InvokeAI/frontend/dist/assets/index.6acd2bd4.js
blessedcoolant 1d34405f4f
[WebUI] Localization Support (#2050)
* Initial Localization Implementation

* Fix Initial Spinner

* Language Picker Dropdown

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Fixed localization breaking themes

* useUpdateTranslation Hook

To force trigger translations for data objects

* Localize Tab Data

* Localize Prompt Input & Current Image Buttons

* Localize Gallery & Bug FIxes

Fix a bug where the delete image from the context menu wasn't working. Removed tooltips that were broken as they don't work in context menu.

* Fix localization breaking in production

* Add Toast Localization Support

* Localize Unified Canvas

* Localize WIP Tabs

* Localize Hotkeys

* Localize Settings

* RU Localization Update

Co-Authored-By: Artur <83028930+netsvetaev@users.noreply.github.com>

* Add Support for Italian and Portuguese

* Localize Toasts

* Fix width of language picker items

* Localize Backend Messages

* Disable Debug Messages

* Add Support for French

* Fix missing localization for a string in the SettingsModal

* Disable French

* Styling updates to normalize text and accommodate other langs

* Add Portuguese Brazilian

* Fix Hotkey headers not being localized.

* Fix styling issue on models tag in Settings

* Fix Slider Styling to accommodate different languages

* Fix slider styling in light mode.

* Add German

* Add Italian

* Add Polish

* Update Italian

* Localized Frontend Build

* Updated RU Translations

* Fresh Build with updated RU changes

* Bug Fixes and Loc Updates

* Updated Frontend Build

* Fresh Build

Co-authored-by: Artur <83028930+netsvetaev@users.noreply.github.com>
2022-12-24 18:23:21 +00:00

626 lines
1.4 MiB

var bZ=Object.defineProperty;var SZ=(e,t,n)=>t in e?bZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var on=(e,t,n)=>(SZ(e,typeof t!="symbol"?t+"":t,n),n);function jRe(){import("data:text/javascript,")}function KI(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k={exports:{}},Jt={};/**
* @license React
* react.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 C2=Symbol.for("react.element"),xZ=Symbol.for("react.portal"),wZ=Symbol.for("react.fragment"),CZ=Symbol.for("react.strict_mode"),_Z=Symbol.for("react.profiler"),kZ=Symbol.for("react.provider"),EZ=Symbol.for("react.context"),PZ=Symbol.for("react.forward_ref"),TZ=Symbol.for("react.suspense"),LZ=Symbol.for("react.memo"),AZ=Symbol.for("react.lazy"),DP=Symbol.iterator;function OZ(e){return e===null||typeof e!="object"?null:(e=DP&&e[DP]||e["@@iterator"],typeof e=="function"?e:null)}var XI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ZI=Object.assign,QI={};function R1(e,t,n){this.props=e,this.context=t,this.refs=QI,this.updater=n||XI}R1.prototype.isReactComponent={};R1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};R1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function JI(){}JI.prototype=R1.prototype;function K9(e,t,n){this.props=e,this.context=t,this.refs=QI,this.updater=n||XI}var X9=K9.prototype=new JI;X9.constructor=K9;ZI(X9,R1.prototype);X9.isPureReactComponent=!0;var NP=Array.isArray,eD=Object.prototype.hasOwnProperty,Z9={current:null},tD={key:!0,ref:!0,__self:!0,__source:!0};function nD(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)eD.call(t,r)&&!tD.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:C2,type:e,key:o,ref:a,props:i,_owner:Z9.current}}function RZ(e,t){return{$$typeof:C2,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Q9(e){return typeof e=="object"&&e!==null&&e.$$typeof===C2}function MZ(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var BP=/\/+/g;function Ux(e,t){return typeof e=="object"&&e!==null&&e.key!=null?MZ(""+e.key):t.toString(36)}function r4(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case C2:case xZ:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+Ux(a,0):r,NP(i)?(n="",e!=null&&(n=e.replace(BP,"$&/")+"/"),r4(i,t,n,"",function(u){return u})):i!=null&&(Q9(i)&&(i=RZ(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(BP,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",NP(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+Ux(o,s);a+=r4(o,t,n,l,i)}else if(l=OZ(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+Ux(o,s++),a+=r4(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Vy(e,t,n){if(e==null)return e;var r=[],i=0;return r4(e,r,"","",function(o){return t.call(n,o,i++)}),r}function IZ(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var vo={current:null},i4={transition:null},DZ={ReactCurrentDispatcher:vo,ReactCurrentBatchConfig:i4,ReactCurrentOwner:Z9};Jt.Children={map:Vy,forEach:function(e,t,n){Vy(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vy(e,function(){t++}),t},toArray:function(e){return Vy(e,function(t){return t})||[]},only:function(e){if(!Q9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Jt.Component=R1;Jt.Fragment=wZ;Jt.Profiler=_Z;Jt.PureComponent=K9;Jt.StrictMode=CZ;Jt.Suspense=TZ;Jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DZ;Jt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ZI({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=Z9.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)eD.call(t,l)&&!tD.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)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:C2,type:e.type,key:i,ref:o,props:r,_owner:a}};Jt.createContext=function(e){return e={$$typeof:EZ,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:kZ,_context:e},e.Consumer=e};Jt.createElement=nD;Jt.createFactory=function(e){var t=nD.bind(null,e);return t.type=e,t};Jt.createRef=function(){return{current:null}};Jt.forwardRef=function(e){return{$$typeof:PZ,render:e}};Jt.isValidElement=Q9;Jt.lazy=function(e){return{$$typeof:AZ,_payload:{_status:-1,_result:e},_init:IZ}};Jt.memo=function(e,t){return{$$typeof:LZ,type:e,compare:t===void 0?null:t}};Jt.startTransition=function(e){var t=i4.transition;i4.transition={};try{e()}finally{i4.transition=t}};Jt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Jt.useCallback=function(e,t){return vo.current.useCallback(e,t)};Jt.useContext=function(e){return vo.current.useContext(e)};Jt.useDebugValue=function(){};Jt.useDeferredValue=function(e){return vo.current.useDeferredValue(e)};Jt.useEffect=function(e,t){return vo.current.useEffect(e,t)};Jt.useId=function(){return vo.current.useId()};Jt.useImperativeHandle=function(e,t,n){return vo.current.useImperativeHandle(e,t,n)};Jt.useInsertionEffect=function(e,t){return vo.current.useInsertionEffect(e,t)};Jt.useLayoutEffect=function(e,t){return vo.current.useLayoutEffect(e,t)};Jt.useMemo=function(e,t){return vo.current.useMemo(e,t)};Jt.useReducer=function(e,t,n){return vo.current.useReducer(e,t,n)};Jt.useRef=function(e){return vo.current.useRef(e)};Jt.useState=function(e){return vo.current.useState(e)};Jt.useSyncExternalStore=function(e,t,n){return vo.current.useSyncExternalStore(e,t,n)};Jt.useTransition=function(){return vo.current.useTransition()};Jt.version="18.2.0";(function(e){e.exports=Jt})(k);const oe=Y9(k.exports),U6=KI({__proto__:null,default:oe},[k.exports]);var j6={},Zl={exports:{}},Ca={},N0={exports:{}},rD={};/**
* @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(U,Q){var ue=U.length;U.push(Q);e:for(;0<ue;){var fe=ue-1>>>1,Te=U[fe];if(0<i(Te,Q))U[fe]=Q,U[ue]=Te,ue=fe;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var Q=U[0],ue=U.pop();if(ue!==Q){U[0]=ue;e:for(var fe=0,Te=U.length,Oe=Te>>>1;fe<Oe;){var ve=2*(fe+1)-1,Ce=U[ve],Re=ve+1,Ye=U[Re];if(0>i(Ce,ue))Re<Te&&0>i(Ye,Ce)?(U[fe]=Ye,U[Re]=ue,fe=Re):(U[fe]=Ce,U[ve]=ue,fe=ve);else if(Re<Te&&0>i(Ye,ue))U[fe]=Ye,U[Re]=ue,fe=Re;else break e}}return Q}function i(U,Q){var ue=U.sortIndex-Q.sortIndex;return ue!==0?ue:U.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],f=1,p=null,m=3,v=!1,y=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(U){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=U)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function A(U){if(x=!1,T(U),!y)if(n(l)!==null)y=!0,K(M);else{var Q=n(u);Q!==null&&Z(A,Q.startTime-U)}}function M(U,Q){y=!1,x&&(x=!1,_(B),B=-1),v=!0;var ue=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||U&&!Y());){var fe=p.callback;if(typeof fe=="function"){p.callback=null,m=p.priorityLevel;var Te=fe(p.expirationTime<=Q);Q=e.unstable_now(),typeof Te=="function"?p.callback=Te:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Oe=!0;else{var ve=n(u);ve!==null&&Z(A,ve.startTime-Q),Oe=!1}return Oe}finally{p=null,m=ue,v=!1}}var I=!1,D=null,B=-1,F=5,H=-1;function Y(){return!(e.unstable_now()-H<F)}function te(){if(D!==null){var U=e.unstable_now();H=U;var Q=!0;try{Q=D(!0,U)}finally{Q?G():(I=!1,D=null)}}else I=!1}var G;if(typeof C=="function")G=function(){C(te)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,W=z.port2;z.port1.onmessage=te,G=function(){W.postMessage(null)}}else G=function(){E(te,0)};function K(U){D=U,I||(I=!0,G())}function Z(U,Q){B=E(function(){U(e.unstable_now())},Q)}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(U){U.callback=null},e.unstable_continueExecution=function(){y||v||(y=!0,K(M))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(U){switch(m){case 1:case 2:case 3:var Q=3;break;default:Q=m}var ue=m;m=Q;try{return U()}finally{m=ue}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,Q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ue=m;m=U;try{return Q()}finally{m=ue}},e.unstable_scheduleCallback=function(U,Q,ue){var fe=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?fe+ue:fe):ue=fe,U){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=ue+Te,U={id:f++,callback:Q,priorityLevel:U,startTime:ue,expirationTime:Te,sortIndex:-1},ue>fe?(U.sortIndex=ue,t(u,U),n(l)===null&&U===n(u)&&(x?(_(B),B=-1):x=!0,Z(A,ue-fe))):(U.sortIndex=Te,t(l,U),y||v||(y=!0,K(M))),U},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(U){var Q=m;return function(){var ue=m;m=Q;try{return U.apply(this,arguments)}finally{m=ue}}}})(rD);(function(e){e.exports=rD})(N0);/**
* @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 iD=k.exports,Sa=N0.exports;function Ne(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 oD=new Set,Lv={};function Nh(e,t){c1(e,t),c1(e+"Capture",t)}function c1(e,t){for(Lv[e]=t,e=0;e<t.length;e++)oD.add(t[e])}var zu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),G6=Object.prototype.hasOwnProperty,NZ=/^[: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]*$/,zP={},$P={};function BZ(e){return G6.call($P,e)?!0:G6.call(zP,e)?!1:NZ.test(e)?$P[e]=!0:(zP[e]=!0,!1)}function zZ(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $Z(e,t,n,r){if(t===null||typeof t>"u"||zZ(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yo(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Bi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Bi[e]=new yo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Bi[t]=new yo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Bi[e]=new yo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Bi[e]=new yo(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){Bi[e]=new yo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Bi[e]=new yo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Bi[e]=new yo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Bi[e]=new yo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Bi[e]=new yo(e,5,!1,e.toLowerCase(),null,!1,!1)});var J9=/[\-:]([a-z])/g;function e8(e){return e[1].toUpperCase()}"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(J9,e8);Bi[t]=new yo(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(J9,e8);Bi[t]=new yo(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(J9,e8);Bi[t]=new yo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Bi[e]=new yo(e,1,!1,e.toLowerCase(),null,!1,!1)});Bi.xlinkHref=new yo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Bi[e]=new yo(e,1,!1,e.toLowerCase(),null,!0,!0)});function t8(e,t,n,r){var i=Bi.hasOwnProperty(t)?Bi[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($Z(t,n,i,r)&&(n=null),r||i===null?BZ(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zu=iD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wy=Symbol.for("react.element"),g0=Symbol.for("react.portal"),m0=Symbol.for("react.fragment"),n8=Symbol.for("react.strict_mode"),q6=Symbol.for("react.profiler"),aD=Symbol.for("react.provider"),sD=Symbol.for("react.context"),r8=Symbol.for("react.forward_ref"),Y6=Symbol.for("react.suspense"),K6=Symbol.for("react.suspense_list"),i8=Symbol.for("react.memo"),ed=Symbol.for("react.lazy"),lD=Symbol.for("react.offscreen"),FP=Symbol.iterator;function om(e){return e===null||typeof e!="object"?null:(e=FP&&e[FP]||e["@@iterator"],typeof e=="function"?e:null)}var vr=Object.assign,jx;function Im(e){if(jx===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jx=t&&t[1]||""}return`
`+jx+e}var Gx=!1;function qx(e,t){if(!e||Gx)return"";Gx=!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()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
`+i[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{Gx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Im(e):""}function FZ(e){switch(e.tag){case 5:return Im(e.type);case 16:return Im("Lazy");case 13:return Im("Suspense");case 19:return Im("SuspenseList");case 0:case 2:case 15:return e=qx(e.type,!1),e;case 11:return e=qx(e.type.render,!1),e;case 1:return e=qx(e.type,!0),e;default:return""}}function X6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case m0:return"Fragment";case g0:return"Portal";case q6:return"Profiler";case n8:return"StrictMode";case Y6:return"Suspense";case K6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sD:return(e.displayName||"Context")+".Consumer";case aD:return(e._context.displayName||"Context")+".Provider";case r8:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case i8:return t=e.displayName||null,t!==null?t:X6(e.type)||"Memo";case ed:t=e._payload,e=e._init;try{return X6(e(t))}catch(n){}}return null}function HZ(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=t.render,e=e.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 X6(t);case 8:return t===n8?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ld(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function VZ(e){var t=uD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Uy(e){e._valueTracker||(e._valueTracker=VZ(e))}function cD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=uD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function G4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z6(e,t){var n=t.checked;return vr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function HP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ld(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dD(e,t){t=t.checked,t!=null&&t8(e,"checked",t,!1)}function Q6(e,t){dD(e,t);var n=Ld(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?J6(e,t.type,n):t.hasOwnProperty("defaultValue")&&J6(e,t.type,Ld(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function VP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function J6(e,t,n){(t!=="number"||G4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dm=Array.isArray;function B0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ld(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function eC(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ne(91));return vr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function WP(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ne(92));if(Dm(n)){if(1<n.length)throw Error(Ne(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ld(n)}}function fD(e,t){var n=Ld(t.value),r=Ld(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function UP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hD(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 tC(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hD(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var jy,pD=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(jy=jy||document.createElement("div"),jy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=jy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Av(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jm={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},WZ=["Webkit","ms","Moz","O"];Object.keys(Jm).forEach(function(e){WZ.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jm[t]=Jm[e]})});function gD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jm.hasOwnProperty(e)&&Jm[e]?(""+t).trim():t+"px"}function mD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=gD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var UZ=vr({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 nC(e,t){if(t){if(UZ[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function rC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 iC=null;function o8(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oC=null,z0=null,$0=null;function jP(e){if(e=E2(e)){if(typeof oC!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=xb(t),oC(e.stateNode,e.type,t))}}function vD(e){z0?$0?$0.push(e):$0=[e]:z0=e}function yD(){if(z0){var e=z0,t=$0;if($0=z0=null,jP(e),t)for(e=0;e<t.length;e++)jP(t[e])}}function bD(e,t){return e(t)}function SD(){}var Yx=!1;function xD(e,t,n){if(Yx)return e(t,n);Yx=!0;try{return bD(e,t,n)}finally{Yx=!1,(z0!==null||$0!==null)&&(SD(),yD())}}function Ov(e,t){var n=e.stateNode;if(n===null)return null;var r=xb(n);if(r===null)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)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ne(231,t,typeof n));return n}var aC=!1;if(zu)try{var am={};Object.defineProperty(am,"passive",{get:function(){aC=!0}}),window.addEventListener("test",am,am),window.removeEventListener("test",am,am)}catch(e){aC=!1}function jZ(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var ev=!1,q4=null,Y4=!1,sC=null,GZ={onError:function(e){ev=!0,q4=e}};function qZ(e,t,n,r,i,o,a,s,l){ev=!1,q4=null,jZ.apply(GZ,arguments)}function YZ(e,t,n,r,i,o,a,s,l){if(qZ.apply(this,arguments),ev){if(ev){var u=q4;ev=!1,q4=null}else throw Error(Ne(198));Y4||(Y4=!0,sC=u)}}function Bh(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function wD(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function GP(e){if(Bh(e)!==e)throw Error(Ne(188))}function KZ(e){var t=e.alternate;if(!t){if(t=Bh(e),t===null)throw Error(Ne(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return GP(i),e;if(o===r)return GP(i),t;o=o.sibling}throw Error(Ne(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,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){for(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)throw Error(Ne(189))}}if(n.alternate!==r)throw Error(Ne(190))}if(n.tag!==3)throw Error(Ne(188));return n.stateNode.current===n?e:t}function CD(e){return e=KZ(e),e!==null?_D(e):null}function _D(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_D(e);if(t!==null)return t;e=e.sibling}return null}var kD=Sa.unstable_scheduleCallback,qP=Sa.unstable_cancelCallback,XZ=Sa.unstable_shouldYield,ZZ=Sa.unstable_requestPaint,Fr=Sa.unstable_now,QZ=Sa.unstable_getCurrentPriorityLevel,a8=Sa.unstable_ImmediatePriority,ED=Sa.unstable_UserBlockingPriority,K4=Sa.unstable_NormalPriority,JZ=Sa.unstable_LowPriority,PD=Sa.unstable_IdlePriority,vb=null,Dl=null;function eQ(e){if(Dl&&typeof Dl.onCommitFiberRoot=="function")try{Dl.onCommitFiberRoot(vb,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Os=Math.clz32?Math.clz32:rQ,tQ=Math.log,nQ=Math.LN2;function rQ(e){return e>>>=0,e===0?32:31-(tQ(e)/nQ|0)|0}var Gy=64,qy=4194304;function Nm(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function X4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Nm(s):(o&=a,o!==0&&(r=Nm(o)))}else a=n&~i,a!==0?r=Nm(a):o!==0&&(r=Nm(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Os(t),i=1<<n,r|=e[n],t&=~i;return r}function iQ(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;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oQ(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Os(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=iQ(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function lC(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function TD(){var e=Gy;return Gy<<=1,(Gy&4194240)===0&&(Gy=64),e}function Kx(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _2(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Os(t),e[t]=n}function aQ(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 i=31-Os(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function s8(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Os(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Mn=0;function LD(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var AD,l8,OD,RD,MD,uC=!1,Yy=[],md=null,vd=null,yd=null,Rv=new Map,Mv=new Map,rd=[],sQ="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 YP(e,t){switch(e){case"focusin":case"focusout":md=null;break;case"dragenter":case"dragleave":vd=null;break;case"mouseover":case"mouseout":yd=null;break;case"pointerover":case"pointerout":Rv.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mv.delete(t.pointerId)}}function sm(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=E2(t),t!==null&&l8(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function lQ(e,t,n,r,i){switch(t){case"focusin":return md=sm(md,e,t,n,r,i),!0;case"dragenter":return vd=sm(vd,e,t,n,r,i),!0;case"mouseover":return yd=sm(yd,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Rv.set(o,sm(Rv.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Mv.set(o,sm(Mv.get(o)||null,e,t,n,r,i)),!0}return!1}function ID(e){var t=ih(e.target);if(t!==null){var n=Bh(t);if(n!==null){if(t=n.tag,t===13){if(t=wD(n),t!==null){e.blockedOn=t,MD(e.priority,function(){OD(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function o4(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=cC(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);iC=r,n.target.dispatchEvent(r),iC=null}else return t=E2(n),t!==null&&l8(t),e.blockedOn=n,!1;t.shift()}return!0}function KP(e,t,n){o4(e)&&n.delete(t)}function uQ(){uC=!1,md!==null&&o4(md)&&(md=null),vd!==null&&o4(vd)&&(vd=null),yd!==null&&o4(yd)&&(yd=null),Rv.forEach(KP),Mv.forEach(KP)}function lm(e,t){e.blockedOn===t&&(e.blockedOn=null,uC||(uC=!0,Sa.unstable_scheduleCallback(Sa.unstable_NormalPriority,uQ)))}function Iv(e){function t(i){return lm(i,e)}if(0<Yy.length){lm(Yy[0],e);for(var n=1;n<Yy.length;n++){var r=Yy[n];r.blockedOn===e&&(r.blockedOn=null)}}for(md!==null&&lm(md,e),vd!==null&&lm(vd,e),yd!==null&&lm(yd,e),Rv.forEach(t),Mv.forEach(t),n=0;n<rd.length;n++)r=rd[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<rd.length&&(n=rd[0],n.blockedOn===null);)ID(n),n.blockedOn===null&&rd.shift()}var F0=Zu.ReactCurrentBatchConfig,Z4=!0;function cQ(e,t,n,r){var i=Mn,o=F0.transition;F0.transition=null;try{Mn=1,u8(e,t,n,r)}finally{Mn=i,F0.transition=o}}function dQ(e,t,n,r){var i=Mn,o=F0.transition;F0.transition=null;try{Mn=4,u8(e,t,n,r)}finally{Mn=i,F0.transition=o}}function u8(e,t,n,r){if(Z4){var i=cC(e,t,n,r);if(i===null)ow(e,t,r,Q4,n),YP(e,r);else if(lQ(i,e,t,n,r))r.stopPropagation();else if(YP(e,r),t&4&&-1<sQ.indexOf(e)){for(;i!==null;){var o=E2(i);if(o!==null&&AD(o),o=cC(e,t,n,r),o===null&&ow(e,t,r,Q4,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ow(e,t,r,null,n)}}var Q4=null;function cC(e,t,n,r){if(Q4=null,e=o8(r),e=ih(e),e!==null)if(t=Bh(e),t===null)e=null;else if(n=t.tag,n===13){if(e=wD(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Q4=e,null}function DD(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(QZ()){case a8:return 1;case ED:return 4;case K4:case JZ:return 16;case PD:return 536870912;default:return 16}default:return 16}}var ld=null,c8=null,a4=null;function ND(){if(a4)return a4;var e,t=c8,n=t.length,r,i="value"in ld?ld.value:ld.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return a4=i.slice(e,1<r?1-r:void 0)}function s4(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ky(){return!0}function XP(){return!1}function _a(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ky:XP,this.isPropagationStopped=XP,this}return vr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ky)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ky)},persist:function(){},isPersistent:Ky}),t}var M1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},d8=_a(M1),k2=vr({},M1,{view:0,detail:0}),fQ=_a(k2),Xx,Zx,um,yb=vr({},k2,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:f8,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==um&&(um&&e.type==="mousemove"?(Xx=e.screenX-um.screenX,Zx=e.screenY-um.screenY):Zx=Xx=0,um=e),Xx)},movementY:function(e){return"movementY"in e?e.movementY:Zx}}),ZP=_a(yb),hQ=vr({},yb,{dataTransfer:0}),pQ=_a(hQ),gQ=vr({},k2,{relatedTarget:0}),Qx=_a(gQ),mQ=vr({},M1,{animationName:0,elapsedTime:0,pseudoElement:0}),vQ=_a(mQ),yQ=vr({},M1,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bQ=_a(yQ),SQ=vr({},M1,{data:0}),QP=_a(SQ),xQ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wQ={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"},CQ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _Q(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=CQ[e])?!!t[e]:!1}function f8(){return _Q}var kQ=vr({},k2,{key:function(e){if(e.key){var t=xQ[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=s4(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wQ[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:f8,charCode:function(e){return e.type==="keypress"?s4(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?s4(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),EQ=_a(kQ),PQ=vr({},yb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JP=_a(PQ),TQ=vr({},k2,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:f8}),LQ=_a(TQ),AQ=vr({},M1,{propertyName:0,elapsedTime:0,pseudoElement:0}),OQ=_a(AQ),RQ=vr({},yb,{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}),MQ=_a(RQ),IQ=[9,13,27,32],h8=zu&&"CompositionEvent"in window,tv=null;zu&&"documentMode"in document&&(tv=document.documentMode);var DQ=zu&&"TextEvent"in window&&!tv,BD=zu&&(!h8||tv&&8<tv&&11>=tv),eT=String.fromCharCode(32),tT=!1;function zD(e,t){switch(e){case"keyup":return IQ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $D(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var v0=!1;function NQ(e,t){switch(e){case"compositionend":return $D(t);case"keypress":return t.which!==32?null:(tT=!0,eT);case"textInput":return e=t.data,e===eT&&tT?null:e;default:return null}}function BQ(e,t){if(v0)return e==="compositionend"||!h8&&zD(e,t)?(e=ND(),a4=c8=ld=null,v0=!1,e):null;switch(e){case"paste":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 BD&&t.locale!=="ko"?null:t.data;default:return null}}var zQ={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 nT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zQ[e.type]:t==="textarea"}function FD(e,t,n,r){vD(r),t=J4(t,"onChange"),0<t.length&&(n=new d8("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var nv=null,Dv=null;function $Q(e){ZD(e,0)}function bb(e){var t=S0(e);if(cD(t))return e}function FQ(e,t){if(e==="change")return t}var HD=!1;if(zu){var Jx;if(zu){var ew="oninput"in document;if(!ew){var rT=document.createElement("div");rT.setAttribute("oninput","return;"),ew=typeof rT.oninput=="function"}Jx=ew}else Jx=!1;HD=Jx&&(!document.documentMode||9<document.documentMode)}function iT(){nv&&(nv.detachEvent("onpropertychange",VD),Dv=nv=null)}function VD(e){if(e.propertyName==="value"&&bb(Dv)){var t=[];FD(t,Dv,e,o8(e)),xD($Q,t)}}function HQ(e,t,n){e==="focusin"?(iT(),nv=t,Dv=n,nv.attachEvent("onpropertychange",VD)):e==="focusout"&&iT()}function VQ(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bb(Dv)}function WQ(e,t){if(e==="click")return bb(t)}function UQ(e,t){if(e==="input"||e==="change")return bb(t)}function jQ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $s=typeof Object.is=="function"?Object.is:jQ;function Nv(e,t){if($s(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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 i=n[r];if(!G6.call(t,i)||!$s(e[i],t[i]))return!1}return!0}function oT(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function aT(e,t){var n=oT(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=oT(n)}}function WD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function UD(){for(var e=window,t=G4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=G4(e.document)}return t}function p8(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function GQ(e){var t=UD(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&WD(n.ownerDocument.documentElement,n)){if(r!==null&&p8(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=aT(n,o);var a=aT(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var qQ=zu&&"documentMode"in document&&11>=document.documentMode,y0=null,dC=null,rv=null,fC=!1;function sT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fC||y0==null||y0!==G4(r)||(r=y0,"selectionStart"in r&&p8(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rv&&Nv(rv,r)||(rv=r,r=J4(dC,"onSelect"),0<r.length&&(t=new d8("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=y0)))}function Xy(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var b0={animationend:Xy("Animation","AnimationEnd"),animationiteration:Xy("Animation","AnimationIteration"),animationstart:Xy("Animation","AnimationStart"),transitionend:Xy("Transition","TransitionEnd")},tw={},jD={};zu&&(jD=document.createElement("div").style,"AnimationEvent"in window||(delete b0.animationend.animation,delete b0.animationiteration.animation,delete b0.animationstart.animation),"TransitionEvent"in window||delete b0.transitionend.transition);function Sb(e){if(tw[e])return tw[e];if(!b0[e])return e;var t=b0[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jD)return tw[e]=t[n];return e}var GD=Sb("animationend"),qD=Sb("animationiteration"),YD=Sb("animationstart"),KD=Sb("transitionend"),XD=new Map,lT="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 zd(e,t){XD.set(e,t),Nh(t,[e])}for(var nw=0;nw<lT.length;nw++){var rw=lT[nw],YQ=rw.toLowerCase(),KQ=rw[0].toUpperCase()+rw.slice(1);zd(YQ,"on"+KQ)}zd(GD,"onAnimationEnd");zd(qD,"onAnimationIteration");zd(YD,"onAnimationStart");zd("dblclick","onDoubleClick");zd("focusin","onFocus");zd("focusout","onBlur");zd(KD,"onTransitionEnd");c1("onMouseEnter",["mouseout","mouseover"]);c1("onMouseLeave",["mouseout","mouseover"]);c1("onPointerEnter",["pointerout","pointerover"]);c1("onPointerLeave",["pointerout","pointerover"]);Nh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nh("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bm="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(" "),XQ=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bm));function uT(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,YZ(r,t,void 0,e),e.currentTarget=null}function ZD(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=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!==o&&i.isPropagationStopped())break e;uT(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;uT(i,s,u),o=l}}}if(Y4)throw e=sC,Y4=!1,sC=null,e}function Jn(e,t){var n=t[vC];n===void 0&&(n=t[vC]=new Set);var r=e+"__bubble";n.has(r)||(QD(t,e,2,!1),n.add(r))}function iw(e,t,n){var r=0;t&&(r|=4),QD(n,e,r,t)}var Zy="_reactListening"+Math.random().toString(36).slice(2);function Bv(e){if(!e[Zy]){e[Zy]=!0,oD.forEach(function(n){n!=="selectionchange"&&(XQ.has(n)||iw(n,!1,e),iw(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zy]||(t[Zy]=!0,iw("selectionchange",!1,t))}}function QD(e,t,n,r){switch(DD(t)){case 1:var i=cQ;break;case 4:i=dQ;break;default:i=u8}n=i.bind(null,t,n,e),i=void 0,!aC||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ow(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=ih(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}xD(function(){var u=o,f=o8(n),p=[];e:{var m=XD.get(e);if(m!==void 0){var v=d8,y=e;switch(e){case"keypress":if(s4(n)===0)break e;case"keydown":case"keyup":v=EQ;break;case"focusin":y="focus",v=Qx;break;case"focusout":y="blur",v=Qx;break;case"beforeblur":case"afterblur":v=Qx;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=ZP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=pQ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=LQ;break;case GD:case qD:case YD:v=vQ;break;case KD:v=OQ;break;case"scroll":v=fQ;break;case"wheel":v=MQ;break;case"copy":case"cut":case"paste":v=bQ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=JP}var x=(t&4)!==0,E=!x&&e==="scroll",_=x?m!==null?m+"Capture":null:m;x=[];for(var C=u,T;C!==null;){T=C;var A=T.stateNode;if(T.tag===5&&A!==null&&(T=A,_!==null&&(A=Ov(C,_),A!=null&&x.push(zv(C,A,T)))),E)break;C=C.return}0<x.length&&(m=new v(m,y,null,n,f),p.push({event:m,listeners:x}))}}if((t&7)===0){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==iC&&(y=n.relatedTarget||n.fromElement)&&(ih(y)||y[$u]))break e;if((v||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,v?(y=n.relatedTarget||n.toElement,v=u,y=y?ih(y):null,y!==null&&(E=Bh(y),y!==E||y.tag!==5&&y.tag!==6)&&(y=null)):(v=null,y=u),v!==y)){if(x=ZP,A="onMouseLeave",_="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(x=JP,A="onPointerLeave",_="onPointerEnter",C="pointer"),E=v==null?m:S0(v),T=y==null?m:S0(y),m=new x(A,C+"leave",v,n,f),m.target=E,m.relatedTarget=T,A=null,ih(f)===u&&(x=new x(_,C+"enter",y,n,f),x.target=T,x.relatedTarget=E,A=x),E=A,v&&y)t:{for(x=v,_=y,C=0,T=x;T;T=Kp(T))C++;for(T=0,A=_;A;A=Kp(A))T++;for(;0<C-T;)x=Kp(x),C--;for(;0<T-C;)_=Kp(_),T--;for(;C--;){if(x===_||_!==null&&x===_.alternate)break t;x=Kp(x),_=Kp(_)}x=null}else x=null;v!==null&&cT(p,m,v,x,!1),y!==null&&E!==null&&cT(p,E,y,x,!0)}}e:{if(m=u?S0(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var M=FQ;else if(nT(m))if(HD)M=UQ;else{M=VQ;var I=HQ}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(M=WQ);if(M&&(M=M(e,u))){FD(p,M,n,f);break e}I&&I(e,m,u),e==="focusout"&&(I=m._wrapperState)&&I.controlled&&m.type==="number"&&J6(m,"number",m.value)}switch(I=u?S0(u):window,e){case"focusin":(nT(I)||I.contentEditable==="true")&&(y0=I,dC=u,rv=null);break;case"focusout":rv=dC=y0=null;break;case"mousedown":fC=!0;break;case"contextmenu":case"mouseup":case"dragend":fC=!1,sT(p,n,f);break;case"selectionchange":if(qQ)break;case"keydown":case"keyup":sT(p,n,f)}var D;if(h8)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 v0?zD(e,n)&&(B="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(B="onCompositionStart");B&&(BD&&n.locale!=="ko"&&(v0||B!=="onCompositionStart"?B==="onCompositionEnd"&&v0&&(D=ND()):(ld=f,c8="value"in ld?ld.value:ld.textContent,v0=!0)),I=J4(u,B),0<I.length&&(B=new QP(B,e,null,n,f),p.push({event:B,listeners:I}),D?B.data=D:(D=$D(n),D!==null&&(B.data=D)))),(D=DQ?NQ(e,n):BQ(e,n))&&(u=J4(u,"onBeforeInput"),0<u.length&&(f=new QP("onBeforeInput","beforeinput",null,n,f),p.push({event:f,listeners:u}),f.data=D))}ZD(p,t)})}function zv(e,t,n){return{instance:e,listener:t,currentTarget:n}}function J4(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Ov(e,n),o!=null&&r.unshift(zv(e,o,i)),o=Ov(e,t),o!=null&&r.push(zv(e,o,i))),e=e.return}return r}function Kp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function cT(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=Ov(n,o),l!=null&&a.unshift(zv(n,l,s))):i||(l=Ov(n,o),l!=null&&a.push(zv(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var ZQ=/\r\n?/g,QQ=/\u0000|\uFFFD/g;function dT(e){return(typeof e=="string"?e:""+e).replace(ZQ,`
`).replace(QQ,"")}function Qy(e,t,n){if(t=dT(t),dT(e)!==t&&n)throw Error(Ne(425))}function e5(){}var hC=null,pC=null;function gC(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mC=typeof setTimeout=="function"?setTimeout:void 0,JQ=typeof clearTimeout=="function"?clearTimeout:void 0,fT=typeof Promise=="function"?Promise:void 0,eJ=typeof queueMicrotask=="function"?queueMicrotask:typeof fT<"u"?function(e){return fT.resolve(null).then(e).catch(tJ)}:mC;function tJ(e){setTimeout(function(){throw e})}function aw(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Iv(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Iv(t)}function bd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hT(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var I1=Math.random().toString(36).slice(2),Pl="__reactFiber$"+I1,$v="__reactProps$"+I1,$u="__reactContainer$"+I1,vC="__reactEvents$"+I1,nJ="__reactListeners$"+I1,rJ="__reactHandles$"+I1;function ih(e){var t=e[Pl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$u]||n[Pl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hT(e);e!==null;){if(n=e[Pl])return n;e=hT(e)}return t}e=n,n=e.parentNode}return null}function E2(e){return e=e[Pl]||e[$u],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function S0(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ne(33))}function xb(e){return e[$v]||null}var yC=[],x0=-1;function $d(e){return{current:e}}function tr(e){0>x0||(e.current=yC[x0],yC[x0]=null,x0--)}function Zn(e,t){x0++,yC[x0]=e.current,e.current=t}var Ad={},Xi=$d(Ad),Fo=$d(!1),Eh=Ad;function d1(e,t){var n=e.type.contextTypes;if(!n)return Ad;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ho(e){return e=e.childContextTypes,e!=null}function t5(){tr(Fo),tr(Xi)}function pT(e,t,n){if(Xi.current!==Ad)throw Error(Ne(168));Zn(Xi,t),Zn(Fo,n)}function JD(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ne(108,HZ(e)||"Unknown",i));return vr({},n,r)}function n5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ad,Eh=Xi.current,Zn(Xi,e),Zn(Fo,Fo.current),!0}function gT(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=JD(e,t,Eh),r.__reactInternalMemoizedMergedChildContext=e,tr(Fo),tr(Xi),Zn(Xi,e)):tr(Fo),Zn(Fo,n)}var Tu=null,wb=!1,sw=!1;function eN(e){Tu===null?Tu=[e]:Tu.push(e)}function iJ(e){wb=!0,eN(e)}function Fd(){if(!sw&&Tu!==null){sw=!0;var e=0,t=Mn;try{var n=Tu;for(Mn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Tu=null,wb=!1}catch(i){throw Tu!==null&&(Tu=Tu.slice(e+1)),kD(a8,Fd),i}finally{Mn=t,sw=!1}}return null}var w0=[],C0=0,r5=null,i5=0,$a=[],Fa=0,Ph=null,Au=1,Ou="";function Yf(e,t){w0[C0++]=i5,w0[C0++]=r5,r5=e,i5=t}function tN(e,t,n){$a[Fa++]=Au,$a[Fa++]=Ou,$a[Fa++]=Ph,Ph=e;var r=Au;e=Ou;var i=32-Os(r)-1;r&=~(1<<i),n+=1;var o=32-Os(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Au=1<<32-Os(t)+i|n<<i|r,Ou=o+e}else Au=1<<o|n<<i|r,Ou=e}function g8(e){e.return!==null&&(Yf(e,1),tN(e,1,0))}function m8(e){for(;e===r5;)r5=w0[--C0],w0[C0]=null,i5=w0[--C0],w0[C0]=null;for(;e===Ph;)Ph=$a[--Fa],$a[Fa]=null,Ou=$a[--Fa],$a[Fa]=null,Au=$a[--Fa],$a[Fa]=null}var ma=null,ga=null,ar=!1,Ts=null;function nN(e,t){var n=Ua(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mT(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ma=e,ga=bd(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ma=e,ga=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ph!==null?{id:Au,overflow:Ou}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ua(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ma=e,ga=null,!0):!1;default:return!1}}function bC(e){return(e.mode&1)!==0&&(e.flags&128)===0}function SC(e){if(ar){var t=ga;if(t){var n=t;if(!mT(e,t)){if(bC(e))throw Error(Ne(418));t=bd(n.nextSibling);var r=ma;t&&mT(e,t)?nN(r,n):(e.flags=e.flags&-4097|2,ar=!1,ma=e)}}else{if(bC(e))throw Error(Ne(418));e.flags=e.flags&-4097|2,ar=!1,ma=e}}}function vT(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ma=e}function Jy(e){if(e!==ma)return!1;if(!ar)return vT(e),ar=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!gC(e.type,e.memoizedProps)),t&&(t=ga)){if(bC(e))throw rN(),Error(Ne(418));for(;t;)nN(e,t),t=bd(t.nextSibling)}if(vT(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ne(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ga=bd(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ga=null}}else ga=ma?bd(e.stateNode.nextSibling):null;return!0}function rN(){for(var e=ga;e;)e=bd(e.nextSibling)}function f1(){ga=ma=null,ar=!1}function v8(e){Ts===null?Ts=[e]:Ts.push(e)}var oJ=Zu.ReactCurrentBatchConfig;function ks(e,t){if(e&&e.defaultProps){t=vr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var o5=$d(null),a5=null,_0=null,y8=null;function b8(){y8=_0=a5=null}function S8(e){var t=o5.current;tr(o5),e._currentValue=t}function xC(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function H0(e,t){a5=e,y8=_0=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(zo=!0),e.firstContext=null)}function Ka(e){var t=e._currentValue;if(y8!==e)if(e={context:e,memoizedValue:t,next:null},_0===null){if(a5===null)throw Error(Ne(308));_0=e,a5.dependencies={lanes:0,firstContext:e}}else _0=_0.next=e;return t}var oh=null;function x8(e){oh===null?oh=[e]:oh.push(e)}function iN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,x8(t)):(n.next=i.next,i.next=n),t.interleaved=n,Fu(e,r)}function Fu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var td=!1;function w8(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oN(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 Mu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Sd(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(cn&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Fu(e,n)}return i=r.interleaved,i===null?(t.next=t,x8(r)):(t.next=i.next,i.next=t),r.interleaved=t,Fu(e,n)}function l4(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s8(e,n)}}function yT(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function s5(e,t,n,r){var i=e.updateQueue;td=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==a&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(o!==null){var p=i.baseState;a=0,f=u=l=null,s=o;do{var m=s.lane,v=s.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,x=s;switch(m=t,v=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){p=y.call(v,p,m);break e}p=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,m=typeof y=="function"?y.call(v,p,m):y,m==null)break e;p=vr({},p,m);break e;case 2:td=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[s]:m.push(s))}else v={eventTime:v,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=v,l=p):f=f.next=v,a|=m;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);if(f===null&&(l=p),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Lh|=a,e.lanes=a,e.memoizedState=p}}function bT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ne(191,i));i.call(r)}}}var aN=new iD.Component().refs;function wC(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:vr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cb={isMounted:function(e){return(e=e._reactInternals)?Bh(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=go(),i=wd(e),o=Mu(r,i);o.payload=t,n!=null&&(o.callback=n),t=Sd(e,o,i),t!==null&&(Rs(t,e,i,r),l4(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=go(),i=wd(e),o=Mu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Sd(e,o,i),t!==null&&(Rs(t,e,i,r),l4(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=go(),r=wd(e),i=Mu(n,r);i.tag=2,t!=null&&(i.callback=t),t=Sd(e,i,r),t!==null&&(Rs(t,e,r,n),l4(t,e,r))}};function ST(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Nv(n,r)||!Nv(i,o):!0}function sN(e,t,n){var r=!1,i=Ad,o=t.contextType;return typeof o=="object"&&o!==null?o=Ka(o):(i=Ho(t)?Eh:Xi.current,r=t.contextTypes,o=(r=r!=null)?d1(e,i):Ad),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Cb,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xT(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Cb.enqueueReplaceState(t,t.state,null)}function CC(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=aN,w8(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Ka(o):(o=Ho(t)?Eh:Xi.current,i.context=d1(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(wC(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Cb.enqueueReplaceState(i,i.state,null),s5(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function cm(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ne(309));var r=n.stateNode}if(!r)throw Error(Ne(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===aN&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Ne(284));if(!n._owner)throw Error(Ne(290,e))}return e}function e3(e,t){throw e=Object.prototype.toString.call(t),Error(Ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function wT(e){var t=e._init;return t(e._payload)}function lN(e){function t(_,C){if(e){var T=_.deletions;T===null?(_.deletions=[C],_.flags|=16):T.push(C)}}function n(_,C){if(!e)return null;for(;C!==null;)t(_,C),C=C.sibling;return null}function r(_,C){for(_=new Map;C!==null;)C.key!==null?_.set(C.key,C):_.set(C.index,C),C=C.sibling;return _}function i(_,C){return _=Cd(_,C),_.index=0,_.sibling=null,_}function o(_,C,T){return _.index=T,e?(T=_.alternate,T!==null?(T=T.index,T<C?(_.flags|=2,C):T):(_.flags|=2,C)):(_.flags|=1048576,C)}function a(_){return e&&_.alternate===null&&(_.flags|=2),_}function s(_,C,T,A){return C===null||C.tag!==6?(C=pw(T,_.mode,A),C.return=_,C):(C=i(C,T),C.return=_,C)}function l(_,C,T,A){var M=T.type;return M===m0?f(_,C,T.props.children,A,T.key):C!==null&&(C.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ed&&wT(M)===C.type)?(A=i(C,T.props),A.ref=cm(_,C,T),A.return=_,A):(A=p4(T.type,T.key,T.props,null,_.mode,A),A.ref=cm(_,C,T),A.return=_,A)}function u(_,C,T,A){return C===null||C.tag!==4||C.stateNode.containerInfo!==T.containerInfo||C.stateNode.implementation!==T.implementation?(C=gw(T,_.mode,A),C.return=_,C):(C=i(C,T.children||[]),C.return=_,C)}function f(_,C,T,A,M){return C===null||C.tag!==7?(C=mh(T,_.mode,A,M),C.return=_,C):(C=i(C,T),C.return=_,C)}function p(_,C,T){if(typeof C=="string"&&C!==""||typeof C=="number")return C=pw(""+C,_.mode,T),C.return=_,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Wy:return T=p4(C.type,C.key,C.props,null,_.mode,T),T.ref=cm(_,null,C),T.return=_,T;case g0:return C=gw(C,_.mode,T),C.return=_,C;case ed:var A=C._init;return p(_,A(C._payload),T)}if(Dm(C)||om(C))return C=mh(C,_.mode,T,null),C.return=_,C;e3(_,C)}return null}function m(_,C,T,A){var M=C!==null?C.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return M!==null?null:s(_,C,""+T,A);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Wy:return T.key===M?l(_,C,T,A):null;case g0:return T.key===M?u(_,C,T,A):null;case ed:return M=T._init,m(_,C,M(T._payload),A)}if(Dm(T)||om(T))return M!==null?null:f(_,C,T,A,null);e3(_,T)}return null}function v(_,C,T,A,M){if(typeof A=="string"&&A!==""||typeof A=="number")return _=_.get(T)||null,s(C,_,""+A,M);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Wy:return _=_.get(A.key===null?T:A.key)||null,l(C,_,A,M);case g0:return _=_.get(A.key===null?T:A.key)||null,u(C,_,A,M);case ed:var I=A._init;return v(_,C,T,I(A._payload),M)}if(Dm(A)||om(A))return _=_.get(T)||null,f(C,_,A,M,null);e3(C,A)}return null}function y(_,C,T,A){for(var M=null,I=null,D=C,B=C=0,F=null;D!==null&&B<T.length;B++){D.index>B?(F=D,D=null):F=D.sibling;var H=m(_,D,T[B],A);if(H===null){D===null&&(D=F);break}e&&D&&H.alternate===null&&t(_,D),C=o(H,C,B),I===null?M=H:I.sibling=H,I=H,D=F}if(B===T.length)return n(_,D),ar&&Yf(_,B),M;if(D===null){for(;B<T.length;B++)D=p(_,T[B],A),D!==null&&(C=o(D,C,B),I===null?M=D:I.sibling=D,I=D);return ar&&Yf(_,B),M}for(D=r(_,D);B<T.length;B++)F=v(D,_,B,T[B],A),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?B:F.key),C=o(F,C,B),I===null?M=F:I.sibling=F,I=F);return e&&D.forEach(function(Y){return t(_,Y)}),ar&&Yf(_,B),M}function x(_,C,T,A){var M=om(T);if(typeof M!="function")throw Error(Ne(150));if(T=M.call(T),T==null)throw Error(Ne(151));for(var I=M=null,D=C,B=C=0,F=null,H=T.next();D!==null&&!H.done;B++,H=T.next()){D.index>B?(F=D,D=null):F=D.sibling;var Y=m(_,D,H.value,A);if(Y===null){D===null&&(D=F);break}e&&D&&Y.alternate===null&&t(_,D),C=o(Y,C,B),I===null?M=Y:I.sibling=Y,I=Y,D=F}if(H.done)return n(_,D),ar&&Yf(_,B),M;if(D===null){for(;!H.done;B++,H=T.next())H=p(_,H.value,A),H!==null&&(C=o(H,C,B),I===null?M=H:I.sibling=H,I=H);return ar&&Yf(_,B),M}for(D=r(_,D);!H.done;B++,H=T.next())H=v(D,_,B,H.value,A),H!==null&&(e&&H.alternate!==null&&D.delete(H.key===null?B:H.key),C=o(H,C,B),I===null?M=H:I.sibling=H,I=H);return e&&D.forEach(function(te){return t(_,te)}),ar&&Yf(_,B),M}function E(_,C,T,A){if(typeof T=="object"&&T!==null&&T.type===m0&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Wy:e:{for(var M=T.key,I=C;I!==null;){if(I.key===M){if(M=T.type,M===m0){if(I.tag===7){n(_,I.sibling),C=i(I,T.props.children),C.return=_,_=C;break e}}else if(I.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ed&&wT(M)===I.type){n(_,I.sibling),C=i(I,T.props),C.ref=cm(_,I,T),C.return=_,_=C;break e}n(_,I);break}else t(_,I);I=I.sibling}T.type===m0?(C=mh(T.props.children,_.mode,A,T.key),C.return=_,_=C):(A=p4(T.type,T.key,T.props,null,_.mode,A),A.ref=cm(_,C,T),A.return=_,_=A)}return a(_);case g0:e:{for(I=T.key;C!==null;){if(C.key===I)if(C.tag===4&&C.stateNode.containerInfo===T.containerInfo&&C.stateNode.implementation===T.implementation){n(_,C.sibling),C=i(C,T.children||[]),C.return=_,_=C;break e}else{n(_,C);break}else t(_,C);C=C.sibling}C=gw(T,_.mode,A),C.return=_,_=C}return a(_);case ed:return I=T._init,E(_,C,I(T._payload),A)}if(Dm(T))return y(_,C,T,A);if(om(T))return x(_,C,T,A);e3(_,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,C!==null&&C.tag===6?(n(_,C.sibling),C=i(C,T),C.return=_,_=C):(n(_,C),C=pw(T,_.mode,A),C.return=_,_=C),a(_)):n(_,C)}return E}var h1=lN(!0),uN=lN(!1),P2={},Nl=$d(P2),Fv=$d(P2),Hv=$d(P2);function ah(e){if(e===P2)throw Error(Ne(174));return e}function C8(e,t){switch(Zn(Hv,t),Zn(Fv,e),Zn(Nl,P2),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tC(t,e)}tr(Nl),Zn(Nl,t)}function p1(){tr(Nl),tr(Fv),tr(Hv)}function cN(e){ah(Hv.current);var t=ah(Nl.current),n=tC(t,e.type);t!==n&&(Zn(Fv,e),Zn(Nl,n))}function _8(e){Fv.current===e&&(tr(Nl),tr(Fv))}var hr=$d(0);function l5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lw=[];function k8(){for(var e=0;e<lw.length;e++)lw[e]._workInProgressVersionPrimary=null;lw.length=0}var u4=Zu.ReactCurrentDispatcher,uw=Zu.ReactCurrentBatchConfig,Th=0,mr=null,oi=null,Si=null,u5=!1,iv=!1,Vv=0,aJ=0;function Vi(){throw Error(Ne(321))}function E8(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$s(e[n],t[n]))return!1;return!0}function P8(e,t,n,r,i,o){if(Th=o,mr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,u4.current=e===null||e.memoizedState===null?cJ:dJ,e=n(r,i),iv){o=0;do{if(iv=!1,Vv=0,25<=o)throw Error(Ne(301));o+=1,Si=oi=null,t.updateQueue=null,u4.current=fJ,e=n(r,i)}while(iv)}if(u4.current=c5,t=oi!==null&&oi.next!==null,Th=0,Si=oi=mr=null,u5=!1,t)throw Error(Ne(300));return e}function T8(){var e=Vv!==0;return Vv=0,e}function xl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Si===null?mr.memoizedState=Si=e:Si=Si.next=e,Si}function Xa(){if(oi===null){var e=mr.alternate;e=e!==null?e.memoizedState:null}else e=oi.next;var t=Si===null?mr.memoizedState:Si.next;if(t!==null)Si=t,oi=e;else{if(e===null)throw Error(Ne(310));oi=e,e={memoizedState:oi.memoizedState,baseState:oi.baseState,baseQueue:oi.baseQueue,queue:oi.queue,next:null},Si===null?mr.memoizedState=Si=e:Si=Si.next=e}return Si}function Wv(e,t){return typeof t=="function"?t(e):t}function cw(e){var t=Xa(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=oi,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var f=u.lane;if((Th&f)===f)l!==null&&(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 p={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=p,a=r):l=l.next=p,mr.lanes|=f,Lh|=f}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,$s(r,t.memoizedState)||(zo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,mr.lanes|=o,Lh|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function dw(e){var t=Xa(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);$s(o,t.memoizedState)||(zo=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function dN(){}function fN(e,t){var n=mr,r=Xa(),i=t(),o=!$s(r.memoizedState,i);if(o&&(r.memoizedState=i,zo=!0),r=r.queue,L8(gN.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Si!==null&&Si.memoizedState.tag&1){if(n.flags|=2048,Uv(9,pN.bind(null,n,r,i,t),void 0,null),xi===null)throw Error(Ne(349));(Th&30)!==0||hN(n,t,i)}return i}function hN(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mr.updateQueue,t===null?(t={lastEffect:null,stores:null},mr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function pN(e,t,n,r){t.value=n,t.getSnapshot=r,mN(t)&&vN(e)}function gN(e,t,n){return n(function(){mN(t)&&vN(e)})}function mN(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$s(e,n)}catch(r){return!0}}function vN(e){var t=Fu(e,1);t!==null&&Rs(t,e,1,-1)}function CT(e){var t=xl();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wv,lastRenderedState:e},t.queue=e,e=e.dispatch=uJ.bind(null,mr,e),[t.memoizedState,e]}function Uv(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=mr.updateQueue,t===null?(t={lastEffect:null,stores:null},mr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function yN(){return Xa().memoizedState}function c4(e,t,n,r){var i=xl();mr.flags|=e,i.memoizedState=Uv(1|t,n,void 0,r===void 0?null:r)}function _b(e,t,n,r){var i=Xa();r=r===void 0?null:r;var o=void 0;if(oi!==null){var a=oi.memoizedState;if(o=a.destroy,r!==null&&E8(r,a.deps)){i.memoizedState=Uv(t,n,o,r);return}}mr.flags|=e,i.memoizedState=Uv(1|t,n,o,r)}function _T(e,t){return c4(8390656,8,e,t)}function L8(e,t){return _b(2048,8,e,t)}function bN(e,t){return _b(4,2,e,t)}function SN(e,t){return _b(4,4,e,t)}function xN(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wN(e,t,n){return n=n!=null?n.concat([e]):null,_b(4,4,xN.bind(null,t,e),n)}function A8(){}function CN(e,t){var n=Xa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&E8(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _N(e,t){var n=Xa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&E8(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kN(e,t,n){return(Th&21)===0?(e.baseState&&(e.baseState=!1,zo=!0),e.memoizedState=n):($s(n,t)||(n=TD(),mr.lanes|=n,Lh|=n,e.baseState=!0),t)}function sJ(e,t){var n=Mn;Mn=n!==0&&4>n?n:4,e(!0);var r=uw.transition;uw.transition={};try{e(!1),t()}finally{Mn=n,uw.transition=r}}function EN(){return Xa().memoizedState}function lJ(e,t,n){var r=wd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},PN(e))TN(t,n);else if(n=iN(e,t,n,r),n!==null){var i=go();Rs(n,e,r,i),LN(n,t,r)}}function uJ(e,t,n){var r=wd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(PN(e))TN(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,$s(s,a)){var l=t.interleaved;l===null?(i.next=i,x8(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch(u){}finally{}n=iN(e,t,i,r),n!==null&&(i=go(),Rs(n,e,r,i),LN(n,t,r))}}function PN(e){var t=e.alternate;return e===mr||t!==null&&t===mr}function TN(e,t){iv=u5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function LN(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s8(e,n)}}var c5={readContext:Ka,useCallback:Vi,useContext:Vi,useEffect:Vi,useImperativeHandle:Vi,useInsertionEffect:Vi,useLayoutEffect:Vi,useMemo:Vi,useReducer:Vi,useRef:Vi,useState:Vi,useDebugValue:Vi,useDeferredValue:Vi,useTransition:Vi,useMutableSource:Vi,useSyncExternalStore:Vi,useId:Vi,unstable_isNewReconciler:!1},cJ={readContext:Ka,useCallback:function(e,t){return xl().memoizedState=[e,t===void 0?null:t],e},useContext:Ka,useEffect:_T,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,c4(4194308,4,xN.bind(null,t,e),n)},useLayoutEffect:function(e,t){return c4(4194308,4,e,t)},useInsertionEffect:function(e,t){return c4(4,2,e,t)},useMemo:function(e,t){var n=xl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xl();return t=n!==void 0?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=lJ.bind(null,mr,e),[r.memoizedState,e]},useRef:function(e){var t=xl();return e={current:e},t.memoizedState=e},useState:CT,useDebugValue:A8,useDeferredValue:function(e){return xl().memoizedState=e},useTransition:function(){var e=CT(!1),t=e[0];return e=sJ.bind(null,e[1]),xl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mr,i=xl();if(ar){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),xi===null)throw Error(Ne(349));(Th&30)!==0||hN(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,_T(gN.bind(null,r,o,e),[e]),r.flags|=2048,Uv(9,pN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=xl(),t=xi.identifierPrefix;if(ar){var n=Ou,r=Au;n=(r&~(1<<32-Os(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vv++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=aJ++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dJ={readContext:Ka,useCallback:CN,useContext:Ka,useEffect:L8,useImperativeHandle:wN,useInsertionEffect:bN,useLayoutEffect:SN,useMemo:_N,useReducer:cw,useRef:yN,useState:function(){return cw(Wv)},useDebugValue:A8,useDeferredValue:function(e){var t=Xa();return kN(t,oi.memoizedState,e)},useTransition:function(){var e=cw(Wv)[0],t=Xa().memoizedState;return[e,t]},useMutableSource:dN,useSyncExternalStore:fN,useId:EN,unstable_isNewReconciler:!1},fJ={readContext:Ka,useCallback:CN,useContext:Ka,useEffect:L8,useImperativeHandle:wN,useInsertionEffect:bN,useLayoutEffect:SN,useMemo:_N,useReducer:dw,useRef:yN,useState:function(){return dw(Wv)},useDebugValue:A8,useDeferredValue:function(e){var t=Xa();return oi===null?t.memoizedState=e:kN(t,oi.memoizedState,e)},useTransition:function(){var e=dw(Wv)[0],t=Xa().memoizedState;return[e,t]},useMutableSource:dN,useSyncExternalStore:fN,useId:EN,unstable_isNewReconciler:!1};function g1(e,t){try{var n="",r=t;do n+=FZ(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function fw(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function _C(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hJ=typeof WeakMap=="function"?WeakMap:Map;function AN(e,t,n){n=Mu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){f5||(f5=!0,IC=r),_C(e,t)},n}function ON(e,t,n){n=Mu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){_C(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){_C(e,t),typeof r!="function"&&(xd===null?xd=new Set([this]):xd.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function kT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hJ;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=PJ.bind(null,e,t,n),t.then(e,e))}function ET(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function PT(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Mu(-1,1),t.tag=2,Sd(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var pJ=Zu.ReactCurrentOwner,zo=!1;function uo(e,t,n,r){t.child=e===null?uN(t,null,n,r):h1(t,e.child,n,r)}function TT(e,t,n,r,i){n=n.render;var o=t.ref;return H0(t,i),r=P8(e,t,n,r,o,i),n=T8(),e!==null&&!zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i)):(ar&&n&&g8(t),t.flags|=1,uo(e,t,r,i),t.child)}function LT(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!z8(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,RN(e,t,o,r,i)):(e=p4(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Nv,n(a,r)&&e.ref===t.ref)return Hu(e,t,i)}return t.flags|=1,e=Cd(o,r),e.ref=t.ref,e.return=t,t.child=e}function RN(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Nv(o,r)&&e.ref===t.ref)if(zo=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(zo=!0);else return t.lanes=e.lanes,Hu(e,t,i)}return kC(e,t,n,r,i)}function MN(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zn(E0,ha),ha|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Zn(E0,ha),ha|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Zn(E0,ha),ha|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Zn(E0,ha),ha|=r;return uo(e,t,i,n),t.child}function IN(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function kC(e,t,n,r,i){var o=Ho(n)?Eh:Xi.current;return o=d1(t,o),H0(t,i),n=P8(e,t,n,r,o,i),r=T8(),e!==null&&!zo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hu(e,t,i)):(ar&&r&&g8(t),t.flags|=1,uo(e,t,n,i),t.child)}function AT(e,t,n,r,i){if(Ho(n)){var o=!0;n5(t)}else o=!1;if(H0(t,i),t.stateNode===null)d4(e,t),sN(t,n,r),CC(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ka(u):(u=Ho(n)?Eh:Xi.current,u=d1(t,u));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&xT(t,a,r,u),td=!1;var m=t.memoizedState;a.state=m,s5(t,r,a,i),l=t.memoizedState,s!==r||m!==l||Fo.current||td?(typeof f=="function"&&(wC(t,n,f,r),l=t.memoizedState),(s=td||ST(t,n,s,r,m,l,u))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,oN(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ks(t.type,s),a.props=u,p=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ka(l):(l=Ho(n)?Eh:Xi.current,l=d1(t,l));var v=n.getDerivedStateFromProps;(f=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==p||m!==l)&&xT(t,a,r,l),td=!1,m=t.memoizedState,a.state=m,s5(t,r,a,i);var y=t.memoizedState;s!==p||m!==y||Fo.current||td?(typeof v=="function"&&(wC(t,n,v,r),y=t.memoizedState),(u=td||ST(t,n,u,r,m,y,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return EC(e,t,n,r,o,i)}function EC(e,t,n,r,i,o){IN(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&gT(t,n,!1),Hu(e,t,o);r=t.stateNode,pJ.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=h1(t,e.child,null,o),t.child=h1(t,null,s,o)):uo(e,t,s,o),t.memoizedState=r.state,i&&gT(t,n,!0),t.child}function DN(e){var t=e.stateNode;t.pendingContext?pT(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pT(e,t.context,!1),C8(e,t.containerInfo)}function OT(e,t,n,r,i){return f1(),v8(i),t.flags|=256,uo(e,t,n,r),t.child}var PC={dehydrated:null,treeContext:null,retryLane:0};function TC(e){return{baseLanes:e,cachePool:null,transitions:null}}function NN(e,t,n){var r=t.pendingProps,i=hr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Zn(hr,i&1),e===null)return SC(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Pb(a,r,0,null),e=mh(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=TC(n),t.memoizedState=PC,e):O8(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return gJ(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Cd(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Cd(s,o):(o=mh(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?TC(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=PC,r}return o=e.child,e=o.sibling,r=Cd(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function O8(e,t){return t=Pb({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function t3(e,t,n,r){return r!==null&&v8(r),h1(t,e.child,null,n),e=O8(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gJ(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=fw(Error(Ne(422))),t3(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Pb({mode:"visible",children:r.children},i,0,null),o=mh(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&h1(t,e.child,null,a),t.child.memoizedState=TC(a),t.memoizedState=PC,o);if((t.mode&1)===0)return t3(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ne(419)),r=fw(o,r,void 0),t3(e,t,a,r)}if(s=(a&e.childLanes)!==0,zo||s){if(r=xi,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Fu(e,i),Rs(r,e,i,-1))}return B8(),r=fw(Error(Ne(421))),t3(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=TJ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ga=bd(i.nextSibling),ma=t,ar=!0,Ts=null,e!==null&&($a[Fa++]=Au,$a[Fa++]=Ou,$a[Fa++]=Ph,Au=e.id,Ou=e.overflow,Ph=t),t=O8(t,r.children),t.flags|=4096,t)}function RT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xC(e.return,t,n)}function hw(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function BN(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(uo(e,t,r.children,n),r=hr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&RT(e,n,t);else if(e.tag===19)RT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Zn(hr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&l5(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),hw(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&l5(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}hw(t,!0,n,null,o);break;case"together":hw(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function d4(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Lh|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=Cd(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cd(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mJ(e,t,n){switch(t.tag){case 3:DN(t),f1();break;case 5:cN(t);break;case 1:Ho(t.type)&&n5(t);break;case 4:C8(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Zn(o5,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Zn(hr,hr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?NN(e,t,n):(Zn(hr,hr.current&1),e=Hu(e,t,n),e!==null?e.sibling:null);Zn(hr,hr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return BN(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Zn(hr,hr.current),r)break;return null;case 22:case 23:return t.lanes=0,MN(e,t,n)}return Hu(e,t,n)}var zN,LC,$N,FN;zN=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};LC=function(){};$N=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ah(Nl.current);var o=null;switch(n){case"input":i=Z6(e,i),r=Z6(e,r),o=[];break;case"select":i=vr({},i,{value:void 0}),r=vr({},r,{value:void 0}),o=[];break;case"textarea":i=eC(e,i),r=eC(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=e5)}nC(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Lv.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Lv.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Jn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};FN=function(e,t,n,r){n!==r&&(t.flags|=4)};function dm(e,t){if(!ar)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vJ(e,t,n){var r=t.pendingProps;switch(m8(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wi(t),null;case 1:return Ho(t.type)&&t5(),Wi(t),null;case 3:return r=t.stateNode,p1(),tr(Fo),tr(Xi),k8(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Jy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ts!==null&&(BC(Ts),Ts=null))),LC(e,t),Wi(t),null;case 5:_8(t);var i=ah(Hv.current);if(n=t.type,e!==null&&t.stateNode!=null)$N(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return Wi(t),null}if(e=ah(Nl.current),Jy(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Pl]=t,r[$v]=o,e=(t.mode&1)!==0,n){case"dialog":Jn("cancel",r),Jn("close",r);break;case"iframe":case"object":case"embed":Jn("load",r);break;case"video":case"audio":for(i=0;i<Bm.length;i++)Jn(Bm[i],r);break;case"source":Jn("error",r);break;case"img":case"image":case"link":Jn("error",r),Jn("load",r);break;case"details":Jn("toggle",r);break;case"input":HP(r,o),Jn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Jn("invalid",r);break;case"textarea":WP(r,o),Jn("invalid",r)}nC(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Qy(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Qy(r.textContent,s,e),i=["children",""+s]):Lv.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Jn("scroll",r)}switch(n){case"input":Uy(r),VP(r,o,!0);break;case"textarea":Uy(r),UP(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=e5)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hD(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Pl]=t,e[$v]=r,zN(e,t,!1,!1),t.stateNode=e;e:{switch(a=rC(n,r),n){case"dialog":Jn("cancel",e),Jn("close",e),i=r;break;case"iframe":case"object":case"embed":Jn("load",e),i=r;break;case"video":case"audio":for(i=0;i<Bm.length;i++)Jn(Bm[i],e);i=r;break;case"source":Jn("error",e),i=r;break;case"img":case"image":case"link":Jn("error",e),Jn("load",e),i=r;break;case"details":Jn("toggle",e),i=r;break;case"input":HP(e,r),i=Z6(e,r),Jn("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=vr({},r,{value:void 0}),Jn("invalid",e);break;case"textarea":WP(e,r),i=eC(e,r),Jn("invalid",e);break;default:i=r}nC(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?mD(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&pD(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Av(e,l):typeof l=="number"&&Av(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Lv.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Jn("scroll",e):l!=null&&t8(e,o,l,a))}switch(n){case"input":Uy(e),VP(e,r,!1);break;case"textarea":Uy(e),UP(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ld(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?B0(e,!!r.multiple,o,!1):r.defaultValue!=null&&B0(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=e5)}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)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Wi(t),null;case 6:if(e&&t.stateNode!=null)FN(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ne(166));if(n=ah(Hv.current),ah(Nl.current),Jy(t)){if(r=t.stateNode,n=t.memoizedProps,r[Pl]=t,(o=r.nodeValue!==n)&&(e=ma,e!==null))switch(e.tag){case 3:Qy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qy(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Pl]=t,t.stateNode=r}return Wi(t),null;case 13:if(tr(hr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ar&&ga!==null&&(t.mode&1)!==0&&(t.flags&128)===0)rN(),f1(),t.flags|=98560,o=!1;else if(o=Jy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Ne(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Ne(317));o[Pl]=t}else f1(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Wi(t),o=!1}else Ts!==null&&(BC(Ts),Ts=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(hr.current&1)!==0?si===0&&(si=3):B8())),t.updateQueue!==null&&(t.flags|=4),Wi(t),null);case 4:return p1(),LC(e,t),e===null&&Bv(t.stateNode.containerInfo),Wi(t),null;case 10:return S8(t.type._context),Wi(t),null;case 17:return Ho(t.type)&&t5(),Wi(t),null;case 19:if(tr(hr),o=t.memoizedState,o===null)return Wi(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)dm(o,!1);else{if(si!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=l5(e),a!==null){for(t.flags|=128,dm(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Zn(hr,hr.current&1|2),t.child}e=e.sibling}o.tail!==null&&Fr()>m1&&(t.flags|=128,r=!0,dm(o,!1),t.lanes=4194304)}else{if(!r)if(e=l5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),dm(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ar)return Wi(t),null}else 2*Fr()-o.renderingStartTime>m1&&n!==1073741824&&(t.flags|=128,r=!0,dm(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Fr(),t.sibling=null,n=hr.current,Zn(hr,r?n&1|2:n&1),t):(Wi(t),null);case 22:case 23:return N8(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ha&1073741824)!==0&&(Wi(t),t.subtreeFlags&6&&(t.flags|=8192)):Wi(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function yJ(e,t){switch(m8(t),t.tag){case 1:return Ho(t.type)&&t5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return p1(),tr(Fo),tr(Xi),k8(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return _8(t),null;case 13:if(tr(hr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));f1()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tr(hr),null;case 4:return p1(),null;case 10:return S8(t.type._context),null;case 22:case 23:return N8(),null;case 24:return null;default:return null}}var n3=!1,Gi=!1,bJ=typeof WeakSet=="function"?WeakSet:Set,st=null;function k0(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Lr(e,t,r)}else n.current=null}function AC(e,t,n){try{n()}catch(r){Lr(e,t,r)}}var MT=!1;function SJ(e,t){if(hC=Z4,e=UD(),p8(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(A){n=null;break e}var a=0,s=-1,l=-1,u=0,f=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++f===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(pC={focusedElem:e,selectionRange:n},Z4=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,E=y.memoizedState,_=t.stateNode,C=_.getSnapshotBeforeUpdate(t.elementType===t.type?x:ks(t.type,x),E);_.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(A){Lr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return y=MT,MT=!1,y}function ov(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&AC(t,n,o)}i=i.next}while(i!==r)}}function kb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 OC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function HN(e){var t=e.alternate;t!==null&&(e.alternate=null,HN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pl],delete t[$v],delete t[vC],delete t[nJ],delete t[rJ])),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 VN(e){return e.tag===5||e.tag===3||e.tag===4}function IT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function RC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=e5));else if(r!==4&&(e=e.child,e!==null))for(RC(e,t,n),e=e.sibling;e!==null;)RC(e,t,n),e=e.sibling}function MC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(MC(e,t,n),e=e.sibling;e!==null;)MC(e,t,n),e=e.sibling}var Mi=null,Es=!1;function jc(e,t,n){for(n=n.child;n!==null;)WN(e,t,n),n=n.sibling}function WN(e,t,n){if(Dl&&typeof Dl.onCommitFiberUnmount=="function")try{Dl.onCommitFiberUnmount(vb,n)}catch(s){}switch(n.tag){case 5:Gi||k0(n,t);case 6:var r=Mi,i=Es;Mi=null,jc(e,t,n),Mi=r,Es=i,Mi!==null&&(Es?(e=Mi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Mi.removeChild(n.stateNode));break;case 18:Mi!==null&&(Es?(e=Mi,n=n.stateNode,e.nodeType===8?aw(e.parentNode,n):e.nodeType===1&&aw(e,n),Iv(e)):aw(Mi,n.stateNode));break;case 4:r=Mi,i=Es,Mi=n.stateNode.containerInfo,Es=!0,jc(e,t,n),Mi=r,Es=i;break;case 0:case 11:case 14:case 15:if(!Gi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&AC(n,t,a),i=i.next}while(i!==r)}jc(e,t,n);break;case 1:if(!Gi&&(k0(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Lr(n,t,s)}jc(e,t,n);break;case 21:jc(e,t,n);break;case 22:n.mode&1?(Gi=(r=Gi)||n.memoizedState!==null,jc(e,t,n),Gi=r):jc(e,t,n);break;default:jc(e,t,n)}}function DT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bJ),t.forEach(function(r){var i=LJ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bs(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Mi=s.stateNode,Es=!1;break e;case 3:Mi=s.stateNode.containerInfo,Es=!0;break e;case 4:Mi=s.stateNode.containerInfo,Es=!0;break e}s=s.return}if(Mi===null)throw Error(Ne(160));WN(o,a,i),Mi=null,Es=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Lr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)UN(t,e),t=t.sibling}function UN(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bs(t,e),gl(e),r&4){try{ov(3,e,e.return),kb(3,e)}catch(x){Lr(e,e.return,x)}try{ov(5,e,e.return)}catch(x){Lr(e,e.return,x)}}break;case 1:bs(t,e),gl(e),r&512&&n!==null&&k0(n,n.return);break;case 5:if(bs(t,e),gl(e),r&512&&n!==null&&k0(n,n.return),e.flags&32){var i=e.stateNode;try{Av(i,"")}catch(x){Lr(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&dD(i,o),rC(s,a);var u=rC(s,o);for(a=0;a<l.length;a+=2){var f=l[a],p=l[a+1];f==="style"?mD(i,p):f==="dangerouslySetInnerHTML"?pD(i,p):f==="children"?Av(i,p):t8(i,f,p,u)}switch(s){case"input":Q6(i,o);break;case"textarea":fD(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?B0(i,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?B0(i,!!o.multiple,o.defaultValue,!0):B0(i,!!o.multiple,o.multiple?[]:"",!1))}i[$v]=o}catch(x){Lr(e,e.return,x)}}break;case 6:if(bs(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(Ne(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){Lr(e,e.return,x)}}break;case 3:if(bs(t,e),gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Iv(t.containerInfo)}catch(x){Lr(e,e.return,x)}break;case 4:bs(t,e),gl(e);break;case 13:bs(t,e),gl(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(I8=Fr())),r&4&&DT(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Gi=(u=Gi)||f,bs(t,e),Gi=u):bs(t,e),gl(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&(e.mode&1)!==0)for(st=e,f=e.child;f!==null;){for(p=st=f;st!==null;){switch(m=st,v=m.child,m.tag){case 0:case 11:case 14:case 15:ov(4,m,m.return);break;case 1:k0(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){Lr(r,n,x)}}break;case 5:k0(m,m.return);break;case 22:if(m.memoizedState!==null){BT(p);continue}}v!==null?(v.return=m,st=v):BT(p)}f=f.sibling}e:for(f=null,p=e;;){if(p.tag===5){if(f===null){f=p;try{i=p.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=p.stateNode,l=p.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=gD("display",a))}catch(x){Lr(e,e.return,x)}}}else if(p.tag===6){if(f===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(x){Lr(e,e.return,x)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:bs(t,e),gl(e),r&4&&DT(e);break;case 21:break;default:bs(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(VN(n)){var r=n;break e}n=n.return}throw Error(Ne(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Av(i,""),r.flags&=-33);var o=IT(e);MC(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=IT(e);RC(e,s,a);break;default:throw Error(Ne(161))}}catch(l){Lr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xJ(e,t,n){st=e,jN(e)}function jN(e,t,n){for(var r=(e.mode&1)!==0;st!==null;){var i=st,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||n3;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Gi;s=n3;var u=Gi;if(n3=a,(Gi=l)&&!u)for(st=i;st!==null;)a=st,l=a.child,a.tag===22&&a.memoizedState!==null?zT(i):l!==null?(l.return=a,st=l):zT(i);for(;o!==null;)st=o,jN(o),o=o.sibling;st=i,n3=s,Gi=u}NT(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,st=o):NT(e)}}function NT(e){for(;st!==null;){var t=st;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Gi||kb(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Gi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ks(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&bT(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bT(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){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:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var p=f.dehydrated;p!==null&&Iv(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ne(163))}Gi||t.flags&512&&OC(t)}catch(m){Lr(t,t.return,m)}}if(t===e){st=null;break}if(n=t.sibling,n!==null){n.return=t.return,st=n;break}st=t.return}}function BT(e){for(;st!==null;){var t=st;if(t===e){st=null;break}var n=t.sibling;if(n!==null){n.return=t.return,st=n;break}st=t.return}}function zT(e){for(;st!==null;){var t=st;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{kb(4,t)}catch(l){Lr(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Lr(t,i,l)}}var o=t.return;try{OC(t)}catch(l){Lr(t,o,l)}break;case 5:var a=t.return;try{OC(t)}catch(l){Lr(t,a,l)}}}catch(l){Lr(t,t.return,l)}if(t===e){st=null;break}var s=t.sibling;if(s!==null){s.return=t.return,st=s;break}st=t.return}}var wJ=Math.ceil,d5=Zu.ReactCurrentDispatcher,R8=Zu.ReactCurrentOwner,qa=Zu.ReactCurrentBatchConfig,cn=0,xi=null,Xr=null,Di=0,ha=0,E0=$d(0),si=0,jv=null,Lh=0,Eb=0,M8=0,av=null,No=null,I8=0,m1=1/0,Pu=null,f5=!1,IC=null,xd=null,r3=!1,ud=null,h5=0,sv=0,DC=null,f4=-1,h4=0;function go(){return(cn&6)!==0?Fr():f4!==-1?f4:f4=Fr()}function wd(e){return(e.mode&1)===0?1:(cn&2)!==0&&Di!==0?Di&-Di:oJ.transition!==null?(h4===0&&(h4=TD()),h4):(e=Mn,e!==0||(e=window.event,e=e===void 0?16:DD(e.type)),e)}function Rs(e,t,n,r){if(50<sv)throw sv=0,DC=null,Error(Ne(185));_2(e,n,r),((cn&2)===0||e!==xi)&&(e===xi&&((cn&2)===0&&(Eb|=n),si===4&&id(e,Di)),Vo(e,r),n===1&&cn===0&&(t.mode&1)===0&&(m1=Fr()+500,wb&&Fd()))}function Vo(e,t){var n=e.callbackNode;oQ(e,t);var r=X4(e,e===xi?Di:0);if(r===0)n!==null&&qP(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qP(n),t===1)e.tag===0?iJ($T.bind(null,e)):eN($T.bind(null,e)),eJ(function(){(cn&6)===0&&Fd()}),n=null;else{switch(LD(r)){case 1:n=a8;break;case 4:n=ED;break;case 16:n=K4;break;case 536870912:n=PD;break;default:n=K4}n=JN(n,GN.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function GN(e,t){if(f4=-1,h4=0,(cn&6)!==0)throw Error(Ne(327));var n=e.callbackNode;if(V0()&&e.callbackNode!==n)return null;var r=X4(e,e===xi?Di:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=p5(e,r);else{t=r;var i=cn;cn|=2;var o=YN();(xi!==e||Di!==t)&&(Pu=null,m1=Fr()+500,gh(e,t));do try{kJ();break}catch(s){qN(e,s)}while(1);b8(),d5.current=o,cn=i,Xr!==null?t=0:(xi=null,Di=0,t=si)}if(t!==0){if(t===2&&(i=lC(e),i!==0&&(r=i,t=NC(e,i))),t===1)throw n=jv,gh(e,0),id(e,r),Vo(e,Fr()),n;if(t===6)id(e,r);else{if(i=e.current.alternate,(r&30)===0&&!CJ(i)&&(t=p5(e,r),t===2&&(o=lC(e),o!==0&&(r=o,t=NC(e,o))),t===1))throw n=jv,gh(e,0),id(e,r),Vo(e,Fr()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ne(345));case 2:Kf(e,No,Pu);break;case 3:if(id(e,r),(r&130023424)===r&&(t=I8+500-Fr(),10<t)){if(X4(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){go(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=mC(Kf.bind(null,e,No,Pu),t);break}Kf(e,No,Pu);break;case 4:if(id(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Os(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Fr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wJ(r/1960))-r,10<r){e.timeoutHandle=mC(Kf.bind(null,e,No,Pu),r);break}Kf(e,No,Pu);break;case 5:Kf(e,No,Pu);break;default:throw Error(Ne(329))}}}return Vo(e,Fr()),e.callbackNode===n?GN.bind(null,e):null}function NC(e,t){var n=av;return e.current.memoizedState.isDehydrated&&(gh(e,t).flags|=256),e=p5(e,t),e!==2&&(t=No,No=n,t!==null&&BC(t)),e}function BC(e){No===null?No=e:No.push.apply(No,e)}function CJ(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!$s(o(),i))return!1}catch(a){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function id(e,t){for(t&=~M8,t&=~Eb,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Os(t),r=1<<n;e[n]=-1,t&=~r}}function $T(e){if((cn&6)!==0)throw Error(Ne(327));V0();var t=X4(e,0);if((t&1)===0)return Vo(e,Fr()),null;var n=p5(e,t);if(e.tag!==0&&n===2){var r=lC(e);r!==0&&(t=r,n=NC(e,r))}if(n===1)throw n=jv,gh(e,0),id(e,t),Vo(e,Fr()),n;if(n===6)throw Error(Ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kf(e,No,Pu),Vo(e,Fr()),null}function D8(e,t){var n=cn;cn|=1;try{return e(t)}finally{cn=n,cn===0&&(m1=Fr()+500,wb&&Fd())}}function Ah(e){ud!==null&&ud.tag===0&&(cn&6)===0&&V0();var t=cn;cn|=1;var n=qa.transition,r=Mn;try{if(qa.transition=null,Mn=1,e)return e()}finally{Mn=r,qa.transition=n,cn=t,(cn&6)===0&&Fd()}}function N8(){ha=E0.current,tr(E0)}function gh(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,JQ(n)),Xr!==null)for(n=Xr.return;n!==null;){var r=n;switch(m8(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&t5();break;case 3:p1(),tr(Fo),tr(Xi),k8();break;case 5:_8(r);break;case 4:p1();break;case 13:tr(hr);break;case 19:tr(hr);break;case 10:S8(r.type._context);break;case 22:case 23:N8()}n=n.return}if(xi=e,Xr=e=Cd(e.current,null),Di=ha=t,si=0,jv=null,M8=Eb=Lh=0,No=av=null,oh!==null){for(t=0;t<oh.length;t++)if(n=oh[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}oh=null}return e}function qN(e,t){do{var n=Xr;try{if(b8(),u4.current=c5,u5){for(var r=mr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}u5=!1}if(Th=0,Si=oi=mr=null,iv=!1,Vv=0,R8.current=null,n===null||n.return===null){si=1,jv=t,Xr=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Di,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,f=s,p=f.tag;if((f.mode&1)===0&&(p===0||p===11||p===15)){var m=f.alternate;m?(f.updateQueue=m.updateQueue,f.memoizedState=m.memoizedState,f.lanes=m.lanes):(f.updateQueue=null,f.memoizedState=null)}var v=ET(a);if(v!==null){v.flags&=-257,PT(v,a,s,o,t),v.mode&1&&kT(o,u,t),t=v,l=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(l),t.updateQueue=x}else y.add(l);break e}else{if((t&1)===0){kT(o,u,t),B8();break e}l=Error(Ne(426))}}else if(ar&&s.mode&1){var E=ET(a);if(E!==null){(E.flags&65536)===0&&(E.flags|=256),PT(E,a,s,o,t),v8(g1(l,s));break e}}o=l=g1(l,s),si!==4&&(si=2),av===null?av=[o]:av.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var _=AN(o,l,t);yT(o,_);break e;case 1:s=l;var C=o.type,T=o.stateNode;if((o.flags&128)===0&&(typeof C.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(xd===null||!xd.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var A=ON(o,s,t);yT(o,A);break e}}o=o.return}while(o!==null)}XN(n)}catch(M){t=M,Xr===n&&n!==null&&(Xr=n=n.return);continue}break}while(1)}function YN(){var e=d5.current;return d5.current=c5,e===null?c5:e}function B8(){(si===0||si===3||si===2)&&(si=4),xi===null||(Lh&268435455)===0&&(Eb&268435455)===0||id(xi,Di)}function p5(e,t){var n=cn;cn|=2;var r=YN();(xi!==e||Di!==t)&&(Pu=null,gh(e,t));do try{_J();break}catch(i){qN(e,i)}while(1);if(b8(),cn=n,d5.current=r,Xr!==null)throw Error(Ne(261));return xi=null,Di=0,si}function _J(){for(;Xr!==null;)KN(Xr)}function kJ(){for(;Xr!==null&&!XZ();)KN(Xr)}function KN(e){var t=QN(e.alternate,e,ha);e.memoizedProps=e.pendingProps,t===null?XN(e):Xr=t,R8.current=null}function XN(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=vJ(n,t,ha),n!==null){Xr=n;return}}else{if(n=yJ(n,t),n!==null){n.flags&=32767,Xr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{si=6,Xr=null;return}}if(t=t.sibling,t!==null){Xr=t;return}Xr=t=e}while(t!==null);si===0&&(si=5)}function Kf(e,t,n){var r=Mn,i=qa.transition;try{qa.transition=null,Mn=1,EJ(e,t,n,r)}finally{qa.transition=i,Mn=r}return null}function EJ(e,t,n,r){do V0();while(ud!==null);if((cn&6)!==0)throw Error(Ne(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ne(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(aQ(e,o),e===xi&&(Xr=xi=null,Di=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||r3||(r3=!0,JN(K4,function(){return V0(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=qa.transition,qa.transition=null;var a=Mn;Mn=1;var s=cn;cn|=4,R8.current=null,SJ(e,n),UN(n,e),GQ(pC),Z4=!!hC,pC=hC=null,e.current=n,xJ(n),ZZ(),cn=s,Mn=a,qa.transition=o}else e.current=n;if(r3&&(r3=!1,ud=e,h5=i),o=e.pendingLanes,o===0&&(xd=null),eQ(n.stateNode),Vo(e,Fr()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(f5)throw f5=!1,e=IC,IC=null,e;return(h5&1)!==0&&e.tag!==0&&V0(),o=e.pendingLanes,(o&1)!==0?e===DC?sv++:(sv=0,DC=e):sv=0,Fd(),null}function V0(){if(ud!==null){var e=LD(h5),t=qa.transition,n=Mn;try{if(qa.transition=null,Mn=16>e?16:e,ud===null)var r=!1;else{if(e=ud,ud=null,h5=0,(cn&6)!==0)throw Error(Ne(331));var i=cn;for(cn|=4,st=e.current;st!==null;){var o=st,a=o.child;if((st.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(st=u;st!==null;){var f=st;switch(f.tag){case 0:case 11:case 15:ov(8,f,o)}var p=f.child;if(p!==null)p.return=f,st=p;else for(;st!==null;){f=st;var m=f.sibling,v=f.return;if(HN(f),f===u){st=null;break}if(m!==null){m.return=v,st=m;break}st=v}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var E=x.sibling;x.sibling=null,x=E}while(x!==null)}}st=o}}if((o.subtreeFlags&2064)!==0&&a!==null)a.return=o,st=a;else e:for(;st!==null;){if(o=st,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:ov(9,o,o.return)}var _=o.sibling;if(_!==null){_.return=o.return,st=_;break e}st=o.return}}var C=e.current;for(st=C;st!==null;){a=st;var T=a.child;if((a.subtreeFlags&2064)!==0&&T!==null)T.return=a,st=T;else e:for(a=C;st!==null;){if(s=st,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:kb(9,s)}}catch(M){Lr(s,s.return,M)}if(s===a){st=null;break e}var A=s.sibling;if(A!==null){A.return=s.return,st=A;break e}st=s.return}}if(cn=i,Fd(),Dl&&typeof Dl.onPostCommitFiberRoot=="function")try{Dl.onPostCommitFiberRoot(vb,e)}catch(M){}r=!0}return r}finally{Mn=n,qa.transition=t}}return!1}function FT(e,t,n){t=g1(n,t),t=AN(e,t,1),e=Sd(e,t,1),t=go(),e!==null&&(_2(e,1,t),Vo(e,t))}function Lr(e,t,n){if(e.tag===3)FT(e,e,n);else for(;t!==null;){if(t.tag===3){FT(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xd===null||!xd.has(r))){e=g1(n,e),e=ON(t,e,1),t=Sd(t,e,1),e=go(),t!==null&&(_2(t,1,e),Vo(t,e));break}}t=t.return}}function PJ(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=go(),e.pingedLanes|=e.suspendedLanes&n,xi===e&&(Di&n)===n&&(si===4||si===3&&(Di&130023424)===Di&&500>Fr()-I8?gh(e,0):M8|=n),Vo(e,t)}function ZN(e,t){t===0&&((e.mode&1)===0?t=1:(t=qy,qy<<=1,(qy&130023424)===0&&(qy=4194304)));var n=go();e=Fu(e,t),e!==null&&(_2(e,t,n),Vo(e,n))}function TJ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ZN(e,n)}function LJ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),ZN(e,n)}var QN;QN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fo.current)zo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return zo=!1,mJ(e,t,n);zo=(e.flags&131072)!==0}else zo=!1,ar&&(t.flags&1048576)!==0&&tN(t,i5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;d4(e,t),e=t.pendingProps;var i=d1(t,Xi.current);H0(t,n),i=P8(null,t,r,e,i,n);var o=T8();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ho(r)?(o=!0,n5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,w8(t),i.updater=Cb,t.stateNode=i,i._reactInternals=t,CC(t,r,e,n),t=EC(null,t,r,!0,o,n)):(t.tag=0,ar&&o&&g8(t),uo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(d4(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=OJ(r),e=ks(r,e),i){case 0:t=kC(null,t,r,e,n);break e;case 1:t=AT(null,t,r,e,n);break e;case 11:t=TT(null,t,r,e,n);break e;case 14:t=LT(null,t,r,ks(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ks(r,i),kC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ks(r,i),AT(e,t,r,i,n);case 3:e:{if(DN(t),e===null)throw Error(Ne(387));r=t.pendingProps,o=t.memoizedState,i=o.element,oN(e,t),s5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=g1(Error(Ne(423)),t),t=OT(e,t,r,n,i);break e}else if(r!==i){i=g1(Error(Ne(424)),t),t=OT(e,t,r,n,i);break e}else for(ga=bd(t.stateNode.containerInfo.firstChild),ma=t,ar=!0,Ts=null,n=uN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(f1(),r===i){t=Hu(e,t,n);break e}uo(e,t,r,n)}t=t.child}return t;case 5:return cN(t),e===null&&SC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,gC(r,i)?a=null:o!==null&&gC(r,o)&&(t.flags|=32),IN(e,t),uo(e,t,a,n),t.child;case 6:return e===null&&SC(t),null;case 13:return NN(e,t,n);case 4:return C8(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=h1(t,null,r,n):uo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ks(r,i),TT(e,t,r,i,n);case 7:return uo(e,t,t.pendingProps,n),t.child;case 8:return uo(e,t,t.pendingProps.children,n),t.child;case 12:return uo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Zn(o5,r._currentValue),r._currentValue=a,o!==null)if($s(o.value,a)){if(o.children===i.children&&!Fo.current){t=Hu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Mu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),xC(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ne(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),xC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}uo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,H0(t,n),i=Ka(i),r=r(i),t.flags|=1,uo(e,t,r,n),t.child;case 14:return r=t.type,i=ks(r,t.pendingProps),i=ks(r.type,i),LT(e,t,r,i,n);case 15:return RN(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ks(r,i),d4(e,t),t.tag=1,Ho(r)?(e=!0,n5(t)):e=!1,H0(t,n),sN(t,r,i),CC(t,r,i,n),EC(null,t,r,!0,e,n);case 19:return BN(e,t,n);case 22:return MN(e,t,n)}throw Error(Ne(156,t.tag))};function JN(e,t){return kD(e,t)}function AJ(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 Ua(e,t,n,r){return new AJ(e,t,n,r)}function z8(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OJ(e){if(typeof e=="function")return z8(e)?1:0;if(e!=null){if(e=e.$$typeof,e===r8)return 11;if(e===i8)return 14}return 2}function Cd(e,t){var n=e.alternate;return n===null?(n=Ua(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function p4(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")z8(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case m0:return mh(n.children,i,o,t);case n8:a=8,i|=8;break;case q6:return e=Ua(12,n,t,i|2),e.elementType=q6,e.lanes=o,e;case Y6:return e=Ua(13,n,t,i),e.elementType=Y6,e.lanes=o,e;case K6:return e=Ua(19,n,t,i),e.elementType=K6,e.lanes=o,e;case lD:return Pb(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aD:a=10;break e;case sD:a=9;break e;case r8:a=11;break e;case i8:a=14;break e;case ed:a=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Ua(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function mh(e,t,n,r){return e=Ua(7,e,r,t),e.lanes=n,e}function Pb(e,t,n,r){return e=Ua(22,e,r,t),e.elementType=lD,e.lanes=n,e.stateNode={isHidden:!1},e}function pw(e,t,n){return e=Ua(6,e,null,t),e.lanes=n,e}function gw(e,t,n){return t=Ua(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function RJ(e,t,n,r,i){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=Kx(0),this.expirationTimes=Kx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $8(e,t,n,r,i,o,a,s,l){return e=new RJ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ua(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},w8(o),e}function MJ(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g0,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function eB(e){if(!e)return Ad;e=e._reactInternals;e:{if(Bh(e)!==e||e.tag!==1)throw Error(Ne(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ho(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ne(171))}if(e.tag===1){var n=e.type;if(Ho(n))return JD(e,n,t)}return t}function tB(e,t,n,r,i,o,a,s,l){return e=$8(n,r,!0,e,i,o,a,s,l),e.context=eB(null),n=e.current,r=go(),i=wd(n),o=Mu(r,i),o.callback=t!=null?t:null,Sd(n,o,i),e.current.lanes=i,_2(e,i,r),Vo(e,r),e}function Tb(e,t,n,r){var i=t.current,o=go(),a=wd(i);return n=eB(n),t.context===null?t.context=n:t.pendingContext=n,t=Mu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Sd(i,t,a),e!==null&&(Rs(e,i,a,o),l4(e,i,a)),a}function g5(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function HT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function F8(e,t){HT(e,t),(e=e.alternate)&&HT(e,t)}function IJ(){return null}var nB=typeof reportError=="function"?reportError:function(e){console.error(e)};function H8(e){this._internalRoot=e}Lb.prototype.render=H8.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ne(409));Tb(e,t,null,null)};Lb.prototype.unmount=H8.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ah(function(){Tb(null,e,null,null)}),t[$u]=null}};function Lb(e){this._internalRoot=e}Lb.prototype.unstable_scheduleHydration=function(e){if(e){var t=RD();e={blockedOn:null,target:e,priority:t};for(var n=0;n<rd.length&&t!==0&&t<rd[n].priority;n++);rd.splice(n,0,e),n===0&&ID(e)}};function V8(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ab(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function VT(){}function DJ(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=g5(a);o.call(u)}}var a=tB(t,r,e,0,null,!1,!1,"",VT);return e._reactRootContainer=a,e[$u]=a.current,Bv(e.nodeType===8?e.parentNode:e),Ah(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=g5(l);s.call(u)}}var l=$8(e,0,!1,null,null,!1,!1,"",VT);return e._reactRootContainer=l,e[$u]=l.current,Bv(e.nodeType===8?e.parentNode:e),Ah(function(){Tb(t,l,n,r)}),l}function Ob(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=g5(a);s.call(l)}}Tb(t,a,e,i)}else a=DJ(n,t,e,i,r);return g5(a)}AD=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Nm(t.pendingLanes);n!==0&&(s8(t,n|1),Vo(t,Fr()),(cn&6)===0&&(m1=Fr()+500,Fd()))}break;case 13:Ah(function(){var r=Fu(e,1);if(r!==null){var i=go();Rs(r,e,1,i)}}),F8(e,1)}};l8=function(e){if(e.tag===13){var t=Fu(e,134217728);if(t!==null){var n=go();Rs(t,e,134217728,n)}F8(e,134217728)}};OD=function(e){if(e.tag===13){var t=wd(e),n=Fu(e,t);if(n!==null){var r=go();Rs(n,e,t,r)}F8(e,t)}};RD=function(){return Mn};MD=function(e,t){var n=Mn;try{return Mn=e,t()}finally{Mn=n}};oC=function(e,t,n){switch(t){case"input":if(Q6(e,n),t=n.name,n.type==="radio"&&t!=null){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 i=xb(r);if(!i)throw Error(Ne(90));cD(r),Q6(r,i)}}}break;case"textarea":fD(e,n);break;case"select":t=n.value,t!=null&&B0(e,!!n.multiple,t,!1)}};bD=D8;SD=Ah;var NJ={usingClientEntryPoint:!1,Events:[E2,S0,xb,vD,yD,D8]},fm={findFiberByHostInstance:ih,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},BJ={bundleType:fm.bundleType,version:fm.version,rendererPackageName:fm.rendererPackageName,rendererConfig:fm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=CD(e),e===null?null:e.stateNode},findFiberByHostInstance:fm.findFiberByHostInstance||IJ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var i3=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!i3.isDisabled&&i3.supportsFiber)try{vb=i3.inject(BJ),Dl=i3}catch(e){}}Ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NJ;Ca.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!V8(t))throw Error(Ne(200));return MJ(e,t,null,n)};Ca.createRoot=function(e,t){if(!V8(e))throw Error(Ne(299));var n=!1,r="",i=nB;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=$8(e,1,!1,null,null,n,!1,r,i),e[$u]=t.current,Bv(e.nodeType===8?e.parentNode:e),new H8(t)};Ca.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ne(188)):(e=Object.keys(e).join(","),Error(Ne(268,e)));return e=CD(t),e=e===null?null:e.stateNode,e};Ca.flushSync=function(e){return Ah(e)};Ca.hydrate=function(e,t,n){if(!Ab(t))throw Error(Ne(200));return Ob(null,e,t,!0,n)};Ca.hydrateRoot=function(e,t,n){if(!V8(e))throw Error(Ne(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=nB;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=tB(t,null,e,1,n!=null?n:null,i,!1,o,a),e[$u]=t.current,Bv(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Lb(t)};Ca.render=function(e,t,n){if(!Ab(t))throw Error(Ne(200));return Ob(null,e,t,!1,n)};Ca.unmountComponentAtNode=function(e){if(!Ab(e))throw Error(Ne(40));return e._reactRootContainer?(Ah(function(){Ob(null,null,e,!1,function(){e._reactRootContainer=null,e[$u]=null})}),!0):!1};Ca.unstable_batchedUpdates=D8;Ca.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ab(n))throw Error(Ne(200));if(e==null||e._reactInternals===void 0)throw Error(Ne(38));return Ob(e,t,n,!1,r)};Ca.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ca})(Zl);const o3=Y9(Zl.exports);var WT=Zl.exports;j6.createRoot=WT.createRoot,j6.hydrateRoot=WT.hydrateRoot;var Ms=Boolean(globalThis==null?void 0:globalThis.document)?k.exports.useLayoutEffect:k.exports.useEffect,Rb={exports:{}},Mb={};/**
* @license React
* react-jsx-runtime.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 zJ=k.exports,$J=Symbol.for("react.element"),FJ=Symbol.for("react.fragment"),HJ=Object.prototype.hasOwnProperty,VJ=zJ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,WJ={key:!0,ref:!0,__self:!0,__source:!0};function rB(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)HJ.call(t,r)&&!WJ.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:$J,type:e,key:o,ref:a,props:i,_owner:VJ.current}}Mb.Fragment=FJ;Mb.jsx=rB;Mb.jsxs=rB;(function(e){e.exports=Mb})(Rb);const In=Rb.exports.Fragment,b=Rb.exports.jsx,ee=Rb.exports.jsxs;var W8=k.exports.createContext({});W8.displayName="ColorModeContext";function T2(){const e=k.exports.useContext(W8);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var a3={light:"chakra-ui-light",dark:"chakra-ui-dark"};function UJ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?a3.dark:a3.light),document.body.classList.remove(r?a3.light:a3.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var o;return((o=n.query().matches)!=null?o:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.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(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var jJ="chakra-ui-color-mode";function GJ(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch(r){}return n||t},set(t){try{localStorage.setItem(e,t)}catch(n){}}}}var qJ=GJ(jJ),UT=()=>{};function jT(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function iB(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=qJ}=e,s=i==="dark"?"dark":"light",[l,u]=k.exports.useState(()=>jT(a,s)),[f,p]=k.exports.useState(()=>jT(a)),{getSystemTheme:m,setClassName:v,setDataset:y,addListener:x}=k.exports.useMemo(()=>UJ({preventTransition:o}),[o]),E=i==="system"&&!l?f:l,_=k.exports.useCallback(A=>{const M=A==="system"?m():A;u(M),v(M==="dark"),y(M),a.set(M)},[a,m,v,y]);Ms(()=>{i==="system"&&p(m())},[]),k.exports.useEffect(()=>{const A=a.get();if(A){_(A);return}if(i==="system"){_("system");return}_(s)},[a,s,i,_]);const C=k.exports.useCallback(()=>{_(E==="dark"?"light":"dark")},[E,_]);k.exports.useEffect(()=>{if(!!r)return x(_)},[r,x,_]);const T=k.exports.useMemo(()=>({colorMode:t!=null?t:E,toggleColorMode:t?UT:C,setColorMode:t?UT:_,forced:t!==void 0}),[E,C,_,t]);return b(W8.Provider,{value:T,children:n})}iB.displayName="ColorModeProvider";var zC={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",y="[object GeneratorFunction]",x="[object Map]",E="[object Number]",_="[object Null]",C="[object Object]",T="[object Proxy]",A="[object RegExp]",M="[object Set]",I="[object String]",D="[object Undefined]",B="[object WeakMap]",F="[object ArrayBuffer]",H="[object DataView]",Y="[object Float32Array]",te="[object Float64Array]",G="[object Int8Array]",z="[object Int16Array]",W="[object Int32Array]",K="[object Uint8Array]",Z="[object Uint8ClampedArray]",U="[object Uint16Array]",Q="[object Uint32Array]",ue=/[\\^$.*+?()[\]{}|]/g,fe=/^\[object .+?Constructor\]$/,Te=/^(?:0|[1-9]\d*)$/,Oe={};Oe[Y]=Oe[te]=Oe[G]=Oe[z]=Oe[W]=Oe[K]=Oe[Z]=Oe[U]=Oe[Q]=!0,Oe[s]=Oe[l]=Oe[F]=Oe[f]=Oe[H]=Oe[p]=Oe[m]=Oe[v]=Oe[x]=Oe[E]=Oe[C]=Oe[A]=Oe[M]=Oe[I]=Oe[B]=!1;var ve=typeof fo=="object"&&fo&&fo.Object===Object&&fo,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Re=ve||Ce||Function("return this")(),Ye=t&&!t.nodeType&&t,Ue=Ye&&!0&&e&&!e.nodeType&&e,pt=Ue&&Ue.exports===Ye,wt=pt&&ve.process,ut=function(){try{var q=Ue&&Ue.require&&Ue.require("util").types;return q||wt&&wt.binding&&wt.binding("util")}catch(re){}}(),ft=ut&&ut.isTypedArray;function vt(q,re,pe){switch(pe.length){case 0:return q.call(re);case 1:return q.call(re,pe[0]);case 2:return q.call(re,pe[0],pe[1]);case 3:return q.call(re,pe[0],pe[1],pe[2])}return q.apply(re,pe)}function ke(q,re){for(var pe=-1,Je=Array(q);++pe<q;)Je[pe]=re(pe);return Je}function at(q){return function(re){return q(re)}}function Rt(q,re){return q==null?void 0:q[re]}function tt(q,re){return function(pe){return q(re(pe))}}var yt=Array.prototype,dn=Function.prototype,Pt=Object.prototype,Yt=Re["__core-js_shared__"],fn=dn.toString,Cn=Pt.hasOwnProperty,De=function(){var q=/[^.]+$/.exec(Yt&&Yt.keys&&Yt.keys.IE_PROTO||"");return q?"Symbol(src)_1."+q:""}(),nt=Pt.toString,tn=fn.call(Object),Zt=RegExp("^"+fn.call(Cn).replace(ue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=pt?Re.Buffer:void 0,Ct=Re.Symbol,Wt=Re.Uint8Array,$e=Ee?Ee.allocUnsafe:void 0,ct=tt(Object.getPrototypeOf,Object),hn=Object.create,Be=Pt.propertyIsEnumerable,gt=yt.splice,rt=Ct?Ct.toStringTag:void 0,Bt=function(){try{var q=ss(Object,"defineProperty");return q({},"",{}),q}catch(re){}}(),ln=Ee?Ee.isBuffer:void 0,wr=Math.max,sr=Date.now,Vr=ss(Re,"Map"),Go=ss(Object,"create"),Q1=function(){function q(){}return function(re){if(!Zo(re))return{};if(hn)return hn(re);q.prototype=re;var pe=new q;return q.prototype=void 0,pe}}();function Pa(q){var re=-1,pe=q==null?0:q.length;for(this.clear();++re<pe;){var Je=q[re];this.set(Je[0],Je[1])}}function Jh(){this.__data__=Go?Go(null):{},this.size=0}function J1(q){var re=this.has(q)&&delete this.__data__[q];return this.size-=re?1:0,re}function oc(q){var re=this.__data__;if(Go){var pe=re[q];return pe===r?void 0:pe}return Cn.call(re,q)?re[q]:void 0}function ep(q){var re=this.__data__;return Go?re[q]!==void 0:Cn.call(re,q)}function tp(q,re){var pe=this.__data__;return this.size+=this.has(q)?0:1,pe[q]=Go&&re===void 0?r:re,this}Pa.prototype.clear=Jh,Pa.prototype.delete=J1,Pa.prototype.get=oc,Pa.prototype.has=ep,Pa.prototype.set=tp;function qo(q){var re=-1,pe=q==null?0:q.length;for(this.clear();++re<pe;){var Je=q[re];this.set(Je[0],Je[1])}}function tf(){this.__data__=[],this.size=0}function eg(q){var re=this.__data__,pe=os(re,q);if(pe<0)return!1;var Je=re.length-1;return pe==Je?re.pop():gt.call(re,pe,1),--this.size,!0}function ac(q){var re=this.__data__,pe=os(re,q);return pe<0?void 0:re[pe][1]}function nf(q){return os(this.__data__,q)>-1}function tg(q,re){var pe=this.__data__,Je=os(pe,q);return Je<0?(++this.size,pe.push([q,re])):pe[Je][1]=re,this}qo.prototype.clear=tf,qo.prototype.delete=eg,qo.prototype.get=ac,qo.prototype.has=nf,qo.prototype.set=tg;function js(q){var re=-1,pe=q==null?0:q.length;for(this.clear();++re<pe;){var Je=q[re];this.set(Je[0],Je[1])}}function sc(){this.size=0,this.__data__={hash:new Pa,map:new(Vr||qo),string:new Pa}}function ng(q){var re=au(this,q).delete(q);return this.size-=re?1:0,re}function rg(q){return au(this,q).get(q)}function ig(q){return au(this,q).has(q)}function og(q,re){var pe=au(this,q),Je=pe.size;return pe.set(q,re),this.size+=pe.size==Je?0:1,this}js.prototype.clear=sc,js.prototype.delete=ng,js.prototype.get=rg,js.prototype.has=ig,js.prototype.set=og;function is(q){var re=this.__data__=new qo(q);this.size=re.size}function ag(){this.__data__=new qo,this.size=0}function sg(q){var re=this.__data__,pe=re.delete(q);return this.size=re.size,pe}function lg(q){return this.__data__.get(q)}function ug(q){return this.__data__.has(q)}function cg(q,re){var pe=this.__data__;if(pe instanceof qo){var Je=pe.__data__;if(!Vr||Je.length<n-1)return Je.push([q,re]),this.size=++pe.size,this;pe=this.__data__=new js(Je)}return pe.set(q,re),this.size=pe.size,this}is.prototype.clear=ag,is.prototype.delete=sg,is.prototype.get=lg,is.prototype.has=ug,is.prototype.set=cg;function dg(q,re){var pe=lu(q),Je=!pe&&lf(q),$t=!pe&&!Je&&fc(q),vn=!pe&&!Je&&!$t&&sp(q),St=pe||Je||$t||vn,Ot=St?ke(q.length,String):[],Gt=Ot.length;for(var Wr in q)(re||Cn.call(q,Wr))&&!(St&&(Wr=="length"||$t&&(Wr=="offset"||Wr=="parent")||vn&&(Wr=="buffer"||Wr=="byteLength"||Wr=="byteOffset")||rp(Wr,Gt)))&&Ot.push(Wr);return Ot}function Gs(q,re,pe){(pe!==void 0&&!Ta(q[re],pe)||pe===void 0&&!(re in q))&&ru(q,re,pe)}function fg(q,re,pe){var Je=q[re];(!(Cn.call(q,re)&&Ta(Je,pe))||pe===void 0&&!(re in q))&&ru(q,re,pe)}function os(q,re){for(var pe=q.length;pe--;)if(Ta(q[pe][0],re))return pe;return-1}function ru(q,re,pe){re=="__proto__"&&Bt?Bt(q,re,{configurable:!0,enumerable:!0,value:pe,writable:!0}):q[re]=pe}var iu=rf();function qs(q){return q==null?q===void 0?D:_:rt&&rt in Object(q)?of(q):su(q)}function ou(q){return qn(q)&&qs(q)==s}function np(q){if(!Zo(q)||Xs(q))return!1;var re=hc(q)?Zt:fe;return re.test(dc(q))}function lc(q){return qn(q)&&ap(q.length)&&!!Oe[qs(q)]}function Ys(q){if(!Zo(q))return Zs(q);var re=So(q),pe=[];for(var Je in q)Je=="constructor"&&(re||!Cn.call(q,Je))||pe.push(Je);return pe}function Yo(q,re,pe,Je,$t){q!==re&&iu(re,function(vn,St){if($t||($t=new is),Zo(vn))On(q,re,St,pe,Yo,Je,$t);else{var Ot=Je?Je(uc(q,St),vn,St+"",q,re,$t):void 0;Ot===void 0&&(Ot=vn),Gs(q,St,Ot)}},lp)}function On(q,re,pe,Je,$t,vn,St){var Ot=uc(q,pe),Gt=uc(re,pe),Wr=St.get(Gt);if(Wr){Gs(q,pe,Wr);return}var Cr=vn?vn(Ot,Gt,pe+"",q,re,St):void 0,yn=Cr===void 0;if(yn){var ei=lu(Gt),xo=!ei&&fc(Gt),Qi=!ei&&!xo&&sp(Gt);Cr=Gt,ei||xo||Qi?lu(Ot)?Cr=Ot:op(Ot)?Cr=Ks(Ot):xo?(yn=!1,Cr=Or(Gt,!0)):Qi?(yn=!1,Cr=Xo(Gt,!0)):Cr=[]:uf(Gt)||lf(Gt)?(Cr=Ot,lf(Ot)?Cr=cf(Ot):(!Zo(Ot)||hc(Ot))&&(Cr=Ci(Gt))):yn=!1}yn&&(St.set(Gt,Cr),$t(Cr,Gt,Je,vn,St),St.delete(Gt)),Gs(q,pe,Cr)}function _n(q,re){return cc(hg(q,re,up),q+"")}var Ko=Bt?function(q,re){return Bt(q,"toString",{configurable:!0,enumerable:!1,value:jt(re),writable:!0})}:up;function Or(q,re){if(re)return q.slice();var pe=q.length,Je=$e?$e(pe):new q.constructor(pe);return q.copy(Je),Je}function Qr(q){var re=new q.constructor(q.byteLength);return new Wt(re).set(new Wt(q)),re}function Xo(q,re){var pe=re?Qr(q.buffer):q.buffer;return new q.constructor(pe,q.byteOffset,q.length)}function Ks(q,re){var pe=-1,Je=q.length;for(re||(re=Array(Je));++pe<Je;)re[pe]=q[pe];return re}function Jr(q,re,pe,Je){var $t=!pe;pe||(pe={});for(var vn=-1,St=re.length;++vn<St;){var Ot=re[vn],Gt=Je?Je(pe[Ot],q[Ot],Ot,pe,q):void 0;Gt===void 0&&(Gt=q[Ot]),$t?ru(pe,Ot,Gt):fg(pe,Ot,Gt)}return pe}function as(q){return _n(function(re,pe){var Je=-1,$t=pe.length,vn=$t>1?pe[$t-1]:void 0,St=$t>2?pe[2]:void 0;for(vn=q.length>3&&typeof vn=="function"?($t--,vn):void 0,St&&ip(pe[0],pe[1],St)&&(vn=$t<3?void 0:vn,$t=1),re=Object(re);++Je<$t;){var Ot=pe[Je];Ot&&q(re,Ot,Je,vn)}return re})}function rf(q){return function(re,pe,Je){for(var $t=-1,vn=Object(re),St=Je(re),Ot=St.length;Ot--;){var Gt=St[q?Ot:++$t];if(pe(vn[Gt],Gt,vn)===!1)break}return re}}function au(q,re){var pe=q.__data__;return af(re)?pe[typeof re=="string"?"string":"hash"]:pe.map}function ss(q,re){var pe=Rt(q,re);return np(pe)?pe:void 0}function of(q){var re=Cn.call(q,rt),pe=q[rt];try{q[rt]=void 0;var Je=!0}catch(vn){}var $t=nt.call(q);return Je&&(re?q[rt]=pe:delete q[rt]),$t}function Ci(q){return typeof q.constructor=="function"&&!So(q)?Q1(ct(q)):{}}function rp(q,re){var pe=typeof q;return re=re==null?a:re,!!re&&(pe=="number"||pe!="symbol"&&Te.test(q))&&q>-1&&q%1==0&&q<re}function ip(q,re,pe){if(!Zo(pe))return!1;var Je=typeof re;return(Je=="number"?Ut(pe)&&rp(re,pe.length):Je=="string"&&re in pe)?Ta(pe[re],q):!1}function af(q){var re=typeof q;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?q!=="__proto__":q===null}function Xs(q){return!!De&&De in q}function So(q){var re=q&&q.constructor,pe=typeof re=="function"&&re.prototype||Pt;return q===pe}function Zs(q){var re=[];if(q!=null)for(var pe in Object(q))re.push(pe);return re}function su(q){return nt.call(q)}function hg(q,re,pe){return re=wr(re===void 0?q.length-1:re,0),function(){for(var Je=arguments,$t=-1,vn=wr(Je.length-re,0),St=Array(vn);++$t<vn;)St[$t]=Je[re+$t];$t=-1;for(var Ot=Array(re+1);++$t<re;)Ot[$t]=Je[$t];return Ot[re]=pe(St),vt(q,this,Ot)}}function uc(q,re){if(!(re==="constructor"&&typeof q[re]=="function")&&re!="__proto__")return q[re]}var cc=sf(Ko);function sf(q){var re=0,pe=0;return function(){var Je=sr(),$t=o-(Je-pe);if(pe=Je,$t>0){if(++re>=i)return arguments[0]}else re=0;return q.apply(void 0,arguments)}}function dc(q){if(q!=null){try{return fn.call(q)}catch(re){}try{return q+""}catch(re){}}return""}function Ta(q,re){return q===re||q!==q&&re!==re}var lf=ou(function(){return arguments}())?ou:function(q){return qn(q)&&Cn.call(q,"callee")&&!Be.call(q,"callee")},lu=Array.isArray;function Ut(q){return q!=null&&ap(q.length)&&!hc(q)}function op(q){return qn(q)&&Ut(q)}var fc=ln||pg;function hc(q){if(!Zo(q))return!1;var re=qs(q);return re==v||re==y||re==u||re==T}function ap(q){return typeof q=="number"&&q>-1&&q%1==0&&q<=a}function Zo(q){var re=typeof q;return q!=null&&(re=="object"||re=="function")}function qn(q){return q!=null&&typeof q=="object"}function uf(q){if(!qn(q)||qs(q)!=C)return!1;var re=ct(q);if(re===null)return!0;var pe=Cn.call(re,"constructor")&&re.constructor;return typeof pe=="function"&&pe instanceof pe&&fn.call(pe)==tn}var sp=ft?at(ft):lc;function cf(q){return Jr(q,lp(q))}function lp(q){return Ut(q)?dg(q,!0):Ys(q)}var pn=as(function(q,re,pe,Je){Yo(q,re,pe,Je)});function jt(q){return function(){return q}}function up(q){return q}function pg(){return!1}e.exports=pn})(zC,zC.exports);const Ol=zC.exports;function Is(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function sh(e,...t){return YJ(e)?e(...t):e}var YJ=e=>typeof e=="function",KJ=e=>/!(important)?$/.test(e),GT=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,$C=(e,t)=>n=>{const r=String(t),i=KJ(r),o=GT(r),a=e?`${e}.${o}`:o;let s=Is(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=GT(s),i?`${s} !important`:s};function Gv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var u;const s=$C(t,o)(a);let l=(u=n==null?void 0:n(s,a))!=null?u:s;return r&&(l=r(l,a)),l}}var s3=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Ss(e,t){return n=>{const r={property:n,scale:e};return r.transform=Gv({scale:e,transform:t}),r}}var XJ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function ZJ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:XJ(t),transform:n?Gv({scale:n,compose:r}):r}}var oB=["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))"];function QJ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...oB].join(" ")}function JJ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...oB].join(" ")}var eee={"--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(" ")},tee={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,/*!*/ /*!*/)"};function nee(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(", ")}}var ree={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},aB="& > :not(style) ~ :not(style)",iee={[aB]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},oee={[aB]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},FC={"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"},aee=new Set(Object.values(FC)),sB=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),see=e=>e.trim();function lee(e,t){var p;var n;if(e==null||sB.has(e))return e;const r=new RegExp("(?<type>^[a-z-A-Z]+)\\((?<values>(.*))\\)","g"),{type:i,values:o}=(p=(n=r.exec(e))==null?void 0:n.groups)!=null?p:{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(see).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in FC?FC[s]:s;l.unshift(u);const f=l.map(m=>{if(aee.has(m))return m;const v=m.indexOf(" "),[y,x]=v!==-1?[m.substr(0,v),m.substr(v+1)]:[m],E=lB(x)?x:x&&x.split(" "),_=`colors.${y}`,C=_ in t.__cssMap?t.__cssMap[_].varRef:y;return E?[C,...Array.isArray(E)?E:[E]].join(" "):C});return`${a}(${f.join(", ")})`}var lB=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),uee=(e,t)=>lee(e,t!=null?t:{});function cee(e){return/^var\(--.+\)$/.test(e)}var dee=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},ml=e=>t=>`${e}(${t})`,un={filter(e){return e!=="auto"?e:eee},backdropFilter(e){return e!=="auto"?e:tee},ring(e){return nee(un.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?QJ():e==="auto-gpu"?JJ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=dee(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(cee(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:uee,blur:ml("blur"),opacity:ml("opacity"),brightness:ml("brightness"),contrast:ml("contrast"),dropShadow:ml("drop-shadow"),grayscale:ml("grayscale"),hueRotate:ml("hue-rotate"),invert:ml("invert"),saturate:ml("saturate"),sepia:ml("sepia"),bgImage(e){return e==null||lB(e)||sB.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var i;const{space:t,divide:n}=(i=ree[e])!=null?i:{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:Ss("borderWidths"),borderStyles:Ss("borderStyles"),colors:Ss("colors"),borders:Ss("borders"),radii:Ss("radii",un.px),space:Ss("space",s3(un.vh,un.px)),spaceT:Ss("space",s3(un.vh,un.px)),degreeT(e){return{property:e,transform:un.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Gv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Ss("sizes",s3(un.vh,un.px)),sizesT:Ss("sizes",s3(un.vh,un.fraction)),shadows:Ss("shadows"),logical:ZJ,blur:Ss("blur",un.blur)},g4={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",un.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:un.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",un.gradient),bgClip:{transform:un.bgClip}};Object.assign(g4,{bgImage:g4.backgroundImage,bgImg:g4.backgroundImage});var bn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(bn,{rounded:bn.borderRadius,roundedTop:bn.borderTopRadius,roundedTopLeft:bn.borderTopLeftRadius,roundedTopRight:bn.borderTopRightRadius,roundedTopStart:bn.borderStartStartRadius,roundedTopEnd:bn.borderStartEndRadius,roundedBottom:bn.borderBottomRadius,roundedBottomLeft:bn.borderBottomLeftRadius,roundedBottomRight:bn.borderBottomRightRadius,roundedBottomStart:bn.borderEndStartRadius,roundedBottomEnd:bn.borderEndEndRadius,roundedLeft:bn.borderLeftRadius,roundedRight:bn.borderRightRadius,roundedStart:bn.borderInlineStartRadius,roundedEnd:bn.borderInlineEndRadius,borderStart:bn.borderInlineStart,borderEnd:bn.borderInlineEnd,borderTopStartRadius:bn.borderStartStartRadius,borderTopEndRadius:bn.borderStartEndRadius,borderBottomStartRadius:bn.borderEndStartRadius,borderBottomEndRadius:bn.borderEndEndRadius,borderStartRadius:bn.borderInlineStartRadius,borderEndRadius:bn.borderInlineEndRadius,borderStartWidth:bn.borderInlineStartWidth,borderEndWidth:bn.borderInlineEndWidth,borderStartColor:bn.borderInlineStartColor,borderEndColor:bn.borderInlineEndColor,borderStartStyle:bn.borderInlineStartStyle,borderEndStyle:bn.borderInlineEndStyle});var fee={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},HC={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(HC,{shadow:HC.boxShadow});var hee={filter:{transform:un.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",un.brightness),contrast:ae.propT("--chakra-contrast",un.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",un.invert),saturate:ae.propT("--chakra-saturate",un.saturate),dropShadow:ae.propT("--chakra-drop-shadow",un.dropShadow),backdropFilter:{transform:un.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",un.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",un.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",un.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",un.saturate)},m5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:un.flexDirection},experimental_spaceX:{static:iee,transform:Gv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:oee,transform:Gv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(m5,{flexDir:m5.flexDirection});var uB={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.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},pee={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:un.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},za={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",un.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(za,{w:za.width,h:za.height,minW:za.minWidth,maxW:za.maxWidth,minH:za.minHeight,maxH:za.maxHeight,overscroll:za.overscrollBehavior,overscrollX:za.overscrollBehaviorX,overscrollY:za.overscrollBehaviorY});var gee={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function mee(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var vee=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},yee=vee(mee),bee={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},See={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},mw=(e,t,n)=>{const r={},i=yee(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},xee={srOnly:{transform(e){return e===!0?bee:e==="focusable"?See:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>mw(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>mw(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>mw(t,e,n)}},lv={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(lv,{insetStart:lv.insetInlineStart,insetEnd:lv.insetInlineEnd});var wee={ring:{transform:un.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},er={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(er,{m:er.margin,mt:er.marginTop,mr:er.marginRight,me:er.marginInlineEnd,marginEnd:er.marginInlineEnd,mb:er.marginBottom,ml:er.marginLeft,ms:er.marginInlineStart,marginStart:er.marginInlineStart,mx:er.marginX,my:er.marginY,p:er.padding,pt:er.paddingTop,py:er.paddingY,px:er.paddingX,pb:er.paddingBottom,pl:er.paddingLeft,ps:er.paddingInlineStart,paddingStart:er.paddingInlineStart,pr:er.paddingRight,pe:er.paddingInlineEnd,paddingEnd:er.paddingInlineEnd});var Cee={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},_ee={clipPath:!0,transform:ae.propT("transform",un.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},kee={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},Eee={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",un.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.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"}},Pee={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function cB(e){return Is(e)&&e.reference?e.reference:String(e)}var Ib=(e,...t)=>t.map(cB).join(` ${e} `).replace(/calc/g,""),qT=(...e)=>`calc(${Ib("+",...e)})`,YT=(...e)=>`calc(${Ib("-",...e)})`,VC=(...e)=>`calc(${Ib("*",...e)})`,KT=(...e)=>`calc(${Ib("/",...e)})`,XT=e=>{const t=cB(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:VC(t,-1)},th=Object.assign(e=>({add:(...t)=>th(qT(e,...t)),subtract:(...t)=>th(YT(e,...t)),multiply:(...t)=>th(VC(e,...t)),divide:(...t)=>th(KT(e,...t)),negate:()=>th(XT(e)),toString:()=>e.toString()}),{add:qT,subtract:YT,multiply:VC,divide:KT,negate:XT});function Tee(e,t="-"){return e.replace(/\s+/g,t)}function Lee(e){const t=Tee(e.toString());return Oee(Aee(t))}function Aee(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function Oee(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function Ree(e,t=""){return[t,e].filter(Boolean).join("-")}function Mee(e,t){return`var(${e}${t?`, ${t}`:""})`}function Iee(e,t=""){return Lee(`--${Ree(e,t)}`)}function Hn(e,t,n){const r=Iee(e,n);return{variable:r,reference:Mee(r,t)}}function Dee(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Nee(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function WC(e){if(e==null)return e;const{unitless:t}=Nee(e);return t||typeof e=="number"?`${e}px`:e}var dB=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,U8=e=>Object.fromEntries(Object.entries(e).sort(dB));function ZT(e){const t=U8(e);return Object.assign(Object.values(t),t)}function Bee(e){const t=Object.keys(U8(e));return new Set(t)}function QT(e){var n;if(!e)return e;e=(n=WC(e))!=null?n:e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(new RegExp("(\\d+\\.?\\d*)","u"),r=>`${parseFloat(r)+t}`)}function zm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${WC(e)})`),t&&n.push("and",`(max-width: ${WC(t)})`),n.join(" ")}function zee(e){var o;if(!e)return null;e.base=(o=e.base)!=null?o:"0px";const t=ZT(e),n=Object.entries(e).sort(dB).map(([a,s],l,u)=>{var p;let[,f]=(p=u[l+1])!=null?p:[];return f=parseFloat(f)>0?QT(f):void 0,{_minW:QT(s),breakpoint:a,minW:s,maxW:f,maxWQuery:zm(null,f),minWQuery:zm(s),minMaxQuery:zm(s,f)}}),r=Bee(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>r.has(l))},asObject:U8(e),asArray:ZT(e),details:n,media:[null,...t.map(a=>zm(a)).slice(1)],toArrayValue(a){if(!Is(a))throw new Error("toArrayValue: value must be an object");const s=i.map(l=>{var u;return(u=a[l])!=null?u:null});for(;Dee(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,u)=>{const f=i[u];return f!=null&&l!=null&&(s[f]=l),s},{})}}}var Oi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Gc=e=>fB(t=>e(t,"&"),"[role=group]","[data-group]",".group"),wu=e=>fB(t=>e(t,"~ &"),"[data-peer]",".peer"),fB=(e,...t)=>t.map(e).join(", "),Db={_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:Gc(Oi.hover),_peerHover:wu(Oi.hover),_groupFocus:Gc(Oi.focus),_peerFocus:wu(Oi.focus),_groupFocusVisible:Gc(Oi.focusVisible),_peerFocusVisible:wu(Oi.focusVisible),_groupActive:Gc(Oi.active),_peerActive:wu(Oi.active),_groupDisabled:Gc(Oi.disabled),_peerDisabled:wu(Oi.disabled),_groupInvalid:Gc(Oi.invalid),_peerInvalid:wu(Oi.invalid),_groupChecked:Gc(Oi.checked),_peerChecked:wu(Oi.checked),_groupFocusWithin:Gc(Oi.focusWithin),_peerFocusWithin:wu(Oi.focusWithin),_peerPlaceholderShown:wu(Oi.placeholderShown),_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]"},$ee=Object.keys(Db);function JT(e,t){return Hn(String(e).replace(/\./g,"-"),void 0,t)}function Fee(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=JT(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...y]=m,x=`${v}.-${y.join(".")}`,E=th.negate(s),_=th.negate(u);r[x]={value:E,var:l,varRef:_}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const f=m=>{const y=[String(i).split(".")[0],m].join(".");if(!e[y])return m;const{reference:E}=JT(y,t==null?void 0:t.cssVarPrefix);return E},p=Is(s)?s:{default:s};n=Ol(n,Object.entries(p).reduce((m,[v,y])=>{var C;var x;const E=f(y);if(v==="default")return m[l]=E,m;const _=(C=(x=Db)==null?void 0:x[v])!=null?C:v;return m[_]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function Hee(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Vee(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Wee=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function Uee(e){return Vee(e,Wee)}function jee(e){return e.semanticTokens}function Gee(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function qee({tokens:e,semanticTokens:t}){var i,o;const n=Object.entries((i=UC(e))!=null?i:{}).map(([a,s])=>[a,{isSemantic:!1,value:s}]),r=Object.entries((o=UC(t,1))!=null?o:{}).map(([a,s])=>[a,{isSemantic:!0,value:s}]);return Object.fromEntries([...n,...r])}function UC(e,t=1/0){return!Is(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Is(i)||Array.isArray(i)?Object.entries(UC(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function Yee(e){var t;const n=Gee(e),r=Uee(n),i=jee(n),o=qee({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=Fee(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--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"},...l},__cssMap:s,__breakpoints:zee(n.breakpoints)}),n}var j8=Ol({},g4,bn,fee,m5,za,hee,wee,pee,uB,xee,lv,HC,er,Pee,Eee,Cee,_ee,gee,kee),Kee=Object.assign({},er,za,m5,uB,lv),Xee=Object.keys(Kee),Zee=[...Object.keys(j8),...$ee],Qee={...j8,...Db},Jee=e=>e in Qee,ete=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=sh(e[a],t);if(s==null)continue;if(s=Is(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;u<l;u+=1){const f=i==null?void 0:i[u];if(!f){o[a]=s[u];continue}o[f]=o[f]||{},s[u]!=null&&(o[f][a]=s[u])}}return o};function tte(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function nte(e){return/^var\(--.+\)$/.test(e)}var rte=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!nte(t),ite=(e,t)=>{var a,s;if(t==null)return t;const n=l=>{var u,f;return(f=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:f.varRef},r=l=>{var u;return(u=n(l))!=null?u:l},[i,o]=tte(t);return t=(s=(a=n(i))!=null?a:r(o))!=null?s:r(t),t};function ote(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var p,m;var s;const l=sh(o,r),u=ete(l)(r);let f={};for(let v in u){const y=u[v];let x=sh(y,r);v in n&&(v=n[v]),rte(v,x)&&(x=ite(r,x));let E=t[v];if(E===!0&&(E={property:v}),Is(x)){f[v]=(p=f[v])!=null?p:{},f[v]=Ol({},f[v],i(x,!0));continue}let _=(m=(s=E==null?void 0:E.transform)==null?void 0:s.call(E,x,r,l))!=null?m:x;_=E!=null&&E.processResult?i(_,!0):_;const C=sh(E==null?void 0:E.property,r);if(!a&&(E==null?void 0:E.static)){const T=sh(E.static,r);f=Ol({},f,T)}if(C&&Array.isArray(C)){for(const T of C)f[T]=_;continue}if(C){C==="&"&&Is(_)?f=Ol({},f,_):f[C]=_;continue}if(Is(_)){f=Ol({},f,_);continue}f[v]=_}return f};return i}var hB=e=>t=>ote({theme:t,pseudos:Db,configs:j8})(e);function nr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function ate(e,t){if(Array.isArray(e))return e;if(Is(e))return t(e);if(e!=null)return[e]}function ste(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function lte(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},f=ate(o,t.toArrayValue);if(!f)return u;const p=f.length,m=p===1,v=!!r.parts;for(let y=0;y<p;y++){const x=t.details[y],E=t.details[ste(f,y)],_=zm(x.minW,E==null?void 0:E._minW),C=sh((s=r[i])==null?void 0:s[f[y]],a);if(!!C){if(v){(l=r.parts)==null||l.forEach(T=>{Ol(u,{[T]:m?C[T]:{[_]:C[T]}})});continue}if(!v){m?Ol(u,C):u[_]=C;continue}u[_]=C}}return u}}function ute(e){return t=>{var a;const{variant:n,size:r,theme:i}=t,o=lte(i);return Ol({},sh((a=e.baseStyle)!=null?a:{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function cte(e,t,n){var o;var r,i;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function wn(e){return Hee(e,["styleConfig","size","variant","colorScheme"])}function dte(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]}function fte(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var hte=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(fte(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=dte(i);try{o.insertRule(r,o.cssRules.length)}catch(a){}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ui="-ms-",v5="-moz-",Sn="-webkit-",pB="comm",G8="rule",q8="decl",pte="@import",gB="@keyframes",gte=Math.abs,Nb=String.fromCharCode,mte=Object.assign;function vte(e,t){return Ii(e,0)^45?(((t<<2^Ii(e,0))<<2^Ii(e,1))<<2^Ii(e,2))<<2^Ii(e,3):0}function mB(e){return e.trim()}function yte(e,t){return(e=t.exec(e))?e[0]:e}function Pn(e,t,n){return e.replace(t,n)}function jC(e,t){return e.indexOf(t)}function Ii(e,t){return e.charCodeAt(t)|0}function qv(e,t,n){return e.slice(t,n)}function kl(e){return e.length}function Y8(e){return e.length}function l3(e,t){return t.push(e),e}function bte(e,t){return e.map(t).join("")}var Bb=1,v1=1,vB=0,jo=0,Yr=0,D1="";function zb(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Bb,column:v1,length:a,return:""}}function hm(e,t){return mte(zb("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ste(){return Yr}function xte(){return Yr=jo>0?Ii(D1,--jo):0,v1--,Yr===10&&(v1=1,Bb--),Yr}function va(){return Yr=jo<vB?Ii(D1,jo++):0,v1++,Yr===10&&(v1=1,Bb++),Yr}function Bl(){return Ii(D1,jo)}function m4(){return jo}function L2(e,t){return qv(D1,e,t)}function Yv(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 yB(e){return Bb=v1=1,vB=kl(D1=e),jo=0,[]}function bB(e){return D1="",e}function v4(e){return mB(L2(jo-1,GC(e===91?e+2:e===40?e+1:e)))}function wte(e){for(;(Yr=Bl())&&Yr<33;)va();return Yv(e)>2||Yv(Yr)>3?"":" "}function Cte(e,t){for(;--t&&va()&&!(Yr<48||Yr>102||Yr>57&&Yr<65||Yr>70&&Yr<97););return L2(e,m4()+(t<6&&Bl()==32&&va()==32))}function GC(e){for(;va();)switch(Yr){case e:return jo;case 34:case 39:e!==34&&e!==39&&GC(Yr);break;case 40:e===41&&GC(e);break;case 92:va();break}return jo}function _te(e,t){for(;va()&&e+Yr!==47+10;)if(e+Yr===42+42&&Bl()===47)break;return"/*"+L2(t,jo-1)+"*"+Nb(e===47?e:va())}function kte(e){for(;!Yv(Bl());)va();return L2(e,jo)}function Ete(e){return bB(y4("",null,null,null,[""],e=yB(e),0,[0],e))}function y4(e,t,n,r,i,o,a,s,l){for(var u=0,f=0,p=a,m=0,v=0,y=0,x=1,E=1,_=1,C=0,T="",A=i,M=o,I=r,D=T;E;)switch(y=C,C=va()){case 40:if(y!=108&&Ii(D,p-1)==58){jC(D+=Pn(v4(C),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:D+=v4(C);break;case 9:case 10:case 13:case 32:D+=wte(y);break;case 92:D+=Cte(m4()-1,7);continue;case 47:switch(Bl()){case 42:case 47:l3(Pte(_te(va(),m4()),t,n),l);break;default:D+="/"}break;case 123*x:s[u++]=kl(D)*_;case 125*x:case 59:case 0:switch(C){case 0:case 125:E=0;case 59+f:v>0&&kl(D)-p&&l3(v>32?tL(D+";",r,n,p-1):tL(Pn(D," ","")+";",r,n,p-2),l);break;case 59:D+=";";default:if(l3(I=eL(D,t,n,u,f,i,s,T,A=[],M=[],p),o),C===123)if(f===0)y4(D,t,I,I,A,o,p,s,M);else switch(m===99&&Ii(D,3)===110?100:m){case 100:case 109:case 115:y4(e,I,I,r&&l3(eL(e,I,I,0,0,i,s,T,i,A=[],p),M),i,M,p,s,r?A:M);break;default:y4(D,I,I,I,[""],M,0,s,M)}}u=f=v=0,x=_=1,T=D="",p=a;break;case 58:p=1+kl(D),v=y;default:if(x<1){if(C==123)--x;else if(C==125&&x++==0&&xte()==125)continue}switch(D+=Nb(C),C*x){case 38:_=f>0?1:(D+="\f",-1);break;case 44:s[u++]=(kl(D)-1)*_,_=1;break;case 64:Bl()===45&&(D+=v4(va())),m=Bl(),f=p=kl(T=D+=kte(m4())),C++;break;case 45:y===45&&kl(D)==2&&(x=0)}}return o}function eL(e,t,n,r,i,o,a,s,l,u,f){for(var p=i-1,m=i===0?o:[""],v=Y8(m),y=0,x=0,E=0;y<r;++y)for(var _=0,C=qv(e,p+1,p=gte(x=a[y])),T=e;_<v;++_)(T=mB(x>0?m[_]+" "+C:Pn(C,/&\f/g,m[_])))&&(l[E++]=T);return zb(e,t,n,i===0?G8:s,l,u,f)}function Pte(e,t,n){return zb(e,t,n,pB,Nb(Ste()),qv(e,2,-2),0)}function tL(e,t,n,r){return zb(e,t,n,q8,qv(e,0,r),qv(e,r+1,-1),r)}function W0(e,t){for(var n="",r=Y8(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Tte(e,t,n,r){switch(e.type){case pte:case q8:return e.return=e.return||e.value;case pB:return"";case gB:return e.return=e.value+"{"+W0(e.children,r)+"}";case G8:e.value=e.props.join(",")}return kl(n=W0(e.children,r))?e.return=e.value+"{"+n+"}":""}function Lte(e){var t=Y8(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function Ate(e){return function(t){t.root||(t=t.return)&&e(t)}}var nL=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function SB(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ote=function(t,n,r){for(var i=0,o=0;i=o,o=Bl(),i===38&&o===12&&(n[r]=1),!Yv(o);)va();return L2(t,jo)},Rte=function(t,n){var r=-1,i=44;do switch(Yv(i)){case 0:i===38&&Bl()===12&&(n[r]=1),t[r]+=Ote(jo-1,n,r);break;case 2:t[r]+=v4(i);break;case 4:if(i===44){t[++r]=Bl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Nb(i)}while(i=va());return t},Mte=function(t,n){return bB(Rte(yB(t),n))},rL=new WeakMap,Ite=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!rL.get(r))&&!i){rL.set(t,!0);for(var o=[],a=Mte(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var f=0;f<s.length;f++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[f]):s[f]+" "+a[l]}}},Dte=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xB(e,t){switch(vte(e,t)){case 5103:return Sn+"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 Sn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Sn+e+v5+e+Ui+e+e;case 6828:case 4268:return Sn+e+Ui+e+e;case 6165:return Sn+e+Ui+"flex-"+e+e;case 5187:return Sn+e+Pn(e,/(\w+).+(:[^]+)/,Sn+"box-$1$2"+Ui+"flex-$1$2")+e;case 5443:return Sn+e+Ui+"flex-item-"+Pn(e,/flex-|-self/,"")+e;case 4675:return Sn+e+Ui+"flex-line-pack"+Pn(e,/align-content|flex-|-self/,"")+e;case 5548:return Sn+e+Ui+Pn(e,"shrink","negative")+e;case 5292:return Sn+e+Ui+Pn(e,"basis","preferred-size")+e;case 6060:return Sn+"box-"+Pn(e,"-grow","")+Sn+e+Ui+Pn(e,"grow","positive")+e;case 4554:return Sn+Pn(e,/([^-])(transform)/g,"$1"+Sn+"$2")+e;case 6187:return Pn(Pn(Pn(e,/(zoom-|grab)/,Sn+"$1"),/(image-set)/,Sn+"$1"),e,"")+e;case 5495:case 3959:return Pn(e,/(image-set\([^]*)/,Sn+"$1$`$1");case 4968:return Pn(Pn(e,/(.+:)(flex-)?(.*)/,Sn+"box-pack:$3"+Ui+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Sn+e+e;case 4095:case 3583:case 4068:case 2532:return Pn(e,/(.+)-inline(.+)/,Sn+"$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(kl(e)-1-t>6)switch(Ii(e,t+1)){case 109:if(Ii(e,t+4)!==45)break;case 102:return Pn(e,/(.+:)(.+)-([^]+)/,"$1"+Sn+"$2-$3$1"+v5+(Ii(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~jC(e,"stretch")?xB(Pn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ii(e,t+1)!==115)break;case 6444:switch(Ii(e,kl(e)-3-(~jC(e,"!important")&&10))){case 107:return Pn(e,":",":"+Sn)+e;case 101:return Pn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Sn+(Ii(e,14)===45?"inline-":"")+"box$3$1"+Sn+"$2$3$1"+Ui+"$2box$3")+e}break;case 5936:switch(Ii(e,t+11)){case 114:return Sn+e+Ui+Pn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Sn+e+Ui+Pn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Sn+e+Ui+Pn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Sn+e+Ui+e+e}return e}var Nte=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case q8:t.return=xB(t.value,t.length);break;case gB:return W0([hm(t,{value:Pn(t.value,"@","@"+Sn)})],i);case G8:if(t.length)return bte(t.props,function(o){switch(yte(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return W0([hm(t,{props:[Pn(o,/:(read-\w+)/,":"+v5+"$1")]})],i);case"::placeholder":return W0([hm(t,{props:[Pn(o,/:(plac\w+)/,":"+Sn+"input-$1")]}),hm(t,{props:[Pn(o,/:(plac\w+)/,":"+v5+"$1")]}),hm(t,{props:[Pn(o,/:(plac\w+)/,Ui+"input-$1")]})],i)}return""})}},Bte=[Nte],wB=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var E=x.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=t.stylisPlugins||Bte,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var E=x.getAttribute("data-emotion").split(" "),_=1;_<E.length;_++)o[E[_]]=!0;s.push(x)});var l,u=[Ite,Dte];{var f,p=[Tte,Ate(function(x){f.insert(x)})],m=Lte(u.concat(i,p)),v=function(E){return W0(Ete(E),m)};l=function(E,_,C,T){f=C,v(E?E+"{"+_.styles+"}":_.styles),T&&(y.inserted[_.name]=!0)}}var y={key:n,sheet:new hte({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y};function Dn(){return Dn=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},Dn.apply(this,arguments)}var CB={exports:{}},Nn={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wi=typeof Symbol=="function"&&Symbol.for,K8=wi?Symbol.for("react.element"):60103,X8=wi?Symbol.for("react.portal"):60106,$b=wi?Symbol.for("react.fragment"):60107,Fb=wi?Symbol.for("react.strict_mode"):60108,Hb=wi?Symbol.for("react.profiler"):60114,Vb=wi?Symbol.for("react.provider"):60109,Wb=wi?Symbol.for("react.context"):60110,Z8=wi?Symbol.for("react.async_mode"):60111,Ub=wi?Symbol.for("react.concurrent_mode"):60111,jb=wi?Symbol.for("react.forward_ref"):60112,Gb=wi?Symbol.for("react.suspense"):60113,zte=wi?Symbol.for("react.suspense_list"):60120,qb=wi?Symbol.for("react.memo"):60115,Yb=wi?Symbol.for("react.lazy"):60116,$te=wi?Symbol.for("react.block"):60121,Fte=wi?Symbol.for("react.fundamental"):60117,Hte=wi?Symbol.for("react.responder"):60118,Vte=wi?Symbol.for("react.scope"):60119;function ka(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case K8:switch(e=e.type,e){case Z8:case Ub:case $b:case Hb:case Fb:case Gb:return e;default:switch(e=e&&e.$$typeof,e){case Wb:case jb:case Yb:case qb:case Vb:return e;default:return t}}case X8:return t}}}function _B(e){return ka(e)===Ub}Nn.AsyncMode=Z8;Nn.ConcurrentMode=Ub;Nn.ContextConsumer=Wb;Nn.ContextProvider=Vb;Nn.Element=K8;Nn.ForwardRef=jb;Nn.Fragment=$b;Nn.Lazy=Yb;Nn.Memo=qb;Nn.Portal=X8;Nn.Profiler=Hb;Nn.StrictMode=Fb;Nn.Suspense=Gb;Nn.isAsyncMode=function(e){return _B(e)||ka(e)===Z8};Nn.isConcurrentMode=_B;Nn.isContextConsumer=function(e){return ka(e)===Wb};Nn.isContextProvider=function(e){return ka(e)===Vb};Nn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===K8};Nn.isForwardRef=function(e){return ka(e)===jb};Nn.isFragment=function(e){return ka(e)===$b};Nn.isLazy=function(e){return ka(e)===Yb};Nn.isMemo=function(e){return ka(e)===qb};Nn.isPortal=function(e){return ka(e)===X8};Nn.isProfiler=function(e){return ka(e)===Hb};Nn.isStrictMode=function(e){return ka(e)===Fb};Nn.isSuspense=function(e){return ka(e)===Gb};Nn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$b||e===Ub||e===Hb||e===Fb||e===Gb||e===zte||typeof e=="object"&&e!==null&&(e.$$typeof===Yb||e.$$typeof===qb||e.$$typeof===Vb||e.$$typeof===Wb||e.$$typeof===jb||e.$$typeof===Fte||e.$$typeof===Hte||e.$$typeof===Vte||e.$$typeof===$te)};Nn.typeOf=ka;(function(e){e.exports=Nn})(CB);var kB=CB.exports,Wte={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ute={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},EB={};EB[kB.ForwardRef]=Wte;EB[kB.Memo]=Ute;var jte=!0;function Gte(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var PB=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||jte===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},TB=function(t,n,r){PB(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function qte(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Yte={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},Kte=/[A-Z]|^ms/g,Xte=/_EMO_([^_]+?)_([^]*?)_EMO_/g,LB=function(t){return t.charCodeAt(1)===45},iL=function(t){return t!=null&&typeof t!="boolean"},vw=SB(function(e){return LB(e)?e:e.replace(Kte,"-$&").toLowerCase()}),oL=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Xte,function(r,i,o){return El={name:i,styles:o,next:El},i})}return Yte[t]!==1&&!LB(t)&&typeof n=="number"&&n!==0?n+"px":n};function Kv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return El={name:n.name,styles:n.styles,next:El},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)El={name:r.name,styles:r.styles,next:El},r=r.next;var i=n.styles+";";return i}return Zte(e,t,n)}case"function":{if(e!==void 0){var o=El,a=n(e);return El=o,Kv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function Zte(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Kv(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":iL(a)&&(r+=vw(o)+":"+oL(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)iL(a[s])&&(r+=vw(o)+":"+oL(o,a[s])+";");else{var l=Kv(e,t,a);switch(o){case"animation":case"animationName":{r+=vw(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var aL=/label:\s*([^\s;\n{]+)\s*(;|$)/g,El,Q8=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";El=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=Kv(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=Kv(r,n,t[s]),i&&(o+=a[s]);aL.lastIndex=0;for(var l="",u;(u=aL.exec(o))!==null;)l+="-"+u[1];var f=qte(o)+l;return{name:f,styles:o,next:El}},Qte=function(t){return t()},AB=U6["useInsertionEffect"]?U6["useInsertionEffect"]:!1,Jte=AB||Qte,sL=AB||k.exports.useLayoutEffect,OB=k.exports.createContext(typeof HTMLElement<"u"?wB({key:"css"}):null),ene=OB.Provider,RB=function(t){return k.exports.forwardRef(function(n,r){var i=k.exports.useContext(OB);return t(n,i,r)})},Xv=k.exports.createContext({}),tne=function(t,n){if(typeof n=="function"){var r=n(t);return r}return Dn({},t,n)},nne=nL(function(e){return nL(function(t){return tne(e,t)})}),rne=function(t){var n=k.exports.useContext(Xv);return t.theme!==n&&(n=nne(n)(t.theme)),k.exports.createElement(Xv.Provider,{value:n},t.children)},Kb=RB(function(e,t){var n=e.styles,r=Q8([n],void 0,k.exports.useContext(Xv)),i=k.exports.useRef();return sL(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),sL(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&TB(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function ine(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q8(t)}var Hd=function(){var t=ine.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},MB=1/60*1e3,one=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},IB=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(one())},MB)};function ane(e){var t=[],n=[],r=0,i=!1,o=new WeakSet,a={schedule:function(s,l,u){l===void 0&&(l=!1),u===void 0&&(u=!1);var f=u&&i,p=f?t:n;return l&&o.add(s),p.indexOf(s)===-1&&(p.push(s),f&&i&&(r=t.length)),s},cancel:function(s){var l=n.indexOf(s);l!==-1&&n.splice(l,1),o.delete(s)},process:function(s){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var u=0;u<r;u++){var f=t[u];f(s),o.has(f)&&(a.schedule(f),e())}i=!1}};return a}var sne=40,qC=!0,Zv=!1,YC=!1,uv={delta:0,timestamp:0},Xb=["read","update","preRender","render","postRender"],J8=Xb.reduce(function(e,t){return e[t]=ane(function(){return Zv=!0}),e},{}),lne=Xb.reduce(function(e,t){var n=J8[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),Zv||dne(),n.schedule(r,i,o)},e},{}),une=Xb.reduce(function(e,t){return e[t]=J8[t].cancel,e},{}),cne=function(e){return J8[e].process(uv)},DB=function(e){Zv=!1,uv.delta=qC?MB:Math.max(Math.min(e-uv.timestamp,sne),1),uv.timestamp=e,YC=!0,Xb.forEach(cne),YC=!1,Zv&&(qC=!1,IB(DB))},dne=function(){Zv=!0,qC=!0,YC||IB(DB)},lL=function(){return uv};function fne(e){return typeof e=="function"}function hne(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function pne(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var gne=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},NB=gne(pne);function BB(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var zB=e=>BB(e,t=>t!=null);function mne(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var vne=mne();function $B(e,...t){return fne(e)?e(...t):e}function yne(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function bne(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=k.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=k.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var Sne=/^((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)-.*))$/,xne=SB(function(e){return Sne.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),wne=xne,Cne=function(t){return t!=="theme"},uL=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?wne:Cne},cL=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},_ne=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return PB(n,r,i),Jte(function(){return TB(n,r,i)}),null},kne=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=cL(t,n,r),l=s||uL(i),u=!l("as");return function(){var f=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)p.push.apply(p,f);else{p.push(f[0][0]);for(var m=f.length,v=1;v<m;v++)p.push(f[v],f[0][v])}var y=RB(function(x,E,_){var C=u&&x.as||i,T="",A=[],M=x;if(x.theme==null){M={};for(var I in x)M[I]=x[I];M.theme=k.exports.useContext(Xv)}typeof x.className=="string"?T=Gte(E.registered,A,x.className):x.className!=null&&(T=x.className+" ");var D=Q8(p.concat(A),E.registered,M);T+=E.key+"-"+D.name,a!==void 0&&(T+=" "+a);var B=u&&s===void 0?uL(C):l,F={};for(var H in x)u&&H==="as"||B(H)&&(F[H]=x[H]);return F.className=T,F.ref=_,k.exports.createElement(k.exports.Fragment,null,k.exports.createElement(_ne,{cache:E,serialized:D,isStringTag:typeof C=="string"}),k.exports.createElement(C,F))});return y.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",y.defaultProps=t.defaultProps,y.__emotion_real=y,y.__emotion_base=i,y.__emotion_styles=p,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return"."+a}}),y.withComponent=function(x,E){return e(x,Dn({},n,E,{shouldForwardProp:cL(y,E,!0)})).apply(void 0,p)},y}},Ene=["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"],KC=kne.bind();Ene.forEach(function(e){KC[e]=KC(e)});function Tn(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...f){r();for(const p of f)t[p]=l(p);return Tn(e,t)}function o(...f){for(const p of f)p in t||(t[p]=l(p));return Tn(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(f){const v=`chakra-${(["container","root"].includes(f!=null?f:"")?[e]:[e,f]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>f}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var Pne=Tn("accordion").parts("root","container","button","panel").extend("icon"),Tne=Tn("alert").parts("title","description","container").extend("icon","spinner"),Lne=Tn("avatar").parts("label","badge","container").extend("excessLabel","group"),Ane=Tn("breadcrumb").parts("link","item","container").extend("separator");Tn("button").parts();var One=Tn("checkbox").parts("control","icon","container").extend("label");Tn("progress").parts("track","filledTrack").extend("label");var Rne=Tn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Mne=Tn("editable").parts("preview","input","textarea"),Ine=Tn("form").parts("container","requiredIndicator","helperText"),Dne=Tn("formError").parts("text","icon"),Nne=Tn("input").parts("addon","field","element"),Bne=Tn("list").parts("container","item","icon"),zne=Tn("menu").parts("button","list","item").extend("groupTitle","command","divider"),$ne=Tn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Fne=Tn("numberinput").parts("root","field","stepperGroup","stepper");Tn("pininput").parts("field");var Hne=Tn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Vne=Tn("progress").parts("label","filledTrack","track"),Wne=Tn("radio").parts("container","control","label"),Une=Tn("select").parts("field","icon"),jne=Tn("slider").parts("container","track","thumb","filledTrack","mark"),Gne=Tn("stat").parts("container","label","helpText","number","icon"),qne=Tn("switch").parts("container","track","thumb"),Yne=Tn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Kne=Tn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Xne=Tn("tag").parts("container","label","closeButton"),Zne=Tn("card").parts("container","header","body","footer");function Ni(e,t){Qne(e)&&(e="100%");var n=Jne(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function u3(e){return Math.min(1,Math.max(0,e))}function Qne(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jne(e){return typeof e=="string"&&e.indexOf("%")!==-1}function FB(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function c3(e){return e<=1?"".concat(Number(e)*100,"%"):e}function lh(e){return e.length===1?"0"+e:String(e)}function ere(e,t,n){return{r:Ni(e,255)*255,g:Ni(t,255)*255,b:Ni(n,255)*255}}function dL(e,t,n){e=Ni(e,255),t=Ni(t,255),n=Ni(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function yw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tre(e,t,n){var r,i,o;if(e=Ni(e,360),t=Ni(t,100),n=Ni(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=yw(s,a,e+1/3),i=yw(s,a,e),o=yw(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function fL(e,t,n){e=Ni(e,255),t=Ni(t,255),n=Ni(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function nre(e,t,n){e=Ni(e,360)*6,t=Ni(t,100),n=Ni(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,a,o,o,s,n][l],f=[s,n,n,a,o,o][l],p=[o,o,s,n,n,a][l];return{r:u*255,g:f*255,b:p*255}}function hL(e,t,n,r){var i=[lh(Math.round(e).toString(16)),lh(Math.round(t).toString(16)),lh(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rre(e,t,n,r,i){var o=[lh(Math.round(e).toString(16)),lh(Math.round(t).toString(16)),lh(Math.round(n).toString(16)),lh(ire(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function ire(e){return Math.round(parseFloat(e)*255).toString(16)}function pL(e){return fa(e)/255}function fa(e){return parseInt(e,16)}function ore(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var XC={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 are(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=ure(e)),typeof e=="object"&&(Cu(e.r)&&Cu(e.g)&&Cu(e.b)?(t=ere(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Cu(e.h)&&Cu(e.s)&&Cu(e.v)?(r=c3(e.s),i=c3(e.v),t=nre(e.h,r,i),a=!0,s="hsv"):Cu(e.h)&&Cu(e.s)&&Cu(e.l)&&(r=c3(e.s),o=c3(e.l),t=tre(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=FB(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 sre="[-\\+]?\\d+%?",lre="[-\\+]?\\d*\\.\\d+%?",cd="(?:".concat(lre,")|(?:").concat(sre,")"),bw="[\\s|\\(]+(".concat(cd,")[,|\\s]+(").concat(cd,")[,|\\s]+(").concat(cd,")\\s*\\)?"),Sw="[\\s|\\(]+(".concat(cd,")[,|\\s]+(").concat(cd,")[,|\\s]+(").concat(cd,")[,|\\s]+(").concat(cd,")\\s*\\)?"),_s={CSS_UNIT:new RegExp(cd),rgb:new RegExp("rgb"+bw),rgba:new RegExp("rgba"+Sw),hsl:new RegExp("hsl"+bw),hsla:new RegExp("hsla"+Sw),hsv:new RegExp("hsv"+bw),hsva:new RegExp("hsva"+Sw),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 ure(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(XC[e])e=XC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=_s.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=_s.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_s.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=_s.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_s.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=_s.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_s.hex8.exec(e),n?{r:fa(n[1]),g:fa(n[2]),b:fa(n[3]),a:pL(n[4]),format:t?"name":"hex8"}:(n=_s.hex6.exec(e),n?{r:fa(n[1]),g:fa(n[2]),b:fa(n[3]),format:t?"name":"hex"}:(n=_s.hex4.exec(e),n?{r:fa(n[1]+n[1]),g:fa(n[2]+n[2]),b:fa(n[3]+n[3]),a:pL(n[4]+n[4]),format:t?"name":"hex8"}:(n=_s.hex3.exec(e),n?{r:fa(n[1]+n[1]),g:fa(n[2]+n[2]),b:fa(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Cu(e){return Boolean(_s.CSS_UNIT.exec(String(e)))}var A2=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=ore(t)),this.originalInput=t;var i=are(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.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=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=FB(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=fL(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=fL(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=dL(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=dL(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),hL(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),rre(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},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 t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ni(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ni(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+hL(this.r,this.g,this.b,!1),n=0,r=Object.entries(XC);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},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){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=u3(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=u3(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=u3(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=u3(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){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+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,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function HB(e){if(e===void 0&&(e={}),e.count!==void 0&&e.count!==null){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(HB(e));return e.count=t,n}var r=cre(e.hue,e.seed),i=dre(r,e),o=fre(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new A2(a)}function cre(e,t){var n=pre(e),r=y5(n,t);return r<0&&(r=360+r),r}function dre(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return y5([0,100],t.seed);var n=VB(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return y5([r,i],t.seed)}function fre(e,t,n){var r=hre(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return y5([r,i],n.seed)}function hre(e,t){for(var n=VB(e).lowerBounds,r=0;r<n.length-1;r++){var i=n[r][0],o=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function pre(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=UB.find(function(a){return a.name===e});if(n){var r=WB(n);if(r.hueRange)return r.hueRange}var i=new A2(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function VB(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=UB;t<n.length;t++){var r=n[t],i=WB(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function y5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function WB(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var UB=[{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]]}];function gre(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var mre=e=>Object.keys(e).length===0,ho=(e,t,n)=>{const r=gre(e,`colors.${t}`,t),{isValid:i}=new A2(r);return i?r:n},vre=e=>t=>{const n=ho(t,e);return new A2(n).isDark()?"dark":"light"},yre=e=>t=>vre(e)(t)==="dark",y1=(e,t)=>n=>{const r=ho(n,e);return new A2(r).setAlpha(t).toRgbString()};function gL(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
45deg,
${t} 25%,
transparent 25%,
transparent 50%,
${t} 50%,
${t} 75%,
transparent 75%,
transparent
)`,backgroundSize:`${e} ${e}`}}function bre(e){const t=HB().toHexString();return!e||mre(e)?t:e.string&&e.colors?xre(e.string,e.colors):e.string&&!e.colors?Sre(e.string):e.colors&&!e.string?wre(e.colors):t}function Sre(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function xre(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function wre(e){return e[Math.floor(Math.random()*e.length)]}function xt(e,t){return n=>n.colorMode==="dark"?t:e}function e_(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Cre(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function jB(e){return Cre(e)&&e.reference?e.reference:String(e)}var Zb=(e,...t)=>t.map(jB).join(` ${e} `).replace(/calc/g,""),mL=(...e)=>`calc(${Zb("+",...e)})`,vL=(...e)=>`calc(${Zb("-",...e)})`,ZC=(...e)=>`calc(${Zb("*",...e)})`,yL=(...e)=>`calc(${Zb("/",...e)})`,bL=e=>{const t=jB(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:ZC(t,-1)},Lu=Object.assign(e=>({add:(...t)=>Lu(mL(e,...t)),subtract:(...t)=>Lu(vL(e,...t)),multiply:(...t)=>Lu(ZC(e,...t)),divide:(...t)=>Lu(yL(e,...t)),negate:()=>Lu(bL(e)),toString:()=>e.toString()}),{add:mL,subtract:vL,multiply:ZC,divide:yL,negate:bL});function _re(e){return!Number.isInteger(parseFloat(e.toString()))}function kre(e,t="-"){return e.replace(/\s+/g,t)}function GB(e){const t=kre(e.toString());return t.includes("\\.")?e:_re(e)?t.replace(".","\\."):e}function Ere(e,t=""){return[t,GB(e)].filter(Boolean).join("-")}function Pre(e,t){return`var(${GB(e)}${t?`, ${t}`:""})`}function Tre(e,t=""){return`--${Ere(e,t)}`}function ci(e,t){const n=Tre(e,t==null?void 0:t.prefix);return{variable:n,reference:Pre(n,Lre(t==null?void 0:t.fallback))}}function Lre(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:Are,defineMultiStyleConfig:Ore}=nr(Pne.keys),Rre={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Mre={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Ire={pt:"2",px:"4",pb:"5"},Dre={fontSize:"1.25em"},Nre=Are({container:Rre,button:Mre,panel:Ire,icon:Dre}),Bre=Ore({baseStyle:Nre}),{definePartsStyle:O2,defineMultiStyleConfig:zre}=nr(Tne.keys),ya=Hn("alert-fg"),Vu=Hn("alert-bg"),$re=O2({container:{bg:Vu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ya.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ya.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function t_(e){const{theme:t,colorScheme:n}=e,r=y1(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Fre=O2(e=>{const{colorScheme:t}=e,n=t_(e);return{container:{[ya.variable]:`colors.${t}.500`,[Vu.variable]:n.light,_dark:{[ya.variable]:`colors.${t}.200`,[Vu.variable]:n.dark}}}}),Hre=O2(e=>{const{colorScheme:t}=e,n=t_(e);return{container:{[ya.variable]:`colors.${t}.500`,[Vu.variable]:n.light,_dark:{[ya.variable]:`colors.${t}.200`,[Vu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ya.reference}}}),Vre=O2(e=>{const{colorScheme:t}=e,n=t_(e);return{container:{[ya.variable]:`colors.${t}.500`,[Vu.variable]:n.light,_dark:{[ya.variable]:`colors.${t}.200`,[Vu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ya.reference}}}),Wre=O2(e=>{const{colorScheme:t}=e;return{container:{[ya.variable]:"colors.white",[Vu.variable]:`colors.${t}.500`,_dark:{[ya.variable]:"colors.gray.900",[Vu.variable]:`colors.${t}.200`},color:ya.reference}}}),Ure={subtle:Fre,"left-accent":Hre,"top-accent":Vre,solid:Wre},jre=zre({baseStyle:$re,variants:Ure,defaultProps:{variant:"subtle",colorScheme:"blue"}}),qB={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"},Gre={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"},qre={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Yre={...qB,...Gre,container:qre},YB=Yre,Kre=e=>typeof e=="function";function mo(e,...t){return Kre(e)?e(...t):e}var{definePartsStyle:KB,defineMultiStyleConfig:Xre}=nr(Lne.keys),U0=Hn("avatar-border-color"),xw=Hn("avatar-bg"),Zre={borderRadius:"full",border:"0.2em solid",[U0.variable]:"white",_dark:{[U0.variable]:"colors.gray.800"},borderColor:U0.reference},Qre={[xw.variable]:"colors.gray.200",_dark:{[xw.variable]:"colors.whiteAlpha.400"},bgColor:xw.reference},SL=Hn("avatar-background"),Jre=e=>{const{name:t,theme:n}=e,r=t?bre({string:t}):"colors.gray.400",i=yre(r)(n);let o="white";return i||(o="gray.800"),{bg:SL.reference,"&:not([data-loaded])":{[SL.variable]:r},color:o,[U0.variable]:"colors.white",_dark:{[U0.variable]:"colors.gray.800"},borderColor:U0.reference,verticalAlign:"top"}},eie=KB(e=>({badge:mo(Zre,e),excessLabel:mo(Qre,e),container:mo(Jre,e)}));function qc(e){const t=e!=="100%"?YB[e]:void 0;return KB({container:{width:e,height:e,fontSize:`calc(${t!=null?t:e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t!=null?t:e} / 2.5)`,lineHeight:e!=="100%"?t!=null?t:e:void 0}})}var tie={"2xs":qc(4),xs:qc(6),sm:qc(8),md:qc(12),lg:qc(16),xl:qc(24),"2xl":qc(32),full:qc("100%")},nie=Xre({baseStyle:eie,sizes:tie,defaultProps:{size:"md"}}),rie={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},j0=Hn("badge-bg"),Rl=Hn("badge-color"),iie=e=>{const{colorScheme:t,theme:n}=e,r=y1(`${t}.500`,.6)(n);return{[j0.variable]:`colors.${t}.500`,[Rl.variable]:"colors.white",_dark:{[j0.variable]:r,[Rl.variable]:"colors.whiteAlpha.800"},bg:j0.reference,color:Rl.reference}},oie=e=>{const{colorScheme:t,theme:n}=e,r=y1(`${t}.200`,.16)(n);return{[j0.variable]:`colors.${t}.100`,[Rl.variable]:`colors.${t}.800`,_dark:{[j0.variable]:r,[Rl.variable]:`colors.${t}.200`},bg:j0.reference,color:Rl.reference}},aie=e=>{const{colorScheme:t,theme:n}=e,r=y1(`${t}.200`,.8)(n);return{[Rl.variable]:`colors.${t}.500`,_dark:{[Rl.variable]:r},color:Rl.reference,boxShadow:`inset 0 0 0px 1px ${Rl.reference}`}},sie={solid:iie,subtle:oie,outline:aie},cv={baseStyle:rie,variants:sie,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:lie,definePartsStyle:uie}=nr(Ane.keys),cie={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},die=uie({link:cie}),fie=lie({baseStyle:die}),hie={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"}}},XB=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:xt("inherit","whiteAlpha.900")(e),_hover:{bg:xt("gray.100","whiteAlpha.200")(e)},_active:{bg:xt("gray.200","whiteAlpha.300")(e)}};const r=y1(`${t}.200`,.12)(n),i=y1(`${t}.200`,.24)(n);return{color:xt(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:xt(`${t}.50`,r)(e)},_active:{bg:xt(`${t}.100`,i)(e)}}},pie=e=>{const{colorScheme:t}=e,n=xt("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...mo(XB,e)}},gie={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},mie=e=>{var s;const{colorScheme:t}=e;if(t==="gray"){const l=xt("gray.100","whiteAlpha.200")(e);return{bg:l,_hover:{bg:xt("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:xt("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=(s=gie[t])!=null?s:{},a=xt(n,`${t}.200`)(e);return{bg:a,color:xt(r,"gray.800")(e),_hover:{bg:xt(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:xt(o,`${t}.400`)(e)}}},vie=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:xt(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:xt(`${t}.700`,`${t}.500`)(e)}}},yie={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},bie={ghost:XB,outline:pie,solid:mie,link:vie,unstyled:yie},Sie={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"}},xie={baseStyle:hie,variants:bie,sizes:Sie,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:vh,defineMultiStyleConfig:wie}=nr(Zne.keys),b5=Hn("card-bg"),G0=Hn("card-padding"),Cie=vh({container:{[b5.variable]:"chakra-body-bg",backgroundColor:b5.reference,color:"chakra-body-text"},body:{padding:G0.reference,flex:"1 1 0%"},header:{padding:G0.reference},footer:{padding:G0.reference}}),_ie={sm:vh({container:{borderRadius:"base",[G0.variable]:"space.3"}}),md:vh({container:{borderRadius:"md",[G0.variable]:"space.5"}}),lg:vh({container:{borderRadius:"xl",[G0.variable]:"space.7"}})},kie={elevated:vh({container:{boxShadow:"base",_dark:{[b5.variable]:"colors.gray.700"}}}),outline:vh({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:vh({container:{[b5.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},Eie=wie({baseStyle:Cie,variants:kie,sizes:_ie,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:b4,defineMultiStyleConfig:Pie}=nr(One.keys),dv=Hn("checkbox-size"),Tie=e=>{const{colorScheme:t}=e;return{w:dv.reference,h:dv.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:xt(`${t}.500`,`${t}.200`)(e),borderColor:xt(`${t}.500`,`${t}.200`)(e),color:xt("white","gray.900")(e),_hover:{bg:xt(`${t}.600`,`${t}.300`)(e),borderColor:xt(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:xt("gray.200","transparent")(e),bg:xt("gray.200","whiteAlpha.300")(e),color:xt("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:xt(`${t}.500`,`${t}.200`)(e),borderColor:xt(`${t}.500`,`${t}.200`)(e),color:xt("white","gray.900")(e)},_disabled:{bg:xt("gray.100","whiteAlpha.100")(e),borderColor:xt("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:xt("red.500","red.300")(e)}}},Lie={_disabled:{cursor:"not-allowed"}},Aie={userSelect:"none",_disabled:{opacity:.4}},Oie={transitionProperty:"transform",transitionDuration:"normal"},Rie=b4(e=>({icon:Oie,container:Lie,control:mo(Tie,e),label:Aie})),Mie={sm:b4({control:{[dv.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:b4({control:{[dv.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:b4({control:{[dv.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},S5=Pie({baseStyle:Rie,sizes:Mie,defaultProps:{size:"md",colorScheme:"blue"}}),fv=ci("close-button-size"),pm=ci("close-button-bg"),Iie={w:[fv.reference],h:[fv.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[pm.variable]:"colors.blackAlpha.100",_dark:{[pm.variable]:"colors.whiteAlpha.100"}},_active:{[pm.variable]:"colors.blackAlpha.200",_dark:{[pm.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:pm.reference},Die={lg:{[fv.variable]:"sizes.10",fontSize:"md"},md:{[fv.variable]:"sizes.8",fontSize:"xs"},sm:{[fv.variable]:"sizes.6",fontSize:"2xs"}},Nie={baseStyle:Iie,sizes:Die,defaultProps:{size:"md"}},{variants:Bie,defaultProps:zie}=cv,$ie={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Fie={baseStyle:$ie,variants:Bie,defaultProps:zie},Hie={w:"100%",mx:"auto",maxW:"prose",px:"4"},Vie={baseStyle:Hie},Wie={opacity:.6,borderColor:"inherit"},Uie={borderStyle:"solid"},jie={borderStyle:"dashed"},Gie={solid:Uie,dashed:jie},qie={baseStyle:Wie,variants:Gie,defaultProps:{variant:"solid"}},{definePartsStyle:QC,defineMultiStyleConfig:Yie}=nr(Rne.keys),ww=Hn("drawer-bg"),Cw=Hn("drawer-box-shadow");function Xp(e){return QC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kie={bg:"blackAlpha.600",zIndex:"overlay"},Xie={display:"flex",zIndex:"modal",justifyContent:"center"},Zie=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[ww.variable]:"colors.white",[Cw.variable]:"shadows.lg",_dark:{[ww.variable]:"colors.gray.700",[Cw.variable]:"shadows.dark-lg"},bg:ww.reference,boxShadow:Cw.reference}},Qie={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jie={position:"absolute",top:"2",insetEnd:"3"},eoe={px:"6",py:"2",flex:"1",overflow:"auto"},toe={px:"6",py:"4"},noe=QC(e=>({overlay:Kie,dialogContainer:Xie,dialog:mo(Zie,e),header:Qie,closeButton:Jie,body:eoe,footer:toe})),roe={xs:Xp("xs"),sm:Xp("md"),md:Xp("lg"),lg:Xp("2xl"),xl:Xp("4xl"),full:Xp("full")},ioe=Yie({baseStyle:noe,sizes:roe,defaultProps:{size:"xs"}}),{definePartsStyle:ooe,defineMultiStyleConfig:aoe}=nr(Mne.keys),soe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},loe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},uoe={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},coe=ooe({preview:soe,input:loe,textarea:uoe}),doe=aoe({baseStyle:coe}),{definePartsStyle:foe,defineMultiStyleConfig:hoe}=nr(Ine.keys),q0=Hn("form-control-color"),poe={marginStart:"1",[q0.variable]:"colors.red.500",_dark:{[q0.variable]:"colors.red.300"},color:q0.reference},goe={mt:"2",[q0.variable]:"colors.gray.600",_dark:{[q0.variable]:"colors.whiteAlpha.600"},color:q0.reference,lineHeight:"normal",fontSize:"sm"},moe=foe({container:{width:"100%",position:"relative"},requiredIndicator:poe,helperText:goe}),voe=hoe({baseStyle:moe}),{definePartsStyle:yoe,defineMultiStyleConfig:boe}=nr(Dne.keys),Y0=Hn("form-error-color"),Soe={[Y0.variable]:"colors.red.500",_dark:{[Y0.variable]:"colors.red.300"},color:Y0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xoe={marginEnd:"0.5em",[Y0.variable]:"colors.red.500",_dark:{[Y0.variable]:"colors.red.300"},color:Y0.reference},woe=yoe({text:Soe,icon:xoe}),Coe=boe({baseStyle:woe}),_oe={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},koe={baseStyle:_oe},Eoe={fontFamily:"heading",fontWeight:"bold"},Poe={"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}},Toe={baseStyle:Eoe,sizes:Poe,defaultProps:{size:"xl"}},{definePartsStyle:Ru,defineMultiStyleConfig:Loe}=nr(Nne.keys),Aoe=Ru({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Yc={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"}},Ooe={lg:Ru({field:Yc.lg,addon:Yc.lg}),md:Ru({field:Yc.md,addon:Yc.md}),sm:Ru({field:Yc.sm,addon:Yc.sm}),xs:Ru({field:Yc.xs,addon:Yc.xs})};function n_(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||xt("blue.500","blue.300")(e),errorBorderColor:n||xt("red.500","red.300")(e)}}var Roe=Ru(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n_(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:xt("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ho(t,r),boxShadow:`0 0 0 1px ${ho(t,r)}`},_focusVisible:{zIndex:1,borderColor:ho(t,n),boxShadow:`0 0 0 1px ${ho(t,n)}`}},addon:{border:"1px solid",borderColor:xt("inherit","whiteAlpha.50")(e),bg:xt("gray.100","whiteAlpha.300")(e)}}}),Moe=Ru(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n_(e);return{field:{border:"2px solid",borderColor:"transparent",bg:xt("gray.100","whiteAlpha.50")(e),_hover:{bg:xt("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ho(t,r)},_focusVisible:{bg:"transparent",borderColor:ho(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:xt("gray.100","whiteAlpha.50")(e)}}}),Ioe=Ru(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=n_(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ho(t,r),boxShadow:`0px 1px 0px 0px ${ho(t,r)}`},_focusVisible:{borderColor:ho(t,n),boxShadow:`0px 1px 0px 0px ${ho(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Doe=Ru({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Noe={outline:Roe,filled:Moe,flushed:Ioe,unstyled:Doe},xn=Loe({baseStyle:Aoe,sizes:Ooe,variants:Noe,defaultProps:{size:"md",variant:"outline"}}),_w=Hn("kbd-bg"),Boe={[_w.variable]:"colors.gray.100",_dark:{[_w.variable]:"colors.whiteAlpha.100"},bg:_w.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},zoe={baseStyle:Boe},$oe={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Foe={baseStyle:$oe},{defineMultiStyleConfig:Hoe,definePartsStyle:Voe}=nr(Bne.keys),Woe={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Uoe=Voe({icon:Woe}),joe=Hoe({baseStyle:Uoe}),{defineMultiStyleConfig:Goe,definePartsStyle:qoe}=nr(zne.keys),_l=Hn("menu-bg"),kw=Hn("menu-shadow"),Yoe={[_l.variable]:"#fff",[kw.variable]:"shadows.sm",_dark:{[_l.variable]:"colors.gray.700",[kw.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:_l.reference,boxShadow:kw.reference},Koe={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[_l.variable]:"colors.gray.100",_dark:{[_l.variable]:"colors.whiteAlpha.100"}},_active:{[_l.variable]:"colors.gray.200",_dark:{[_l.variable]:"colors.whiteAlpha.200"}},_expanded:{[_l.variable]:"colors.gray.100",_dark:{[_l.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:_l.reference},Xoe={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zoe={opacity:.6},Qoe={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Joe={transitionProperty:"common",transitionDuration:"normal"},eae=qoe({button:Joe,list:Yoe,item:Koe,groupTitle:Xoe,command:Zoe,divider:Qoe}),tae=Goe({baseStyle:eae}),{defineMultiStyleConfig:nae,definePartsStyle:JC}=nr($ne.keys),rae={bg:"blackAlpha.600",zIndex:"modal"},iae=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},oae=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:xt("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:xt("lg","dark-lg")(e)}},aae={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sae={position:"absolute",top:"2",insetEnd:"3"},lae=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},uae={px:"6",py:"4"},cae=JC(e=>({overlay:rae,dialogContainer:mo(iae,e),dialog:mo(oae,e),header:aae,closeButton:sae,body:mo(lae,e),footer:uae}));function xs(e){return JC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dae={xs:xs("xs"),sm:xs("sm"),md:xs("md"),lg:xs("lg"),xl:xs("xl"),"2xl":xs("2xl"),"3xl":xs("3xl"),"4xl":xs("4xl"),"5xl":xs("5xl"),"6xl":xs("6xl"),full:xs("full")},fae=nae({baseStyle:cae,sizes:dae,defaultProps:{size:"md"}}),hae={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"}},ZB=hae,{defineMultiStyleConfig:pae,definePartsStyle:QB}=nr(Fne.keys),r_=ci("number-input-stepper-width"),JB=ci("number-input-input-padding"),gae=Lu(r_).add("0.5rem").toString(),Ew=ci("number-input-bg"),Pw=ci("number-input-color"),Tw=ci("number-input-border-color"),mae={[r_.variable]:"sizes.6",[JB.variable]:gae},vae=e=>{var n;var t;return(n=(t=mo(xn.baseStyle,e))==null?void 0:t.field)!=null?n:{}},yae={width:r_.reference},bae={borderStart:"1px solid",borderStartColor:Tw.reference,color:Pw.reference,bg:Ew.reference,[Pw.variable]:"colors.chakra-body-text",[Tw.variable]:"colors.chakra-border-color",_dark:{[Pw.variable]:"colors.whiteAlpha.800",[Tw.variable]:"colors.whiteAlpha.300"},_active:{[Ew.variable]:"colors.gray.200",_dark:{[Ew.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Sae=QB(e=>{var t;return{root:mae,field:(t=mo(vae,e))!=null?t:{},stepperGroup:yae,stepper:bae}});function d3(e){var s;var t,n;const r=(t=xn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=(s=(n=r.field)==null?void 0:n.fontSize)!=null?s:"md",a=ZB.fontSizes[o];return QB({field:{...r.field,paddingInlineEnd:JB.reference,verticalAlign:"top"},stepper:{fontSize:Lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xae={xs:d3("xs"),sm:d3("sm"),md:d3("md"),lg:d3("lg")},wae=pae({baseStyle:Sae,sizes:xae,variants:xn.variants,defaultProps:xn.defaultProps}),xL,Cae={...(xL=xn.baseStyle)==null?void 0:xL.field,textAlign:"center"},_ae={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"}},wL,WI,kae={outline:e=>{var r;var t,n;return(r=(n=mo((t=xn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var r;var t,n;return(r=(n=mo((t=xn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var r;var t,n;return(r=(n=mo((t=xn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(WI=(wL=xn.variants)==null?void 0:wL.unstyled.field)!=null?WI:{}},Eae={baseStyle:Cae,sizes:_ae,variants:kae,defaultProps:xn.defaultProps},{defineMultiStyleConfig:Pae,definePartsStyle:Tae}=nr(Hne.keys),f3=ci("popper-bg"),Lae=ci("popper-arrow-bg"),CL=ci("popper-arrow-shadow-color"),Aae={zIndex:10},Oae={[f3.variable]:"colors.white",bg:f3.reference,[Lae.variable]:f3.reference,[CL.variable]:"colors.gray.200",_dark:{[f3.variable]:"colors.gray.700",[CL.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Rae={px:3,py:2,borderBottomWidth:"1px"},Mae={px:3,py:2},Iae={px:3,py:2,borderTopWidth:"1px"},Dae={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Nae=Tae({popper:Aae,content:Oae,header:Rae,body:Mae,footer:Iae,closeButton:Dae}),Bae=Pae({baseStyle:Nae}),{defineMultiStyleConfig:zae,definePartsStyle:$m}=nr(Vne.keys),$ae=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=xt(gL(),gL("1rem","rgba(0,0,0,0.1)"))(e),a=xt(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
to right,
transparent 0%,
${ho(n,a)} 50%,
transparent 100%
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Fae={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Hae=e=>({bg:xt("gray.100","whiteAlpha.300")(e)}),Vae=e=>({transitionProperty:"common",transitionDuration:"slow",...$ae(e)}),Wae=$m(e=>({label:Fae,filledTrack:Vae(e),track:Hae(e)})),Uae={xs:$m({track:{h:"1"}}),sm:$m({track:{h:"2"}}),md:$m({track:{h:"3"}}),lg:$m({track:{h:"4"}})},jae=zae({sizes:Uae,baseStyle:Wae,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Gae,definePartsStyle:S4}=nr(Wne.keys),qae=e=>{var t;const n=(t=mo(S5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Yae=S4(e=>{var t,n,r,i;return{label:(n=(t=S5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=S5).baseStyle)==null?void 0:i.call(r,e).container,control:qae(e)}}),Kae={md:S4({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:S4({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:S4({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xae=Gae({baseStyle:Yae,sizes:Kae,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zae,definePartsStyle:Qae}=nr(Une.keys),h3=Hn("select-bg"),_L,Jae={...(_L=xn.baseStyle)==null?void 0:_L.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:h3.reference,[h3.variable]:"colors.white",_dark:{[h3.variable]:"colors.gray.700"},"> option, > optgroup":{bg:h3.reference}},ese={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tse=Qae({field:Jae,icon:ese}),p3={paddingInlineEnd:"8"},kL,EL,PL,TL,LL,AL,OL,RL,nse={lg:{...(kL=xn.sizes)==null?void 0:kL.lg,field:{...(EL=xn.sizes)==null?void 0:EL.lg.field,...p3}},md:{...(PL=xn.sizes)==null?void 0:PL.md,field:{...(TL=xn.sizes)==null?void 0:TL.md.field,...p3}},sm:{...(LL=xn.sizes)==null?void 0:LL.sm,field:{...(AL=xn.sizes)==null?void 0:AL.sm.field,...p3}},xs:{...(OL=xn.sizes)==null?void 0:OL.xs,field:{...(RL=xn.sizes)==null?void 0:RL.xs.field,...p3},icon:{insetEnd:"1"}}},rse=Zae({baseStyle:tse,sizes:nse,variants:xn.variants,defaultProps:xn.defaultProps}),Lw=Hn("skeleton-start-color"),Aw=Hn("skeleton-end-color"),ise={[Lw.variable]:"colors.gray.100",[Aw.variable]:"colors.gray.400",_dark:{[Lw.variable]:"colors.gray.800",[Aw.variable]:"colors.gray.600"},background:Lw.reference,borderColor:Aw.reference,opacity:.7,borderRadius:"sm"},ose={baseStyle:ise},Ow=Hn("skip-link-bg"),ase={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ow.variable]:"colors.white",_dark:{[Ow.variable]:"colors.gray.700"},bg:Ow.reference}},sse={baseStyle:ase},{defineMultiStyleConfig:lse,definePartsStyle:Qb}=nr(jne.keys),Qv=Hn("slider-thumb-size"),Jv=Hn("slider-track-size"),od=Hn("slider-bg"),use=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...e_({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},cse=e=>({...e_({orientation:e.orientation,horizontal:{h:Jv.reference},vertical:{w:Jv.reference}}),overflow:"hidden",borderRadius:"sm",[od.variable]:"colors.gray.200",_dark:{[od.variable]:"colors.whiteAlpha.200"},_disabled:{[od.variable]:"colors.gray.300",_dark:{[od.variable]:"colors.whiteAlpha.300"}},bg:od.reference}),dse=e=>{const{orientation:t}=e;return{...e_({orientation:t,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:Qv.reference,h:Qv.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"}}},fse=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[od.variable]:`colors.${t}.500`,_dark:{[od.variable]:`colors.${t}.200`},bg:od.reference}},hse=Qb(e=>({container:use(e),track:cse(e),thumb:dse(e),filledTrack:fse(e)})),pse=Qb({container:{[Qv.variable]:"sizes.4",[Jv.variable]:"sizes.1"}}),gse=Qb({container:{[Qv.variable]:"sizes.3.5",[Jv.variable]:"sizes.1"}}),mse=Qb({container:{[Qv.variable]:"sizes.2.5",[Jv.variable]:"sizes.0.5"}}),vse={lg:pse,md:gse,sm:mse},yse=lse({baseStyle:hse,sizes:vse,defaultProps:{size:"md",colorScheme:"blue"}}),nh=ci("spinner-size"),bse={width:[nh.reference],height:[nh.reference]},Sse={xs:{[nh.variable]:"sizes.3"},sm:{[nh.variable]:"sizes.4"},md:{[nh.variable]:"sizes.6"},lg:{[nh.variable]:"sizes.8"},xl:{[nh.variable]:"sizes.12"}},xse={baseStyle:bse,sizes:Sse,defaultProps:{size:"md"}},{defineMultiStyleConfig:wse,definePartsStyle:ez}=nr(Gne.keys),Cse={fontWeight:"medium"},_se={opacity:.8,marginBottom:"2"},kse={verticalAlign:"baseline",fontWeight:"semibold"},Ese={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Pse=ez({container:{},label:Cse,helpText:_se,number:kse,icon:Ese}),Tse={md:ez({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Lse=wse({baseStyle:Pse,sizes:Tse,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Ase,definePartsStyle:x4}=nr(qne.keys),hv=ci("switch-track-width"),yh=ci("switch-track-height"),Rw=ci("switch-track-diff"),Ose=Lu.subtract(hv,yh),e7=ci("switch-thumb-x"),gm=ci("switch-bg"),Rse=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[hv.reference],height:[yh.reference],transitionProperty:"common",transitionDuration:"fast",[gm.variable]:"colors.gray.300",_dark:{[gm.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[gm.variable]:`colors.${t}.500`,_dark:{[gm.variable]:`colors.${t}.200`}},bg:gm.reference}},Mse={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[yh.reference],height:[yh.reference],_checked:{transform:`translateX(${e7.reference})`}},Ise=x4(e=>({container:{[Rw.variable]:Ose,[e7.variable]:Rw.reference,_rtl:{[e7.variable]:Lu(Rw).negate().toString()}},track:Rse(e),thumb:Mse})),Dse={sm:x4({container:{[hv.variable]:"1.375rem",[yh.variable]:"sizes.3"}}),md:x4({container:{[hv.variable]:"1.875rem",[yh.variable]:"sizes.4"}}),lg:x4({container:{[hv.variable]:"2.875rem",[yh.variable]:"sizes.6"}})},Nse=Ase({baseStyle:Ise,sizes:Dse,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Bse,definePartsStyle:K0}=nr(Yne.keys),zse=K0({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"}}),x5={"&[data-is-numeric=true]":{textAlign:"end"}},$se=K0(e=>{const{colorScheme:t}=e;return{th:{color:xt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:xt(`${t}.100`,`${t}.700`)(e),...x5},td:{borderBottom:"1px",borderColor:xt(`${t}.100`,`${t}.700`)(e),...x5},caption:{color:xt("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Fse=K0(e=>{const{colorScheme:t}=e;return{th:{color:xt("gray.600","gray.400")(e),borderBottom:"1px",borderColor:xt(`${t}.100`,`${t}.700`)(e),...x5},td:{borderBottom:"1px",borderColor:xt(`${t}.100`,`${t}.700`)(e),...x5},caption:{color:xt("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:xt(`${t}.100`,`${t}.700`)(e)},td:{background:xt(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Hse={simple:$se,striped:Fse,unstyled:{}},Vse={sm:K0({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:K0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:K0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Wse=Bse({baseStyle:zse,variants:Hse,sizes:Vse,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Bo=Hn("tabs-color"),Ls=Hn("tabs-bg"),g3=Hn("tabs-border-color"),{defineMultiStyleConfig:Use,definePartsStyle:zl}=nr(Kne.keys),jse=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Gse=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},qse=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Yse={p:4},Kse=zl(e=>({root:jse(e),tab:Gse(e),tablist:qse(e),tabpanel:Yse})),Xse={sm:zl({tab:{py:1,px:4,fontSize:"sm"}}),md:zl({tab:{fontSize:"md",py:2,px:4}}),lg:zl({tab:{fontSize:"lg",py:3,px:4}})},Zse=zl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[Bo.variable]:`colors.${t}.600`,_dark:{[Bo.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Ls.variable]:"colors.gray.200",_dark:{[Ls.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Bo.reference,bg:Ls.reference}}}),Qse=zl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[g3.reference]:"transparent",_selected:{[Bo.variable]:`colors.${t}.600`,[g3.variable]:"colors.white",_dark:{[Bo.variable]:`colors.${t}.300`,[g3.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:g3.reference},color:Bo.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Jse=zl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Ls.variable]:"colors.gray.50",_dark:{[Ls.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Ls.variable]:"colors.white",[Bo.variable]:`colors.${t}.600`,_dark:{[Ls.variable]:"colors.gray.800",[Bo.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Bo.reference,bg:Ls.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),ele=zl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:ho(n,`${t}.700`),bg:ho(n,`${t}.100`)}}}}),tle=zl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Bo.variable]:"colors.gray.600",_dark:{[Bo.variable]:"inherit"},_selected:{[Bo.variable]:"colors.white",[Ls.variable]:`colors.${t}.600`,_dark:{[Bo.variable]:"colors.gray.800",[Ls.variable]:`colors.${t}.300`}},color:Bo.reference,bg:Ls.reference}}}),nle=zl({}),rle={line:Zse,enclosed:Qse,"enclosed-colored":Jse,"soft-rounded":ele,"solid-rounded":tle,unstyled:nle},ile=Use({baseStyle:Kse,sizes:Xse,variants:rle,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:ole,definePartsStyle:bh}=nr(Xne.keys),ale={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},sle={lineHeight:1.2,overflow:"visible"},lle={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}},ule=bh({container:ale,label:sle,closeButton:lle}),cle={sm:bh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:bh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:bh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},dle={subtle:bh(e=>{var t;return{container:(t=cv.variants)==null?void 0:t.subtle(e)}}),solid:bh(e=>{var t;return{container:(t=cv.variants)==null?void 0:t.solid(e)}}),outline:bh(e=>{var t;return{container:(t=cv.variants)==null?void 0:t.outline(e)}})},fle=ole({variants:dle,baseStyle:ule,sizes:cle,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),ML,hle={...(ML=xn.baseStyle)==null?void 0:ML.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},IL,UI,ple={outline:e=>{var n;var t;return(n=(t=xn.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var n;var t;return(n=(t=xn.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var n;var t;return(n=(t=xn.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(UI=(IL=xn.variants)==null?void 0:IL.unstyled.field)!=null?UI:{}},DL,NL,BL,zL,jI,GI,qI,YI,gle={xs:(jI=(DL=xn.sizes)==null?void 0:DL.xs.field)!=null?jI:{},sm:(GI=(NL=xn.sizes)==null?void 0:NL.sm.field)!=null?GI:{},md:(qI=(BL=xn.sizes)==null?void 0:BL.md.field)!=null?qI:{},lg:(YI=(zL=xn.sizes)==null?void 0:zL.lg.field)!=null?YI:{}},mle={baseStyle:hle,sizes:gle,variants:ple,defaultProps:{size:"md",variant:"outline"}},m3=ci("tooltip-bg"),Mw=ci("tooltip-fg"),vle=ci("popper-arrow-bg"),yle={bg:m3.reference,color:Mw.reference,[m3.variable]:"colors.gray.700",[Mw.variable]:"colors.whiteAlpha.900",_dark:{[m3.variable]:"colors.gray.300",[Mw.variable]:"colors.gray.900"},[vle.variable]:m3.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},ble={baseStyle:yle},Sle={Accordion:Bre,Alert:jre,Avatar:nie,Badge:cv,Breadcrumb:fie,Button:xie,Checkbox:S5,CloseButton:Nie,Code:Fie,Container:Vie,Divider:qie,Drawer:ioe,Editable:doe,Form:voe,FormError:Coe,FormLabel:koe,Heading:Toe,Input:xn,Kbd:zoe,Link:Foe,List:joe,Menu:tae,Modal:fae,NumberInput:wae,PinInput:Eae,Popover:Bae,Progress:jae,Radio:Xae,Select:rse,Skeleton:ose,SkipLink:sse,Slider:yse,Spinner:xse,Stat:Lse,Switch:Nse,Table:Wse,Tabs:ile,Tag:fle,Textarea:mle,Tooltip:ble,Card:Eie},xle={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},wle=xle,Cle={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},_le=Cle,kle={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"}},Ele=kle,Ple={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Tle=Ple,Lle={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"},Ale=Lle,Ole={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"},Rle={"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)"},Mle={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Ile={property:Ole,easing:Rle,duration:Mle},Dle=Ile,Nle={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},Ble=Nle,zle={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},$le=zle,Fle={breakpoints:_le,zIndices:Ble,radii:Tle,blur:$le,colors:Ele,...ZB,sizes:YB,shadows:Ale,space:qB,borders:wle,transition:Dle},Hle={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"}}},Vle={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"}}},Wle="ltr",Ule={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},jle={semanticTokens:Hle,direction:Wle,...Fle,components:Sle,styles:Vle,config:Ule},Gle=typeof Element<"u",qle=typeof Map=="function",Yle=typeof Set=="function",Kle=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function w4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!w4(e[r],t[r]))return!1;return!0}var o;if(qle&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!w4(r.value[1],t.get(r.value[0])))return!1;return!0}if(Yle&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Kle&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)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(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Gle&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!w4(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Xle=function(t,n){try{return w4(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function N1(){const e=k.exports.useContext(Xv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function tz(){const e=T2(),t=N1();return{...e,theme:t}}function Zle(e,t,n){var i,o;if(t==null)return t;const r=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(o=(i=r(t))!=null?i:r(n))!=null?o:n}function Qle(e,t,n){var i,o;if(t==null)return t;const r=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(o=(i=r(t))!=null?i:r(n))!=null?o:n}function Jle(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{var p,m;if(e==="breakpoints")return Zle(o,l,(p=a[u])!=null?p:l);const f=`${e}.${l}`;return Qle(o,f,(m=a[u])!=null?m:l)});return Array.isArray(t)?s:s[0]}}function eue(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=k.exports.useMemo(()=>Yee(n),[n]);return ee(rne,{theme:i,children:[b(tue,{root:t}),r]})}function tue({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return b(Kb,{styles:n=>({[t]:n.__cssVars})})}bne({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function nue(){const{colorMode:e}=T2();return b(Kb,{styles:t=>{const n=NB(t,"styles.global"),r=$B(n,{theme:t,colorMode:e});return r?hB(r)(t):void 0}})}var rue=new Set([...Zee,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),iue=new Set(["htmlWidth","htmlHeight","htmlSize"]);function oue(e){return iue.has(e)||!rue.has(e)}var aue=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=BB(a,(p,m)=>Jee(m)),l=$B(e,t),u=Object.assign({},i,l,zB(s),o),f=hB(u)(t.theme);return r?[f,r]:f};function Iw(e,t){const{baseStyle:n,...r}=t!=null?t:{};r.shouldForwardProp||(r.shouldForwardProp=oue);const i=aue({baseStyle:n}),o=KC(e,r)(i);return oe.forwardRef(function(l,u){const{colorMode:f,forced:p}=T2();return oe.createElement(o,{ref:u,"data-theme":p?f:void 0,...l})})}function Pe(e){return k.exports.forwardRef(e)}function nz(e,t={}){var f;const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=tz(),a=e?NB(i,`components.${e}`):void 0,s=n||a,l=Ol({theme:i,colorMode:o},(f=s==null?void 0:s.defaultProps)!=null?f:{},zB(hne(r,["children"]))),u=k.exports.useRef({});if(s){const m=ute(s)(l);Xle(u.current,m)||(u.current=m)}return u.current}function bo(e,t={}){return nz(e,t)}function zi(e,t={}){return nz(e,t)}function sue(){const e=new Map;return new Proxy(Iw,{apply(t,n,r){return Iw(...r)},get(t,n){return e.has(n)||e.set(n,Iw(n)),e.get(n)}})}var xe=sue();function lue(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ln(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=k.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=k.exports.useContext(a);if(!u&&n){const f=new Error(o!=null?o:lue(r,i));throw f.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,f,s),f}return u}return[a.Provider,s,a]}function uue(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch(n){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function jn(...e){return t=>{e.forEach(n=>{uue(n,t)})}}function cue(...e){return k.exports.useMemo(()=>jn(...e),e)}function $L(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var due=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function FL(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function HL(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var t7=typeof window<"u"?k.exports.useLayoutEffect:k.exports.useEffect,w5=e=>e,fue=class{constructor(){on(this,"descendants",new Map);on(this,"register",e=>{if(e!=null)return due(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});on(this,"unregister",e=>{this.descendants.delete(e);const t=$L(Array.from(this.descendants.keys()));this.assignIndex(t)});on(this,"destroy",()=>{this.descendants.clear()});on(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});on(this,"count",()=>this.descendants.size);on(this,"enabledCount",()=>this.enabledValues().length);on(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));on(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));on(this,"item",e=>{if(this.count()!==0)return this.values()[e]});on(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});on(this,"first",()=>this.item(0));on(this,"firstEnabled",()=>this.enabledItem(0));on(this,"last",()=>this.item(this.descendants.size-1));on(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});on(this,"indexOf",e=>{var n;var t;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1});on(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));on(this,"next",(e,t=!0)=>{const n=FL(e,this.count(),t);return this.item(n)});on(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=FL(r,this.enabledCount(),t);return this.enabledItem(i)});on(this,"prev",(e,t=!0)=>{const n=HL(e,this.count()-1,t);return this.item(n)});on(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=HL(r,this.enabledCount()-1,t);return this.enabledItem(i)});on(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=$L(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function hue(){const e=k.exports.useRef(new fue);return t7(()=>()=>e.current.destroy()),e.current}var[pue,rz]=Ln({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function gue(e){const t=rz(),[n,r]=k.exports.useState(-1),i=k.exports.useRef(null);t7(()=>()=>{!i.current||t.unregister(i.current)},[]),t7(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=w5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:jn(o,i)}}function iz(){return[w5(pue),()=>w5(rz()),()=>hue(),i=>gue(i)]}var Hr=(...e)=>e.filter(Boolean).join(" "),VL={path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[b("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"}),b("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),b("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ea=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,f=Hr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:f,__css:p},v=r!=null?r:VL.viewBox;if(n&&typeof n!="string")return oe.createElement(xe.svg,{as:n,...m,...u});const y=a!=null?a:VL.path;return oe.createElement(xe.svg,{verticalAlign:"middle",viewBox:v,...m,...u},y)});Ea.displayName="Icon";function dt(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=k.exports.Children.toArray(e.path),a=Pe((s,l)=>b(Ea,{ref:l,viewBox:t,...i,...s,children:o.length?o:b("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function gr(e,t=[]){const n=k.exports.useRef(e);return k.exports.useEffect(()=>{n.current=e}),k.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Jb(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=gr(r),a=gr(i),[s,l]=k.exports.useState(n),u=t!==void 0,f=u?t:s,p=gr(m=>{const y=typeof m=="function"?m(f):m;!a(f,y)||(u||l(y),o(y))},[u,o,f,a]);return[f,p]}const i_=k.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),eS=k.exports.createContext({});function mue(){return k.exports.useContext(eS).visualElement}const B1=k.exports.createContext(null),zh=typeof document<"u",C5=zh?k.exports.useLayoutEffect:k.exports.useEffect,oz=k.exports.createContext({strict:!1});function vue(e,t,n,r){const i=mue(),o=k.exports.useContext(oz),a=k.exports.useContext(B1),s=k.exports.useContext(i_).reducedMotion,l=k.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return C5(()=>{u&&u.render()}),k.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),C5(()=>()=>u&&u.notify("Unmount"),[]),u}function P0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yue(e,t,n){return k.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):P0(n)&&(n.current=r))},[t])}function e2(e){return typeof e=="string"||Array.isArray(e)}function tS(e){return typeof e=="object"&&typeof e.start=="function"}const bue=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function nS(e){return tS(e.animate)||bue.some(t=>e2(e[t]))}function az(e){return Boolean(nS(e)||e.variants)}function Sue(e,t){if(nS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||e2(n)?n:void 0,animate:e2(r)?r:void 0}}return e.inherit!==!1?t:{}}function xue(e){const{initial:t,animate:n}=Sue(e,k.exports.useContext(eS));return k.exports.useMemo(()=>({initial:t,animate:n}),[WL(t),WL(n)])}function WL(e){return Array.isArray(e)?e.join(" "):e}const _u=e=>({isEnabled:t=>e.some(n=>!!t[n])}),t2={measureLayout:_u(["layout","layoutId","drag"]),animation:_u(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:_u(["exit"]),drag:_u(["drag","dragControls"]),focus:_u(["whileFocus"]),hover:_u(["whileHover","onHoverStart","onHoverEnd"]),tap:_u(["whileTap","onTap","onTapStart","onTapCancel"]),pan:_u(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:_u(["whileInView","onViewportEnter","onViewportLeave"])};function wue(e){for(const t in e)t==="projectionNodeConstructor"?t2.projectionNodeConstructor=e[t]:t2[t].Component=e[t]}function rS(e){const t=k.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const pv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Cue=1;function _ue(){return rS(()=>{if(pv.hasEverUpdated)return Cue++})}const o_=k.exports.createContext({});class kue extends oe.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const sz=k.exports.createContext({}),Eue=Symbol.for("motionComponentSymbol");function Pue({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&wue(e);function a(l,u){const f={...k.exports.useContext(i_),...l,layoutId:Tue(l)},{isStatic:p}=f;let m=null;const v=xue(l),y=p?void 0:_ue(),x=i(l,p);if(!p&&zh){v.visualElement=vue(o,x,f,t);const E=k.exports.useContext(oz).strict,_=k.exports.useContext(sz);v.visualElement&&(m=v.visualElement.loadFeatures(f,E,e,y,n||t2.projectionNodeConstructor,_))}return ee(kue,{visualElement:v.visualElement,props:f,children:[m,b(eS.Provider,{value:v,children:r(o,l,y,yue(x,v.visualElement,u),x,p,v.visualElement)})]})}const s=k.exports.forwardRef(a);return s[Eue]=o,s}function Tue({layoutId:e}){const t=k.exports.useContext(o_).id;return t&&e!==void 0?t+"-"+e:e}function Lue(e){function t(r,i={}){return Pue(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Aue=["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 a_(e){return typeof e!="string"||e.includes("-")?!1:!!(Aue.indexOf(e)>-1||/[A-Z]/.test(e))}const _5={};function Oue(e){Object.assign(_5,e)}const k5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],z1=new Set(k5);function lz(e,{layout:t,layoutId:n}){return z1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_5[e]||e==="opacity")}const jl=e=>!!(e!=null&&e.getVelocity),Rue={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mue=(e,t)=>k5.indexOf(e)-k5.indexOf(t);function Iue({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Mue);for(const s of t)a+=`${Rue[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function uz(e){return e.startsWith("--")}const Due=(e,t)=>t&&typeof e=="number"?t.transform(e):e,cz=(e,t)=>n=>Math.max(Math.min(n,t),e),gv=e=>e%1?Number(e.toFixed(5)):e,n2=/(-)?([\d]*\.?[\d])+/g,n7=/(#[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,Nue=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function R2(e){return typeof e=="string"}const $h={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mv=Object.assign(Object.assign({},$h),{transform:cz(0,1)}),v3=Object.assign(Object.assign({},$h),{default:1}),M2=e=>({test:t=>R2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zc=M2("deg"),$l=M2("%"),Et=M2("px"),Bue=M2("vh"),zue=M2("vw"),UL=Object.assign(Object.assign({},$l),{parse:e=>$l.parse(e)/100,transform:e=>$l.transform(e*100)}),s_=(e,t)=>n=>Boolean(R2(n)&&Nue.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),dz=(e,t,n)=>r=>{if(!R2(r))return r;const[i,o,a,s]=r.match(n2);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},uh={test:s_("hsl","hue"),parse:dz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$l.transform(gv(t))+", "+$l.transform(gv(n))+", "+gv(mv.transform(r))+")"},$ue=cz(0,255),Dw=Object.assign(Object.assign({},$h),{transform:e=>Math.round($ue(e))}),dd={test:s_("rgb","red"),parse:dz("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Dw.transform(e)+", "+Dw.transform(t)+", "+Dw.transform(n)+", "+gv(mv.transform(r))+")"};function Fue(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const r7={test:s_("#"),parse:Fue,transform:dd.transform},lo={test:e=>dd.test(e)||r7.test(e)||uh.test(e),parse:e=>dd.test(e)?dd.parse(e):uh.test(e)?uh.parse(e):r7.parse(e),transform:e=>R2(e)?e:e.hasOwnProperty("red")?dd.transform(e):uh.transform(e)},fz="${c}",hz="${n}";function Hue(e){var t,n,r,i;return isNaN(e)&&R2(e)&&((n=(t=e.match(n2))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(n7))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function pz(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(n7);r&&(n=r.length,e=e.replace(n7,fz),t.push(...r.map(lo.parse)));const i=e.match(n2);return i&&(e=e.replace(n2,hz),t.push(...i.map($h.parse))),{values:t,numColors:n,tokenised:e}}function gz(e){return pz(e).values}function mz(e){const{values:t,numColors:n,tokenised:r}=pz(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?fz:hz,s<n?lo.transform(o[s]):gv(o[s]));return a}}const Vue=e=>typeof e=="number"?0:e;function Wue(e){const t=gz(e);return mz(e)(t.map(Vue))}const Wu={test:Hue,parse:gz,createTransformer:mz,getAnimatableNone:Wue},Uue=new Set(["brightness","contrast","saturate","opacity"]);function jue(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(n2)||[];if(!r)return e;const i=n.replace(r,"");let o=Uue.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Gue=/([a-z-]*)\(.*?\)/g,i7=Object.assign(Object.assign({},Wu),{getAnimatableNone:e=>{const t=e.match(Gue);return t?t.map(jue).join(" "):e}}),jL={...$h,transform:Math.round},vz={borderWidth:Et,borderTopWidth:Et,borderRightWidth:Et,borderBottomWidth:Et,borderLeftWidth:Et,borderRadius:Et,radius:Et,borderTopLeftRadius:Et,borderTopRightRadius:Et,borderBottomRightRadius:Et,borderBottomLeftRadius:Et,width:Et,maxWidth:Et,height:Et,maxHeight:Et,size:Et,top:Et,right:Et,bottom:Et,left:Et,padding:Et,paddingTop:Et,paddingRight:Et,paddingBottom:Et,paddingLeft:Et,margin:Et,marginTop:Et,marginRight:Et,marginBottom:Et,marginLeft:Et,rotate:Zc,rotateX:Zc,rotateY:Zc,rotateZ:Zc,scale:v3,scaleX:v3,scaleY:v3,scaleZ:v3,skew:Zc,skewX:Zc,skewY:Zc,distance:Et,translateX:Et,translateY:Et,translateZ:Et,x:Et,y:Et,z:Et,perspective:Et,transformPerspective:Et,opacity:mv,originX:UL,originY:UL,originZ:Et,zIndex:jL,fillOpacity:mv,strokeOpacity:mv,numOctaves:jL};function l_(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,f=!1,p=!0;for(const m in t){const v=t[m];if(uz(m)){o[m]=v;continue}const y=vz[m],x=Due(v,y);if(z1.has(m)){if(u=!0,a[m]=x,s.push(m),!p)continue;v!==(y.default||0)&&(p=!1)}else m.startsWith("origin")?(f=!0,l[m]=x):i[m]=x}if(t.transform||(u||r?i.transform=Iue(e,n,p,r):i.transform&&(i.transform="none")),f){const{originX:m="50%",originY:v="50%",originZ:y=0}=l;i.transformOrigin=`${m} ${v} ${y}`}}const u_=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function yz(e,t,n){for(const r in t)!jl(t[r])&&!lz(r,n)&&(e[r]=t[r])}function que({transformTemplate:e},t,n){return k.exports.useMemo(()=>{const r=u_();return l_(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Yue(e,t,n){const r=e.style||{},i={};return yz(i,r,e),Object.assign(i,que(e,t,n)),e.transformValues?e.transformValues(i):i}function Kue(e,t,n){const r={},i=Yue(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Xue=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Zue=["whileTap","onTap","onTapStart","onTapCancel"],Que=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Jue=["whileInView","onViewportEnter","onViewportLeave","viewport"],ece=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",...Jue,...Zue,...Xue,...Que]);function E5(e){return ece.has(e)}let bz=e=>!E5(e);function tce(e){!e||(bz=t=>t.startsWith("on")?!E5(t):e(t))}try{tce(require("@emotion/is-prop-valid").default)}catch(e){}function nce(e,t,n){const r={};for(const i in e)(bz(i)||n===!0&&E5(i)||!t&&!E5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function GL(e,t,n){return typeof e=="string"?e:Et.transform(t+n*e)}function rce(e,t,n){const r=GL(t,e.x,e.width),i=GL(n,e.y,e.height);return`${r} ${i}`}const ice={offset:"stroke-dashoffset",array:"stroke-dasharray"},oce={offset:"strokeDashoffset",array:"strokeDasharray"};function ace(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ice:oce;e[o.offset]=Et.transform(-r);const a=Et.transform(t),s=Et.transform(n);e[o.array]=`${a} ${s}`}function c_(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,f){l_(e,l,u,f),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=rce(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&ace(p,o,a,s,!1)}const Sz=()=>({...u_(),attrs:{}});function sce(e,t){const n=k.exports.useMemo(()=>{const r=Sz();return c_(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};yz(r,e.style,e),n.style={...r,...n.style}}return n}function lce(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(a_(n)?sce:Kue)(r,a,s),p={...nce(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),k.exports.createElement(n,p)}}const xz=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function wz(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Cz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function _z(e,t,n,r){wz(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Cz.has(i)?i:xz(i),t.attrs[i])}function d_(e){const{style:t}=e,n={};for(const r in t)(jl(t[r])||lz(r,e))&&(n[r]=t[r]);return n}function kz(e){const t=d_(e);for(const n in e)if(jl(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function f_(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const r2=e=>Array.isArray(e),uce=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),Ez=e=>r2(e)?e[e.length-1]||0:e;function C4(e){const t=jl(e)?e.get():e;return uce(t)?t.toValue():t}function cce({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:dce(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const Pz=e=>(t,n)=>{const r=k.exports.useContext(eS),i=k.exports.useContext(B1),o=()=>cce(e,t,r,i);return n?o():rS(o)};function dce(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=C4(o[m]);let{initial:a,animate:s}=e;const l=nS(e),u=az(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let f=n?n.initial===!1:!1;f=f||a===!1;const p=f?s:a;return p&&typeof p!="boolean"&&!tS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const y=f_(e,v);if(!y)return;const{transitionEnd:x,transition:E,..._}=y;for(const C in _){let T=_[C];if(Array.isArray(T)){const A=f?T.length-1:0;T=T[A]}T!==null&&(i[C]=T)}for(const C in x)i[C]=x[C]}),i}const fce={useVisualState:Pz({scrapeMotionValuesFromProps:kz,createRenderState:Sz,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch(i){n.dimensions={x:0,y:0,width:0,height:0}}c_(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),_z(t,n)}})},hce={useVisualState:Pz({scrapeMotionValuesFromProps:d_,createRenderState:u_})};function pce(e,{forwardMotionProps:t=!1},n,r,i){return{...a_(e)?fce:hce,preloadedFeatures:n,useRender:lce(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Xn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Xn||(Xn={}));function iS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function o7(e,t,n,r){k.exports.useEffect(()=>{const i=e.current;if(n&&i)return iS(i,t,n,r)},[e,t,n,r])}function gce({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Xn.Focus,!0)},i=()=>{n&&n.setActive(Xn.Focus,!1)};o7(t,"focus",e?r:void 0),o7(t,"blur",e?i:void 0)}function Tz(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Lz(e){return!!e.touches}function mce(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const vce={pageX:0,pageY:0};function yce(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||vce;return{x:r[t+"X"],y:r[t+"Y"]}}function bce(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function h_(e,t="page"){return{point:Lz(e)?yce(e,t):bce(e,t)}}const Az=(e,t=!1)=>{const n=r=>e(r,h_(r));return t?mce(n):n},Sce=()=>zh&&window.onpointerdown===null,xce=()=>zh&&window.ontouchstart===null,wce=()=>zh&&window.onmousedown===null,Cce={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},_ce={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Oz(e){return Sce()?e:xce()?_ce[e]:wce()?Cce[e]:e}function X0(e,t,n,r){return iS(e,Oz(t),Az(n,t==="pointerdown"),r)}function P5(e,t,n,r){return o7(e,Oz(t),n&&Az(n,t==="pointerdown"),r)}function Rz(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const qL=Rz("dragHorizontal"),YL=Rz("dragVertical");function Mz(e){let t=!1;if(e==="y")t=YL();else if(e==="x")t=qL();else{const n=qL(),r=YL();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Iz(){const e=Mz(!0);return e?(e(),!1):!0}function KL(e,t,n){return(r,i)=>{!Tz(r)||Iz()||(e.animationState&&e.animationState.setActive(Xn.Hover,t),n&&n(r,i))}}function kce({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){P5(r,"pointerenter",e||n?KL(r,!0,e):void 0,{passive:!e}),P5(r,"pointerleave",t||n?KL(r,!1,t):void 0,{passive:!t})}const Dz=(e,t)=>t?e===t?!0:Dz(e,t.parentElement):!1;function p_(e){return k.exports.useEffect(()=>()=>e(),[])}function Nz(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Ece=function(){},T5=function(){};const L5=(e,t,n)=>Math.min(Math.max(n,e),t),Nw=.001,Pce=.01,XL=10,Tce=.05,Lce=1;function Ace({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Ece(e<=XL*1e3);let a=1-t;a=L5(Tce,Lce,a),e=L5(Pce,XL,e/1e3),a<1?(i=u=>{const f=u*a,p=f*e,m=f-n,v=a7(u,a),y=Math.exp(-p);return Nw-m/v*y},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-p),x=a7(Math.pow(u,2),a);return(-i(u)+Nw>0?-1:1)*((m-v)*y)/x}):(i=u=>{const f=Math.exp(-u*e),p=(u-n)*e+1;return-Nw+f*p},o=u=>{const f=Math.exp(-u*e),p=(n-u)*(e*e);return f*p});const s=5/e,l=Rce(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Oce=12;function Rce(e,t,n){let r=n;for(let i=1;i<Oce;i++)r=r-e(r)/t(r);return r}function a7(e,t){return e*Math.sqrt(1-t*t)}const Mce=["duration","bounce"],Ice=["stiffness","damping","mass"];function ZL(e,t){return t.some(n=>e[n]!==void 0)}function Dce(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ZL(e,Ice)&&ZL(e,Mce)){const n=Ace(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function g_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=Nz(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:f,duration:p,isResolvedFromDuration:m}=Dce(o),v=QL,y=QL;function x(){const E=f?-(f/1e3):0,_=n-t,C=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),C<1){const A=a7(T,C);v=M=>{const I=Math.exp(-C*T*M);return n-I*((E+C*T*_)/A*Math.sin(A*M)+_*Math.cos(A*M))},y=M=>{const I=Math.exp(-C*T*M);return C*T*I*(Math.sin(A*M)*(E+C*T*_)/A+_*Math.cos(A*M))-I*(Math.cos(A*M)*(E+C*T*_)-A*_*Math.sin(A*M))}}else if(C===1)v=A=>n-Math.exp(-T*A)*(_+(E+T*_)*A);else{const A=T*Math.sqrt(C*C-1);v=M=>{const I=Math.exp(-C*T*M),D=Math.min(A*M,300);return n-I*((E+C*T*_)*Math.sinh(D)+A*_*Math.cosh(D))/A}}}return x(),{next:E=>{const _=v(E);if(m)a.done=E>=p;else{const C=y(E)*1e3,T=Math.abs(C)<=r,A=Math.abs(n-_)<=i;a.done=T&&A}return a.value=a.done?n:_,a},flipTarget:()=>{f=-f,[t,n]=[n,t],x()}}}g_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const QL=e=>0,i2=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ar=(e,t,n)=>-n*e+n*t+e;function Bw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Bw(l,s,e+1/3),o=Bw(l,s,e),a=Bw(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Nce=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Bce=[r7,dd,uh],eA=e=>Bce.find(t=>t.test(e)),Bz=(e,t)=>{let n=eA(e),r=eA(t),i=n.parse(e),o=r.parse(t);n===uh&&(i=JL(i),n=dd),r===uh&&(o=JL(o),r=dd);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Nce(i[l],o[l],s));return a.alpha=Ar(i.alpha,o.alpha,s),n.transform(a)}},s7=e=>typeof e=="number",zce=(e,t)=>n=>t(e(n)),oS=(...e)=>e.reduce(zce);function zz(e,t){return s7(e)?n=>Ar(e,t,n):lo.test(e)?Bz(e,t):Fz(e,t)}const $z=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>zz(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},$ce=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zz(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function tA(e){const t=Wu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||typeof t[a]=="number"?r++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const Fz=(e,t)=>{const n=Wu.createTransformer(t),r=tA(e),i=tA(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?oS($z(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Fce=(e,t)=>n=>Ar(e,t,n);function Hce(e){if(typeof e=="number")return Fce;if(typeof e=="string")return lo.test(e)?Bz:Fz;if(Array.isArray(e))return $z;if(typeof e=="object")return $ce}function Vce(e,t,n){const r=[],i=n||Hce(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=oS(l,s)}r.push(s)}return r}function Wce([e,t],[n]){return r=>n(i2(e,t,r))}function Uce(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const s=i2(e[o],e[o+1],i);return t[o](s)}}function Hz(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;T5(o===t.length),T5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Vce(t,r,i),s=o===2?Wce(e,a):Uce(e,a);return n?l=>s(L5(e[0],e[o-1],l)):s}const aS=e=>t=>1-e(1-t),m_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jce=e=>t=>Math.pow(t,e),Vz=e=>t=>t*t*((e+1)*t-e),Gce=e=>{const t=Vz(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},Wz=1.525,qce=4/11,Yce=8/11,Kce=9/10,v_=e=>e,y_=jce(2),Xce=aS(y_),Uz=m_(y_),jz=e=>1-Math.sin(Math.acos(e)),b_=aS(jz),Zce=m_(b_),S_=Vz(Wz),Qce=aS(S_),Jce=m_(S_),ede=Gce(Wz),tde=4356/361,nde=35442/1805,rde=16061/1805,A5=e=>{if(e===1||e===0)return e;const t=e*e;return e<qce?7.5625*t:e<Yce?9.075*t-9.9*e+3.4:e<Kce?tde*t-nde*e+rde:10.8*e*e-20.52*e+10.72},ide=aS(A5),ode=e=>e<.5?.5*(1-A5(1-e*2)):.5*A5(e*2-1)+.5;function ade(e,t){return e.map(()=>t||Uz).splice(0,e.length-1)}function sde(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function lde(e,t){return e.map(n=>n*t)}function _4({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=lde(r&&r.length===a.length?r:sde(a),i);function l(){return Hz(s,a,{ease:Array.isArray(n)?n:ade(a,n)})}let u=l();return{next:f=>(o.value=u(f),o.done=f>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function ude({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:f=>{const p=-s*Math.exp(-f/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const nA={keyframes:_4,spring:g_,decay:ude};function cde(e){if(Array.isArray(e.to))return _4;if(nA[e.type])return nA[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?_4:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?g_:_4}const Gz=1/60*1e3,dde=typeof performance<"u"?()=>performance.now():()=>Date.now(),qz=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(dde()),Gz);function fde(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,f=!1)=>{const p=f&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const f=t[u];f(l),a.has(f)&&(s.schedule(f),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const hde=40;let l7=!0,o2=!1,u7=!1;const Z0={delta:0,timestamp:0},I2=["read","update","preRender","render","postRender"],sS=I2.reduce((e,t)=>(e[t]=fde(()=>o2=!0),e),{}),pde=I2.reduce((e,t)=>{const n=sS[t];return e[t]=(r,i=!1,o=!1)=>(o2||vde(),n.schedule(r,i,o)),e},{}),gde=I2.reduce((e,t)=>(e[t]=sS[t].cancel,e),{});I2.reduce((e,t)=>(e[t]=()=>sS[t].process(Z0),e),{});const mde=e=>sS[e].process(Z0),Yz=e=>{o2=!1,Z0.delta=l7?Gz:Math.max(Math.min(e-Z0.timestamp,hde),1),Z0.timestamp=e,u7=!0,I2.forEach(mde),u7=!1,o2&&(l7=!1,qz(Yz))},vde=()=>{o2=!0,l7=!0,u7||qz(Yz)},yde=()=>Z0;function Kz(e,t,n=0){return e-t-n}function bde(e,t,n=0,r=!0){return r?Kz(t+-e,t,n):t-(e-t)+n}function Sde(e,t,n,r){return r?e>=t+n:e<=-n}const xde=e=>{const t=({delta:n})=>e(n);return{start:()=>pde.update(t,!0),stop:()=>gde.update(t)}};function Xz(e){var t,n,{from:r,autoplay:i=!0,driver:o=xde,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:f,onStop:p,onComplete:m,onRepeat:v,onUpdate:y}=e,x=Nz(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=x,_,C=0,T=x.duration,A,M=!1,I=!0,D;const B=cde(x);!((n=(t=B).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=Hz([0,100],[r,E],{clamp:!1}),r=0,E=100);const F=B(Object.assign(Object.assign({},x),{from:r,to:E}));function H(){C++,l==="reverse"?(I=C%2===0,a=bde(a,T,u,I)):(a=Kz(a,T,u),l==="mirror"&&F.flipTarget()),M=!1,v&&v()}function Y(){_.stop(),m&&m()}function te(z){if(I||(z=-z),a+=z,!M){const W=F.next(Math.max(0,a));A=W.value,D&&(A=D(A)),M=I?W.done:a<=0}y==null||y(A),M&&(C===0&&(T!=null||(T=a)),C<s?Sde(a,T,u,I)&&H():Y())}function G(){f==null||f(),_=o(te),_.start()}return i&&G(),{stop:()=>{p==null||p(),_.stop()}}}function Zz(e,t){return t?e*(1e3/t):0}function wde({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:f,onUpdate:p,onComplete:m,onStop:v}){let y;function x(T){return n!==void 0&&T<n||r!==void 0&&T>r}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T)<Math.abs(r-T)?n:r}function _(T){y==null||y.stop(),y=Xz(Object.assign(Object.assign({},T),{driver:f,onUpdate:A=>{var M;p==null||p(A),(M=T.onUpdate)===null||M===void 0||M.call(T,A)},onComplete:m,onStop:v}))}function C(T){_(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(x(e))C({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const A=E(T),M=A===n?-1:1;let I,D;const B=F=>{I=D,D=F,t=Zz(F-I,yde().delta),(M===1&&F>A||M===-1&&F<A)&&C({from:F,to:A,velocity:t})};_({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:x(T)?B:void 0})}return{stop:()=>y==null?void 0:y.stop()}}const c7=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),rA=e=>c7(e)&&e.hasOwnProperty("z"),y3=(e,t)=>Math.abs(e-t);function x_(e,t){if(s7(e)&&s7(t))return y3(e,t);if(c7(e)&&c7(t)){const n=y3(e.x,t.x),r=y3(e.y,t.y),i=rA(e)&&rA(t)?y3(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const Qz=(e,t)=>1-3*t+3*e,Jz=(e,t)=>3*t-6*e,e$=e=>3*e,O5=(e,t,n)=>((Qz(t,n)*e+Jz(t,n))*e+e$(t))*e,t$=(e,t,n)=>3*Qz(t,n)*e*e+2*Jz(t,n)*e+e$(t),Cde=1e-7,_de=10;function kde(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=O5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Cde&&++s<_de);return a}const Ede=8,Pde=.001;function Tde(e,t,n,r){for(let i=0;i<Ede;++i){const o=t$(t,n,r);if(o===0)return t;const a=O5(t,n,r)-e;t-=a/o}return t}const k4=11,b3=1/(k4-1);function Lde(e,t,n,r){if(e===t&&n===r)return v_;const i=new Float32Array(k4);for(let a=0;a<k4;++a)i[a]=O5(a*b3,e,n);function o(a){let s=0,l=1;const u=k4-1;for(;l!==u&&i[l]<=a;++l)s+=b3;--l;const f=(a-i[l])/(i[l+1]-i[l]),p=s+f*b3,m=t$(p,e,n);return m>=Pde?Tde(a,p,e,n):m===0?p:kde(a,s,s+b3,e,n)}return a=>a===0||a===1?a:O5(o(a),t,r)}function Ade({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=k.exports.useRef(!1),s=k.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function f(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Xn.Tap,!1),!Iz()}function p(y,x){!f()||(Dz(i.current,y.target)?e&&e(y,x):n&&n(y,x))}function m(y,x){!f()||n&&n(y,x)}function v(y,x){u(),!a.current&&(a.current=!0,s.current=oS(X0(window,"pointerup",p,l),X0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Xn.Tap,!0),t&&t(y,x))}P5(i,"pointerdown",o?v:void 0,l),p_(u)}const Ode="production",n$=typeof process>"u"||process.env===void 0?Ode:"production",iA=new Set;function r$(e,t,n){e||iA.has(t)||(console.warn(t),n&&console.warn(n),iA.add(t))}const d7=new WeakMap,zw=new WeakMap,Rde=e=>{const t=d7.get(e.target);t&&t(e)},Mde=e=>{e.forEach(Rde)};function Ide({root:e,...t}){const n=e||document;zw.has(n)||zw.set(n,{});const r=zw.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Mde,{root:e,...t})),r[i]}function Dde(e,t,n){const r=Ide(t);return d7.set(e,n),r.observe(e),()=>{d7.delete(e),r.unobserve(e)}}function Nde({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=k.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?$de:zde)(a,o.current,e,i)}const Bde={some:0,all:1};function zde(e,t,n,{root:r,margin:i,amount:o="some",once:a}){k.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:Bde[o]},l=u=>{const{isIntersecting:f}=u;if(t.isInView===f||(t.isInView=f,a&&!f&&t.hasEnteredView))return;f&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Xn.InView,f);const p=n.getProps(),m=f?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Dde(n.current,s,l)},[e,r,i,o])}function $de(e,t,n,{fallback:r=!0}){k.exports.useEffect(()=>{!e||!r||(n$!=="production"&&r$(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Xn.InView,!0)}))},[e])}const fd=e=>t=>(e(t),null),Fde={inView:fd(Nde),tap:fd(Ade),focus:fd(gce),hover:fd(kce)};function w_(){const e=k.exports.useContext(B1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=k.exports.useId();return k.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Hde(){return Vde(k.exports.useContext(B1))}function Vde(e){return e===null?!0:e.isPresent}function i$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const R5=e=>e*1e3,Wde={linear:v_,easeIn:y_,easeInOut:Uz,easeOut:Xce,circIn:jz,circInOut:Zce,circOut:b_,backIn:S_,backInOut:Jce,backOut:Qce,anticipate:ede,bounceIn:ide,bounceInOut:ode,bounceOut:A5},oA=e=>{if(Array.isArray(e)){T5(e.length===4);const[t,n,r,i]=e;return Lde(t,n,r,i)}else if(typeof e=="string")return Wde[e];return e},Ude=e=>Array.isArray(e)&&typeof e[0]!="number",aA=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Wu.test(t)&&!t.startsWith("url(")),Vf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),S3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$w=()=>({type:"keyframes",ease:"linear",duration:.3}),jde=e=>({type:"keyframes",duration:.8,values:e}),sA={x:Vf,y:Vf,z:Vf,rotate:Vf,rotateX:Vf,rotateY:Vf,rotateZ:Vf,scaleX:S3,scaleY:S3,scale:S3,opacity:$w,backgroundColor:$w,color:$w,default:S3},Gde=(e,t)=>{let n;return r2(t)?n=jde:n=sA[e]||sA.default,{to:t,...n(t)}},qde={...vz,color:lo,backgroundColor:lo,outlineColor:lo,fill:lo,stroke:lo,borderColor:lo,borderTopColor:lo,borderRightColor:lo,borderBottomColor:lo,borderLeftColor:lo,filter:i7,WebkitFilter:i7},C_=e=>qde[e];function __(e,t){var n;let r=C_(e);return r!==i7&&(r=Wu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Yde={current:!1},o$=1/60*1e3,Kde=typeof performance<"u"?()=>performance.now():()=>Date.now(),a$=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Kde()),o$);function Xde(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,f=!1)=>{const p=f&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const f=t[u];f(l),a.has(f)&&(s.schedule(f),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Zde=40;let f7=!0,a2=!1,h7=!1;const Q0={delta:0,timestamp:0},D2=["read","update","preRender","render","postRender"],lS=D2.reduce((e,t)=>(e[t]=Xde(()=>a2=!0),e),{}),Ds=D2.reduce((e,t)=>{const n=lS[t];return e[t]=(r,i=!1,o=!1)=>(a2||Jde(),n.schedule(r,i,o)),e},{}),Oh=D2.reduce((e,t)=>(e[t]=lS[t].cancel,e),{}),Fw=D2.reduce((e,t)=>(e[t]=()=>lS[t].process(Q0),e),{}),Qde=e=>lS[e].process(Q0),s$=e=>{a2=!1,Q0.delta=f7?o$:Math.max(Math.min(e-Q0.timestamp,Zde),1),Q0.timestamp=e,h7=!0,D2.forEach(Qde),h7=!1,a2&&(f7=!1,a$(s$))},Jde=()=>{a2=!0,f7=!0,h7||a$(s$)},p7=()=>Q0;function l$(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Oh.read(r),e(o-t))};return Ds.read(r,!0),()=>Oh.read(r)}function efe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function tfe({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=R5(o.duration)),o.repeatDelay&&(a.repeatDelay=R5(o.repeatDelay)),e&&(a.ease=Ude(e)?e.map(oA):oA(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function nfe(e,t){var n,r;return(r=(n=(k_(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function rfe(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function ife(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),rfe(t),efe(e)||(e={...e,...Gde(n,t.to)}),{...t,...tfe(e)}}function ofe(e,t,n,r,i){const o=k_(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=aA(e,n);a==="none"&&s&&typeof n=="string"?a=__(e,n):lA(a)&&typeof n=="string"?a=uA(n):!Array.isArray(n)&&lA(n)&&typeof a=="string"&&(n=uA(a));const l=aA(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?wde({...p,...o}):Xz({...ife(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function f(){const p=Ez(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?f:u}function lA(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function uA(e){return typeof e=="number"?0:__("",e)}function k_(e,t){return e[t]||e.default||e}function E_(e,t,n,r={}){return Yde.current&&(r={type:!1}),t.start(i=>{let o;const a=ofe(e,t,n,r,i),s=nfe(r,e),l=()=>o=a();let u;return s?u=l$(l,R5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const afe=e=>/^\-?\d*\.?\d+$/.test(e),sfe=e=>/^0[^.\s]+$/.test(e);function P_(e,t){e.indexOf(t)===-1&&e.push(t)}function T_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class vv{constructor(){this.subscriptions=[]}add(t){return P_(this.subscriptions,t),()=>T_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const lfe=e=>!isNaN(parseFloat(e));class ufe{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new vv,this.velocityUpdateSubscribers=new vv,this.renderSubscribers=new vv,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=p7();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ds.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Ds.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=lfe(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Zz(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function b1(e){return new ufe(e)}const u$=e=>t=>t.test(e),cfe={test:e=>e==="auto",parse:e=>e},c$=[$h,Et,$l,Zc,zue,Bue,cfe],mm=e=>c$.find(u$(e)),dfe=[...c$,lo,Wu],ffe=e=>dfe.find(u$(e));function hfe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function pfe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function uS(e,t,n){const r=e.getProps();return f_(r,t,n!==void 0?n:r.custom,hfe(e),pfe(e))}function gfe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,b1(n))}function mfe(e,t){const n=uS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=Ez(o[a]);gfe(e,a,s)}}function vfe(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s<a;s++){const l=o[s],u=t[l];let f=null;Array.isArray(u)&&(f=u[0]),f===null&&(f=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),f!=null&&(typeof f=="string"&&(afe(f)||sfe(f))?f=parseFloat(f):!ffe(f)&&Wu.test(u)&&(f=__(l,u)),e.addValue(l,b1(f)),n[l]===void 0&&(n[l]=f),f!==null&&e.setBaseTarget(l,f))}}function yfe(e,t){return t?(t[e]||t.default||t).from:void 0}function bfe(e,t,n){var r;const i={};for(const o in e){const a=yfe(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function M5(e){return Boolean(jl(e)&&e.add)}function Sfe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>g7(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=g7(e,t,n);else{const i=typeof t=="function"?uS(e,t,n.custom):t;r=d$(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function g7(e,t,n={}){var r;const i=uS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>d$(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:m}=o;return xfe(e,t,f+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,f]=l==="beforeChildren"?[a,s]:[s,a];return u().then(f)}else return Promise.all([a(),s(n.delay)])}function d$(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const f=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),y=l[m];if(!v||y===void 0||p&&Cfe(p,m))continue;let x={delay:n,...a};e.shouldReduceMotion&&z1.has(m)&&(x={...x,type:!1,delay:0});let E=E_(m,v,y,x);M5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),f.push(E)}return Promise.all(f).then(()=>{s&&mfe(e,s)})}function xfe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(wfe).forEach((u,f)=>{a.push(g7(u,t,{...o,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function wfe(e,t){return e.sortNodePosition(t)}function Cfe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const L_=[Xn.Animate,Xn.InView,Xn.Focus,Xn.Hover,Xn.Tap,Xn.Drag,Xn.Exit],_fe=[...L_].reverse(),kfe=L_.length;function Efe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Sfe(e,n,r)))}function Pfe(e){let t=Efe(e);const n=Lfe();let r=!0;const i=(l,u)=>{const f=uS(e,u);if(f){const{transition:p,transitionEnd:m,...v}=f;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var f;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],y=new Set;let x={},E=1/0;for(let C=0;C<kfe;C++){const T=_fe[C],A=n[T],M=(f=p[T])!==null&&f!==void 0?f:m[T],I=e2(M),D=T===u?A.isActive:null;D===!1&&(E=C);let B=M===m[T]&&M!==p[T]&&I;if(B&&r&&e.manuallyAnimateOnMount&&(B=!1),A.protectedKeys={...x},!A.isActive&&D===null||!M&&!A.prevProp||tS(M)||typeof M=="boolean")continue;const F=Tfe(A.prevProp,M);let H=F||T===u&&A.isActive&&!B&&I||C>E&&I;const Y=Array.isArray(M)?M:[M];let te=Y.reduce(i,{});D===!1&&(te={});const{prevResolvedValues:G={}}=A,z={...G,...te},W=K=>{H=!0,y.delete(K),A.needsAnimating[K]=!0};for(const K in z){const Z=te[K],U=G[K];x.hasOwnProperty(K)||(Z!==U?r2(Z)&&r2(U)?!i$(Z,U)||F?W(K):A.protectedKeys[K]=!0:Z!==void 0?W(K):y.add(K):Z!==void 0&&y.has(K)?W(K):A.protectedKeys[K]=!0)}A.prevProp=M,A.prevResolvedValues=te,A.isActive&&(x={...x,...te}),r&&e.blockInitialAnimation&&(H=!1),H&&!B&&v.push(...Y.map(K=>({animation:K,options:{type:T,...l}})))}if(y.size){const C={};y.forEach(T=>{const A=e.getBaseTarget(T);A!==void 0&&(C[T]=A)}),v.push({animation:C})}let _=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(v):Promise.resolve()}function s(l,u,f){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,u)}),n[l].isActive=u;const m=a(f,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function Tfe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!i$(t,e):!1}function Wf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lfe(){return{[Xn.Animate]:Wf(!0),[Xn.InView]:Wf(),[Xn.Hover]:Wf(),[Xn.Tap]:Wf(),[Xn.Drag]:Wf(),[Xn.Focus]:Wf(),[Xn.Exit]:Wf()}}const Afe={animation:fd(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Pfe(e)),tS(t)&&k.exports.useEffect(()=>t.subscribe(e),[t])}),exit:fd(e=>{const{custom:t,visualElement:n}=e,[r,i]=w_(),o=k.exports.useContext(B1);k.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Xn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class f${constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Vw(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=x_(u.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=u,{timestamp:v}=p7();this.history.push({...m,timestamp:v});const{onStart:y,onMove:x}=this.handlers;f||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Hw(f,this.transformPagePoint),Tz(u)&&u.buttons===0){this.handlePointerUp(u,f);return}Ds.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Vw(Hw(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},Lz(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=h_(t),o=Hw(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=p7();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Vw(o,this.history)),this.removeListeners=oS(X0(window,"pointermove",this.handlePointerMove),X0(window,"pointerup",this.handlePointerUp),X0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Oh.update(this.updatePoint)}}function Hw(e,t){return t?{point:t(e.point)}:e}function cA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vw({point:e},t){return{point:e,delta:cA(e,h$(t)),offset:cA(e,Ofe(t)),velocity:Rfe(t,.1)}}function Ofe(e){return e[0]}function h$(e){return e[e.length-1]}function Rfe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=h$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>R5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function xa(e){return e.max-e.min}function dA(e,t=0,n=.01){return x_(e,t)<n}function fA(e,t,n,r=.5){e.origin=r,e.originPoint=Ar(t.min,t.max,e.origin),e.scale=xa(n)/xa(t),(dA(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ar(n.min,n.max,e.origin)-e.originPoint,(dA(e.translate)||isNaN(e.translate))&&(e.translate=0)}function yv(e,t,n,r){fA(e.x,t.x,n.x,r==null?void 0:r.originX),fA(e.y,t.y,n.y,r==null?void 0:r.originY)}function hA(e,t,n){e.min=n.min+t.min,e.max=e.min+xa(t)}function Mfe(e,t,n){hA(e.x,t.x,n.x),hA(e.y,t.y,n.y)}function pA(e,t,n){e.min=t.min-n.min,e.max=e.min+xa(t)}function bv(e,t,n){pA(e.x,t.x,n.x),pA(e.y,t.y,n.y)}function Ife(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ar(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ar(n,e,r.max):Math.min(e,n)),e}function gA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Dfe(e,{top:t,left:n,bottom:r,right:i}){return{x:gA(e.x,n,i),y:gA(e.y,t,r)}}function mA(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Nfe(e,t){return{x:mA(e.x,t.x),y:mA(e.y,t.y)}}function Bfe(e,t){let n=.5;const r=xa(e),i=xa(t);return i>r?n=i2(t.min,t.max-r,e.min):r>i&&(n=i2(e.min,e.max-i,t.min)),L5(0,1,n)}function zfe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const m7=.35;function $fe(e=m7){return e===!1?e=0:e===!0&&(e=m7),{x:vA(e,"left","right"),y:vA(e,"top","bottom")}}function vA(e,t,n){return{min:yA(e,t),max:yA(e,n)}}function yA(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const bA=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sv=()=>({x:bA(),y:bA()}),SA=()=>({min:0,max:0}),ii=()=>({x:SA(),y:SA()});function wl(e){return[e("x"),e("y")]}function p$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ffe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Hfe(e,t){if(!t)return e;const 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}}function Ww(e){return e===void 0||e===1}function v7({scale:e,scaleX:t,scaleY:n}){return!Ww(e)||!Ww(t)||!Ww(n)}function Xf(e){return v7(e)||g$(e)||e.z||e.rotate||e.rotateX||e.rotateY}function g$(e){return xA(e.x)||xA(e.y)}function xA(e){return e&&e!=="0%"}function I5(e,t,n){const r=e-n,i=t*r;return n+i}function wA(e,t,n,r,i){return i!==void 0&&(e=I5(e,i,r)),I5(e,n,r)+t}function y7(e,t=0,n=1,r,i){e.min=wA(e.min,t,n,r,i),e.max=wA(e.max,t,n,r,i)}function m$(e,{x:t,y:n}){y7(e.x,t.translate,t.scale,t.originPoint),y7(e.y,n.translate,n.scale,n.originPoint)}function Vfe(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;u++)s=n[u],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&T0(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,m$(e,l)),r&&Xf(s.latestValues)&&T0(e,s.latestValues))}function nd(e,t){e.min=e.min+t,e.max=e.max+t}function CA(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=Ar(e.min,e.max,o);y7(e,t[n],t[r],a,t.scale)}const Wfe=["x","scaleX","originX"],Ufe=["y","scaleY","originY"];function T0(e,t){CA(e.x,t,Wfe),CA(e.y,t,Ufe)}function v$(e,t){return p$(Hfe(e.getBoundingClientRect(),t))}function jfe(e,t,n){const r=v$(e,n),{scroll:i}=t;return i&&(nd(r.x,i.offset.x),nd(r.y,i.offset.y)),r}const Gfe=new WeakMap;class qfe{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ii(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(h_(s,"page").point)},i=(s,l)=>{var u;const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Mz(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wl(v=>{var y,x;let E=this.getAxisMotionValue(v).get()||0;if($l.test(E)){const _=(x=(y=this.visualElement.projection)===null||y===void 0?void 0:y.layout)===null||x===void 0?void 0:x.layoutBox[v];_&&(E=xa(_)*(parseFloat(E)/100))}this.originPoint[v]=E}),m==null||m(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Xn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(f&&this.currentDirection===null){this.currentDirection=Yfe(v),this.currentDirection!==null&&(p==null||p(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),m==null||m(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new f$(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Xn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!x3(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Ife(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&P0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Dfe(r.layoutBox,t):this.constraints=!1,this.elastic=$fe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&wl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=zfe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!P0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=jfe(r,i.root,this.visualElement.getTransformPagePoint());let a=Nfe(i.layout.layoutBox,o);if(n){const s=n(Ffe(a));this.hasMutatedConstraints=!!s,s&&(a=p$(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=wl(f=>{var p;if(!x3(f,n,this.currentDirection))return;let m=(p=l==null?void 0:l[f])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,y=i?40:1e7,x={type:"inertia",velocity:r?t[f]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(f,x)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return E_(t,r,0,n)}stopAnimation(){wl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){wl(n=>{const{drag:r}=this.getProps();if(!x3(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Ar(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!P0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};wl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Bfe({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),wl(s=>{if(!x3(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:f}=this.constraints[s];l.set(Ar(u,f,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;Gfe.set(this.visualElement,this);const n=this.visualElement.current,r=X0(n,"pointerdown",u=>{const{drag:f,dragListener:p=!0}=this.getProps();f&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();P0(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=iS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(wl(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l==null||l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=m7,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function x3(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Yfe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Kfe(e){const{dragControls:t,visualElement:n}=e,r=rS(()=>new qfe(n));k.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),k.exports.useEffect(()=>r.addListeners(),[r])}function Xfe({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=k.exports.useRef(null),{transformPagePoint:s}=k.exports.useContext(i_),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(f,p)=>{a.current=null,n&&n(f,p)}};k.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(f){a.current=new f$(f,l,{transformPagePoint:s})}P5(i,"pointerdown",o&&u),p_(()=>a.current&&a.current.end())}const Zfe={pan:fd(Xfe),drag:fd(Kfe)};function b7(e){return typeof e=="string"&&e.startsWith("var(--")}const y$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Qfe(e){const t=y$.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function S7(e,t,n=1){const[r,i]=Qfe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():b7(i)?S7(i,t,n+1):i}function Jfe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!b7(o))return;const a=S7(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!b7(o))continue;const a=S7(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const ehe=new Set(["width","height","top","left","right","bottom","x","y"]),b$=e=>ehe.has(e),the=e=>Object.keys(e).some(b$),S$=(e,t)=>{e.set(t,!1),e.set(t)},_A=e=>e===$h||e===Et;var kA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(kA||(kA={}));const EA=(e,t)=>parseFloat(e.split(", ")[t]),PA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return EA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?EA(o[1],e):0}},nhe=new Set(["x","y","z"]),rhe=k5.filter(e=>!nhe.has(e));function ihe(e){const t=[];return rhe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const TA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:PA(4,13),y:PA(5,14)},ohe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=TA[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const f=t.getValue(u);S$(f,s[u]),e[u]=TA[u](l,o)}),e},ahe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(b$);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let f=n[l],p=mm(f);const m=t[l];let v;if(r2(m)){const y=m.length,x=m[0]===null?1:0;f=m[x],p=mm(f);for(let E=x;E<y;E++)v?T5(mm(m[E])===v):v=mm(m[E])}else v=mm(m);if(p!==v)if(_A(p)&&_A(v)){const y=u.get();typeof y=="string"&&u.set(parseFloat(y)),typeof m=="string"?t[l]=parseFloat(m):Array.isArray(m)&&v===Et&&(t[l]=m.map(parseFloat))}else(p==null?void 0:p.transform)&&(v==null?void 0:v.transform)&&(f===0||m===0)?f===0?u.set(v.transform(f)):t[l]=p.transform(m):(a||(o=ihe(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],S$(u,m))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=ohe(t,e,s);return o.length&&o.forEach(([f,p])=>{e.getValue(f).set(p)}),e.render(),zh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function she(e,t,n,r){return the(t)?ahe(e,t,n,r):{target:t,transitionEnd:r}}const lhe=(e,t,n,r)=>{const i=Jfe(e,t,r);return t=i.target,r=i.transitionEnd,she(e,t,n,r)},x7={current:null},x$={current:!1};function uhe(){if(x$.current=!0,!!zh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>x7.current=e.matches;e.addListener(t),t()}else x7.current=!1}function che(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(jl(o))e.addValue(i,o),M5(r)&&r.add(i);else if(jl(a))e.addValue(i,b1(o)),M5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,b1(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const w$=Object.keys(t2),dhe=w$.length,LA=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fhe{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){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=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ds.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=nS(n),this.isVariantNode=az(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const f in u){const p=u[f];a[f]!==void 0&&jl(p)&&(p.set(a[f],!1),M5(l)&&l.add(f))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),x$.current||uhe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:x7.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),Oh.update(this.notifyUpdate),Oh.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=z1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ds.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isProjectionDirty=!0)}),o=n.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<dhe;l++){const u=w$[l],{isEnabled:f,Component:p}=t2[u];f(t)&&p&&s.push(k.exports.createElement(p,{key:u,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:f,dragConstraints:p,layoutScroll:m}=t;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:Boolean(f)||p&&P0(p),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:m})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ii()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;n<LA.length;n++){const r=LA[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i=t["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=che(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:(t=this.parent)===null||t===void 0?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var n,r;if(t)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const o=((r=this.parent)===null||r===void 0?void 0:r.getVariantContext())||{};return this.props.initial!==void 0&&(o.initial=this.props.initial),o}const i={};for(let o=0;o<hhe;o++){const a=C$[o],s=this.props[a];(e2(s)||s===!1)&&(i[a]=s)}return i}addVariantChild(t){var n;const r=this.getClosestVariantNode();if(r)return(n=r.variantChildren)===null||n===void 0||n.add(t),()=>r.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=b1(n),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=f_(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!jl(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new vv),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const C$=["initial",...L_],hhe=C$.length;class _$ extends fhe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=bfe(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){vfe(this,r,a);const s=lhe(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function phe(e){return window.getComputedStyle(e)}class ghe extends _${readValueFromInstance(t,n){if(z1.has(n)){const r=C_(n);return r&&r.default||0}else{const r=phe(t),i=(uz(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return v$(t,n)}build(t,n,r,i){l_(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return d_(t)}renderInstance(t,n,r,i){wz(t,n,r,i)}}class mhe extends _${getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return z1.has(n)?((r=C_(n))===null||r===void 0?void 0:r.default)||0:(n=Cz.has(n)?n:xz(n),t.getAttribute(n))}measureInstanceViewportBox(){return ii()}scrapeMotionValuesFromProps(t){return kz(t)}build(t,n,r,i){c_(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){_z(t,n,r,i)}}const vhe=(e,t)=>a_(e)?new mhe(t,{enableHardwareAcceleration:!1}):new ghe(t,{enableHardwareAcceleration:!0});function AA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vm={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Et.test(e))e=parseFloat(e);else return e;const n=AA(e,t.target.x),r=AA(e,t.target.y);return`${n}% ${r}%`}},OA="_$css",yhe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(y$,v=>(o.push(v),OA)));const a=Wu.parse(e);if(a.length>5)return r;const s=Wu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,f=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=f;const p=Ar(u,f,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(OA,()=>{const y=o[v];return v++,y})}return m}};class bhe extends oe.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Oue(xhe),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),pv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ds.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),r!=null&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t==null||t()}render(){return null}}function She(e){const[t,n]=w_(),r=k.exports.useContext(o_);return b(bhe,{...e,layoutGroup:r,switchLayoutGroup:k.exports.useContext(sz),isPresent:t,safeToRemove:n})}const xhe={borderRadius:{...vm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vm,borderTopRightRadius:vm,borderBottomLeftRadius:vm,borderBottomRightRadius:vm,boxShadow:yhe},whe={measureLayout:She};function Che(e,t,n={}){const r=jl(e)?e:b1(e);return E_("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const k$=["TopLeft","TopRight","BottomLeft","BottomRight"],_he=k$.length,RA=e=>typeof e=="string"?parseFloat(e):e,MA=e=>typeof e=="number"||Et.test(e);function khe(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=Ar(0,(a=n.opacity)!==null&&a!==void 0?a:1,Ehe(r)),e.opacityExit=Ar((s=t.opacity)!==null&&s!==void 0?s:1,0,Phe(r))):o&&(e.opacity=Ar((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let f=0;f<_he;f++){const p=`border${k$[f]}Radius`;let m=IA(t,p),v=IA(n,p);if(m===void 0&&v===void 0)continue;m||(m=0),v||(v=0),m===0||v===0||MA(m)===MA(v)?(e[p]=Math.max(Ar(RA(m),RA(v),r),0),($l.test(v)||$l.test(m))&&(e[p]+="%")):e[p]=v}(t.rotate||n.rotate)&&(e.rotate=Ar(t.rotate||0,n.rotate||0,r))}function IA(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}const Ehe=E$(0,.5,b_),Phe=E$(.5,.95,v_);function E$(e,t,n){return r=>r<e?0:r>t?1:n(i2(e,t,r))}function DA(e,t){e.min=t.min,e.max=t.max}function ws(e,t){DA(e.x,t.x),DA(e.y,t.y)}function NA(e,t,n,r,i){return e-=t,e=I5(e,1/n,r),i!==void 0&&(e=I5(e,1/i,r)),e}function The(e,t=0,n=1,r=.5,i,o=e,a=e){if($l.test(t)&&(t=parseFloat(t),t=Ar(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Ar(o.min,o.max,r);e===o&&(s-=t),e.min=NA(e.min,t,n,s,i),e.max=NA(e.max,t,n,s,i)}function BA(e,t,[n,r,i],o,a){The(e,t[n],t[r],t[i],t.scale,o,a)}const Lhe=["x","scaleX","originX"],Ahe=["y","scaleY","originY"];function zA(e,t,n,r){BA(e.x,t,Lhe,n==null?void 0:n.x,r==null?void 0:r.x),BA(e.y,t,Ahe,n==null?void 0:n.y,r==null?void 0:r.y)}function $A(e){return e.translate===0&&e.scale===1}function P$(e){return $A(e.x)&&$A(e.y)}function T$(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 FA(e){return xa(e.x)/xa(e.y)}function Ohe(e,t,n=.1){return x_(e,t)<=n}class Rhe{constructor(){this.members=[]}add(t){P_(this.members,t),t.scheduleRender()}remove(t){if(T_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function HA(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:f}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const Mhe=(e,t)=>e.depth-t.depth;class Ihe{constructor(){this.children=[],this.isDirty=!1}add(t){P_(this.children,t),this.isDirty=!0}remove(t){T_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mhe),this.isDirty=!1,this.children.forEach(t)}}const VA=["","X","Y","Z"],WA=1e3;let Dhe=0;function L$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=Dhe++,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=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Fhe),this.nodes.forEach(Hhe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ihe)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new vv),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l==null||l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}registerPotentialNode(a,s){this.potentialNodes.set(a,s)}mount(a,s=!1){var l;if(this.instance)return;this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;const{layoutId:u,layout:f,visualElement:p}=this.options;if(p&&!p.current&&p.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),s&&(f||u)&&(this.isLayoutDirty=!0),e){let m;const v=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=l$(v,250),pv.hasAnimatedSinceResize&&(pv.hasAnimatedSinceResize=!1,this.nodes.forEach(jA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||f)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y,layout:x})=>{var E,_,C,T,A;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=(_=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&_!==void 0?_:Ghe,{onLayoutAnimationStart:I,onLayoutAnimationComplete:D}=p.getProps(),B=!this.targetLayout||!T$(this.targetLayout,x)||y,F=!v&&y;if(((C=this.resumeFrom)===null||C===void 0?void 0:C.instance)||F||v&&(B||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,F);const H={...k_(M,"layout"),onPlay:I,onComplete:D};p.shouldReduceMotion&&(H.delay=0,H.type=!1),this.startAnimation(H)}else!v&&this.animationProgress===0&&jA(this),this.isLead()&&((A=(T=this.options).onExitComplete)===null||A===void 0||A.call(T));this.targetLayout=x})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Oh.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Vhe),this.animationId++)}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const y=this.path[v];y.shouldResetTransform=!0,y.updateScroll("snapshot")}const{layoutId:f,layout:p}=this.options;if(f===void 0&&!p)return;const m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=m==null?void 0:m(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(UA);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(qhe),this.potentialNodes.clear()),this.nodes.forEach($he),this.nodes.forEach(Nhe),this.nodes.forEach(Bhe),this.clearAllSnapshots(),Fw.update(),Fw.preRender(),Fw.render())}clearAllSnapshots(){this.nodes.forEach(zhe),this.sharedNodes.forEach(Whe)}scheduleUpdateProjection(){Ds.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Ds.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ii(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(a=this.options.visualElement)===null||a===void 0||a.notify("LayoutMeasure",this.layout.layoutBox,s==null?void 0:s.layoutBox)}updateScroll(a="measure"){let s=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!P$(this.projectionDelta),u=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,f=u==null?void 0:u(this.latestValues,""),p=f!==this.prevTransformTemplateValue;s&&(l||Xf(this.latestValues)||p)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){var s;const l=this.measurePageBox();let u=this.removeElementScroll(l);a&&(u=this.removeTransform(u)),Yhe(u);const f=(s=this.options.visualElement)===null||s===void 0?void 0:s.readValue("position"),p=f==="fixed"||f==="sticky"?f:"static";return{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id,position:p}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return ii();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(nd(s.x,l.offset.x),nd(s.y,l.offset.y)),s}removeElementScroll(a){const s=ii();ws(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:f,options:p}=u;if(u!==this.root&&f&&p.layoutScroll){if(f.isRoot){ws(s,a);const{scroll:m}=this.root;m&&(nd(s.x,-m.offset.x),nd(s.y,-m.offset.y))}nd(s.x,f.offset.x),nd(s.y,f.offset.y)}}return s}applyTransform(a,s=!1){const l=ii();ws(l,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];!s&&f.options.layoutScroll&&f.scroll&&f!==f.root&&T0(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),Xf(f.latestValues)&&T0(l,f.latestValues)}return Xf(this.latestValues)&&T0(l,this.latestValues),l}removeTransform(a){var s;const l=ii();ws(l,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!Xf(f.latestValues))continue;v7(f.latestValues)&&f.updateSnapshot();const p=ii(),m=f.measurePageBox();ws(p,m),zA(l,f.latestValues,(s=f.snapshot)===null||s===void 0?void 0:s.layoutBox,p)}return Xf(this.latestValues)&&zA(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){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}resolveTargetDelta(){var a;if(this.isProjectionDirty||(this.isProjectionDirty=this.getLead().isProjectionDirty||Boolean(this.parent&&this.parent.isProjectionDirty)),!this.isProjectionDirty)return;const{layout:s,layoutId:l}=this.options;if(!(!this.layout||!(s||l))){if(!this.targetDelta&&!this.relativeTarget){const u=this.getClosestProjectingParent();u&&u.layout?(this.relativeParent=u,this.relativeTarget=ii(),this.relativeTargetOrigin=ii(),bv(this.relativeTargetOrigin,this.layout.layoutBox,u.layout.layoutBox),ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ii(),this.targetWithTransforms=ii()),this.relativeTarget&&this.relativeTargetOrigin&&((a=this.relativeParent)===null||a===void 0?void 0:a.target)?Mfe(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ws(this.target,this.layout.layoutBox),m$(this.target,this.targetDelta)):ws(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const u=this.getClosestProjectingParent();u&&Boolean(u.resumingFrom)===Boolean(this.resumingFrom)&&!u.options.layoutScroll&&u.target?(this.relativeParent=u,this.relativeTarget=ii(),this.relativeTargetOrigin=ii(),bv(this.relativeTargetOrigin,this.target,u.target),ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||v7(this.parent.latestValues)||g$(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;if(!this.isProjectionDirty)return;this.isProjectionDirty=!1;const{layout:s,layoutId:l}=this.options;if(this.isTreeAnimating=Boolean(((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||l))return;const u=this.getLead();ws(this.layoutCorrected,this.layout.layoutBox),Vfe(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:f}=u;if(!f)return;this.projectionDelta||(this.projectionDelta=Sv(),this.projectionDeltaWithTransform=Sv());const p=this.treeScale.x,m=this.treeScale.y,v=this.projectionTransform;yv(this.projectionDelta,this.layoutCorrected,f,this.latestValues),this.projectionTransform=HA(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==p||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s,l,u;(l=(s=this.options).scheduleRender)===null||l===void 0||l.call(s),a&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){var l,u;const f=this.snapshot,p=(f==null?void 0:f.latestValues)||{},m={...this.latestValues},v=Sv();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const y=ii(),x=(f==null?void 0:f.source)!==((l=this.layout)===null||l===void 0?void 0:l.source),E=(((u=this.getStack())===null||u===void 0?void 0:u.members.length)||0)<=1,_=Boolean(x&&!E&&this.options.crossfade===!0&&!this.path.some(jhe));this.animationProgress=0,this.mixTargetDelta=C=>{var T;const A=C/1e3;GA(v.x,a.x,A),GA(v.y,a.y,A),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(bv(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Uhe(this.relativeTarget,this.relativeTargetOrigin,y,A)),x&&(this.animationValues=m,khe(m,p,this.latestValues,A,_,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Oh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ds.update(()=>{pv.hasAnimatedSinceResize=!0,this.currentAnimation=Che(0,WA,{...a,onUpdate:u=>{var f;this.mixTargetDelta(u),(f=a.onUpdate)===null||f===void 0||f.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,WA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:f}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&A$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ii();const p=xa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=xa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ws(s,l),T0(s,f),yv(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(a,s){var l,u,f;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rhe),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let f=0;f<VA.length;f++){const p="rotate"+VA[f];l[p]&&(u[p]=l[p],a.setStaticValue(p,0))}a==null||a.render();for(const f in u)a.setStaticValue(f,u[f]);a.scheduleRender()}getProjectionStyles(a={}){var s,l,u;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const p=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=C4(a.pointerEvents)||"",f.transform=p?p(this.latestValues,""):"none",f;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=C4(a.pointerEvents)||""),this.hasProjected&&!Xf(this.latestValues)&&(E.transform=p?p({},""):"none",this.hasProjected=!1),E}const v=m.animationValues||m.latestValues;this.applyTransformsToTarget(),f.transform=HA(this.projectionDeltaWithTransform,this.treeScale,v),p&&(f.transform=p(v,f.transform));const{x:y,y:x}=this.projectionDelta;f.transformOrigin=`${y.origin*100}% ${x.origin*100}% 0`,m.animationValues?f.opacity=m===this?(u=(l=v.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:f.opacity=m===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const E in _5){if(v[E]===void 0)continue;const{correct:_,applyTo:C}=_5[E],T=_(v[E],m);if(C){const A=C.length;for(let M=0;M<A;M++)f[C[M]]=T}else f[E]=T}return this.options.layoutId&&(f.pointerEvents=m===this?C4(a.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(UA),this.root.sharedNodes.clear()}}}function Nhe(e){e.updateLayout()}function Bhe(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?wl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],x=xa(y);y.min=o[v].min,y.max=y.min+x}):A$(s,i.layoutBox,o)&&wl(v=>{const y=l?i.measuredBox[v]:i.layoutBox[v],x=xa(o[v]);y.max=y.min+x});const u=Sv();yv(u,o,i.layoutBox);const f=Sv();l?yv(f,e.applyTransform(a,!0),i.measuredBox):yv(f,o,i.layoutBox);const p=!P$(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:y,layout:x}=v;if(y&&x){const E=ii();bv(E,i.layoutBox,y.layoutBox);const _=ii();bv(_,o,x.layoutBox),T$(E,_)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:f,layoutDelta:u,hasLayoutChanged:p,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function zhe(e){e.clearSnapshot()}function UA(e){e.clearMeasurements()}function $he(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Fhe(e){e.resolveTargetDelta()}function Hhe(e){e.calcProjection()}function Vhe(e){e.resetRotation()}function Whe(e){e.removeLeadSnapshot()}function GA(e,t,n){e.translate=Ar(t.translate,0,n),e.scale=Ar(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qA(e,t,n,r){e.min=Ar(t.min,n.min,r),e.max=Ar(t.max,n.max,r)}function Uhe(e,t,n,r){qA(e.x,t.x,n.x,r),qA(e.y,t.y,n.y,r)}function jhe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ghe={duration:.45,ease:[.4,0,.1,1]};function qhe(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function YA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Yhe(e){YA(e.x),YA(e.y)}function A$(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ohe(FA(t),FA(n),.2)}const Khe=L$({attachResizeListener:(e,t)=>iS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Uw={current:void 0},Xhe=L$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Uw.current){const e=new Khe(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Uw.current=e}return Uw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Zhe={...Afe,...Fde,...Zfe,...whe},Ql=Lue((e,t)=>pce(e,t,Zhe,vhe,Xhe));function O$(){const e=k.exports.useRef(!1);return C5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Qhe(){const e=O$(),[t,n]=k.exports.useState(0),r=k.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[k.exports.useCallback(()=>Ds.postRender(r),[r]),t]}class Jhe extends k.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function epe({children:e,isPresent:t}){const n=k.exports.useId(),r=k.exports.useRef(null),i=k.exports.useRef({width:0,height:0,top:0,left:0});return k.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${s}px !important;
left: ${l}px !important;
}
`),()=>{document.head.removeChild(u)}},[t]),b(Jhe,{isPresent:t,childRef:r,sizeRef:i,children:k.exports.cloneElement(e,{ref:r})})}const jw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=rS(tpe),l=k.exports.useId(),u=k.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:f=>{s.set(f,!0);for(const p of s.values())if(!p)return;r&&r()},register:f=>(s.set(f,!1),()=>s.delete(f))}),o?void 0:[n]);return k.exports.useMemo(()=>{s.forEach((f,p)=>s.set(p,!1))},[n]),k.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=b(epe,{isPresent:n,children:e})),b(B1.Provider,{value:u,children:e})};function tpe(){return new Map}const f0=e=>e.key||"";function npe(e,t){e.forEach(n=>{const r=f0(n);t.set(r,n)})}function rpe(e){const t=[];return k.exports.Children.forEach(e,n=>{k.exports.isValidElement(n)&&t.push(n)}),t}const Vd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",r$(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Qhe();const l=k.exports.useContext(o_).forceRender;l&&(s=l);const u=O$(),f=rpe(e);let p=f;const m=new Set,v=k.exports.useRef(p),y=k.exports.useRef(new Map).current,x=k.exports.useRef(!0);if(C5(()=>{x.current=!1,npe(f,y),v.current=p}),p_(()=>{x.current=!0,y.clear(),m.clear()}),x.current)return b(In,{children:p.map(T=>b(jw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},f0(T)))});p=[...p];const E=v.current.map(f0),_=f.map(f0),C=E.length;for(let T=0;T<C;T++){const A=E[T];_.indexOf(A)===-1&&m.add(A)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(_.indexOf(T)!==-1)return;const A=y.get(T);if(!A)return;const M=E.indexOf(T),I=()=>{y.delete(T),m.delete(T);const D=v.current.findIndex(B=>B.key===T);if(v.current.splice(D,1),!m.size){if(v.current=f,u.current===!1)return;s(),r&&r()}};p.splice(M,0,b(jw,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:a,children:A},f0(A)))}),p=p.map(T=>{const A=T.key;return m.has(A)?T:b(jw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},f0(T))}),n$!=="production"&&a==="wait"&&p.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.`),b(In,{children:m.size?p:p.map(T=>k.exports.cloneElement(T))})};var Tl=function(){return Tl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Tl.apply(this,arguments)};function R$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function $1(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{u(r.next(f))}catch(p){a(p)}}function l(f){try{u(r.throw(f))}catch(p){a(p)}}function u(f){f.done?o(f.value):i(f.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function F1(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function KA(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function w7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var N2=(...e)=>e.filter(Boolean).join(" ");function ipe(){return!1}var ope=e=>{const{condition:t,message:n}=e;t&&ipe()&&console.warn(n)},ch={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},ym={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function C7(e){var n;switch((n=e==null?void 0:e.direction)!=null?n:"right"){case"right":return ym.slideRight;case"left":return ym.slideLeft;case"bottom":return ym.slideDown;case"top":return ym.slideUp;default:return ym.slideRight}}var Sh={enter:{duration:.2,ease:ch.easeOut},exit:{duration:.1,ease:ch.easeIn}},Ns={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},ape=e=>e!=null&&parseInt(e.toString(),10)>0,XA={exit:{height:{duration:.2,ease:ch.ease},opacity:{duration:.3,ease:ch.ease}},enter:{height:{duration:.3,ease:ch.ease},opacity:{duration:.4,ease:ch.ease}}},spe={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:ape(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(o=n==null?void 0:n.exit)!=null?o:Ns.exit(XA.exit,i)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(o=n==null?void 0:n.enter)!=null?o:Ns.enter(XA.enter,i)}}},M$=k.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:f,...p}=e,[m,v]=k.exports.useState(!1);k.exports.useEffect(()=>{const C=setTimeout(()=>{v(!0)});return()=>clearTimeout(C)},[]),ope({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const y=parseFloat(o.toString())>0,x={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:f==null?void 0:f.enter,exit:r?f==null?void 0:f.exit:{...f==null?void 0:f.exit,display:y?"block":"none"}}},E=r?n:!0,_=n||r?"enter":"exit";return b(Vd,{initial:!1,custom:x,children:E&&oe.createElement(Ql.div,{ref:t,...p,className:N2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:x,variants:spe,initial:r?"exit":!1,animate:_,exit:"exit"})})});M$.displayName="Collapse";var lpe={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Ns.enter(Sh.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:Ns.exit(Sh.exit,n),transitionEnd:t==null?void 0:t.exit}}},I$={initial:"exit",animate:"enter",exit:"exit",variants:lpe},upe=k.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,f=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return b(Vd,{custom:m,children:p&&oe.createElement(Ql.div,{ref:n,className:N2("chakra-fade",o),custom:m,...I$,animate:f,...u})})});upe.displayName="Fade";var cpe={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:Ns.exit(Sh.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Ns.enter(Sh.enter,n),transitionEnd:e==null?void 0:e.enter}}},D$={initial:"exit",animate:"enter",exit:"exit",variants:cpe},dpe=k.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:f,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",y={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:f};return b(Vd,{custom:y,children:m&&oe.createElement(Ql.div,{ref:n,className:N2("chakra-offset-slide",s),...D$,animate:v,custom:y,...p})})});dpe.displayName="ScaleFade";var ZA={exit:{duration:.15,ease:ch.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},fpe={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:i}=C7({direction:e});return{...i,transition:(o=t==null?void 0:t.exit)!=null?o:Ns.exit(ZA.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:i}=C7({direction:e});return{...i,transition:(o=n==null?void 0:n.enter)!=null?o:Ns.enter(ZA.enter,r),transitionEnd:t==null?void 0:t.enter}}},N$=k.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:f,motionProps:p,...m}=t,v=C7({direction:r}),y=Object.assign({position:"fixed"},v.position,i),x=o?a&&o:!0,E=a||o?"enter":"exit",_={transitionEnd:u,transition:l,direction:r,delay:f};return b(Vd,{custom:_,children:x&&oe.createElement(Ql.div,{...m,ref:n,initial:"exit",className:N2("chakra-slide",s),animate:E,exit:"exit",custom:_,variants:fpe,style:y,...p})})});N$.displayName="Slide";var hpe={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:Ns.exit(Sh.exit,i),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:Ns.enter(Sh.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var s;const a={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:Ns.exit(Sh.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},_7={initial:"initial",animate:"enter",exit:"exit",variants:hpe},ppe=k.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:f,delay:p,...m}=t,v=r?i&&r:!0,y=i||r?"enter":"exit",x={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:f,delay:p};return b(Vd,{custom:x,children:v&&oe.createElement(Ql.div,{ref:n,className:N2("chakra-offset-slide",a),custom:x,..._7,animate:y,...m})})});ppe.displayName="SlideFade";var B2=(...e)=>e.filter(Boolean).join(" ");function gpe(){return!1}var cS=e=>{const{condition:t,message:n}=e;t&&gpe()&&console.warn(n)};function Gw(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[mpe,dS]=Ln({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[vpe,A_]=Ln({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[ype,qRe,bpe,Spe]=iz(),dh=Pe(function(t,n){const{getButtonProps:r}=A_(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...dS().button};return oe.createElement(xe.button,{...i,className:B2("chakra-accordion__button",t.className),__css:a})});dh.displayName="AccordionButton";function xpe(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;_pe(e),kpe(e);const s=bpe(),[l,u]=k.exports.useState(-1);k.exports.useEffect(()=>()=>{u(-1)},[]);const[f,p]=Jb({value:r,defaultValue(){return i?n!=null?n:[]:n!=null?n:-1},onChange:t});return{index:f,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let y=!1;return v!==null&&(y=Array.isArray(f)?f.includes(v):f===v),{isOpen:y,onChange:E=>{if(v!==null)if(i&&Array.isArray(f)){const _=E?f.concat(v):f.filter(C=>C!==v);p(_)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[wpe,O_]=Ln({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Cpe(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=O_(),s=k.exports.useRef(null),l=k.exports.useId(),u=r!=null?r:l,f=`accordion-button-${u}`,p=`accordion-panel-${u}`;Epe(e);const{register:m,index:v,descendants:y}=Spe({disabled:t&&!n}),{isOpen:x,onChange:E}=o(v===-1?null:v);Ppe({isOpen:x,isDisabled:t});const _=()=>{E==null||E(!0)},C=()=>{E==null||E(!1)},T=k.exports.useCallback(()=>{E==null||E(!x),a(v)},[v,a,x,E]),A=k.exports.useCallback(B=>{const H={ArrowDown:()=>{const Y=y.nextEnabled(v);Y==null||Y.node.focus()},ArrowUp:()=>{const Y=y.prevEnabled(v);Y==null||Y.node.focus()},Home:()=>{const Y=y.firstEnabled();Y==null||Y.node.focus()},End:()=>{const Y=y.lastEnabled();Y==null||Y.node.focus()}}[B.key];H&&(B.preventDefault(),H(B))},[y,v]),M=k.exports.useCallback(()=>{a(v)},[a,v]),I=k.exports.useCallback(function(F={},H=null){return{...F,type:"button",ref:jn(m,s,H),id:f,disabled:!!t,"aria-expanded":!!x,"aria-controls":p,onClick:Gw(F.onClick,T),onFocus:Gw(F.onFocus,M),onKeyDown:Gw(F.onKeyDown,A)}},[f,t,x,T,M,A,p,m]),D=k.exports.useCallback(function(F={},H=null){return{...F,ref:H,role:"region",id:p,"aria-labelledby":f,hidden:!x}},[f,x,p]);return{isOpen:x,isDisabled:t,isFocusable:n,onOpen:_,onClose:C,getButtonProps:I,getPanelProps:D,htmlProps:i}}function _pe(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;cS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function kpe(e){cS({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"})}function Epe(e){cS({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.
`})}function Ppe(e){cS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function fh(e){const{isOpen:t,isDisabled:n}=A_(),{reduceMotion:r}=O_(),i=B2("chakra-accordion__icon",e.className),o=dS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return b(Ea,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:b("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}fh.displayName="AccordionIcon";var hh=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Cpe(t),l={...dS().container,overflowAnchor:"none"},u=k.exports.useMemo(()=>a,[a]);return oe.createElement(vpe,{value:u},oe.createElement(xe.div,{ref:n,...o,className:B2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});hh.displayName="AccordionItem";var ph=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=O_(),{getPanelProps:s,isOpen:l}=A_(),u=s(o,n),f=B2("chakra-accordion__panel",r),p=dS();a||delete u.hidden;const m=oe.createElement(xe.div,{...u,__css:p.panel,className:f});return a?m:b(M$,{in:l,...i,children:m})});ph.displayName="AccordionPanel";var fS=Pe(function({children:t,reduceMotion:n,...r},i){const o=zi("Accordion",r),a=wn(r),{htmlProps:s,descendants:l,...u}=xpe(a),f=k.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return oe.createElement(ype,{value:l},oe.createElement(wpe,{value:f},oe.createElement(mpe,{value:o},oe.createElement(xe.div,{ref:i,...s,className:B2("chakra-accordion",r.className),__css:o.root},t))))});fS.displayName="Accordion";var Tpe=(...e)=>e.filter(Boolean).join(" "),Lpe=Hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),z2=Pe((e,t)=>{const n=bo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=wn(e),u=Tpe("chakra-spinner",s),f={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lpe} ${o} linear infinite`,...n};return oe.createElement(xe.div,{ref:t,__css:f,className:u,...l},r&&oe.createElement(xe.span,{srOnly:!0},r))});z2.displayName="Spinner";var hS=(...e)=>e.filter(Boolean).join(" ");function Ape(e){return b(Ea,{viewBox:"0 0 24 24",...e,children:b("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"})})}function Ope(e){return b(Ea,{viewBox:"0 0 24 24",...e,children:b("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"})})}function QA(e){return b(Ea,{viewBox:"0 0 24 24",...e,children:b("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[Rpe,Mpe]=Ln({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Ipe,R_]=Ln({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),B$={info:{icon:Ope,colorScheme:"blue"},warning:{icon:QA,colorScheme:"orange"},success:{icon:Ape,colorScheme:"green"},error:{icon:QA,colorScheme:"red"},loading:{icon:z2,colorScheme:"blue"}};function Dpe(e){return B$[e].colorScheme}function Npe(e){return B$[e].icon}var z$=Pe(function(t,n){var u;const{status:r="info",addRole:i=!0,...o}=wn(t),a=(u=t.colorScheme)!=null?u:Dpe(r),s=zi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return oe.createElement(Rpe,{value:{status:r}},oe.createElement(Ipe,{value:s},oe.createElement(xe.div,{role:i?"alert":void 0,ref:n,...o,className:hS("chakra-alert",t.className),__css:l})))});z$.displayName="Alert";var $$=Pe(function(t,n){const i={display:"inline",...R_().description};return oe.createElement(xe.div,{ref:n,...t,className:hS("chakra-alert__desc",t.className),__css:i})});$$.displayName="AlertDescription";function F$(e){const{status:t}=Mpe(),n=Npe(t),r=R_(),i=t==="loading"?r.spinner:r.icon;return oe.createElement(xe.span,{display:"inherit",...e,className:hS("chakra-alert__icon",e.className),__css:i},e.children||b(n,{h:"100%",w:"100%"}))}F$.displayName="AlertIcon";var H$=Pe(function(t,n){const r=R_();return oe.createElement(xe.div,{ref:n,...t,className:hS("chakra-alert__title",t.className),__css:r.title})});H$.displayName="AlertTitle";function Bpe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function zpe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,f]=k.exports.useState("pending");k.exports.useEffect(()=>{f(n?"loading":"pending")},[n]);const p=k.exports.useRef(),m=k.exports.useCallback(()=>{if(!n)return;v();const y=new Image;y.src=n,a&&(y.crossOrigin=a),r&&(y.srcset=r),s&&(y.sizes=s),t&&(y.loading=t),y.onload=x=>{v(),f("loaded"),i==null||i(x)},y.onerror=x=>{v(),f("failed"),o==null||o(x)},p.current=y},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Ms(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $pe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",D5=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return b("img",{width:r,height:i,ref:n,alt:o,...a})});D5.displayName="NativeImage";var pS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:f,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...y}=t,x=r!==void 0||i!==void 0,E=u!=null||f||!x,_=zpe({...t,ignoreFallback:E}),C=$pe(_,m),T={ref:n,objectFit:l,objectPosition:s,...E?y:Bpe(y,["onError","onLoad"])};return C?i||oe.createElement(xe.img,{as:D5,className:"chakra-image__placeholder",src:r,...T}):oe.createElement(xe.img,{as:D5,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});pS.displayName="Image";Pe((e,t)=>oe.createElement(xe.img,{ref:t,as:D5,className:"chakra-image",...e}));function gS(e){return k.exports.Children.toArray(e).filter(t=>k.exports.isValidElement(t))}var mS=(...e)=>e.filter(Boolean).join(" "),JA=e=>e?"":void 0,[Fpe,Hpe]=Ln({strict:!1,name:"ButtonGroupContext"});function k7(e){const{children:t,className:n,...r}=e,i=k.exports.isValidElement(t)?k.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=mS("chakra-button__icon",n);return oe.createElement(xe.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}k7.displayName="ButtonIcon";function E7(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=b(z2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=mS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",f=k.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return oe.createElement(xe.div,{className:l,...s,__css:f},i)}E7.displayName="ButtonSpinner";function Vpe(e){const[t,n]=k.exports.useState(!e);return{ref:k.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Za=Pe((e,t)=>{const n=Hpe(),r=bo("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:f,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:y="start",className:x,as:E,..._}=wn(e),C=k.exports.useMemo(()=>{const I={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:I}}},[r,n]),{ref:T,type:A}=Vpe(E),M={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return oe.createElement(xe.button,{disabled:i||o,ref:cue(t,T),as:E,type:m!=null?m:A,"data-active":JA(a),"data-loading":JA(o),__css:C,className:mS("chakra-button",x),..._},o&&y==="start"&&b(E7,{className:"chakra-button__spinner--start",label:f,placement:"start",spacing:p,children:v}),o?f||oe.createElement(xe.span,{opacity:0},b(eO,{...M})):b(eO,{...M}),o&&y==="end"&&b(E7,{className:"chakra-button__spinner--end",label:f,placement:"end",spacing:p,children:v}))});Za.displayName="Button";function eO(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(In,{children:[t&&b(k7,{marginEnd:i,children:t}),r,n&&b(k7,{marginStart:i,children:n})]})}var Yi=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...f}=t,p=mS("chakra-button__group",a),m=k.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *: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}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},oe.createElement(Fpe,{value:m},oe.createElement(xe.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...f}))});Yi.displayName="ButtonGroup";var Qa=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=k.exports.isValidElement(s)?k.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return b(Za,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Qa.displayName="IconButton";var H1=(...e)=>e.filter(Boolean).join(" "),w3=e=>e?"":void 0,qw=e=>e?!0:void 0;function tO(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Wpe,V$]=Ln({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[Upe,V1]=Ln({strict:!1,name:"FormControlContext"});function jpe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=k.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,f=`${l}-feedback`,p=`${l}-helptext`,[m,v]=k.exports.useState(!1),[y,x]=k.exports.useState(!1),[E,_]=k.exports.useState(!1),C=k.exports.useCallback((D={},B=null)=>({id:p,...D,ref:jn(B,F=>{!F||x(!0)})}),[p]),T=k.exports.useCallback((D={},B=null)=>{var F,H;return{...D,ref:B,"data-focus":w3(E),"data-disabled":w3(i),"data-invalid":w3(r),"data-readonly":w3(o),id:(F=D.id)!=null?F:u,htmlFor:(H=D.htmlFor)!=null?H:l}},[l,i,E,r,o,u]),A=k.exports.useCallback((D={},B=null)=>({id:f,...D,ref:jn(B,F=>{!F||v(!0)}),"aria-live":"polite"}),[f]),M=k.exports.useCallback((D={},B=null)=>({...D,...a,ref:B,role:"group"}),[a]),I=k.exports.useCallback((D={},B=null)=>({...D,ref:B,role:"presentation","aria-hidden":!0,children:D.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>_(!0),onBlur:()=>_(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:y,setHasHelpText:x,id:l,labelId:u,feedbackId:f,helpTextId:p,htmlProps:a,getHelpTextProps:C,getErrorMessageProps:A,getRootProps:M,getLabelProps:T,getRequiredIndicatorProps:I}}var Wd=Pe(function(t,n){const r=zi("Form",t),i=wn(t),{getRootProps:o,htmlProps:a,...s}=jpe(i),l=H1("chakra-form-control",t.className);return oe.createElement(Upe,{value:s},oe.createElement(Wpe,{value:r},oe.createElement(xe.div,{...o({},n),className:l,__css:r.container})))});Wd.displayName="FormControl";var Gpe=Pe(function(t,n){const r=V1(),i=V$(),o=H1("chakra-form__helper-text",t.className);return oe.createElement(xe.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});Gpe.displayName="FormHelperText";function M_(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=I_(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":qw(n),"aria-required":qw(i),"aria-readonly":qw(r)}}function I_(e){var y,x,E;const t=V1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:f,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return(t==null?void 0:t.hasFeedbackText)&&(t==null?void 0:t.isInvalid)&&v.push(t.feedbackId),t!=null&&t.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n!=null?n:t==null?void 0:t.id,isDisabled:(y=r!=null?r:u)!=null?y:t==null?void 0:t.isDisabled,isReadOnly:(x=i!=null?i:l)!=null?x:t==null?void 0:t.isReadOnly,isRequired:(E=o!=null?o:a)!=null?E:t==null?void 0:t.isRequired,isInvalid:s!=null?s:t==null?void 0:t.isInvalid,onFocus:tO(t==null?void 0:t.onFocus,f),onBlur:tO(t==null?void 0:t.onBlur,p)}}var[qpe,Ype]=Ln({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),Kpe=Pe((e,t)=>{const n=zi("FormError",e),r=wn(e),i=V1();return i!=null&&i.isInvalid?oe.createElement(qpe,{value:n},oe.createElement(xe.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:H1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Kpe.displayName="FormErrorMessage";var Xpe=Pe((e,t)=>{const n=Ype(),r=V1();if(!(r!=null&&r.isInvalid))return null;const i=H1("chakra-form__error-icon",e.className);return b(Ea,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:b("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"})})});Xpe.displayName="FormErrorIcon";var Fh=Pe(function(t,n){var m;const r=bo("FormLabel",t),i=wn(t),{className:o,children:a,requiredIndicator:s=b(W$,{}),optionalIndicator:l=null,...u}=i,f=V1(),p=(m=f==null?void 0:f.getLabelProps(u,n))!=null?m:{ref:n,...u};return oe.createElement(xe.label,{...p,className:H1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,f!=null&&f.isRequired?s:l)});Fh.displayName="FormLabel";var W$=Pe(function(t,n){const r=V1(),i=V$();if(!(r!=null&&r.isRequired))return null;const o=H1("chakra-form__required-indicator",t.className);return oe.createElement(xe.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});W$.displayName="RequiredIndicator";function Od(e,t){const n=k.exports.useRef(!1),r=k.exports.useRef(!1);k.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),k.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var D_={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Zpe=xe("span",{baseStyle:D_});Zpe.displayName="VisuallyHidden";var Qpe=xe("input",{baseStyle:D_});Qpe.displayName="VisuallyHiddenInput";var nO=!1,vS=null,S1=!1,P7=new Set,Jpe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function e0e(e){return!(e.metaKey||!Jpe&&e.altKey||e.ctrlKey)}function N_(e,t){P7.forEach(n=>n(e,t))}function rO(e){S1=!0,e0e(e)&&(vS="keyboard",N_("keyboard",e))}function Zp(e){vS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(S1=!0,N_("pointer",e))}function t0e(e){e.target===window||e.target===document||(S1||(vS="keyboard",N_("keyboard",e)),S1=!1)}function n0e(){S1=!1}function iO(){return vS!=="pointer"}function r0e(){if(typeof window>"u"||nO)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){S1=!0,e.apply(this,n)},document.addEventListener("keydown",rO,!0),document.addEventListener("keyup",rO,!0),window.addEventListener("focus",t0e,!0),window.addEventListener("blur",n0e,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Zp,!0),document.addEventListener("pointermove",Zp,!0),document.addEventListener("pointerup",Zp,!0)):(document.addEventListener("mousedown",Zp,!0),document.addEventListener("mousemove",Zp,!0),document.addEventListener("mouseup",Zp,!0)),nO=!0}function i0e(e){r0e(),e(iO());const t=()=>e(iO());return P7.add(t),()=>{P7.delete(t)}}var[YRe,o0e]=Ln({name:"CheckboxGroupContext",strict:!1}),a0e=(...e)=>e.filter(Boolean).join(" "),ao=e=>e?"":void 0;function Ba(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function s0e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function l0e(e){return oe.createElement(xe.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},b("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function u0e(e){return oe.createElement(xe.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},b("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function c0e(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?u0e:l0e;return n||t?oe.createElement(xe.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},b(i,{...r})):null}function d0e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function U$(e={}){const t=I_(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:f,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:y,name:x,value:E,tabIndex:_=void 0,"aria-label":C,"aria-labelledby":T,"aria-invalid":A,...M}=e,I=d0e(M,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=gr(v),B=gr(s),F=gr(l),[H,Y]=k.exports.useState(!1),[te,G]=k.exports.useState(!1),[z,W]=k.exports.useState(!1),[K,Z]=k.exports.useState(!1);k.exports.useEffect(()=>i0e(Y),[]);const U=k.exports.useRef(null),[Q,ue]=k.exports.useState(!0),[fe,Te]=k.exports.useState(!!f),Oe=p!==void 0,ve=Oe?p:fe,Ce=k.exports.useCallback(ke=>{if(r||n){ke.preventDefault();return}Oe||Te(ve?ke.target.checked:y?!0:ke.target.checked),D==null||D(ke)},[r,n,ve,Oe,y,D]);Ms(()=>{U.current&&(U.current.indeterminate=Boolean(y))},[y]),Od(()=>{n&&G(!1)},[n,G]),Ms(()=>{const ke=U.current;!(ke!=null&&ke.form)||(ke.form.onreset=()=>{Te(!!f)})},[]);const Re=n&&!m,Ye=k.exports.useCallback(ke=>{ke.key===" "&&Z(!0)},[Z]),Ue=k.exports.useCallback(ke=>{ke.key===" "&&Z(!1)},[Z]);Ms(()=>{if(!U.current)return;U.current.checked!==ve&&Te(U.current.checked)},[U.current]);const pt=k.exports.useCallback((ke={},at=null)=>{const Rt=tt=>{te&&tt.preventDefault(),Z(!0)};return{...ke,ref:at,"data-active":ao(K),"data-hover":ao(z),"data-checked":ao(ve),"data-focus":ao(te),"data-focus-visible":ao(te&&H),"data-indeterminate":ao(y),"data-disabled":ao(n),"data-invalid":ao(o),"data-readonly":ao(r),"aria-hidden":!0,onMouseDown:Ba(ke.onMouseDown,Rt),onMouseUp:Ba(ke.onMouseUp,()=>Z(!1)),onMouseEnter:Ba(ke.onMouseEnter,()=>W(!0)),onMouseLeave:Ba(ke.onMouseLeave,()=>W(!1))}},[K,ve,n,te,H,z,y,o,r]),wt=k.exports.useCallback((ke={},at=null)=>({...I,...ke,ref:jn(at,Rt=>{!Rt||ue(Rt.tagName==="LABEL")}),onClick:Ba(ke.onClick,()=>{var Rt;Q||((Rt=U.current)==null||Rt.click(),requestAnimationFrame(()=>{var tt;(tt=U.current)==null||tt.focus()}))}),"data-disabled":ao(n),"data-checked":ao(ve),"data-invalid":ao(o)}),[I,n,ve,o,Q]),ut=k.exports.useCallback((ke={},at=null)=>({...ke,ref:jn(U,at),type:"checkbox",name:x,value:E,id:a,tabIndex:_,onChange:Ba(ke.onChange,Ce),onBlur:Ba(ke.onBlur,B,()=>G(!1)),onFocus:Ba(ke.onFocus,F,()=>G(!0)),onKeyDown:Ba(ke.onKeyDown,Ye),onKeyUp:Ba(ke.onKeyUp,Ue),required:i,checked:ve,disabled:Re,readOnly:r,"aria-label":C,"aria-labelledby":T,"aria-invalid":A?Boolean(A):o,"aria-describedby":u,"aria-disabled":n,style:D_}),[x,E,a,Ce,B,F,Ye,Ue,i,ve,Re,r,C,T,A,o,u,n,_]),ft=k.exports.useCallback((ke={},at=null)=>({...ke,ref:at,onMouseDown:Ba(ke.onMouseDown,oO),onTouchStart:Ba(ke.onTouchStart,oO),"data-disabled":ao(n),"data-checked":ao(ve),"data-invalid":ao(o)}),[ve,n,o]);return{state:{isInvalid:o,isFocused:te,isChecked:ve,isActive:K,isHovered:z,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:wt,getCheckboxProps:pt,getInputProps:ut,getLabelProps:ft,htmlProps:I}}function oO(e){e.preventDefault(),e.stopPropagation()}var f0e={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},h0e={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},p0e=Hd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),g0e=Hd({from:{opacity:0},to:{opacity:1}}),m0e=Hd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),j$=Pe(function(t,n){const r=o0e(),i={...r,...t},o=zi("Checkbox",i),a=wn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:f,iconSize:p,icon:m=b(c0e,{}),isChecked:v,isDisabled:y=r==null?void 0:r.isDisabled,onChange:x,inputProps:E,..._}=a;let C=v;(r==null?void 0:r.value)&&a.value&&(C=r.value.includes(a.value));let T=x;(r==null?void 0:r.onChange)&&a.value&&(T=s0e(r.onChange,x));const{state:A,getInputProps:M,getCheckboxProps:I,getLabelProps:D,getRootProps:B}=U$({..._,isDisabled:y,isChecked:C,onChange:T}),F=k.exports.useMemo(()=>({animation:A.isIndeterminate?`${g0e} 20ms linear, ${m0e} 200ms linear`:`${p0e} 200ms linear`,fontSize:p,color:f,...o.icon}),[f,p,,A.isIndeterminate,o.icon]),H=k.exports.cloneElement(m,{__css:F,isIndeterminate:A.isIndeterminate,isChecked:A.isChecked});return oe.createElement(xe.label,{__css:{...h0e,...o.container},className:a0e("chakra-checkbox",l),...B()},b("input",{className:"chakra-checkbox__input",...M(E,n)}),oe.createElement(xe.span,{__css:{...f0e,...o.control},className:"chakra-checkbox__control",...I()},H),u&&oe.createElement(xe.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});j$.displayName="Checkbox";function v0e(e){return b(Ea,{focusable:"false","aria-hidden":!0,...e,children:b("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"})})}var yS=Pe(function(t,n){const r=bo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=wn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return oe.createElement(xe.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||b(v0e,{width:"1em",height:"1em"}))});yS.displayName="CloseButton";function y0e(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function B_(e,t){let n=y0e(e);const r=10**(t!=null?t:10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function T7(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function N5(e,t,n){return(e-t)*100/(n-t)}function G$(e,t,n){return(n-t)*e+t}function L7(e,t,n){const r=Math.round((e-t)/n)*n+t,i=T7(n);return B_(r,i)}function J0(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function b0e(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,keepWithinRange:l=!0}=e,u=gr(t),[f,p]=k.exports.useState(()=>{var H;return r==null?"":(H=Yw(r,o,n))!=null?H:""}),m=typeof i<"u",v=m?i:f,y=q$(Qc(v),o),x=n!=null?n:y,E=k.exports.useCallback(H=>{H!==v&&(m||p(H.toString()),u==null||u(H.toString(),Qc(H)))},[u,m,v]),_=k.exports.useCallback(H=>{let Y=H;return l&&(Y=J0(Y,a,s)),B_(Y,x)},[x,l,s,a]),C=k.exports.useCallback((H=o)=>{let Y;v===""?Y=Qc(H):Y=Qc(v)+H,Y=_(Y),E(Y)},[_,o,E,v]),T=k.exports.useCallback((H=o)=>{let Y;v===""?Y=Qc(-H):Y=Qc(v)-H,Y=_(Y),E(Y)},[_,o,E,v]),A=k.exports.useCallback(()=>{var Y;let H;r==null?H="":H=(Y=Yw(r,o,n))!=null?Y:a,E(H)},[r,n,o,E,a]),M=k.exports.useCallback(H=>{var te;const Y=(te=Yw(H,o,x))!=null?te:a;E(Y)},[x,o,E,a]),I=Qc(v);return{isOutOfRange:I>s||I<a,isAtMax:I===s,isAtMin:I===a,precision:x,value:v,valueAsNumber:I,update:E,reset:A,increment:C,decrement:T,clamp:_,cast:M,setValue:p}}function Qc(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function q$(e,t){return Math.max(T7(t),T7(e))}function Yw(e,t,n){const r=Qc(e);if(Number.isNaN(r))return;const i=q$(r,t);return B_(r,n!=null?n:i)}var Y$=`
:root {
--chakra-vh: 100vh;
}
@supports (height: -webkit-fill-available) {
:root {
--chakra-vh: -webkit-fill-available;
}
}
@supports (height: -moz-fill-available) {
:root {
--chakra-vh: -moz-fill-available;
}
}
@supports (height: 100dvh) {
:root {
--chakra-vh: 100dvh;
}
}
`,S0e=()=>b(Kb,{styles:Y$}),x0e=()=>b(Kb,{styles:`
html {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
font-family: system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
touch-action: manipulation;
}
body {
position: relative;
min-height: 100%;
font-feature-settings: 'kern';
}
*,
*::before,
*::after {
border-width: 0;
border-style: solid;
box-sizing: border-box;
}
main {
display: block;
}
hr {
border-top-width: 1px;
box-sizing: content-box;
height: 0;
overflow: visible;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 1em;
}
a {
background-color: transparent;
color: inherit;
text-decoration: inherit;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
b,
strong {
font-weight: bold;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
img {
border-style: none;
}
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
progress {
vertical-align: baseline;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
-moz-appearance: textfield;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none !important;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
details {
display: block;
}
summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
body,
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
button {
background: transparent;
padding: 0;
}
fieldset {
margin: 0;
padding: 0;
}
ol,
ul {
margin: 0;
padding: 0;
}
textarea {
resize: vertical;
}
button,
[role="button"] {
cursor: pointer;
}
button::-moz-focus-inner {
border: 0 !important;
}
table {
border-collapse: collapse;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
button,
input,
optgroup,
select,
textarea {
padding: 0;
line-height: inherit;
color: inherit;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
}
img,
video {
max-width: 100%;
height: auto;
}
[data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {
outline: none;
box-shadow: none;
}
select::-ms-expand {
display: none;
}
${Y$}
`});function xh(e,t,n,r){const i=gr(n);return k.exports.useEffect(()=>{const o=typeof e=="function"?e():e!=null?e:document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e!=null?e:document;o==null||o.removeEventListener(t,i,r)}}function w0e(e){return"current"in e}var K$=()=>typeof window<"u";function C0e(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var _0e=e=>K$()&&e.test(navigator.vendor),k0e=e=>K$()&&e.test(C0e()),E0e=()=>k0e(/mac|iphone|ipad|ipod/i),P0e=()=>E0e()&&_0e(/apple/i);function T0e(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var a;var o;return(a=(o=t.current)==null?void 0:o.ownerDocument)!=null?a:document};xh(i,"pointerdown",o=>{if(!P0e()||!r)return;const a=o.target,l=(n!=null?n:[t]).some(u=>{const f=w0e(u)?u.current:u;return(f==null?void 0:f.contains(a))||f===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var L0e=vne?k.exports.useLayoutEffect:k.exports.useEffect;function aO(e,t=[]){const n=k.exports.useRef(e);return L0e(()=>{n.current=e}),k.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function A0e(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function O0e(e,t){const n=k.exports.useId();return k.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function s2(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=aO(n),a=aO(t),[s,l]=k.exports.useState(e.defaultIsOpen||!1),[u,f]=A0e(r,s),p=O0e(i,"disclosure"),m=k.exports.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),v=k.exports.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),y=k.exports.useCallback(()=>{(f?m:v)()},[f,v,m]);return{isOpen:!!f,onOpen:v,onClose:m,onToggle:y,isControlled:u,getButtonProps:(x={})=>({...x,"aria-expanded":f,"aria-controls":p,onClick:yne(x.onClick,y)}),getDisclosureProps:(x={})=>({...x,hidden:!f,id:p})}}function z_(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var $_=Pe(function(t,n){const{htmlSize:r,...i}=t,o=zi("Input",i),a=wn(i),s=M_(a),l=Hr("chakra-input",t.className);return oe.createElement(xe.input,{size:r,...s,__css:o.field,ref:n,className:l})});$_.displayName="Input";$_.id="Input";var[R0e,X$]=Ln({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),M0e=Pe(function(t,n){const r=zi("Input",t),{children:i,className:o,...a}=wn(t),s=Hr("chakra-input__group",o),l={},u=gS(i),f=r.field;u.forEach(m=>{var v,y;!r||(f&&m.type.id==="InputLeftElement"&&(l.paddingStart=(v=f.height)!=null?v:f.h),f&&m.type.id==="InputRightElement"&&(l.paddingEnd=(y=f.height)!=null?y:f.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,y;const x=z_({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((y=m.props)==null?void 0:y.variant)||t.variant});return m.type.id!=="Input"?k.exports.cloneElement(m,x):k.exports.cloneElement(m,Object.assign(x,l,m.props))});return oe.createElement(xe.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},b(R0e,{value:r,children:p}))});M0e.displayName="InputGroup";var I0e={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},D0e=xe("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),F_=Pe(function(t,n){var s;const{placement:r="left",...i}=t,o=(s=I0e[r])!=null?s:{},a=X$();return b(D0e,{ref:n,...i,__css:{...a.addon,...o}})});F_.displayName="InputAddon";var Z$=Pe(function(t,n){return b(F_,{ref:n,placement:"left",...t,className:Hr("chakra-input__left-addon",t.className)})});Z$.displayName="InputLeftAddon";Z$.id="InputLeftAddon";var Q$=Pe(function(t,n){return b(F_,{ref:n,placement:"right",...t,className:Hr("chakra-input__right-addon",t.className)})});Q$.displayName="InputRightAddon";Q$.id="InputRightAddon";var N0e=xe("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),bS=Pe(function(t,n){var u,f;const{placement:r="left",...i}=t,o=X$(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:(u=a==null?void 0:a.height)!=null?u:a==null?void 0:a.h,height:(f=a==null?void 0:a.height)!=null?f:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...o.element};return b(N0e,{ref:n,__css:l,...i})});bS.id="InputElement";bS.displayName="InputElement";var J$=Pe(function(t,n){const{className:r,...i}=t,o=Hr("chakra-input__left-element",r);return b(bS,{ref:n,placement:"left",className:o,...i})});J$.id="InputLeftElement";J$.displayName="InputLeftElement";var eF=Pe(function(t,n){const{className:r,...i}=t,o=Hr("chakra-input__right-element",r);return b(bS,{ref:n,placement:"right",className:o,...i})});eF.id="InputRightElement";eF.displayName="InputRightElement";function B0e(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function Rd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):B0e(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var z0e=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=k.exports.Children.only(r),s=Hr("chakra-aspect-ratio",i);return oe.createElement(xe.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Rd(n,l=>`${1/l*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"}},...o},a)});z0e.displayName="AspectRatio";var $0e=Pe(function(t,n){const r=bo("Badge",t),{className:i,...o}=wn(t);return oe.createElement(xe.span,{ref:n,className:Hr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$0e.displayName="Badge";var Ud=xe("div");Ud.displayName="Box";var tF=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return b(Ud,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});tF.displayName="Square";var F0e=Pe(function(t,n){const{size:r,...i}=t;return b(tF,{size:r,ref:n,borderRadius:"9999px",...i})});F0e.displayName="Circle";var nF=xe("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});nF.displayName="Center";var H0e={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return oe.createElement(xe.div,{ref:n,__css:H0e[r],...i,position:"absolute"})});var V0e=Pe(function(t,n){const r=bo("Code",t),{className:i,...o}=wn(t);return oe.createElement(xe.code,{ref:n,className:Hr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});V0e.displayName="Code";var W0e=Pe(function(t,n){const{className:r,centerContent:i,...o}=wn(t),a=bo("Container",t);return oe.createElement(xe.div,{ref:n,className:Hr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});W0e.displayName="Container";var U0e=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...f}=bo("Divider",t),{className:p,orientation:m="horizontal",__css:v,...y}=wn(t),x={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return oe.createElement(xe.hr,{ref:n,"aria-orientation":m,...y,__css:{...f,border:"0",borderColor:u,borderStyle:l,...x[m],...v},className:Hr("chakra-divider",p)})});U0e.displayName="Divider";var bt=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...f}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return oe.createElement(xe.div,{ref:n,__css:p,...f})});bt.displayName="Flex";var rF=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:f,templateRows:p,autoColumns:m,templateColumns:v,...y}=t,x={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:f,gridTemplateRows:p,gridTemplateColumns:v};return oe.createElement(xe.div,{ref:n,__css:x,...y})});rF.displayName="Grid";function sO(e){return Rd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var j0e=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...f}=t,p=z_({gridArea:r,gridColumn:sO(i),gridRow:sO(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return oe.createElement(xe.div,{ref:n,__css:p,...f})});j0e.displayName="GridItem";var wh=Pe(function(t,n){const r=bo("Heading",t),{className:i,...o}=wn(t);return oe.createElement(xe.h2,{ref:n,className:Hr("chakra-heading",t.className),...o,__css:r})});wh.displayName="Heading";Pe(function(t,n){const r=bo("Mark",t),i=wn(t);return b(Ud,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var G0e=Pe(function(t,n){const r=bo("Kbd",t),{className:i,...o}=wn(t);return oe.createElement(xe.kbd,{ref:n,className:Hr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});G0e.displayName="Kbd";var Ch=Pe(function(t,n){const r=bo("Link",t),{className:i,isExternal:o,...a}=wn(t);return oe.createElement(xe.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Hr("chakra-link",i),...a,__css:r})});Ch.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return oe.createElement(xe.a,{...s,ref:n,className:Hr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return oe.createElement(xe.div,{ref:n,position:"relative",...i,className:Hr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[q0e,iF]=Ln({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),H_=Pe(function(t,n){const r=zi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=wn(t),u=gS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return oe.createElement(q0e,{value:r},oe.createElement(xe.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});H_.displayName="List";var Y0e=Pe((e,t)=>{const{as:n,...r}=e;return b(H_,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Y0e.displayName="OrderedList";var K0e=Pe(function(t,n){const{as:r,...i}=t;return b(H_,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});K0e.displayName="UnorderedList";var X0e=Pe(function(t,n){const r=iF();return oe.createElement(xe.li,{ref:n,...t,__css:r.item})});X0e.displayName="ListItem";var Z0e=Pe(function(t,n){const r=iF();return b(Ea,{ref:n,role:"presentation",...t,__css:r.icon})});Z0e.displayName="ListIcon";var Q0e=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=N1(),f=s?e1e(s,u):t1e(r);return b(rF,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:f,...l})});Q0e.displayName="SimpleGrid";function J0e(e){return typeof e=="number"?`${e}px`:e}function e1e(e,t){return Rd(e,n=>{const r=Jle("sizes",n,J0e(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function t1e(e){return Rd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var oF=xe("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});oF.displayName="Spacer";var A7="& > *:not(style) ~ *:not(style)";function n1e(e){const{spacing:t,direction:n}=e,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{flexDirection:n,[A7]:Rd(n,i=>r[i])}}function r1e(e){const{spacing:t,direction:n}=e,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{"&":Rd(n,i=>r[i])}}var aF=e=>oe.createElement(xe.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});aF.displayName="StackItem";var V_=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:f,shouldWrapChildren:p,...m}=e,v=n?"row":r!=null?r:"column",y=k.exports.useMemo(()=>n1e({direction:v,spacing:a}),[v,a]),x=k.exports.useMemo(()=>r1e({spacing:a,direction:v}),[a,v]),E=!!u,_=!p&&!E,C=k.exports.useMemo(()=>{const A=gS(l);return _?A:A.map((M,I)=>{const D=typeof M.key<"u"?M.key:I,B=I+1===A.length,H=p?b(aF,{children:M},D):M;if(!E)return H;const Y=k.exports.cloneElement(u,{__css:x}),te=B?null:Y;return ee(k.exports.Fragment,{children:[H,te]},D)})},[u,x,E,_,p,l]),T=Hr("chakra-stack",f);return oe.createElement(xe.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:y.flexDirection,flexWrap:s,className:T,__css:E?{}:{[A7]:y[A7]},...m},C)});V_.displayName="Stack";var sF=Pe((e,t)=>b(V_,{align:"center",...e,direction:"row",ref:t}));sF.displayName="HStack";var W_=Pe((e,t)=>b(V_,{align:"center",...e,direction:"column",ref:t}));W_.displayName="VStack";var qi=Pe(function(t,n){const r=bo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=wn(t),u=z_({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return oe.createElement(xe.p,{ref:n,className:Hr("chakra-text",t.className),...u,...l,__css:r})});qi.displayName="Text";function lO(e){return typeof e=="number"?`${e}px`:e}var i1e=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:f,shouldWrapChildren:p,...m}=t,v=k.exports.useMemo(()=>{const{spacingX:x=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":_=>Rd(x,C=>lO($C("space",C)(_))),"--chakra-wrap-y-spacing":_=>Rd(E,C=>lO($C("space",C)(_))),"--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,i,o,s,u,l]),y=k.exports.useMemo(()=>p?k.exports.Children.map(a,(x,E)=>b(lF,{children:x},E)):a,[a,p]);return oe.createElement(xe.div,{ref:n,className:Hr("chakra-wrap",f),overflow:"hidden",...m},oe.createElement(xe.ul,{className:"chakra-wrap__list",__css:v},y))});i1e.displayName="Wrap";var lF=Pe(function(t,n){const{className:r,...i}=t;return oe.createElement(xe.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Hr("chakra-wrap__listitem",r),...i})});lF.displayName="WrapItem";var o1e={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},uF=o1e,Qp=()=>{},a1e={document:uF,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Qp,removeEventListener:Qp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Qp,removeListener:Qp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Qp,setInterval:()=>0,clearInterval:Qp},s1e=a1e,l1e={window:s1e,document:uF},cF=typeof window<"u"?{window,document}:l1e,dF=k.exports.createContext(cF);dF.displayName="EnvironmentContext";function fF(e){const{children:t,environment:n}=e,[r,i]=k.exports.useState(null),[o,a]=k.exports.useState(!1);k.exports.useEffect(()=>a(!0),[]);const s=k.exports.useMemo(()=>{if(n)return n;const l=r==null?void 0:r.ownerDocument,u=r==null?void 0:r.ownerDocument.defaultView;return l?{document:l,window:u}:cF},[r,n]);return ee(dF.Provider,{value:s,children:[t,!n&&o&&b("span",{id:"__chakra_env",hidden:!0,ref:l=>{k.exports.startTransition(()=>{l&&i(l)})}})]})}fF.displayName="EnvironmentProvider";var u1e=e=>e?"":void 0;function c1e(){const e=k.exports.useRef(new Map),t=e.current,n=k.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=k.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return k.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Kw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function d1e(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:f,tabIndex:p,onMouseOver:m,onMouseLeave:v,...y}=e,[x,E]=k.exports.useState(!0),[_,C]=k.exports.useState(!1),T=c1e(),A=Z=>{!Z||Z.tagName!=="BUTTON"&&E(!1)},M=x?p:p||0,I=n&&!r,D=k.exports.useCallback(Z=>{if(n){Z.stopPropagation(),Z.preventDefault();return}Z.currentTarget.focus(),l==null||l(Z)},[n,l]),B=k.exports.useCallback(Z=>{_&&Kw(Z)&&(Z.preventDefault(),Z.stopPropagation(),C(!1),T.remove(document,"keyup",B,!1))},[_,T]),F=k.exports.useCallback(Z=>{if(u==null||u(Z),n||Z.defaultPrevented||Z.metaKey||!Kw(Z.nativeEvent)||x)return;const U=i&&Z.key==="Enter";o&&Z.key===" "&&(Z.preventDefault(),C(!0)),U&&(Z.preventDefault(),Z.currentTarget.click()),T.add(document,"keyup",B,!1)},[n,x,u,i,o,T,B]),H=k.exports.useCallback(Z=>{if(f==null||f(Z),n||Z.defaultPrevented||Z.metaKey||!Kw(Z.nativeEvent)||x)return;o&&Z.key===" "&&(Z.preventDefault(),C(!1),Z.currentTarget.click())},[o,x,n,f]),Y=k.exports.useCallback(Z=>{Z.button===0&&(C(!1),T.remove(document,"mouseup",Y,!1))},[T]),te=k.exports.useCallback(Z=>{if(Z.button!==0)return;if(n){Z.stopPropagation(),Z.preventDefault();return}x||C(!0),Z.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",Y,!1),a==null||a(Z)},[n,x,a,T,Y]),G=k.exports.useCallback(Z=>{Z.button===0&&(x||C(!1),s==null||s(Z))},[s,x]),z=k.exports.useCallback(Z=>{if(n){Z.preventDefault();return}m==null||m(Z)},[n,m]),W=k.exports.useCallback(Z=>{_&&(Z.preventDefault(),C(!1)),v==null||v(Z)},[_,v]),K=jn(t,A);return x?{...y,ref:K,type:"button","aria-disabled":I?void 0:n,disabled:I,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:f,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...y,ref:K,role:"button","data-active":u1e(_),"aria-disabled":n?"true":void 0,tabIndex:I?void 0:M,onClick:D,onMouseDown:te,onMouseUp:G,onKeyUp:H,onKeyDown:F,onMouseOver:z,onMouseLeave:W}}function hF(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function pF(e){var n;if(!hF(e))return!1;const t=(n=e.ownerDocument.defaultView)!=null?n:window;return e instanceof t.HTMLElement}function f1e(e){var n;var t;return(n=(t=gF(e))==null?void 0:t.defaultView)!=null?n:window}function gF(e){return hF(e)?e.ownerDocument:document}function h1e(e){return gF(e).activeElement}var mF=e=>e.hasAttribute("tabindex"),p1e=e=>mF(e)&&e.tabIndex===-1;function g1e(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function vF(e){return e.parentElement&&vF(e.parentElement)?!0:e.hidden}function m1e(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function yF(e){if(!pF(e)||vF(e)||g1e(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():m1e(e)?!0:mF(e)}function v1e(e){return e?pF(e)&&yF(e)&&!p1e(e):!1}var y1e=["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]"],b1e=y1e.join(),S1e=e=>e.offsetWidth>0&&e.offsetHeight>0;function bF(e){const t=Array.from(e.querySelectorAll(b1e));return t.unshift(e),t.filter(n=>yF(n)&&S1e(n))}function x1e(e){const t=e.current;if(!t)return!1;const n=h1e(t);return!n||t.contains(n)?!1:!!v1e(n)}function w1e(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;Od(()=>{if(!o||x1e(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var C1e={preventScroll:!0,shouldFocus:!1};function _1e(e,t=C1e){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=k1e(e)?e.current:e,s=i&&o,l=k.exports.useRef(s),u=k.exports.useRef(o);Ms(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const f=k.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=bF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);Od(()=>{f()},[f]),xh(a,"transitionend",f)}function k1e(e){return"current"in e}var Wo="top",Ja="bottom",es="right",Uo="left",U_="auto",$2=[Wo,Ja,es,Uo],x1="start",l2="end",E1e="clippingParents",SF="viewport",bm="popper",P1e="reference",uO=$2.reduce(function(e,t){return e.concat([t+"-"+x1,t+"-"+l2])},[]),xF=[].concat($2,[U_]).reduce(function(e,t){return e.concat([t,t+"-"+x1,t+"-"+l2])},[]),T1e="beforeRead",L1e="read",A1e="afterRead",O1e="beforeMain",R1e="main",M1e="afterMain",I1e="beforeWrite",D1e="write",N1e="afterWrite",B1e=[T1e,L1e,A1e,O1e,R1e,M1e,I1e,D1e,N1e];function Gl(e){return e?(e.nodeName||"").toLowerCase():null}function ns(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Rh(e){var t=ns(e).Element;return e instanceof t||e instanceof Element}function Ya(e){var t=ns(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function j_(e){if(typeof ShadowRoot>"u")return!1;var t=ns(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function z1e(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ya(o)||!Gl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function $1e(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(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Ya(i)||!Gl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const F1e={name:"applyStyles",enabled:!0,phase:"write",fn:z1e,effect:$1e,requires:["computeStyles"]};function Fl(e){return e.split("-")[0]}var _h=Math.max,B5=Math.min,w1=Math.round;function O7(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wF(){return!/^((?!chrome|android).)*safari/i.test(O7())}function C1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ya(e)&&(i=e.offsetWidth>0&&w1(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&w1(r.height)/e.offsetHeight||1);var a=Rh(e)?ns(e):window,s=a.visualViewport,l=!wF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:f,right:u+p,bottom:f+m,left:u,x:u,y:f}}function G_(e){var t=C1(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 CF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&j_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Uu(e){return ns(e).getComputedStyle(e)}function H1e(e){return["table","td","th"].indexOf(Gl(e))>=0}function jd(e){return((Rh(e)?e.ownerDocument:e.document)||window.document).documentElement}function SS(e){return Gl(e)==="html"?e:e.assignedSlot||e.parentNode||(j_(e)?e.host:null)||jd(e)}function cO(e){return!Ya(e)||Uu(e).position==="fixed"?null:e.offsetParent}function V1e(e){var t=/firefox/i.test(O7()),n=/Trident/i.test(O7());if(n&&Ya(e)){var r=Uu(e);if(r.position==="fixed")return null}var i=SS(e);for(j_(i)&&(i=i.host);Ya(i)&&["html","body"].indexOf(Gl(i))<0;){var o=Uu(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function F2(e){for(var t=ns(e),n=cO(e);n&&H1e(n)&&Uu(n).position==="static";)n=cO(n);return n&&(Gl(n)==="html"||Gl(n)==="body"&&Uu(n).position==="static")?t:n||V1e(e)||t}function q_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xv(e,t,n){return _h(e,B5(t,n))}function W1e(e,t,n){var r=xv(e,t,n);return r>n?n:r}function _F(){return{top:0,right:0,bottom:0,left:0}}function kF(e){return Object.assign({},_F(),e)}function EF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var U1e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,kF(typeof t!="number"?t:EF(t,$2))};function j1e(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Fl(n.placement),l=q_(s),u=[Uo,es].indexOf(s)>=0,f=u?"height":"width";if(!(!o||!a)){var p=U1e(i.padding,n),m=G_(o),v=l==="y"?Wo:Uo,y=l==="y"?Ja:es,x=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],E=a[l]-n.rects.reference[l],_=F2(o),C=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,T=x/2-E/2,A=p[v],M=C-m[f]-p[y],I=C/2-m[f]/2+T,D=xv(A,I,M),B=l;n.modifiersData[r]=(t={},t[B]=D,t.centerOffset=D-I,t)}}function G1e(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!CF(t.elements.popper,i)||(t.elements.arrow=i))}const q1e={name:"arrow",enabled:!0,phase:"main",fn:j1e,effect:G1e,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _1(e){return e.split("-")[1]}var Y1e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K1e(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:w1(t*i)/i||0,y:w1(n*i)/i||0}}function dO(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,y=a.y,x=y===void 0?0:y,E=typeof f=="function"?f({x:v,y:x}):{x:v,y:x};v=E.x,x=E.y;var _=a.hasOwnProperty("x"),C=a.hasOwnProperty("y"),T=Uo,A=Wo,M=window;if(u){var I=F2(n),D="clientHeight",B="clientWidth";if(I===ns(n)&&(I=jd(n),Uu(I).position!=="static"&&s==="absolute"&&(D="scrollHeight",B="scrollWidth")),I=I,i===Wo||(i===Uo||i===es)&&o===l2){A=Ja;var F=p&&I===M&&M.visualViewport?M.visualViewport.height:I[D];x-=F-r.height,x*=l?1:-1}if(i===Uo||(i===Wo||i===Ja)&&o===l2){T=es;var H=p&&I===M&&M.visualViewport?M.visualViewport.width:I[B];v-=H-r.width,v*=l?1:-1}}var Y=Object.assign({position:s},u&&Y1e),te=f===!0?K1e({x:v,y:x}):{x:v,y:x};if(v=te.x,x=te.y,l){var G;return Object.assign({},Y,(G={},G[A]=C?"0":"",G[T]=_?"0":"",G.transform=(M.devicePixelRatio||1)<=1?"translate("+v+"px, "+x+"px)":"translate3d("+v+"px, "+x+"px, 0)",G))}return Object.assign({},Y,(t={},t[A]=C?x+"px":"",t[T]=_?v+"px":"",t.transform="",t))}function X1e(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Fl(t.placement),variation:_1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,dO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,dO(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})}const Z1e={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:X1e,data:{}};var C3={passive:!0};function Q1e(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=ns(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",n.update,C3)}),s&&l.addEventListener("resize",n.update,C3),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",n.update,C3)}),s&&l.removeEventListener("resize",n.update,C3)}}const J1e={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Q1e,data:{}};var ege={left:"right",right:"left",bottom:"top",top:"bottom"};function E4(e){return e.replace(/left|right|bottom|top/g,function(t){return ege[t]})}var tge={start:"end",end:"start"};function fO(e){return e.replace(/start|end/g,function(t){return tge[t]})}function Y_(e){var t=ns(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function K_(e){return C1(jd(e)).left+Y_(e).scrollLeft}function nge(e,t){var n=ns(e),r=jd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=wF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+K_(e),y:l}}function rge(e){var t,n=jd(e),r=Y_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=_h(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=_h(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+K_(e),l=-r.scrollTop;return Uu(i||n).direction==="rtl"&&(s+=_h(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function X_(e){var t=Uu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function PF(e){return["html","body","#document"].indexOf(Gl(e))>=0?e.ownerDocument.body:Ya(e)&&X_(e)?e:PF(SS(e))}function wv(e,t){var n;t===void 0&&(t=[]);var r=PF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ns(r),a=i?[o].concat(o.visualViewport||[],X_(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(wv(SS(a)))}function R7(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ige(e,t){var n=C1(e,!1,t==="fixed");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}function hO(e,t,n){return t===SF?R7(nge(e,n)):Rh(t)?ige(t,n):R7(rge(jd(e)))}function oge(e){var t=wv(SS(e)),n=["absolute","fixed"].indexOf(Uu(e).position)>=0,r=n&&Ya(e)?F2(e):e;return Rh(r)?t.filter(function(i){return Rh(i)&&CF(i,r)&&Gl(i)!=="body"}):[]}function age(e,t,n,r){var i=t==="clippingParents"?oge(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var f=hO(e,u,r);return l.top=_h(f.top,l.top),l.right=B5(f.right,l.right),l.bottom=B5(f.bottom,l.bottom),l.left=_h(f.left,l.left),l},hO(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 TF(e){var t=e.reference,n=e.element,r=e.placement,i=r?Fl(r):null,o=r?_1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Wo:l={x:a,y:t.y-n.height};break;case Ja:l={x:a,y:t.y+t.height};break;case es:l={x:t.x+t.width,y:s};break;case Uo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?q_(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case x1:l[u]=l[u]-(t[f]/2-n[f]/2);break;case l2:l[u]=l[u]+(t[f]/2-n[f]/2);break}}return l}function u2(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?E1e:s,u=n.rootBoundary,f=u===void 0?SF:u,p=n.elementContext,m=p===void 0?bm:p,v=n.altBoundary,y=v===void 0?!1:v,x=n.padding,E=x===void 0?0:x,_=kF(typeof E!="number"?E:EF(E,$2)),C=m===bm?P1e:bm,T=e.rects.popper,A=e.elements[y?C:m],M=age(Rh(A)?A:A.contextElement||jd(e.elements.popper),l,f,a),I=C1(e.elements.reference),D=TF({reference:I,element:T,strategy:"absolute",placement:i}),B=R7(Object.assign({},T,D)),F=m===bm?B:I,H={top:M.top-F.top+_.top,bottom:F.bottom-M.bottom+_.bottom,left:M.left-F.left+_.left,right:F.right-M.right+_.right},Y=e.modifiersData.offset;if(m===bm&&Y){var te=Y[i];Object.keys(H).forEach(function(G){var z=[es,Ja].indexOf(G)>=0?1:-1,W=[Wo,Ja].indexOf(G)>=0?"y":"x";H[G]+=te[W]*z})}return H}function sge(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?xF:l,f=_1(r),p=f?s?uO:uO.filter(function(y){return _1(y)===f}):$2,m=p.filter(function(y){return u.indexOf(y)>=0});m.length===0&&(m=p);var v=m.reduce(function(y,x){return y[x]=u2(e,{placement:x,boundary:i,rootBoundary:o,padding:a})[Fl(x)],y},{});return Object.keys(v).sort(function(y,x){return v[y]-v[x]})}function lge(e){if(Fl(e)===U_)return[];var t=E4(e);return[fO(e),t,fO(t)]}function uge(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,f=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,x=n.allowedAutoPlacements,E=t.options.placement,_=Fl(E),C=_===E,T=l||(C||!y?[E4(E)]:lge(E)),A=[E].concat(T).reduce(function(ve,Ce){return ve.concat(Fl(Ce)===U_?sge(t,{placement:Ce,boundary:f,rootBoundary:p,padding:u,flipVariations:y,allowedAutoPlacements:x}):Ce)},[]),M=t.rects.reference,I=t.rects.popper,D=new Map,B=!0,F=A[0],H=0;H<A.length;H++){var Y=A[H],te=Fl(Y),G=_1(Y)===x1,z=[Wo,Ja].indexOf(te)>=0,W=z?"width":"height",K=u2(t,{placement:Y,boundary:f,rootBoundary:p,altBoundary:m,padding:u}),Z=z?G?es:Uo:G?Ja:Wo;M[W]>I[W]&&(Z=E4(Z));var U=E4(Z),Q=[];if(o&&Q.push(K[te]<=0),s&&Q.push(K[Z]<=0,K[U]<=0),Q.every(function(ve){return ve})){F=Y,B=!1;break}D.set(Y,Q)}if(B)for(var ue=y?3:1,fe=function(Ce){var Re=A.find(function(Ye){var Ue=D.get(Ye);if(Ue)return Ue.slice(0,Ce).every(function(pt){return pt})});if(Re)return F=Re,"break"},Te=ue;Te>0;Te--){var Oe=fe(Te);if(Oe==="break")break}t.placement!==F&&(t.modifiersData[r]._skip=!0,t.placement=F,t.reset=!0)}}const cge={name:"flip",enabled:!0,phase:"main",fn:uge,requiresIfExists:["offset"],data:{_skip:!1}};function pO(e,t,n){return n===void 0&&(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 gO(e){return[Wo,es,Ja,Uo].some(function(t){return e[t]>=0})}function dge(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=u2(t,{elementContext:"reference"}),s=u2(t,{altBoundary:!0}),l=pO(a,r),u=pO(s,i,o),f=gO(l),p=gO(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}const fge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dge};function hge(e,t,n){var r=Fl(e),i=[Uo,Wo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Uo,es].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function pge(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=xF.reduce(function(f,p){return f[p]=hge(p,t.rects,o),f},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const gge={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pge};function mge(e){var t=e.state,n=e.name;t.modifiersData[n]=TF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const vge={name:"popperOffsets",enabled:!0,phase:"read",fn:mge,data:{}};function yge(e){return e==="x"?"y":"x"}function bge(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,y=n.tetherOffset,x=y===void 0?0:y,E=u2(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:f}),_=Fl(t.placement),C=_1(t.placement),T=!C,A=q_(_),M=yge(A),I=t.modifiersData.popperOffsets,D=t.rects.reference,B=t.rects.popper,F=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,H=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,te={x:0,y:0};if(!!I){if(o){var G,z=A==="y"?Wo:Uo,W=A==="y"?Ja:es,K=A==="y"?"height":"width",Z=I[A],U=Z+E[z],Q=Z-E[W],ue=v?-B[K]/2:0,fe=C===x1?D[K]:B[K],Te=C===x1?-B[K]:-D[K],Oe=t.elements.arrow,ve=v&&Oe?G_(Oe):{width:0,height:0},Ce=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_F(),Re=Ce[z],Ye=Ce[W],Ue=xv(0,D[K],ve[K]),pt=T?D[K]/2-ue-Ue-Re-H.mainAxis:fe-Ue-Re-H.mainAxis,wt=T?-D[K]/2+ue+Ue+Ye+H.mainAxis:Te+Ue+Ye+H.mainAxis,ut=t.elements.arrow&&F2(t.elements.arrow),ft=ut?A==="y"?ut.clientTop||0:ut.clientLeft||0:0,vt=(G=Y==null?void 0:Y[A])!=null?G:0,ke=Z+pt-vt-ft,at=Z+wt-vt,Rt=xv(v?B5(U,ke):U,Z,v?_h(Q,at):Q);I[A]=Rt,te[A]=Rt-Z}if(s){var tt,yt=A==="x"?Wo:Uo,dn=A==="x"?Ja:es,Pt=I[M],Yt=M==="y"?"height":"width",fn=Pt+E[yt],Cn=Pt-E[dn],De=[Wo,Uo].indexOf(_)!==-1,nt=(tt=Y==null?void 0:Y[M])!=null?tt:0,tn=De?fn:Pt-D[Yt]-B[Yt]-nt+H.altAxis,Zt=De?Pt+D[Yt]+B[Yt]-nt-H.altAxis:Cn,Ee=v&&De?W1e(tn,Pt,Zt):xv(v?tn:fn,Pt,v?Zt:Cn);I[M]=Ee,te[M]=Ee-Pt}t.modifiersData[r]=te}}const Sge={name:"preventOverflow",enabled:!0,phase:"main",fn:bge,requiresIfExists:["offset"]};function xge(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function wge(e){return e===ns(e)||!Ya(e)?Y_(e):xge(e)}function Cge(e){var t=e.getBoundingClientRect(),n=w1(t.width)/e.offsetWidth||1,r=w1(t.height)/e.offsetHeight||1;return n!==1||r!==1}function _ge(e,t,n){n===void 0&&(n=!1);var r=Ya(t),i=Ya(t)&&Cge(t),o=jd(t),a=C1(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Gl(t)!=="body"||X_(o))&&(s=wge(t)),Ya(t)?(l=C1(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=K_(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function kge(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Ege(e){var t=kge(e);return B1e.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Pge(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Tge(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var mO={placement:"bottom",modifiers:[],strategy:"absolute"};function vO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Lge(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?mO:i;return function(s,l,u){u===void 0&&(u=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},mO,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],m=!1,v={state:f,setOptions:function(_){var C=typeof _=="function"?_(f.options):_;x(),f.options=Object.assign({},o,f.options,C),f.scrollParents={reference:Rh(s)?wv(s):s.contextElement?wv(s.contextElement):[],popper:wv(l)};var T=Ege(Tge([].concat(r,f.options.modifiers)));return f.orderedModifiers=T.filter(function(A){return A.enabled}),y(),v.update()},forceUpdate:function(){if(!m){var _=f.elements,C=_.reference,T=_.popper;if(!!vO(C,T)){f.rects={reference:_ge(C,F2(T),f.options.strategy==="fixed"),popper:G_(T)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(H){return f.modifiersData[H.name]=Object.assign({},H.data)});for(var A=0;A<f.orderedModifiers.length;A++){if(f.reset===!0){f.reset=!1,A=-1;continue}var M=f.orderedModifiers[A],I=M.fn,D=M.options,B=D===void 0?{}:D,F=M.name;typeof I=="function"&&(f=I({state:f,options:B,name:F,instance:v})||f)}}}},update:Pge(function(){return new Promise(function(E){v.forceUpdate(),E(f)})}),destroy:function(){x(),m=!0}};if(!vO(s,l))return v;v.setOptions(u).then(function(E){!m&&u.onFirstUpdate&&u.onFirstUpdate(E)});function y(){f.orderedModifiers.forEach(function(E){var _=E.name,C=E.options,T=C===void 0?{}:C,A=E.effect;if(typeof A=="function"){var M=A({state:f,name:_,instance:v,options:T}),I=function(){};p.push(M||I)}})}function x(){p.forEach(function(E){return E()}),p=[]}return v}}var Age=[J1e,vge,Z1e,F1e,gge,cge,Sge,q1e,fge],Oge=Lge({defaultModifiers:Age}),Jp=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Kr={arrowShadowColor:Jp("--popper-arrow-shadow-color"),arrowSize:Jp("--popper-arrow-size","8px"),arrowSizeHalf:Jp("--popper-arrow-size-half"),arrowBg:Jp("--popper-arrow-bg"),transformOrigin:Jp("--popper-transform-origin"),arrowOffset:Jp("--popper-arrow-offset")};function Rge(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var Mge={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"},Ige=e=>Mge[e],yO={scroll:!0,resize:!0};function Dge(e){let t;return typeof e=="object"?t={enabled:!0,options:{...yO,...e}}:t={enabled:e,options:yO},t}var Nge={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Bge={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{bO(e)},effect:({state:e})=>()=>{bO(e)}},bO=e=>{e.elements.popper.style.setProperty(Kr.transformOrigin.var,Ige(e.placement))},zge={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$ge(e)}},$ge=e=>{var t;if(!e.placement)return;const n=Fge(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Kr.arrowSize.varRef,height:Kr.arrowSize.varRef,zIndex:-1});const r={[Kr.arrowSizeHalf.var]:`calc(${Kr.arrowSize.varRef} / 2)`,[Kr.arrowOffset.var]:`calc(${Kr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Fge=e=>{if(e.startsWith("top"))return{property:"bottom",value:Kr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Kr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Kr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Kr.arrowOffset.varRef}},Hge={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{SO(e)},effect:({state:e})=>()=>{SO(e)}},SO=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Kr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Rge(e.placement)})},Vge={"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"}},Wge={"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 Uge(e,t="ltr"){var i;var n;const r=((n=Vge[e])==null?void 0:n[t])||e;return t==="ltr"?r:(i=Wge[e])!=null?i:r}function LF(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:f="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,y=k.exports.useRef(null),x=k.exports.useRef(null),E=k.exports.useRef(null),_=Uge(r,v),C=k.exports.useRef(()=>{}),T=k.exports.useCallback(()=>{var H;!t||!y.current||!x.current||((H=C.current)==null||H.call(C),E.current=Oge(y.current,x.current,{placement:_,modifiers:[Hge,zge,Bge,{...Nge,enabled:!!m},{name:"eventListeners",...Dge(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s!=null?s:[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:f}},...n!=null?n:[]],strategy:i}),E.current.forceUpdate(),C.current=E.current.destroy)},[_,t,n,m,a,o,s,l,u,p,f,i]);k.exports.useEffect(()=>()=>{var H;!y.current&&!x.current&&((H=E.current)==null||H.destroy(),E.current=null)},[]);const A=k.exports.useCallback(H=>{y.current=H,T()},[T]),M=k.exports.useCallback((H={},Y=null)=>({...H,ref:jn(A,Y)}),[A]),I=k.exports.useCallback(H=>{x.current=H,T()},[T]),D=k.exports.useCallback((H={},Y=null)=>({...H,ref:jn(I,Y),style:{...H.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,I,m]),B=k.exports.useCallback((H={},Y=null)=>{const{size:te,shadowColor:G,bg:z,style:W,...K}=H;return{...K,ref:Y,"data-popper-arrow":"",style:jge(H)}},[]),F=k.exports.useCallback((H={},Y=null)=>({...H,ref:Y,"data-popper-arrow-inner":""}),[]);return{update(){var H;(H=E.current)==null||H.update()},forceUpdate(){var H;(H=E.current)==null||H.forceUpdate()},transformOrigin:Kr.transformOrigin.varRef,referenceRef:A,popperRef:I,getPopperProps:D,getArrowProps:B,getArrowInnerProps:F,getReferenceProps:M}}function jge(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function AF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=gr(n),a=gr(t),[s,l]=k.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,f=r!==void 0,p=k.exports.useId(),m=i!=null?i:`disclosure-${p}`,v=k.exports.useCallback(()=>{f||l(!1),a==null||a()},[f,a]),y=k.exports.useCallback(()=>{f||l(!0),o==null||o()},[f,o]),x=k.exports.useCallback(()=>{u?v():y()},[u,y,v]);function E(C={}){return{...C,"aria-expanded":u,"aria-controls":m,onClick(T){var A;(A=C.onClick)==null||A.call(C,T),x()}}}function _(C={}){return{...C,hidden:!u,id:m}}return{isOpen:u,onOpen:y,onClose:v,onToggle:x,isControlled:f,getButtonProps:E,getDisclosureProps:_}}function Gge(e){const{isOpen:t,ref:n}=e,[r,i]=k.exports.useState(t),[o,a]=k.exports.useState(!1);return k.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),xh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=f1e(n.current),f=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(f)}}}function OF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qge,Yge]=Ln({strict:!1,name:"PortalManagerContext"});function RF(e){const{children:t,zIndex:n}=e;return b(qge,{value:{zIndex:n},children:t})}RF.displayName="PortalManager";var[MF,Kge]=Ln({strict:!1,name:"PortalContext"}),Z_="chakra-portal",Xge=".chakra-portal",Zge=e=>b("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Qge=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=k.exports.useState(null),o=k.exports.useRef(null),[,a]=k.exports.useState({});k.exports.useEffect(()=>a({}),[]);const s=Kge(),l=Yge();Ms(()=>{if(!r)return;const f=r.ownerDocument,p=t&&s!=null?s:f.body;if(!p)return;o.current=f.createElement("div"),o.current.className=Z_,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l!=null&&l.zIndex?b(Zge,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?Zl.exports.createPortal(b(MF,{value:o.current,children:u}),o.current):b("span",{ref:f=>{f&&i(f)}})},Jge=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i!=null?i:typeof window<"u"?document.body:void 0,a=k.exports.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=Z_),l},[i]),[,s]=k.exports.useState({});return Ms(()=>s({}),[]),Ms(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Zl.exports.createPortal(b(MF,{value:r?a:null,children:t}),a):null};function Hh(e){const{containerRef:t,...n}=e;return t?b(Jge,{containerRef:t,...n}):b(Qge,{...n})}Hh.defaultProps={appendToParentPortal:!0};Hh.className=Z_;Hh.selector=Xge;Hh.displayName="Portal";var eme=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},e0=new WeakMap,_3=new WeakMap,k3={},Xw=0,IF=function(e){return e&&(e.host||IF(e.parentNode))},tme=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=IF(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},nme=function(e,t,n,r){var i=tme(t,Array.isArray(e)?e:[e]);k3[n]||(k3[n]=new WeakMap);var o=k3[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))f(m);else{var v=m.getAttribute(r),y=v!==null&&v!=="false",x=(e0.get(m)||0)+1,E=(o.get(m)||0)+1;e0.set(m,x),o.set(m,E),a.push(m),x===1&&y&&_3.set(m,!0),E===1&&m.setAttribute(n,"true"),y||m.setAttribute(r,"true")}})};return f(t),s.clear(),Xw++,function(){a.forEach(function(p){var m=e0.get(p)-1,v=o.get(p)-1;e0.set(p,m),o.set(p,v),m||(_3.has(p)||p.removeAttribute(r),_3.delete(p)),v||p.removeAttribute(n)}),Xw--,Xw||(e0=new WeakMap,e0=new WeakMap,_3=new WeakMap,k3={})}},DF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||eme(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),nme(r,i,n,"aria-hidden")):function(){return null}};function Q_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var $n={exports:{}},rme="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ime=rme,ome=ime;function NF(){}function BF(){}BF.resetWarningCache=NF;var ame=function(){function e(r,i,o,a,s,l){if(l!==ome){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return 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:BF,resetWarningCache:NF};return n.PropTypes=n,n};$n.exports=ame();var M7="data-focus-lock",zF="data-focus-lock-disabled",sme="data-no-focus-lock",lme="data-autofocus-inside",ume="data-no-autofocus";function cme(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dme(e,t){var n=k.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function $F(e,t){return dme(t||null,function(n){return e.forEach(function(r){return cme(r,n)})})}var Zw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function FF(e){return e}function HF(e,t){t===void 0&&(t=FF);var n=[],r=!1,i={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(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var f=a;a=[],f.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return i}function J_(e,t){return t===void 0&&(t=FF),HF(e,t)}function VF(e){e===void 0&&(e={});var t=HF(null);return t.options=Tl({async:!0,ssr:!1},e),t}var WF=function(e){var t=e.sideCar,n=R$(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 b(r,{...Tl({},n)})};WF.isSideCarExport=!0;function fme(e,t){return e.useMedium(t),WF}var UF=J_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),jF=J_(),hme=J_(),pme=VF({async:!0}),gme=[],ek=k.exports.forwardRef(function(t,n){var r,i=k.exports.useState(),o=i[0],a=i[1],s=k.exports.useRef(),l=k.exports.useRef(!1),u=k.exports.useRef(null),f=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,y=t.crossFrame,x=t.autoFocus;t.allowTextSelection;var E=t.group,_=t.className,C=t.whiteList,T=t.hasPositiveIndices,A=t.shards,M=A===void 0?gme:A,I=t.as,D=I===void 0?"div":I,B=t.lockProps,F=B===void 0?{}:B,H=t.sideCar,Y=t.returnFocus,te=t.focusOptions,G=t.onActivation,z=t.onDeactivation,W=k.exports.useState({}),K=W[0],Z=k.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&G&&G(s.current),l.current=!0},[G]),U=k.exports.useCallback(function(){l.current=!1,z&&z(s.current)},[z]);k.exports.useEffect(function(){p||(u.current=null)},[]);var Q=k.exports.useCallback(function(Ye){var Ue=u.current;if(Ue&&Ue.focus){var pt=typeof Y=="function"?Y(Ue):Y;if(pt){var wt=typeof pt=="object"?pt:void 0;u.current=null,Ye?Promise.resolve().then(function(){return Ue.focus(wt)}):Ue.focus(wt)}}},[Y]),ue=k.exports.useCallback(function(Ye){l.current&&UF.useMedium(Ye)},[]),fe=jF.useMedium,Te=k.exports.useCallback(function(Ye){s.current!==Ye&&(s.current=Ye,a(Ye))},[]),Oe=Dn((r={},r[zF]=p&&"disabled",r[M7]=E,r),F),ve=m!==!0,Ce=ve&&m!=="tail",Re=$F([n,Te]);return ee(In,{children:[ve&&[b("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Zw},"guard-first"),T?b("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:Zw},"guard-nearest"):null],!p&&b(H,{id:K,sideCar:pme,observed:o,disabled:p,persistentFocus:v,crossFrame:y,autoFocus:x,whiteList:C,shards:M,onActivation:Z,onDeactivation:U,returnFocus:Q,focusOptions:te}),b(D,{ref:Re,...Oe,className:_,onBlur:fe,onFocus:ue,children:f}),Ce&&b("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Zw})]})});ek.propTypes={};ek.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};const GF=ek;function I7(e,t){return I7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},I7(e,t)}function tk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,I7(e,t)}function qF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mme(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){tk(f,u);function f(){return u.apply(this,arguments)||this}f.peek=function(){return a};var p=f.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return b(i,{...this.props})},f}(k.exports.PureComponent);return qF(l,"displayName","SideEffect("+n(i)+")"),l}}var Jl=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},D7=function(e){return Array.isArray(e)?e:[e]},vme=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},YF=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},KF=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},yme=function(e,t){return!e||KF(e)||!vme(e)&&t(YF(e))},XF=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=yme(t,XF.bind(void 0,e));return e.set(t,r),r},bme=function(e,t){return e&&!KF(e)?wme(e)?t(YF(e)):!1:!0},ZF=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=bme(t,ZF.bind(void 0,e));return e.set(t,r),r},QF=function(e){return e.dataset},Sme=function(e){return e.tagName==="BUTTON"},JF=function(e){return e.tagName==="INPUT"},eH=function(e){return JF(e)&&e.type==="radio"},xme=function(e){return!((JF(e)||Sme(e))&&(e.type==="hidden"||e.disabled))},wme=function(e){var t=e.getAttribute(ume);return![!0,"true",""].includes(t)},nk=function(e){var t;return Boolean(e&&((t=QF(e))===null||t===void 0?void 0:t.focusGuard))},z5=function(e){return!nk(e)},Cme=function(e){return Boolean(e)},_me=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},tH=function(e,t,n){return Jl(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(_me)},kme=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],rk=kme.join(","),Eme="".concat(rk,", [data-focus-guard]"),nH=function(e,t){var n;return Jl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?Eme:rk)?[i]:[],nH(i))},[])},ik=function(e,t){return e.reduce(function(n,r){return n.concat(nH(r,t),r.parentNode?Jl(r.parentNode.querySelectorAll(rk)).filter(function(i){return i===r}):[])},[])},Pme=function(e){var t=e.querySelectorAll("[".concat(lme,"]"));return Jl(t).map(function(n){return ik([n])}).reduce(function(n,r){return n.concat(r)},[])},ok=function(e,t){return Jl(e).filter(function(n){return XF(t,n)}).filter(function(n){return xme(n)})},xO=function(e,t){return t===void 0&&(t=new Map),Jl(e).filter(function(n){return ZF(t,n)})},N7=function(e,t,n){return tH(ok(ik(e,n),t),!0,n)},wO=function(e,t){return tH(ok(ik(e),t),!1)},Tme=function(e,t){return ok(Pme(e),t)},c2=function(e,t){return e.shadowRoot?c2(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Jl(e.children).some(function(n){return c2(n,t)})},Lme=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},rH=function(e){return e.parentNode?rH(e.parentNode):e},ak=function(e){var t=D7(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(M7);return n.push.apply(n,i?Lme(Jl(rH(r).querySelectorAll("[".concat(M7,'="').concat(i,'"]:not([').concat(zF,'="disabled"])')))):[r]),n},[])},iH=function(e){return e.activeElement?e.activeElement.shadowRoot?iH(e.activeElement.shadowRoot):e.activeElement:void 0},sk=function(){return document.activeElement?document.activeElement.shadowRoot?iH(document.activeElement.shadowRoot):document.activeElement:void 0},Ame=function(e){return e===document.activeElement},Ome=function(e){return Boolean(Jl(e.querySelectorAll("iframe")).some(function(t){return Ame(t)}))},oH=function(e){var t=document&&sk();return!t||t.dataset&&t.dataset.focusGuard?!1:ak(e).some(function(n){return c2(n,t)||Ome(n)})},Rme=function(){var e=document&&sk();return e?Jl(document.querySelectorAll("[".concat(sme,"]"))).some(function(t){return c2(t,e)}):!1},Mme=function(e,t){return t.filter(eH).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},lk=function(e,t){return eH(e)&&e.name?Mme(e,t):e},Ime=function(e){var t=new Set;return e.forEach(function(n){return t.add(lk(n,e))}),e.filter(function(n){return t.has(n)})},CO=function(e){return e[0]&&e.length>1?lk(e[0],e):e[0]},_O=function(e,t){return e.length>1?e.indexOf(lk(e[t],e)):t},aH="NEW_FOCUS",Dme=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=nk(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,f=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),y=Ime(t),x=n!==void 0?y.indexOf(n):-1,E=x-(r?y.indexOf(r):l),_=_O(e,0),C=_O(e,i-1);if(l===-1||f===-1)return aH;if(!p&&f>=0)return f;if(l<=m&&s&&Math.abs(p)>1)return C;if(l>=v&&s&&Math.abs(p)>1)return _;if(p&&Math.abs(E)>1)return f;if(l<=m)return C;if(l>v)return _;if(p)return Math.abs(p)>1?f:(i+f+p)%i}},Nme=function(e){return function(t){var n,r=(n=QF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Bme=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=xO(r.filter(Nme(n)));return i&&i.length?CO(i):CO(xO(t))},B7=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&B7(e.parentNode.host||e.parentNode,t),t},Qw=function(e,t){for(var n=B7(e),r=B7(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},sH=function(e,t,n){var r=D7(e),i=D7(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Qw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Qw(o,l);u&&(!a||c2(u,a)?a=u:a=Qw(u,a))})}),a},zme=function(e,t){return e.reduce(function(n,r){return n.concat(Tme(r,t))},[])},$me=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Cme)},Fme=function(e,t){var n=document&&sk(),r=ak(e).filter(z5),i=sH(n||e,e,r),o=new Map,a=wO(r,o),s=N7(r,o).filter(function(m){var v=m.node;return z5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=wO([i],o).map(function(m){var v=m.node;return v}),u=$me(l,s),f=u.map(function(m){var v=m.node;return v}),p=Dme(f,l,n,t);return p===aH?{node:Bme(a,f,zme(r,o))}:p===void 0?p:u[p]}},Hme=function(e){var t=ak(e).filter(z5),n=sH(e,e,t),r=new Map,i=N7([n],r,!0),o=N7(t,r).filter(function(a){var s=a.node;return z5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:nk(s)}})},Vme=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Jw=0,e6=!1,Wme=function(e,t,n){n===void 0&&(n={});var r=Fme(e,t);if(!e6&&r){if(Jw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),e6=!0,setTimeout(function(){e6=!1},1);return}Jw++,Vme(r.node,n.focusOptions),Jw--}};const lH=Wme;function uH(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var Ume=function(){return document&&document.activeElement===document.body},jme=function(){return Ume()||Rme()},e1=null,L0=null,t1=null,d2=!1,Gme=function(){return!0},qme=function(t){return(e1.whiteList||Gme)(t)},Yme=function(t,n){t1={observerNode:t,portaledElement:n}},Kme=function(t){return t1&&t1.portaledElement===t};function kO(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var Xme=function(t){return t&&"current"in t?t.current:t},Zme=function(t){return t?Boolean(d2):d2==="meanwhile"},Qme=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},Jme=function(t,n){return n.some(function(r){return Qme(t,r,r)})},$5=function(){var t=!1;if(e1){var n=e1,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||t1&&t1.portaledElement,f=document&&document.activeElement;if(u){var p=[u].concat(a.map(Xme).filter(Boolean));if((!f||qme(f))&&(i||Zme(s)||!jme()||!L0&&o)&&(u&&!(oH(p)||f&&Jme(f,p)||Kme(f))&&(document&&!L0&&f&&!o?(f.blur&&f.blur(),document.body.focus()):(t=lH(p,L0,{focusOptions:l}),t1={})),d2=!1,L0=document&&document.activeElement),document){var m=document&&document.activeElement,v=Hme(p),y=v.map(function(x){var E=x.node;return E}).indexOf(m);y>-1&&(v.filter(function(x){var E=x.guard,_=x.node;return E&&_.dataset.focusAutoGuard}).forEach(function(x){var E=x.node;return E.removeAttribute("tabIndex")}),kO(y,v.length,1,v),kO(y,-1,-1,v))}}}return t},cH=function(t){$5()&&t&&(t.stopPropagation(),t.preventDefault())},uk=function(){return uH($5)},eve=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||Yme(r,n)},tve=function(){return null},dH=function(){d2="just",setTimeout(function(){d2="meanwhile"},0)},nve=function(){document.addEventListener("focusin",cH),document.addEventListener("focusout",uk),window.addEventListener("blur",dH)},rve=function(){document.removeEventListener("focusin",cH),document.removeEventListener("focusout",uk),window.removeEventListener("blur",dH)};function ive(e){return e.filter(function(t){var n=t.disabled;return!n})}function ove(e){var t=e.slice(-1)[0];t&&!e1&&nve();var n=e1,r=n&&t&&t.id===n.id;e1=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(L0=null,(!r||n.observed!==t.observed)&&t.onActivation(),$5(),uH($5)):(rve(),L0=null)}UF.assignSyncMedium(eve);jF.assignMedium(uk);hme.assignMedium(function(e){return e({moveFocusInside:lH,focusInside:oH})});const ave=mme(ive,ove)(tve);var fH=k.exports.forwardRef(function(t,n){return b(GF,{sideCar:ave,ref:n,...t})}),hH=GF.propTypes||{};hH.sideCar;Q_(hH,["sideCar"]);fH.propTypes={};const sve=fH;var pH=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,f=k.exports.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&bF(r.current).length===0&&requestAnimationFrame(()=>{var y;(y=r.current)==null||y.focus()})},[t,r]),p=k.exports.useCallback(()=>{var v;(v=n==null?void 0:n.current)==null||v.focus()},[n]);return b(sve,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:f,onDeactivation:p,returnFocus:i&&!n,children:o})};pH.displayName="FocusLock";var P4="right-scroll-bar-position",T4="width-before-scroll-bar",lve="with-scroll-bars-hidden",uve="--removed-body-scroll-bar-size",gH=VF(),t6=function(){},xS=k.exports.forwardRef(function(e,t){var n=k.exports.useRef(null),r=k.exports.useState({onScrollCapture:t6,onWheelCapture:t6,onTouchMoveCapture:t6}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,x=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,C=R$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,A=$F([n,t]),M=Tl(Tl({},C),i);return ee(In,{children:[f&&b(T,{sideCar:gH,removeScrollBar:u,shards:p,noIsolation:v,inert:y,setCallbacks:o,allowPinchZoom:!!x,lockRef:n}),a?k.exports.cloneElement(k.exports.Children.only(s),Tl(Tl({},M),{ref:A})):b(_,{...Tl({},M,{className:l,ref:A}),children:s})]})});xS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xS.classNames={fullWidth:T4,zeroRight:P4};var cve=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dve(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cve();return t&&e.setAttribute("nonce",t),e}function fve(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hve(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pve=function(){var e=0,t=null;return{add:function(n){e==0&&(t=dve())&&(fve(t,n),hve(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gve=function(){var e=pve();return function(t,n){k.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mH=function(){var e=gve(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},mve={left:0,top:0,right:0,gap:0},n6=function(e){return parseInt(e||"",10)||0},vve=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[n6(n),n6(r),n6(i)]},yve=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mve;var t=vve(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])}},bve=mH(),Sve=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
.`.concat(lve,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(s,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(s,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(P4,` {
right: `).concat(s,"px ").concat(r,`;
}
.`).concat(T4,` {
margin-right: `).concat(s,"px ").concat(r,`;
}
.`).concat(P4," .").concat(P4,` {
right: 0 `).concat(r,`;
}
.`).concat(T4," .").concat(T4,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(uve,": ").concat(s,`px;
}
`)},xve=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=k.exports.useMemo(function(){return yve(i)},[i]);return b(bve,{styles:Sve(o,!t,i,n?"":"!important")})},z7=!1;if(typeof window<"u")try{var E3=Object.defineProperty({},"passive",{get:function(){return z7=!0,!0}});window.addEventListener("test",E3,E3),window.removeEventListener("test",E3,E3)}catch(e){z7=!1}var t0=z7?{passive:!1}:!1,wve=function(e){return e.tagName==="TEXTAREA"},vH=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wve(e)&&n[t]==="visible")},Cve=function(e){return vH(e,"overflowY")},_ve=function(e){return vH(e,"overflowX")},EO=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=yH(e,n);if(r){var i=bH(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},kve=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Eve=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yH=function(e,t){return e==="v"?Cve(t):_ve(t)},bH=function(e,t){return e==="v"?kve(t):Eve(t)},Pve=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tve=function(e,t,n,r,i){var o=Pve(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,f=a>0,p=0,m=0;do{var v=bH(e,s),y=v[0],x=v[1],E=v[2],_=x-E-o*y;(y||_)&&yH(e,s)&&(p+=_,m+=y),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(i&&p===0||!i&&a>p)||!f&&(i&&m===0||!i&&-a>m))&&(u=!0),u},P3=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},PO=function(e){return[e.deltaX,e.deltaY]},TO=function(e){return e&&"current"in e?e.current:e},Lve=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ave=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Ove=0,n0=[];function Rve(e){var t=k.exports.useRef([]),n=k.exports.useRef([0,0]),r=k.exports.useRef(),i=k.exports.useState(Ove++)[0],o=k.exports.useState(function(){return mH()})[0],a=k.exports.useRef(e);k.exports.useEffect(function(){a.current=e},[e]),k.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=w7([e.lockRef.current],(e.shards||[]).map(TO),!0).filter(Boolean);return x.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.exports.useCallback(function(x,E){if("touches"in x&&x.touches.length===2)return!a.current.allowPinchZoom;var _=P3(x),C=n.current,T="deltaX"in x?x.deltaX:C[0]-_[0],A="deltaY"in x?x.deltaY:C[1]-_[1],M,I=x.target,D=Math.abs(T)>Math.abs(A)?"h":"v";if("touches"in x&&D==="h"&&I.type==="range")return!1;var B=EO(D,I);if(!B)return!0;if(B?M=D:(M=D==="v"?"h":"v",B=EO(D,I)),!B)return!1;if(!r.current&&"changedTouches"in x&&(T||A)&&(r.current=M),!M)return!0;var F=r.current||M;return Tve(F,E,x,F==="h"?T:A,!0)},[]),l=k.exports.useCallback(function(x){var E=x;if(!(!n0.length||n0[n0.length-1]!==o)){var _="deltaY"in E?PO(E):P3(E),C=t.current.filter(function(M){return M.name===E.type&&M.target===E.target&&Lve(M.delta,_)})[0];if(C&&C.should){E.cancelable&&E.preventDefault();return}if(!C){var T=(a.current.shards||[]).map(TO).filter(Boolean).filter(function(M){return M.contains(E.target)}),A=T.length>0?s(E,T[0]):!a.current.noIsolation;A&&E.cancelable&&E.preventDefault()}}},[]),u=k.exports.useCallback(function(x,E,_,C){var T={name:x,delta:E,target:_,should:C};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(A){return A!==T})},1)},[]),f=k.exports.useCallback(function(x){n.current=P3(x),r.current=void 0},[]),p=k.exports.useCallback(function(x){u(x.type,PO(x),x.target,s(x,e.lockRef.current))},[]),m=k.exports.useCallback(function(x){u(x.type,P3(x),x.target,s(x,e.lockRef.current))},[]);k.exports.useEffect(function(){return n0.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,t0),document.addEventListener("touchmove",l,t0),document.addEventListener("touchstart",f,t0),function(){n0=n0.filter(function(x){return x!==o}),document.removeEventListener("wheel",l,t0),document.removeEventListener("touchmove",l,t0),document.removeEventListener("touchstart",f,t0)}},[]);var v=e.removeScrollBar,y=e.inert;return ee(In,{children:[y?b(o,{styles:Ave(i)}):null,v?b(xve,{gapMode:"margin"}):null]})}const Mve=fme(gH,Rve);var SH=k.exports.forwardRef(function(e,t){return b(xS,{...Tl({},e,{ref:t,sideCar:Mve})})});SH.classNames=xS.classNames;const xH=SH;var Vh=(...e)=>e.filter(Boolean).join(" ");function Fm(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Ive=class{constructor(){on(this,"modals");this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},$7=new Ive;function Dve(e,t){k.exports.useEffect(()=>(t&&$7.add(e),()=>{$7.remove(e)}),[t,e])}function Nve(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=k.exports.useRef(null),f=k.exports.useRef(null),[p,m,v]=zve(r,"chakra-modal","chakra-modal--header","chakra-modal--body");Bve(u,t&&a),Dve(u,t);const y=k.exports.useRef(null),x=k.exports.useCallback(B=>{y.current=B.target},[]),E=k.exports.useCallback(B=>{B.key==="Escape"&&(B.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[_,C]=k.exports.useState(!1),[T,A]=k.exports.useState(!1),M=k.exports.useCallback((B={},F=null)=>({role:"dialog",...B,ref:jn(F,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":_?m:void 0,"aria-describedby":T?v:void 0,onClick:Fm(B.onClick,H=>H.stopPropagation())}),[v,T,p,m,_]),I=k.exports.useCallback(B=>{B.stopPropagation(),y.current===B.target&&(!$7.isTopModal(u)||(i&&(n==null||n()),s==null||s()))},[n,i,s]),D=k.exports.useCallback((B={},F=null)=>({...B,ref:jn(F,f),onClick:Fm(B.onClick,I),onKeyDown:Fm(B.onKeyDown,E),onMouseDown:Fm(B.onMouseDown,x)}),[E,x,I]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:A,setHeaderMounted:C,dialogRef:u,overlayRef:f,getDialogProps:M,getDialogContainerProps:D}}function Bve(e,t){const n=e.current;k.exports.useEffect(()=>{if(!(!e.current||!t))return DF(e.current)},[t,e,n])}function zve(e,...t){const n=k.exports.useId(),r=e||n;return k.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[$ve,Wh]=Ln({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[Fve,Md]=Ln({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),k1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:f,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,y=zi("Modal",e),E={...Nve(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:f,motionPreset:p,lockFocusAcrossFrames:m};return b(Fve,{value:E,children:b($ve,{value:y,children:b(Vd,{onExitComplete:v,children:E.isOpen&&b(Hh,{...t,children:n})})})})};k1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};k1.displayName="Modal";var f2=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=Md();k.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Vh("chakra-modal__body",n),s=Wh();return oe.createElement(xe.div,{ref:t,className:a,id:i,...r,__css:s.body})});f2.displayName="ModalBody";var ck=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=Md(),a=Vh("chakra-modal__close-btn",r),s=Wh();return b(yS,{ref:t,__css:s.closeButton,className:a,onClick:Fm(n,l=>{l.stopPropagation(),o()}),...i})});ck.displayName="ModalCloseButton";function wH(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:f}=Md(),[p,m]=w_();return k.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),b(pH,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:f,children:b(xH,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var Hve={slideInBottom:{..._7,custom:{offsetY:16,reverse:!0}},slideInRight:{..._7,custom:{offsetX:16,reverse:!0}},scale:{...D$,custom:{initialScale:.95,reverse:!0}},none:{}},Vve=xe(Ql.section),Wve=e=>Hve[e||"none"],CH=k.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=Wve(n),...i}=e;return b(Vve,{ref:t,...r,...i})});CH.displayName="ModalTransition";var h2=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=Md(),u=s(a,t),f=l(i),p=Vh("chakra-modal__content",n),m=Wh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},y={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:x}=Md();return oe.createElement(wH,null,oe.createElement(xe.div,{...f,className:"chakra-modal__content-container",tabIndex:-1,__css:y},b(CH,{preset:x,motionProps:o,className:p,...u,__css:v,children:r})))});h2.displayName="ModalContent";var wS=Pe((e,t)=>{const{className:n,...r}=e,i=Vh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...Wh().footer};return oe.createElement(xe.footer,{ref:t,...r,__css:a,className:i})});wS.displayName="ModalFooter";var CS=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=Md();k.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Vh("chakra-modal__header",n),l={flex:0,...Wh().header};return oe.createElement(xe.header,{ref:t,className:a,id:i,...r,__css:l})});CS.displayName="ModalHeader";var Uve=xe(Ql.div),E1=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Vh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...Wh().overlay},{motionPreset:u}=Md();return b(Uve,{...i||(u==="none"?{}:I$),__css:l,ref:t,className:a,...o})});E1.displayName="ModalOverlay";function _H(e){const{leastDestructiveRef:t,...n}=e;return b(k1,{...n,initialFocusRef:t})}var kH=Pe((e,t)=>b(h2,{ref:t,role:"alertdialog",...e})),[KRe,jve]=Ln(),Gve=xe(N$),qve=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=Md(),f=s(a,t),p=l(o),m=Vh("chakra-modal__content",n),v=Wh(),y={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},x={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=jve();return oe.createElement(wH,null,oe.createElement(xe.div,{...p,className:"chakra-modal__content-container",__css:x},b(Gve,{motionProps:i,direction:E,in:u,className:m,...f,__css:y,children:r})))});qve.displayName="DrawerContent";function Yve(e,t){const n=gr(e);k.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var EH=(...e)=>e.filter(Boolean).join(" "),r6=e=>e?!0:void 0;function vl(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Kve=e=>b(Ea,{viewBox:"0 0 24 24",...e,children:b("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"})}),Xve=e=>b(Ea,{viewBox:"0 0 24 24",...e,children:b("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 LO(e,t,n,r){k.exports.useEffect(()=>{var s;if(!e.current||!r)return;const i=(s=e.current.ownerDocument.defaultView)!=null?s:window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(l=>{for(const u of l)u.type==="attributes"&&u.attributeName&&o.includes(u.attributeName)&&n(u)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Zve=50,AO=300;function Qve(e,t){const[n,r]=k.exports.useState(!1),[i,o]=k.exports.useState(null),[a,s]=k.exports.useState(!0),l=k.exports.useRef(null),u=()=>clearTimeout(l.current);Yve(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Zve:null);const f=k.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},AO)},[e,a]),p=k.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},AO)},[t,a]),m=k.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return k.exports.useEffect(()=>()=>u(),[]),{up:f,down:p,stop:m,isSpinning:n}}var Jve=/^[Ee0-9+\-.]$/;function e2e(e){return Jve.test(e)}function t2e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function n2e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:f,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:y,onChange:x,precision:E,name:_,"aria-describedby":C,"aria-label":T,"aria-labelledby":A,onFocus:M,onBlur:I,onInvalid:D,getAriaValueText:B,isValidCharacter:F,format:H,parse:Y,...te}=e,G=gr(M),z=gr(I),W=gr(D),K=gr(F!=null?F:e2e),Z=gr(B),U=b0e(e),{update:Q,increment:ue,decrement:fe}=U,[Te,Oe]=k.exports.useState(!1),ve=!(s||l),Ce=k.exports.useRef(null),Re=k.exports.useRef(null),Ye=k.exports.useRef(null),Ue=k.exports.useRef(null),pt=k.exports.useCallback(Ee=>Ee.split("").filter(K).join(""),[K]),wt=k.exports.useCallback(Ee=>{var Ct;return(Ct=Y==null?void 0:Y(Ee))!=null?Ct:Ee},[Y]),ut=k.exports.useCallback(Ee=>{var Ct;return((Ct=H==null?void 0:H(Ee))!=null?Ct:Ee).toString()},[H]);Od(()=>{(U.valueAsNumber>o||U.valueAsNumber<i)&&(W==null||W("rangeOverflow",ut(U.value),U.valueAsNumber))},[U.valueAsNumber,U.value,ut,W]),Ms(()=>{if(!Ce.current)return;if(Ce.current.value!=U.value){const Ct=wt(Ce.current.value);U.setValue(pt(Ct))}},[wt,pt]);const ft=k.exports.useCallback((Ee=a)=>{ve&&ue(Ee)},[ue,ve,a]),vt=k.exports.useCallback((Ee=a)=>{ve&&fe(Ee)},[fe,ve,a]),ke=Qve(ft,vt);LO(Ye,"disabled",ke.stop,ke.isSpinning),LO(Ue,"disabled",ke.stop,ke.isSpinning);const at=k.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Wt=wt(Ee.currentTarget.value);Q(pt(Wt)),Re.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Q,pt,wt]),Rt=k.exports.useCallback(Ee=>{var Wt,$e;var Ct;G==null||G(Ee),Re.current&&(Ee.target.selectionStart=(Wt=Re.current.start)!=null?Wt:(Ct=Ee.currentTarget.value)==null?void 0:Ct.length,Ee.currentTarget.selectionEnd=($e=Re.current.end)!=null?$e:Ee.currentTarget.selectionStart)},[G]),tt=k.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;t2e(Ee,K)||Ee.preventDefault();const Ct=yt(Ee)*a,Wt=Ee.key,ct={ArrowUp:()=>ft(Ct),ArrowDown:()=>vt(Ct),Home:()=>Q(i),End:()=>Q(o)}[Wt];ct&&(Ee.preventDefault(),ct(Ee))},[K,a,ft,vt,Q,i,o]),yt=Ee=>{let Ct=1;return(Ee.metaKey||Ee.ctrlKey)&&(Ct=.1),Ee.shiftKey&&(Ct=10),Ct},dn=k.exports.useMemo(()=>{const Ee=Z==null?void 0:Z(U.value);if(Ee!=null)return Ee;const Ct=U.value.toString();return Ct||void 0},[U.value,Z]),Pt=k.exports.useCallback(()=>{let Ee=U.value;if(U.value==="")return;/^[eE]/.test(U.value.toString())?U.setValue(""):(U.valueAsNumber<i&&(Ee=i),U.valueAsNumber>o&&(Ee=o),U.cast(Ee))},[U,o,i]),Yt=k.exports.useCallback(()=>{Oe(!1),n&&Pt()},[n,Oe,Pt]),fn=k.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=Ce.current)==null||Ee.focus()})},[t]),Cn=k.exports.useCallback(Ee=>{Ee.preventDefault(),ke.up(),fn()},[fn,ke]),De=k.exports.useCallback(Ee=>{Ee.preventDefault(),ke.down(),fn()},[fn,ke]);xh(()=>Ce.current,"wheel",Ee=>{var Be;var Ct;const $e=((Be=(Ct=Ce.current)==null?void 0:Ct.ownerDocument)!=null?Be:document).activeElement===Ce.current;if(!v||!$e)return;Ee.preventDefault();const ct=yt(Ee)*a,hn=Math.sign(Ee.deltaY);hn===-1?ft(ct):hn===1&&vt(ct)},{passive:!1});const nt=k.exports.useCallback((Ee={},Ct=null)=>{const Wt=l||r&&U.isAtMax;return{...Ee,ref:jn(Ct,Ye),role:"button",tabIndex:-1,onPointerDown:vl(Ee.onPointerDown,$e=>{$e.button!==0||Wt||Cn($e)}),onPointerLeave:vl(Ee.onPointerLeave,ke.stop),onPointerUp:vl(Ee.onPointerUp,ke.stop),disabled:Wt,"aria-disabled":r6(Wt)}},[U.isAtMax,r,Cn,ke.stop,l]),tn=k.exports.useCallback((Ee={},Ct=null)=>{const Wt=l||r&&U.isAtMin;return{...Ee,ref:jn(Ct,Ue),role:"button",tabIndex:-1,onPointerDown:vl(Ee.onPointerDown,$e=>{$e.button!==0||Wt||De($e)}),onPointerLeave:vl(Ee.onPointerLeave,ke.stop),onPointerUp:vl(Ee.onPointerUp,ke.stop),disabled:Wt,"aria-disabled":r6(Wt)}},[U.isAtMin,r,De,ke.stop,l]),Zt=k.exports.useCallback((Ee={},Ct=null)=>{var Wt,$e,ct,hn;return{name:_,inputMode:m,type:"text",pattern:p,"aria-labelledby":A,"aria-label":T,"aria-describedby":C,id:y,disabled:l,...Ee,readOnly:(Wt=Ee.readOnly)!=null?Wt:s,"aria-readonly":($e=Ee.readOnly)!=null?$e:s,"aria-required":(ct=Ee.required)!=null?ct:u,required:(hn=Ee.required)!=null?hn:u,ref:jn(Ce,Ct),value:ut(U.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(U.valueAsNumber)?void 0:U.valueAsNumber,"aria-invalid":r6(f!=null?f:U.isOutOfRange),"aria-valuetext":dn,autoComplete:"off",autoCorrect:"off",onChange:vl(Ee.onChange,at),onKeyDown:vl(Ee.onKeyDown,tt),onFocus:vl(Ee.onFocus,Rt,()=>Oe(!0)),onBlur:vl(Ee.onBlur,z,Yt)}},[_,m,p,A,T,ut,C,y,l,u,s,f,U.value,U.valueAsNumber,U.isOutOfRange,i,o,dn,at,tt,Rt,z,Yt]);return{value:ut(U.value),valueAsNumber:U.valueAsNumber,isFocused:Te,isDisabled:l,isReadOnly:s,getIncrementButtonProps:nt,getDecrementButtonProps:tn,getInputProps:Zt,htmlProps:te}}var[r2e,_S]=Ln({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[i2e,dk]=Ln({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),fk=Pe(function(t,n){const r=zi("NumberInput",t),i=wn(t),o=I_(i),{htmlProps:a,...s}=n2e(o),l=k.exports.useMemo(()=>s,[s]);return oe.createElement(i2e,{value:l},oe.createElement(r2e,{value:r},oe.createElement(xe.div,{...a,ref:n,className:EH("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});fk.displayName="NumberInput";var PH=Pe(function(t,n){const r=_S();return oe.createElement(xe.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});PH.displayName="NumberInputStepper";var hk=Pe(function(t,n){const{getInputProps:r}=dk(),i=r(t,n),o=_S();return oe.createElement(xe.input,{...i,className:EH("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});hk.displayName="NumberInputField";var TH=xe("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),pk=Pe(function(t,n){var a;const r=_S(),{getDecrementButtonProps:i}=dk(),o=i(t,n);return b(TH,{...o,__css:r.stepper,children:(a=t.children)!=null?a:b(Kve,{})})});pk.displayName="NumberDecrementStepper";var gk=Pe(function(t,n){var a;const{getIncrementButtonProps:r}=dk(),i=r(t,n),o=_S();return b(TH,{...i,__css:o.stepper,children:(a=t.children)!=null?a:b(Xve,{})})});gk.displayName="NumberIncrementStepper";var H2=(...e)=>e.filter(Boolean).join(" ");function o2e(e,...t){return a2e(e)?e(...t):e}var a2e=e=>typeof e=="function";function yl(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function s2e(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var[l2e,Uh]=Ln({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[u2e,V2]=Ln({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),r0={click:"click",hover:"hover"};function c2e(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=r0.click,openDelay:f=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:y,...x}=e,{isOpen:E,onClose:_,onOpen:C,onToggle:T}=AF(e),A=k.exports.useRef(null),M=k.exports.useRef(null),I=k.exports.useRef(null),D=k.exports.useRef(!1),B=k.exports.useRef(!1);E&&(B.current=!0);const[F,H]=k.exports.useState(!1),[Y,te]=k.exports.useState(!1),G=k.exports.useId(),z=i!=null?i:G,[W,K,Z,U]=["popover-trigger","popover-content","popover-header","popover-body"].map(at=>`${at}-${z}`),{referenceRef:Q,getArrowProps:ue,getPopperProps:fe,getArrowInnerProps:Te,forceUpdate:Oe}=LF({...x,enabled:E||!!y}),ve=Gge({isOpen:E,ref:I});T0e({enabled:E,ref:M}),w1e(I,{focusRef:M,visible:E,shouldFocus:o&&u===r0.click}),_1e(I,{focusRef:r,visible:E,shouldFocus:a&&u===r0.click});const Ce=OF({wasSelected:B.current,enabled:m,mode:v,isSelected:ve.present}),Re=k.exports.useCallback((at={},Rt=null)=>{const tt={...at,style:{...at.style,transformOrigin:Kr.transformOrigin.varRef,[Kr.arrowSize.var]:s?`${s}px`:void 0,[Kr.arrowShadowColor.var]:l},ref:jn(I,Rt),children:Ce?at.children:null,id:K,tabIndex:-1,role:"dialog",onKeyDown:yl(at.onKeyDown,yt=>{n&&yt.key==="Escape"&&_()}),onBlur:yl(at.onBlur,yt=>{const dn=OO(yt),Pt=i6(I.current,dn),Yt=i6(M.current,dn);E&&t&&(!Pt&&!Yt)&&_()}),"aria-labelledby":F?Z:void 0,"aria-describedby":Y?U:void 0};return u===r0.hover&&(tt.role="tooltip",tt.onMouseEnter=yl(at.onMouseEnter,()=>{D.current=!0}),tt.onMouseLeave=yl(at.onMouseLeave,yt=>{yt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>_(),p))})),tt},[Ce,K,F,Z,Y,U,u,n,_,E,t,p,l,s]),Ye=k.exports.useCallback((at={},Rt=null)=>fe({...at,style:{visibility:E?"visible":"hidden",...at.style}},Rt),[E,fe]),Ue=k.exports.useCallback((at,Rt=null)=>({...at,ref:jn(Rt,A,Q)}),[A,Q]),pt=k.exports.useRef(),wt=k.exports.useRef(),ut=k.exports.useCallback(at=>{A.current==null&&Q(at)},[Q]),ft=k.exports.useCallback((at={},Rt=null)=>{const tt={...at,ref:jn(M,Rt,ut),id:W,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":K};return u===r0.click&&(tt.onClick=yl(at.onClick,T)),u===r0.hover&&(tt.onFocus=yl(at.onFocus,()=>{pt.current===void 0&&C()}),tt.onBlur=yl(at.onBlur,yt=>{const dn=OO(yt),Pt=!i6(I.current,dn);E&&t&&Pt&&_()}),tt.onKeyDown=yl(at.onKeyDown,yt=>{yt.key==="Escape"&&_()}),tt.onMouseEnter=yl(at.onMouseEnter,()=>{D.current=!0,pt.current=window.setTimeout(()=>C(),f)}),tt.onMouseLeave=yl(at.onMouseLeave,()=>{D.current=!1,pt.current&&(clearTimeout(pt.current),pt.current=void 0),wt.current=window.setTimeout(()=>{D.current===!1&&_()},p)})),tt},[W,E,K,u,ut,T,C,t,_,f,p]);k.exports.useEffect(()=>()=>{pt.current&&clearTimeout(pt.current),wt.current&&clearTimeout(wt.current)},[]);const vt=k.exports.useCallback((at={},Rt=null)=>({...at,id:Z,ref:jn(Rt,tt=>{H(!!tt)})}),[Z]),ke=k.exports.useCallback((at={},Rt=null)=>({...at,id:U,ref:jn(Rt,tt=>{te(!!tt)})}),[U]);return{forceUpdate:Oe,isOpen:E,onAnimationComplete:ve.onComplete,onClose:_,getAnchorProps:Ue,getArrowProps:ue,getArrowInnerProps:Te,getPopoverPositionerProps:Ye,getPopoverProps:Re,getTriggerProps:ft,getHeaderProps:vt,getBodyProps:ke}}function i6(e,t){return e===t||(e==null?void 0:e.contains(t))}function OO(e){var n;const t=e.currentTarget.ownerDocument.activeElement;return(n=e.relatedTarget)!=null?n:t}function mk(e){const t=zi("Popover",e),{children:n,...r}=wn(e),i=N1(),o=c2e({...r,direction:i.direction});return b(l2e,{value:o,children:b(u2e,{value:t,children:o2e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}mk.displayName="Popover";function vk(e){var l;const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=Uh(),a=V2(),s=(l=t!=null?t:n)!=null?l:r;return oe.createElement(xe.div,{...i(),className:"chakra-popover__arrow-positioner"},oe.createElement(xe.div,{className:H2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}vk.displayName="PopoverArrow";var d2e=Pe(function(t,n){const{getBodyProps:r}=Uh(),i=V2();return oe.createElement(xe.div,{...r(t,n),className:H2("chakra-popover__body",t.className),__css:i.body})});d2e.displayName="PopoverBody";var f2e=Pe(function(t,n){const{onClose:r}=Uh(),i=V2();return b(yS,{size:"sm",onClick:r,className:H2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});f2e.displayName="PopoverCloseButton";function h2e(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var p2e={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]}}},g2e=xe(Ql.section),LH=Pe(function(t,n){const{variants:r=p2e,...i}=t,{isOpen:o}=Uh();return oe.createElement(g2e,{ref:n,variants:h2e(r),initial:!1,animate:o?"enter":"exit",...i})});LH.displayName="PopoverTransition";var yk=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=Uh(),u=V2(),f={position:"relative",display:"flex",flexDirection:"column",...u.content};return oe.createElement(xe.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},b(LH,{...i,...a(o,n),onAnimationComplete:s2e(l,o.onAnimationComplete),className:H2("chakra-popover__content",t.className),__css:f}))});yk.displayName="PopoverContent";var m2e=Pe(function(t,n){const{getHeaderProps:r}=Uh(),i=V2();return oe.createElement(xe.header,{...r(t,n),className:H2("chakra-popover__header",t.className),__css:i.header})});m2e.displayName="PopoverHeader";function bk(e){const t=k.exports.Children.only(e.children),{getTriggerProps:n}=Uh();return k.exports.cloneElement(t,n(t.props,t.ref))}bk.displayName="PopoverTrigger";function v2e(e,t,n){return(e-t)*100/(n-t)}var y2e=Hd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),b2e=Hd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),S2e=Hd({"0%":{left:"-40%"},"100%":{left:"100%"}}),x2e=Hd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function AH(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=v2e(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var OH=e=>{const{size:t,isIndeterminate:n,...r}=e;return oe.createElement(xe.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${b2e} 2s linear infinite`:void 0},...r})};OH.displayName="Shape";var F7=e=>oe.createElement(xe.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});F7.displayName="Circle";var w2e=Pe((e,t)=>{var A;const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:f="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...y}=e,x=AH({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:((A=x.percent)!=null?A:0)*2.64,_=E==null?void 0:`${E} ${264-E}`,C=v?{css:{animation:`${y2e} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:_,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return oe.createElement(xe.div,{ref:t,className:"chakra-progress",...x.bind,...y,__css:T},ee(OH,{size:n,isIndeterminate:v,children:[b(F7,{stroke:m,strokeWidth:f,className:"chakra-progress__track"}),b(F7,{stroke:p,strokeWidth:f,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:x.value===0&&!v?0:void 0,...C})]}),u)});w2e.displayName="CircularProgress";var[C2e,_2e]=Ln({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),k2e=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=AH({value:i,min:n,max:r,isIndeterminate:o,role:a}),f={height:"100%",..._2e().filledTrack};return oe.createElement(xe.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:f})}),RH=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:f,"aria-label":p,"aria-labelledby":m,title:v,role:y,...x}=wn(e),E=zi("Progress",e),_=u!=null?u:(n=E.track)==null?void 0:n.borderRadius,C={animation:`${x2e} 1s linear infinite`},M={...!f&&a&&s&&C,...f&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${S2e} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",...E.track};return oe.createElement(xe.div,{ref:t,borderRadius:_,__css:I,...x},ee(C2e,{value:E,children:[b(k2e,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:f,css:M,borderRadius:_,title:v,role:y}),l]}))});RH.displayName="Progress";var E2e=xe("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});E2e.displayName="CircularProgressLabel";var P2e=(...e)=>e.filter(Boolean).join(" "),T2e=e=>e?"":void 0;function L2e(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var MH=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return oe.createElement(xe.select,{...a,ref:n,className:P2e("chakra-select",o)},i&&b("option",{value:"",children:i}),r)});MH.displayName="SelectField";var IH=Pe((e,t)=>{var n;const r=zi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:f,minHeight:p,iconColor:m,iconSize:v,...y}=wn(e),[x,E]=L2e(y,Xee),_=M_(E),C={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return oe.createElement(xe.div,{className:"chakra-select__wrapper",__css:C,...x,...i},b(MH,{ref:t,height:u!=null?u:l,minH:f!=null?f:p,placeholder:o,..._,__css:T,children:e.children}),b(DH,{"data-disabled":T2e(_.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});IH.displayName="Select";var A2e=e=>b("svg",{viewBox:"0 0 24 24",...e,children:b("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),O2e=xe("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),DH=e=>{const{children:t=b(A2e,{}),...n}=e,r=k.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return b(O2e,{...n,className:"chakra-select__icon-wrapper",children:k.exports.isValidElement(t)?r:null})};DH.displayName="SelectIcon";function R2e(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function M2e(e){const t=D2e(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function NH(e){return!!e.touches}function I2e(e){return NH(e)&&e.touches.length>1}function D2e(e){var t;return(t=e.view)!=null?t:window}function N2e(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function B2e(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function BH(e,t="page"){return NH(e)?N2e(e,t):B2e(e,t)}function z2e(e){return t=>{const n=M2e(t);(!n||n&&t.button===0)&&e(t)}}function $2e(e,t=!1){function n(i){e(i,{point:BH(i)})}return t?z2e(n):n}function L4(e,t,n,r){return R2e(e,t,$2e(n,t==="pointerdown"),r)}function zH(e){const t=k.exports.useRef(null);return t.current=e,t}var F2e=class{constructor(e,t,n){on(this,"history",[]);on(this,"startEvent",null);on(this,"lastEvent",null);on(this,"lastEventInfo",null);on(this,"handlers",{});on(this,"removeListeners",()=>{});on(this,"threshold",3);on(this,"win");on(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=o6(this.lastEventInfo,this.history),t=this.startEvent!==null,n=U2e(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=lL();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i==null||i(this.lastEvent,e),this.startEvent=this.lastEvent),o==null||o(this.lastEvent,e)});on(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,lne.update(this.updatePoint,!0)});on(this,"onPointerUp",(e,t)=>{const n=o6(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i==null||i(e,n),this.end(),!(!r||!this.startEvent)&&(r==null||r(e,n))});var a;if(this.win=(a=e.view)!=null?a:window,I2e(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:BH(e)},{timestamp:i}=lL();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o==null||o(e,o6(r,this.history)),this.removeListeners=W2e(L4(this.win,"pointermove",this.onPointerMove),L4(this.win,"pointerup",this.onPointerUp),L4(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),une.update(this.updatePoint)}};function RO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o6(e,t){return{point:e.point,delta:RO(e.point,t[t.length-1]),offset:RO(e.point,t[0]),velocity:V2e(t,.1)}}var H2e=e=>e*1e3;function V2e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>H2e(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function W2e(...e){return t=>e.reduce((n,r)=>r(n),t)}function a6(e,t){return Math.abs(e-t)}function MO(e){return"x"in e&&"y"in e}function U2e(e,t){if(typeof e=="number"&&typeof t=="number")return a6(e,t);if(MO(e)&&MO(t)){const n=a6(e.x,t.x),r=a6(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function $H(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=k.exports.useRef(null),f=zH({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i==null||i(p,m)}});k.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(f.current)}),k.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new F2e(v,f.current,s)}return L4(p,"pointerdown",m)},[e,l,f,s]),k.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function j2e(e,t){var i;if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=(i=e.ownerDocument.defaultView)!=null?i:window,r=new n.ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const[a]=o;let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,l=f.blockSize}else s=e.offsetWidth,l=e.offsetHeight;t({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var G2e=Boolean(globalThis==null?void 0:globalThis.document)?k.exports.useLayoutEffect:k.exports.useEffect;function q2e(e,t){var o;var n;if(!e||!e.parentElement)return;const r=(o=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?o:window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function FH({getNodes:e,observeMutation:t=!0}){const[n,r]=k.exports.useState([]),[i,o]=k.exports.useState(0);return G2e(()=>{const a=e(),s=a.map((l,u)=>j2e(l,f=>{r(p=>[...p.slice(0,u),f,...p.slice(u+1)])}));if(t){const l=a[0];s.push(q2e(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function Y2e(e){return typeof e=="object"&&e!==null&&"current"in e}function K2e(e){const[t]=FH({observeMutation:!1,getNodes(){return[Y2e(e)?e.current:e]}});return t}var X2e=Object.getOwnPropertyNames,Z2e=(e,t)=>function(){return e&&(t=(0,e[X2e(e)[0]])(e=0)),t},Gd=Z2e({"../../../react-shim.js"(){}});Gd();Gd();Gd();var Ha=e=>e?"":void 0,n1=e=>e?!0:void 0,qd=(...e)=>e.filter(Boolean).join(" ");Gd();function r1(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}Gd();Gd();function Q2e(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function Hm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var A4={width:0,height:0},T3=e=>e||A4;function HH(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=x=>{var _;const E=(_=r[x])!=null?_:A4;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Hm({orientation:t,vertical:{bottom:`calc(${n[x]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[x]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((x,E)=>T3(x).height>T3(E).height?x:E,A4):r.reduce((x,E)=>T3(x).width>T3(E).width?x:E,A4),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Hm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...Hm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,f=[0,i?100-n[0]:n[0]],p=u?f:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),y={...l,...Hm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:y,rootStyle:s,getThumbStyle:o}}function VH(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function J2e(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:f,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:x,"aria-valuetext":E,"aria-label":_,"aria-labelledby":C,name:T,focusThumbOnChange:A=!0,minStepsBetweenThumbs:M=0,...I}=e,D=gr(m),B=gr(v),F=gr(x),H=VH({isReversed:a,direction:s,orientation:l}),[Y,te]=Jb({value:i,defaultValue:o!=null?o:[25,75],onChange:r});if(!Array.isArray(Y))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof Y}\``);const[G,z]=k.exports.useState(!1),[W,K]=k.exports.useState(!1),[Z,U]=k.exports.useState(-1),Q=!(f||p),ue=k.exports.useRef(Y),fe=Y.map(Be=>J0(Be,t,n)),Te=M*y,Oe=eye(fe,t,n,Te),ve=k.exports.useRef({eventSource:null,value:[],valueBounds:[]});ve.current.value=fe,ve.current.valueBounds=Oe;const Ce=fe.map(Be=>n-Be+t),Ye=(H?Ce:fe).map(Be=>N5(Be,t,n)),Ue=l==="vertical",pt=k.exports.useRef(null),wt=k.exports.useRef(null),ut=FH({getNodes(){const Be=wt.current,gt=Be==null?void 0:Be.querySelectorAll("[role=slider]");return gt?Array.from(gt):[]}}),ft=k.exports.useId(),vt=u!=null?u:ft,ke=Q2e(vt),at=k.exports.useCallback(Be=>{var Go;var gt;if(!pt.current)return;ve.current.eventSource="pointer";const rt=pt.current.getBoundingClientRect(),{clientX:Bt,clientY:ln}=(Go=(gt=Be.touches)==null?void 0:gt[0])!=null?Go:Be,wr=Ue?rt.bottom-ln:Bt-rt.left,sr=Ue?rt.height:rt.width;let Vr=wr/sr;return H&&(Vr=1-Vr),G$(Vr,t,n)},[Ue,H,n,t]),Rt=(n-t)/10,tt=y||(n-t)/100,yt=k.exports.useMemo(()=>({setValueAtIndex(Be,gt){if(!Q)return;const rt=ve.current.valueBounds[Be];gt=parseFloat(L7(gt,rt.min,tt)),gt=J0(gt,rt.min,rt.max);const Bt=[...ve.current.value];Bt[Be]=gt,te(Bt)},setActiveIndex:U,stepUp(Be,gt=tt){const rt=ve.current.value[Be],Bt=H?rt-gt:rt+gt;yt.setValueAtIndex(Be,Bt)},stepDown(Be,gt=tt){const rt=ve.current.value[Be],Bt=H?rt+gt:rt-gt;yt.setValueAtIndex(Be,Bt)},reset(){te(ue.current)}}),[tt,H,te,Q]),dn=k.exports.useCallback(Be=>{const gt=Be.key,Bt={ArrowRight:()=>yt.stepUp(Z),ArrowUp:()=>yt.stepUp(Z),ArrowLeft:()=>yt.stepDown(Z),ArrowDown:()=>yt.stepDown(Z),PageUp:()=>yt.stepUp(Z,Rt),PageDown:()=>yt.stepDown(Z,Rt),Home:()=>{const{min:ln}=Oe[Z];yt.setValueAtIndex(Z,ln)},End:()=>{const{max:ln}=Oe[Z];yt.setValueAtIndex(Z,ln)}}[gt];Bt&&(Be.preventDefault(),Be.stopPropagation(),Bt(Be),ve.current.eventSource="keyboard")},[yt,Z,Rt,Oe]),{getThumbStyle:Pt,rootStyle:Yt,trackStyle:fn,innerTrackStyle:Cn}=k.exports.useMemo(()=>HH({isReversed:H,orientation:l,thumbRects:ut,thumbPercents:Ye}),[H,l,Ye,ut]),De=k.exports.useCallback(Be=>{var gt;const rt=Be!=null?Be:Z;if(rt!==-1&&A){const Bt=ke.getThumb(rt),ln=(gt=wt.current)==null?void 0:gt.ownerDocument.getElementById(Bt);ln&&setTimeout(()=>ln.focus())}},[A,Z,ke]);Od(()=>{ve.current.eventSource==="keyboard"&&(B==null||B(ve.current.value))},[fe,B]);const nt=Be=>{const gt=at(Be)||0,rt=ve.current.value.map(Vr=>Math.abs(Vr-gt)),Bt=Math.min(...rt);let ln=rt.indexOf(Bt);const wr=rt.filter(Vr=>Vr===Bt);wr.length>1&&gt>ve.current.value[ln]&&(ln=ln+wr.length-1),U(ln),yt.setValueAtIndex(ln,gt),De(ln)},tn=Be=>{if(Z==-1)return;const gt=at(Be)||0;U(Z),yt.setValueAtIndex(Z,gt),De(Z)};$H(wt,{onPanSessionStart(Be){!Q||(z(!0),nt(Be),D==null||D(ve.current.value))},onPanSessionEnd(){!Q||(z(!1),B==null||B(ve.current.value))},onPan(Be){!Q||tn(Be)}});const Zt=k.exports.useCallback((Be={},gt=null)=>({...Be,...I,id:ke.root,ref:jn(gt,wt),tabIndex:-1,"aria-disabled":n1(f),"data-focused":Ha(W),style:{...Be.style,...Yt}}),[I,f,W,Yt,ke]),Ee=k.exports.useCallback((Be={},gt=null)=>({...Be,ref:jn(gt,pt),id:ke.track,"data-disabled":Ha(f),style:{...Be.style,...fn}}),[f,fn,ke]),Ct=k.exports.useCallback((Be={},gt=null)=>({...Be,ref:gt,id:ke.innerTrack,style:{...Be.style,...Cn}}),[Cn,ke]),Wt=k.exports.useCallback((Be,gt=null)=>{var sr;const{index:rt,...Bt}=Be,ln=fe[rt];if(ln==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${rt}\`. The \`value\` or \`defaultValue\` length is : ${fe.length}`);const wr=Oe[rt];return{...Bt,ref:gt,role:"slider",tabIndex:Q?0:void 0,id:ke.getThumb(rt),"data-active":Ha(G&&Z===rt),"aria-valuetext":(sr=F==null?void 0:F(ln))!=null?sr:E==null?void 0:E[rt],"aria-valuemin":wr.min,"aria-valuemax":wr.max,"aria-valuenow":ln,"aria-orientation":l,"aria-disabled":n1(f),"aria-readonly":n1(p),"aria-label":_==null?void 0:_[rt],"aria-labelledby":_!=null&&_[rt]||C==null?void 0:C[rt],style:{...Be.style,...Pt(rt)},onKeyDown:r1(Be.onKeyDown,dn),onFocus:r1(Be.onFocus,()=>{K(!0),U(rt)}),onBlur:r1(Be.onBlur,()=>{K(!1),U(-1)})}},[ke,fe,Oe,Q,G,Z,F,E,l,f,p,_,C,Pt,dn,K]),$e=k.exports.useCallback((Be={},gt=null)=>({...Be,ref:gt,id:ke.output,htmlFor:fe.map((rt,Bt)=>ke.getThumb(Bt)).join(" "),"aria-live":"off"}),[ke,fe]),ct=k.exports.useCallback((Be,gt=null)=>{const{value:rt,...Bt}=Be,ln=!(rt<t||rt>n),wr=rt>=fe[0]&&rt<=fe[fe.length-1];let sr=N5(rt,t,n);sr=H?100-sr:sr;const Vr={position:"absolute",pointerEvents:"none",...Hm({orientation:l,vertical:{bottom:`${sr}%`},horizontal:{left:`${sr}%`}})};return{...Bt,ref:gt,id:ke.getMarker(Be.value),role:"presentation","aria-hidden":!0,"data-disabled":Ha(f),"data-invalid":Ha(!ln),"data-highlighted":Ha(wr),style:{...Be.style,...Vr}}},[f,H,n,t,l,fe,ke]),hn=k.exports.useCallback((Be,gt=null)=>{const{index:rt,...Bt}=Be;return{...Bt,ref:gt,id:ke.getInput(rt),type:"hidden",value:fe[rt],name:Array.isArray(T)?T[rt]:`${T}-${rt}`}},[T,fe,ke]);return{state:{value:fe,isFocused:W,isDragging:G,getThumbPercent:Be=>Ye[Be],getThumbMinValue:Be=>Oe[Be].min,getThumbMaxValue:Be=>Oe[Be].max},actions:yt,getRootProps:Zt,getTrackProps:Ee,getInnerTrackProps:Ct,getThumbProps:Wt,getMarkerProps:ct,getInputProps:hn,getOutputProps:$e}}function eye(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[tye,kS]=Ln({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[nye,Sk]=Ln({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),WH=Pe(function(t,n){const r=zi("Slider",t),i=wn(t),{direction:o}=N1();i.direction=o;const{getRootProps:a,...s}=J2e(i),l=k.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return oe.createElement(tye,{value:l},oe.createElement(nye,{value:r},oe.createElement(xe.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});WH.defaultProps={orientation:"horizontal"};WH.displayName="RangeSlider";var rye=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=kS(),a=Sk(),s=r(t,n);return oe.createElement(xe.div,{...s,className:qd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&b("input",{...i({index:t.index})}))});rye.displayName="RangeSliderThumb";var iye=Pe(function(t,n){const{getTrackProps:r}=kS(),i=Sk(),o=r(t,n);return oe.createElement(xe.div,{...o,className:qd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});iye.displayName="RangeSliderTrack";var oye=Pe(function(t,n){const{getInnerTrackProps:r}=kS(),i=Sk(),o=r(t,n);return oe.createElement(xe.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});oye.displayName="RangeSliderFilledTrack";var aye=Pe(function(t,n){const{getMarkerProps:r}=kS(),i=r(t,n);return oe.createElement(xe.div,{...i,className:qd("chakra-slider__marker",t.className)})});aye.displayName="RangeSliderMark";Gd();Gd();function sye(e){var Wt;const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:f,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:y=1,getAriaValueText:x,"aria-valuetext":E,"aria-label":_,"aria-labelledby":C,name:T,focusThumbOnChange:A=!0,...M}=e,I=gr(m),D=gr(v),B=gr(x),F=VH({isReversed:a,direction:s,orientation:l}),[H,Y]=Jb({value:i,defaultValue:o!=null?o:uye(t,n),onChange:r}),[te,G]=k.exports.useState(!1),[z,W]=k.exports.useState(!1),K=!(f||p),Z=(n-t)/10,U=y||(n-t)/100,Q=J0(H,t,n),ue=n-Q+t,Te=N5(F?ue:Q,t,n),Oe=l==="vertical",ve=zH({min:t,max:n,step:y,isDisabled:f,value:Q,isInteractive:K,isReversed:F,isVertical:Oe,eventSource:null,focusThumbOnChange:A,orientation:l}),Ce=k.exports.useRef(null),Re=k.exports.useRef(null),Ye=k.exports.useRef(null),Ue=k.exports.useId(),pt=u!=null?u:Ue,[wt,ut]=[`slider-thumb-${pt}`,`slider-track-${pt}`],ft=k.exports.useCallback($e=>{var Vr;var ct;if(!Ce.current)return;const hn=ve.current;hn.eventSource="pointer";const Be=Ce.current.getBoundingClientRect(),{clientX:gt,clientY:rt}=(Vr=(ct=$e.touches)==null?void 0:ct[0])!=null?Vr:$e,Bt=Oe?Be.bottom-rt:gt-Be.left,ln=Oe?Be.height:Be.width;let wr=Bt/ln;F&&(wr=1-wr);let sr=G$(wr,hn.min,hn.max);return hn.step&&(sr=parseFloat(L7(sr,hn.min,hn.step))),sr=J0(sr,hn.min,hn.max),sr},[Oe,F,ve]),vt=k.exports.useCallback($e=>{const ct=ve.current;!ct.isInteractive||($e=parseFloat(L7($e,ct.min,U)),$e=J0($e,ct.min,ct.max),Y($e))},[U,Y,ve]),ke=k.exports.useMemo(()=>({stepUp($e=U){const ct=F?Q-$e:Q+$e;vt(ct)},stepDown($e=U){const ct=F?Q+$e:Q-$e;vt(ct)},reset(){vt(o||0)},stepTo($e){vt($e)}}),[vt,F,Q,U,o]),at=k.exports.useCallback($e=>{const ct=ve.current,Be={ArrowRight:()=>ke.stepUp(),ArrowUp:()=>ke.stepUp(),ArrowLeft:()=>ke.stepDown(),ArrowDown:()=>ke.stepDown(),PageUp:()=>ke.stepUp(Z),PageDown:()=>ke.stepDown(Z),Home:()=>vt(ct.min),End:()=>vt(ct.max)}[$e.key];Be&&($e.preventDefault(),$e.stopPropagation(),Be($e),ct.eventSource="keyboard")},[ke,vt,Z,ve]),Rt=(Wt=B==null?void 0:B(Q))!=null?Wt:E,tt=K2e(Re),{getThumbStyle:yt,rootStyle:dn,trackStyle:Pt,innerTrackStyle:Yt}=k.exports.useMemo(()=>{const $e=ve.current,ct=tt!=null?tt:{width:0,height:0};return HH({isReversed:F,orientation:$e.orientation,thumbRects:[ct],thumbPercents:[Te]})},[F,tt,Te,ve]),fn=k.exports.useCallback(()=>{ve.current.focusThumbOnChange&&setTimeout(()=>{var ct;return(ct=Re.current)==null?void 0:ct.focus()})},[ve]);Od(()=>{const $e=ve.current;fn(),$e.eventSource==="keyboard"&&(D==null||D($e.value))},[Q,D]);function Cn($e){const ct=ft($e);ct!=null&&ct!==ve.current.value&&Y(ct)}$H(Ye,{onPanSessionStart($e){const ct=ve.current;!ct.isInteractive||(G(!0),fn(),Cn($e),I==null||I(ct.value))},onPanSessionEnd(){const $e=ve.current;!$e.isInteractive||(G(!1),D==null||D($e.value))},onPan($e){!ve.current.isInteractive||Cn($e)}});const De=k.exports.useCallback(($e={},ct=null)=>({...$e,...M,ref:jn(ct,Ye),tabIndex:-1,"aria-disabled":n1(f),"data-focused":Ha(z),style:{...$e.style,...dn}}),[M,f,z,dn]),nt=k.exports.useCallback(($e={},ct=null)=>({...$e,ref:jn(ct,Ce),id:ut,"data-disabled":Ha(f),style:{...$e.style,...Pt}}),[f,ut,Pt]),tn=k.exports.useCallback(($e={},ct=null)=>({...$e,ref:ct,style:{...$e.style,...Yt}}),[Yt]),Zt=k.exports.useCallback(($e={},ct=null)=>({...$e,ref:jn(ct,Re),role:"slider",tabIndex:K?0:void 0,id:wt,"data-active":Ha(te),"aria-valuetext":Rt,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":n1(f),"aria-readonly":n1(p),"aria-label":_,"aria-labelledby":_?void 0:C,style:{...$e.style,...yt(0)},onKeyDown:r1($e.onKeyDown,at),onFocus:r1($e.onFocus,()=>W(!0)),onBlur:r1($e.onBlur,()=>W(!1))}),[K,wt,te,Rt,t,n,Q,l,f,p,_,C,yt,at]),Ee=k.exports.useCallback(($e,ct=null)=>{const hn=!($e.value<t||$e.value>n),Be=Q>=$e.value,gt=N5($e.value,t,n),rt={position:"absolute",pointerEvents:"none",...lye({orientation:l,vertical:{bottom:F?`${100-gt}%`:`${gt}%`},horizontal:{left:F?`${100-gt}%`:`${gt}%`}})};return{...$e,ref:ct,role:"presentation","aria-hidden":!0,"data-disabled":Ha(f),"data-invalid":Ha(!hn),"data-highlighted":Ha(Be),style:{...$e.style,...rt}}},[f,F,n,t,l,Q]),Ct=k.exports.useCallback(($e={},ct=null)=>({...$e,ref:ct,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:z,isDragging:te},actions:ke,getRootProps:De,getTrackProps:nt,getInnerTrackProps:tn,getThumbProps:Zt,getMarkerProps:Ee,getInputProps:Ct}}function lye(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function uye(e,t){return t<e?e:e+(t-e)/2}var[cye,ES]=Ln({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[dye,PS]=Ln({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),xk=Pe((e,t)=>{const n=zi("Slider",e),r=wn(e),{direction:i}=N1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sye(r),l=a(),u=o({},t);return oe.createElement(cye,{value:s},oe.createElement(dye,{value:n},oe.createElement(xe.div,{...l,className:qd("chakra-slider",e.className),__css:n.container},e.children,b("input",{...u}))))});xk.defaultProps={orientation:"horizontal"};xk.displayName="Slider";var UH=Pe((e,t)=>{const{getThumbProps:n}=ES(),r=PS(),i=n(e,t);return oe.createElement(xe.div,{...i,className:qd("chakra-slider__thumb",e.className),__css:r.thumb})});UH.displayName="SliderThumb";var jH=Pe((e,t)=>{const{getTrackProps:n}=ES(),r=PS(),i=n(e,t);return oe.createElement(xe.div,{...i,className:qd("chakra-slider__track",e.className),__css:r.track})});jH.displayName="SliderTrack";var GH=Pe((e,t)=>{const{getInnerTrackProps:n}=ES(),r=PS(),i=n(e,t);return oe.createElement(xe.div,{...i,className:qd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});GH.displayName="SliderFilledTrack";var H7=Pe((e,t)=>{const{getMarkerProps:n}=ES(),r=PS(),i=n(e,t);return oe.createElement(xe.div,{...i,className:qd("chakra-slider__marker",e.className),__css:r.mark})});H7.displayName="SliderMark";var fye=(...e)=>e.filter(Boolean).join(" "),IO=e=>e?"":void 0,wk=Pe(function(t,n){const r=zi("Switch",t),{spacing:i="0.5rem",children:o,...a}=wn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:f,getLabelProps:p}=U$(a),m=k.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=k.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),y=k.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return oe.createElement(xe.label,{...f(),className:fye("chakra-switch",t.className),__css:m},b("input",{className:"chakra-switch__input",...l({},n)}),oe.createElement(xe.span,{...u(),className:"chakra-switch__track",__css:v},oe.createElement(xe.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":IO(s.isChecked),"data-hover":IO(s.isHovered)})),o&&oe.createElement(xe.span,{className:"chakra-switch__label",...p(),__css:y},o))});wk.displayName="Switch";var W1=(...e)=>e.filter(Boolean).join(" ");function V7(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[hye,qH,pye,gye]=iz();function mye(e){var C;const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[f,p]=k.exports.useState(t!=null?t:0),[m,v]=Jb({defaultValue:t!=null?t:0,value:r,onChange:n});k.exports.useEffect(()=>{r!=null&&p(r)},[r]);const y=pye(),x=k.exports.useId();return{id:`tabs-${(C=e.id)!=null?C:x}`,selectedIndex:m,focusedIndex:f,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:y,direction:l,htmlProps:u}}var[vye,W2]=Ln({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function yye(e){const{focusedIndex:t,orientation:n,direction:r}=W2(),i=qH(),o=k.exports.useCallback(a=>{const s=()=>{var C;const T=i.nextEnabled(t);T&&((C=T.node)==null||C.focus())},l=()=>{var C;const T=i.prevEnabled(t);T&&((C=T.node)==null||C.focus())},u=()=>{var C;const T=i.firstEnabled();T&&((C=T.node)==null||C.focus())},f=()=>{var C;const T=i.lastEnabled();T&&((C=T.node)==null||C.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,y=r==="ltr"?"ArrowLeft":"ArrowRight",x=r==="ltr"?"ArrowRight":"ArrowLeft",_={[y]:()=>p&&l(),[x]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:f}[v];_&&(a.preventDefault(),_(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:V7(e.onKeyDown,o)}}function bye(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=W2(),{index:u,register:f}=gye({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},y=d1e({...r,ref:jn(f,e.ref),isDisabled:t,isFocusable:n,onClick:V7(e.onClick,m)}),x="button";return{...y,id:YH(a,u),role:"tab",tabIndex:p?0:-1,type:x,"aria-selected":p,"aria-controls":KH(a,u),onFocus:t?void 0:V7(e.onFocus,v)}}var[Sye,xye]=Ln({});function wye(e){const t=W2(),{id:n,selectedIndex:r}=t,o=gS(e.children).map((a,s)=>k.exports.createElement(Sye,{key:s,value:{isSelected:s===r,id:KH(n,s),tabId:YH(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cye(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=W2(),{isSelected:o,id:a,tabId:s}=xye(),l=k.exports.useRef(!1);o&&(l.current=!0);const u=OF({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function _ye(){const e=W2(),t=qH(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=k.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=k.exports.useState(!1);return Ms(()=>{if(n==null)return;const f=t.item(n);if(f==null)return;i&&s({left:f.node.offsetLeft,width:f.node.offsetWidth}),o&&s({top:f.node.offsetTop,height:f.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function YH(e,t){return`${e}--tab-${t}`}function KH(e,t){return`${e}--tabpanel-${t}`}var[kye,U2]=Ln({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),XH=Pe(function(t,n){const r=zi("Tabs",t),{children:i,className:o,...a}=wn(t),{htmlProps:s,descendants:l,...u}=mye(a),f=k.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return oe.createElement(hye,{value:l},oe.createElement(vye,{value:f},oe.createElement(kye,{value:r},oe.createElement(xe.div,{className:W1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});XH.displayName="Tabs";var Eye=Pe(function(t,n){const r=_ye(),i={...t.style,...r},o=U2();return oe.createElement(xe.div,{ref:n,...t,className:W1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eye.displayName="TabIndicator";var Pye=Pe(function(t,n){const r=yye({...t,ref:n}),o={display:"flex",...U2().tablist};return oe.createElement(xe.div,{...r,className:W1("chakra-tabs__tablist",t.className),__css:o})});Pye.displayName="TabList";var ZH=Pe(function(t,n){const r=Cye({...t,ref:n}),i=U2();return oe.createElement(xe.div,{outline:"0",...r,className:W1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});ZH.displayName="TabPanel";var QH=Pe(function(t,n){const r=wye(t),i=U2();return oe.createElement(xe.div,{...r,width:"100%",ref:n,className:W1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});QH.displayName="TabPanels";var JH=Pe(function(t,n){const r=U2(),i=bye({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return oe.createElement(xe.button,{...i,className:W1("chakra-tabs__tab",t.className),__css:o})});JH.displayName="Tab";var Tye=(...e)=>e.filter(Boolean).join(" ");function Lye(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Aye=["h","minH","height","minHeight"],eV=Pe((e,t)=>{const n=bo("Textarea",e),{className:r,rows:i,...o}=wn(e),a=M_(o),s=i?Lye(n,Aye):n;return oe.createElement(xe.textarea,{ref:t,rows:i,...a,className:Tye("chakra-textarea",r),__css:s})});eV.displayName="Textarea";function Oye(e,t){const n=gr(e);k.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function W7(e,...t){return Rye(e)?e(...t):e}var Rye=e=>typeof e=="function";function Mye(e,t){var o;const n=e!=null?e:"bottom",i={"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"}}[n];return(o=i==null?void 0:i[t])!=null?o:n}var Iye=(e,t)=>e.find(n=>n.id===t);function DO(e,t){const n=tV(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function tV(e,t){for(const[n,r]of Object.entries(e))if(Iye(r,t))return n}function Dye(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Nye(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Bye={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ll=zye(Bye);function zye(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=$ye(i,o),{position:s,id:l}=a;return r(u=>{var m,v;const p=s.includes("top")?[a,...(m=u[s])!=null?m:[]]:[...(v=u[s])!=null?v:[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=DO(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:nV(o)}),s})},closeAll:({positions:i}={})=>{r(o=>{const a=["bottom","bottom-right","bottom-left","top","top-left","top-right"];return(i!=null?i:a).reduce((l,u)=>(l[u]=o[u].map(f=>({...f,requestClose:!0})),l),{...o})})},close:i=>{r(o=>{const a=tV(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(DO(Ll.getState(),i).position)}}var NO=0;function $ye(e,t={}){var i,o;NO+=1;const n=(i=t.id)!=null?i:NO,r=(o=t.position)!=null?o:"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ll.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Fye=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return oe.createElement(z$,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},b(F$,{children:l}),oe.createElement(xe.div,{flex:"1",maxWidth:"100%"},i&&b(H$,{id:u==null?void 0:u.title,children:i}),s&&b($$,{id:u==null?void 0:u.description,display:"block",children:s})),o&&b(yS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function nV(e={}){const{render:t,toastComponent:n=Fye}=e;return i=>typeof t=="function"?t({...i,...e}):b(n,{...i,...e})}function Hye(e,t){const n=i=>{var o;return{...t,...i,position:Mye((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=nV(o);return Ll.notify(a,o)};return r.update=(i,o)=>{Ll.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...W7(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...W7(o.error,s)}))},r.closeAll=Ll.closeAll,r.close=Ll.close,r.isActive=Ll.isActive,r}function j2(e){const{theme:t}=tz();return k.exports.useMemo(()=>Hye(t.direction,e),[e,t.direction])}var Vye={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},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]}}},rV=k.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Vye,toastSpacing:f="0.5rem"}=e,[p,m]=k.exports.useState(s),v=Hde();Od(()=>{v||r==null||r()},[v]),Od(()=>{m(s)},[s]);const y=()=>m(null),x=()=>m(s),E=()=>{v&&i()};k.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Oye(E,p);const _=k.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:f,...l}),[l,f]),C=k.exports.useMemo(()=>Dye(a),[a]);return oe.createElement(Ql.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:y,onHoverEnd:x,custom:{position:a},style:C},oe.createElement(xe.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:_},W7(n,{id:t,onClose:E})))});rV.displayName="ToastComponent";var Wye=e=>{const t=k.exports.useSyncExternalStore(Ll.subscribe,Ll.getState,Ll.getState),{children:n,motionVariants:r,component:i=rV,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return b("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Nye(l),children:b(Vd,{initial:!1,children:u.map(f=>b(i,{motionVariants:r,...f},f.id))})},l)});return ee(In,{children:[n,b(Hh,{...o,children:s})]})};function Uye(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function jye(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Gye={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 Sm(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var F5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},U7=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function qye(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:f,id:p,isOpen:m,defaultIsOpen:v,arrowSize:y=10,arrowShadowColor:x,arrowPadding:E,modifiers:_,isDisabled:C,gutter:T,offset:A,direction:M,...I}=e,{isOpen:D,onOpen:B,onClose:F}=AF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:H,getPopperProps:Y,getArrowInnerProps:te,getArrowProps:G}=LF({enabled:D,placement:f,arrowPadding:E,modifiers:_,gutter:T,offset:A,direction:M}),z=k.exports.useId(),K=`tooltip-${p!=null?p:z}`,Z=k.exports.useRef(null),U=k.exports.useRef(),Q=k.exports.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=void 0)},[]),ue=k.exports.useRef(),fe=k.exports.useCallback(()=>{ue.current&&(clearTimeout(ue.current),ue.current=void 0)},[]),Te=k.exports.useCallback(()=>{fe(),F()},[F,fe]),Oe=Yye(Z,Te),ve=k.exports.useCallback(()=>{if(!C&&!U.current){Oe();const ft=U7(Z);U.current=ft.setTimeout(B,t)}},[Oe,C,B,t]),Ce=k.exports.useCallback(()=>{Q();const ft=U7(Z);ue.current=ft.setTimeout(Te,n)},[n,Te,Q]),Re=k.exports.useCallback(()=>{D&&r&&Ce()},[r,Ce,D]),Ye=k.exports.useCallback(()=>{D&&a&&Ce()},[a,Ce,D]),Ue=k.exports.useCallback(ft=>{D&&ft.key==="Escape"&&Ce()},[D,Ce]);xh(()=>F5(Z),"keydown",s?Ue:void 0),xh(()=>F5(Z),"scroll",()=>{D&&o&&Te()}),k.exports.useEffect(()=>{!C||(Q(),D&&F())},[C,D,F,Q]),k.exports.useEffect(()=>()=>{Q(),fe()},[Q,fe]),xh(()=>Z.current,"pointerleave",Ce);const pt=k.exports.useCallback((ft={},vt=null)=>({...ft,ref:jn(Z,vt,H),onPointerEnter:Sm(ft.onPointerEnter,at=>{at.pointerType!=="touch"&&ve()}),onClick:Sm(ft.onClick,Re),onPointerDown:Sm(ft.onPointerDown,Ye),onFocus:Sm(ft.onFocus,ve),onBlur:Sm(ft.onBlur,Ce),"aria-describedby":D?K:void 0}),[ve,Ce,Ye,D,K,Re,H]),wt=k.exports.useCallback((ft={},vt=null)=>Y({...ft,style:{...ft.style,[Kr.arrowSize.var]:y?`${y}px`:void 0,[Kr.arrowShadowColor.var]:x}},vt),[Y,y,x]),ut=k.exports.useCallback((ft={},vt=null)=>{const ke={...ft.style,position:"relative",transformOrigin:Kr.transformOrigin.varRef};return{ref:vt,...I,...ft,id:K,role:"tooltip",style:ke}},[I,K]);return{isOpen:D,show:ve,hide:Ce,getTriggerProps:pt,getTooltipProps:ut,getTooltipPositionerProps:wt,getArrowProps:G,getArrowInnerProps:te}}var s6="chakra-ui:close-tooltip";function Yye(e,t){return k.exports.useEffect(()=>{const n=F5(e);return n.addEventListener(s6,t),()=>n.removeEventListener(s6,t)},[t,e]),()=>{const n=F5(e),r=U7(e);n.dispatchEvent(new r.CustomEvent(s6))}}var Kye=xe(Ql.div),Zi=Pe((e,t)=>{var F,H;const n=bo("Tooltip",e),r=wn(e),i=N1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:f,portalProps:p,background:m,backgroundColor:v,bgColor:y,motionProps:x,...E}=r,_=(H=(F=m!=null?m:v)!=null?F:f)!=null?H:y;if(_){n.bg=_;const Y=cte(i,"colors",_);n[Kr.arrowBg.var]=Y}const C=qye({...E,direction:i.direction}),T=typeof o=="string"||s;let A;if(T)A=oe.createElement(xe.span,{display:"inline-block",tabIndex:0,...C.getTriggerProps()},o);else{const Y=k.exports.Children.only(o);A=k.exports.cloneElement(Y,C.getTriggerProps(Y.props,Y.ref))}const M=!!l,I=C.getTooltipProps({},t),D=M?Uye(I,["role","id"]):I,B=jye(I,["role","id"]);return a?ee(In,{children:[A,b(Vd,{children:C.isOpen&&oe.createElement(Hh,{...p},oe.createElement(xe.div,{...C.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Kye,{variants:Gye,initial:"exit",animate:"enter",exit:"exit",...x,...D,__css:n,children:[a,M&&oe.createElement(xe.span,{srOnly:!0,...B},l),u&&oe.createElement(xe.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},oe.createElement(xe.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):b(In,{children:o})});Zi.displayName="Tooltip";var Xye=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=b(fF,{environment:a,children:t});return b(eue,{theme:o,cssVarsRoot:s,children:ee(iB,{colorModeManager:n,options:o.config,children:[i?b(x0e,{}):b(S0e,{}),b(nue,{}),r?b(RF,{zIndex:r,children:l}):l]})})};function Zye({children:e,theme:t=jle,toastOptions:n,...r}){return ee(Xye,{theme:t,...r,children:[e,b(Wye,{...n})]})}function As(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(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Id(e){return!!e&&!!e[or]}function ju(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===a3e}(e)||Array.isArray(e)||!!e[WO]||!!(!((t=e.constructor)===null||t===void 0)&&t[WO])||Ck(e)||_k(e))}function Mh(e,t,n){n===void 0&&(n=!1),U1(e)===0?(n?Object.keys:o1)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function U1(e){var t=e[or];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ck(e)?2:_k(e)?3:0}function i1(e,t){return U1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qye(e,t){return U1(e)===2?e.get(t):e[t]}function iV(e,t,n){var r=U1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function oV(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ck(e){return i3e&&e instanceof Map}function _k(e){return o3e&&e instanceof Set}function Zf(e){return e.o||e.t}function kk(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=sV(e);delete t[or];for(var n=o1(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Ek(e,t){return t===void 0&&(t=!1),Pk(e)||Id(e)||!ju(e)||(U1(e)>1&&(e.set=e.add=e.clear=e.delete=Jye),Object.freeze(e),t&&Mh(e,function(n,r){return Ek(r,!0)},!0)),e}function Jye(){As(2)}function Pk(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Hl(e){var t=Y7[e];return t||As(18,e),t}function e3e(e,t){Y7[e]||(Y7[e]=t)}function j7(){return p2}function l6(e,t){t&&(Hl("Patches"),e.u=[],e.s=[],e.v=t)}function H5(e){G7(e),e.p.forEach(t3e),e.p=null}function G7(e){e===p2&&(p2=e.l)}function BO(e){return p2={p:[],l:p2,h:e,m:!0,_:0}}function t3e(e){var t=e[or];t.i===0||t.i===1?t.j():t.O=!0}function u6(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Hl("ES5").S(t,e,r),r?(n[or].P&&(H5(t),As(4)),ju(e)&&(e=V5(t,e),t.l||W5(t,e)),t.u&&Hl("Patches").M(n[or].t,e,t.u,t.s)):e=V5(t,n,[]),H5(t),t.u&&t.v(t.u,t.s),e!==aV?e:void 0}function V5(e,t,n){if(Pk(t))return t;var r=t[or];if(!r)return Mh(t,function(o,a){return zO(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return W5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=kk(r.k):r.o;Mh(r.i===3?new Set(i):i,function(o,a){return zO(e,r,i,o,a,n)}),W5(e,i,!1),n&&e.u&&Hl("Patches").R(r,n,e.u,e.s)}return r.o}function zO(e,t,n,r,i,o){if(Id(i)){var a=V5(e,i,o&&t&&t.i!==3&&!i1(t.D,r)?o.concat(r):void 0);if(iV(n,r,a),!Id(a))return;e.m=!1}if(ju(i)&&!Pk(i)){if(!e.h.F&&e._<1)return;V5(e,i),t&&t.A.l||W5(e,i)}}function W5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&Ek(t,n)}function c6(e,t){var n=e[or];return(n?Zf(n):e)[t]}function $O(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 ad(e){e.P||(e.P=!0,e.l&&ad(e.l))}function d6(e){e.o||(e.o=kk(e.t))}function q7(e,t,n){var r=Ck(t)?Hl("MapSet").N(t,n):_k(t)?Hl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:j7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=g2;a&&(l=[s],u=Vm);var f=Proxy.revocable(l,u),p=f.revoke,m=f.proxy;return s.k=m,s.j=p,m}(t,n):Hl("ES5").J(t,n);return(n?n.A:j7()).p.push(r),r}function n3e(e){return Id(e)||As(22,e),function t(n){if(!ju(n))return n;var r,i=n[or],o=U1(n);if(i){if(!i.P&&(i.i<4||!Hl("ES5").K(i)))return i.t;i.I=!0,r=FO(n,o),i.I=!1}else r=FO(n,o);return Mh(r,function(a,s){i&&Qye(i.t,a)===s||iV(r,a,t(s))}),o===3?new Set(r):r}(e)}function FO(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return kk(e)}function r3e(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[or];return g2.get(l,o)},set:function(l){var u=this[or];g2.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][or];if(!s.P)switch(s.i){case 5:r(s)&&ad(s);break;case 4:n(s)&&ad(s)}}}function n(o){for(var a=o.t,s=o.k,l=o1(s),u=l.length-1;u>=0;u--){var f=l[u];if(f!==or){var p=a[f];if(p===void 0&&!i1(a,f))return!0;var m=s[f],v=m&&m[or];if(v?v.t!==p:!oV(m,p))return!0}}var y=!!a[or];return l.length!==o1(a).length+(y?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l<a.length;l++)if(!a.hasOwnProperty(l))return!0;return!1}var i={};e3e("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(f,p){if(f){for(var m=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(m,""+v,e(v,!0));return m}var y=sV(p);delete y[or];for(var x=o1(y),E=0;E<x.length;E++){var _=x[E];y[_]=e(_,f||!!y[_].enumerable)}return Object.create(Object.getPrototypeOf(p),y)}(s,o),u={i:s?5:4,A:a?a.A:j7(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,or,{value:u,writable:!0}),l},S:function(o,a,s){s?Id(a)&&a[or].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var f=u[or];if(f){var p=f.t,m=f.k,v=f.D,y=f.i;if(y===4)Mh(m,function(T){T!==or&&(p[T]!==void 0||i1(p,T)?v[T]||l(m[T]):(v[T]=!0,ad(f)))}),Mh(p,function(T){m[T]!==void 0||i1(m,T)||(v[T]=!1,ad(f))});else if(y===5){if(r(f)&&(ad(f),v.length=!0),m.length<p.length)for(var x=m.length;x<p.length;x++)v[x]=!1;else for(var E=p.length;E<m.length;E++)v[E]=!0;for(var _=Math.min(m.length,p.length),C=0;C<_;C++)m.hasOwnProperty(C)||(v[C]=!0),v[C]===void 0&&l(m[C])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var HO,p2,Tk=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",i3e=typeof Map<"u",o3e=typeof Set<"u",VO=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",aV=Tk?Symbol.for("immer-nothing"):((HO={})["immer-nothing"]=!0,HO),WO=Tk?Symbol.for("immer-draftable"):"__$immer_draftable",or=Tk?Symbol.for("immer-state"):"__$immer_state",a3e=""+Object.prototype.constructor,o1=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,sV=Object.getOwnPropertyDescriptors||function(e){var t={};return o1(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Y7={},g2={get:function(e,t){if(t===or)return e;var n=Zf(e);if(!i1(n,t))return function(i,o,a){var s,l=$O(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!ju(r)?r:r===c6(e.t,t)?(d6(e),e.o[t]=q7(e.A.h,r,e)):r},has:function(e,t){return t in Zf(e)},ownKeys:function(e){return Reflect.ownKeys(Zf(e))},set:function(e,t,n){var r=$O(Zf(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=c6(Zf(e),t),o=i==null?void 0:i[or];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(oV(n,i)&&(n!==void 0||i1(e.t,t)))return!0;d6(e),ad(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return c6(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,d6(e),ad(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Zf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){As(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){As(12)}},Vm={};Mh(g2,function(e,t){Vm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Vm.deleteProperty=function(e,t){return Vm.set.call(this,e,t,void 0)},Vm.set=function(e,t,n){return g2.set.call(this,e[0],t,n,e[0])};var s3e=function(){function e(n){var r=this;this.g=VO,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=r;return function(x){var E=this;x===void 0&&(x=s);for(var _=arguments.length,C=Array(_>1?_-1:0),T=1;T<_;T++)C[T-1]=arguments[T];return l.produce(x,function(A){var M;return(M=o).call.apply(M,[E,A].concat(C))})}}var u;if(typeof o!="function"&&As(6),a!==void 0&&typeof a!="function"&&As(7),ju(i)){var f=BO(r),p=q7(r,i,void 0),m=!0;try{u=o(p),m=!1}finally{m?H5(f):G7(f)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(x){return l6(f,a),u6(x,f)},function(x){throw H5(f),x}):(l6(f,a),u6(u,f))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===aV&&(u=void 0),r.F&&Ek(u,!0),a){var v=[],y=[];Hl("Patches").M(i,u,v,y),a(v,y)}return u}As(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var f=arguments.length,p=Array(f>1?f-1:0),m=1;m<f;m++)p[m-1]=arguments[m];return r.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(p))})};var a,s,l=r.produce(i,o,function(u,f){a=u,s=f});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,a,s]}):[l,a,s]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){ju(n)||As(8),Id(n)&&(n=n3e(n));var r=BO(this),i=q7(this,n,void 0);return i[or].C=!0,G7(r),i},t.finishDraft=function(n,r){var i=n&&n[or],o=i.A;return l6(o,r),u6(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!VO&&As(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Hl("Patches").$;return Id(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),wa=new s3e,lV=wa.produce;wa.produceWithPatches.bind(wa);wa.setAutoFreeze.bind(wa);wa.setUseProxies.bind(wa);wa.applyPatches.bind(wa);wa.createDraft.bind(wa);wa.finishDraft.bind(wa);function UO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){qF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ji(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. "}var GO=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),f6=function(){return Math.random().toString(36).substring(7).split("").join(".")},U5={INIT:"@@redux/INIT"+f6(),REPLACE:"@@redux/REPLACE"+f6(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+f6()}};function l3e(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Lk(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ji(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ji(1));return n(Lk)(e,t)}if(typeof e!="function")throw new Error(ji(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(ji(3));return o}function p(x){if(typeof x!="function")throw new Error(ji(4));if(l)throw new Error(ji(5));var E=!0;return u(),s.push(x),function(){if(!!E){if(l)throw new Error(ji(6));E=!1,u();var C=s.indexOf(x);s.splice(C,1),a=null}}}function m(x){if(!l3e(x))throw new Error(ji(7));if(typeof x.type>"u")throw new Error(ji(8));if(l)throw new Error(ji(9));try{l=!0,o=i(o,x)}finally{l=!1}for(var E=a=s,_=0;_<E.length;_++){var C=E[_];C()}return x}function v(x){if(typeof x!="function")throw new Error(ji(10));i=x,m({type:U5.REPLACE})}function y(){var x,E=p;return x={subscribe:function(C){if(typeof C!="object"||C===null)throw new Error(ji(11));function T(){C.next&&C.next(f())}T();var A=E(T);return{unsubscribe:A}}},x[GO]=function(){return this},x}return m({type:U5.INIT}),r={dispatch:m,subscribe:p,getState:f,replaceReducer:v},r[GO]=y,r}function u3e(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:U5.INIT});if(typeof r>"u")throw new Error(ji(12));if(typeof n(void 0,{type:U5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ji(13))})}function uV(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),a;try{u3e(n)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var f=!1,p={},m=0;m<o.length;m++){var v=o[m],y=n[v],x=l[v],E=y(x,u);if(typeof E>"u")throw u&&u.type,new Error(ji(14));p[v]=E,f=f||E!==x}return f=f||o.length!==Object.keys(l).length,f?p:l}}function j5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function c3e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(ji(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=j5.apply(void 0,s)(i.dispatch),jO(jO({},i),{},{dispatch:o})}}}var G5="NOT_FOUND";function d3e(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:G5},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function f3e(e,t){var n=[];function r(s){var l=n.findIndex(function(f){return t(s,f.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return G5}function i(s,l){r(s)===G5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var h3e=function(t,n){return t===n};function p3e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function g3e(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?h3e:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=p3e(i),u=a===1?d3e(l):f3e(a,l);function f(){var p=u.get(arguments);if(p===G5){if(p=e.apply(null,arguments),s){var m=u.getEntries(),v=m.find(function(y){return s(y.value,p)});v&&(p=v.value)}u.put(arguments,p)}return p}return f.clearCache=function(){return u.clear()},f}function m3e(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function v3e(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 i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=0,f,p={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(p=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var v=p,y=v.memoizeOptions,x=y===void 0?n:y,E=Array.isArray(x)?x:[x],_=m3e(s),C=e.apply(void 0,[function(){return u++,m.apply(null,arguments)}].concat(E)),T=e(function(){for(var M=[],I=_.length,D=0;D<I;D++)M.push(_[D].apply(null,arguments));return f=C.apply(null,M),f});return Object.assign(T,{resultFunc:m,memoizedResultFunc:C,dependencies:_,lastResult:function(){return f},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),T};return i}var ot=v3e(g3e);function cV(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(a){return function(s){return typeof s=="function"?s(i,o,e):a(s)}}};return t}var dV=cV();dV.withExtraArgument=cV;const qO=dV;var y3e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),b3e=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},q5=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},S3e=Object.defineProperty,x3e=Object.defineProperties,w3e=Object.getOwnPropertyDescriptors,YO=Object.getOwnPropertySymbols,C3e=Object.prototype.hasOwnProperty,_3e=Object.prototype.propertyIsEnumerable,KO=function(e,t,n){return t in e?S3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_d=function(e,t){for(var n in t||(t={}))C3e.call(t,n)&&KO(e,n,t[n]);if(YO)for(var r=0,i=YO(t);r<i.length;r++){var n=i[r];_3e.call(t,n)&&KO(e,n,t[n])}return e},h6=function(e,t){return x3e(e,w3e(t))},k3e=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(u){i(u)}},a=function(l){try{s(n.throw(l))}catch(u){i(u)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},E3e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?j5:j5.apply(null,arguments)};function P3e(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var T3e=function(e){y3e(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,q5([void 0],n[0].concat(this)))):new(t.bind.apply(t,q5([void 0],n.concat(this))))},t}(Array);function K7(e){return ju(e)?lV(e,function(){}):e}function L3e(e){return typeof e=="boolean"}function A3e(){return function(t){return O3e(t)}}function O3e(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new T3e;return n&&(L3e(n)?r.push(qO):r.push(qO.withExtraArgument(n.extraArgument))),r}var R3e=!0;function M3e(e){var t=A3e(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,a=o===void 0?t():o,s=n.devTools,l=s===void 0?!0:s,u=n.preloadedState,f=u===void 0?void 0:u,p=n.enhancers,m=p===void 0?void 0:p,v;if(typeof i=="function")v=i;else if(P3e(i))v=uV(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var y=a;typeof y=="function"&&(y=y(t));var x=c3e.apply(void 0,y),E=j5;l&&(E=E3e(_d({trace:!R3e},typeof l=="object"&&l)));var _=[x];Array.isArray(m)?_=q5([x],m):typeof m=="function"&&(_=m(_));var C=E.apply(void 0,_);return Lk(v,f,C)}function ui(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return _d(_d({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function fV(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function I3e(e){return typeof e=="function"}function D3e(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?fV(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(I3e(e))l=function(){return K7(e())};else{var u=K7(e);l=function(){return u}}function f(p,m){p===void 0&&(p=l());var v=q5([o[m.type]],a.filter(function(y){var x=y.matcher;return x(m)}).map(function(y){var x=y.reducer;return x}));return v.filter(function(y){return!!y}).length===0&&(v=[s]),v.reduce(function(y,x){if(x)if(Id(y)){var E=y,_=x(E,m);return _===void 0?y:_}else{if(ju(y))return lV(y,function(C){return x(C,m)});var _=x(y,m);if(_===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return y},p)}return f.getInitialState=l,f}function N3e(e,t){return e+"/"+t}function TS(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:K7(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(f){var p=r[f],m=N3e(t,f),v,y;"reducer"in p?(v=p.reducer,y=p.prepare):v=p,o[f]=v,a[m]=v,s[f]=y?ui(m,y):ui(m)});function l(){var f=typeof e.extraReducers=="function"?fV(e.extraReducers):[e.extraReducers],p=f[0],m=p===void 0?{}:p,v=f[1],y=v===void 0?[]:v,x=f[2],E=x===void 0?void 0:x,_=_d(_d({},m),a);return D3e(n,function(C){for(var T in _)C.addCase(T,_[T]);for(var A=0,M=y;A<M.length;A++){var I=M[A];C.addMatcher(I.matcher,I.reducer)}E&&C.addDefaultCase(E)})}var u;return{name:t,reducer:function(f,p){return u||(u=l()),u(f,p)},actions:s,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var B3e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",z3e=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=B3e[Math.random()*64|0];return t},$3e=["name","message","stack","code"],p6=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),XO=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),F3e=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=$3e;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}};(function(){function e(t,n,r){var i=ui(t+"/fulfilled",function(u,f,p,m){return{payload:u,meta:h6(_d({},m||{}),{arg:p,requestId:f,requestStatus:"fulfilled"})}}),o=ui(t+"/pending",function(u,f,p){return{payload:void 0,meta:h6(_d({},p||{}),{arg:f,requestId:u,requestStatus:"pending"})}}),a=ui(t+"/rejected",function(u,f,p,m,v){return{payload:m,error:(r&&r.serializeError||F3e)(u||"Rejected"),meta:h6(_d({},v||{}),{arg:p,requestId:f,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(f,p,m){var v=r!=null&&r.idGenerator?r.idGenerator(u):z3e(),y=new s,x,E=new Promise(function(A,M){return y.signal.addEventListener("abort",function(){return M({name:"AbortError",message:x||"Aborted"})})}),_=!1;function C(A){_&&(x=A,y.abort())}var T=function(){return k3e(this,null,function(){var A,M,I,D,B,F;return b3e(this,function(H){switch(H.label){case 0:return H.trys.push([0,4,,5]),D=(A=r==null?void 0:r.condition)==null?void 0:A.call(r,u,{getState:p,extra:m}),V3e(D)?[4,D]:[3,2];case 1:D=H.sent(),H.label=2;case 2:if(D===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,f(o(v,u,(M=r==null?void 0:r.getPendingMeta)==null?void 0:M.call(r,{requestId:v,arg:u},{getState:p,extra:m}))),[4,Promise.race([E,Promise.resolve(n(u,{dispatch:f,getState:p,extra:m,requestId:v,signal:y.signal,abort:C,rejectWithValue:function(Y,te){return new p6(Y,te)},fulfillWithValue:function(Y,te){return new XO(Y,te)}})).then(function(Y){if(Y instanceof p6)throw Y;return Y instanceof XO?i(Y.payload,v,u,Y.meta):i(Y,v,u)})])];case 3:return I=H.sent(),[3,5];case 4:return B=H.sent(),I=B instanceof p6?a(null,v,u,B.payload,B.meta):a(B,v,u),[3,5];case 5:return F=r&&!r.dispatchConditionRejection&&a.match(I)&&I.meta.condition,F||f(I),[2,I]}})})}();return Object.assign(T,{abort:C,requestId:v,arg:u,unwrap:function(){return T.then(H3e)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function H3e(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function V3e(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ak="listenerMiddleware";ui(Ak+"/add");ui(Ak+"/removeAll");ui(Ak+"/remove");var ZO;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);r3e();var Ok="persist:",hV="persist/FLUSH",Rk="persist/REHYDRATE",pV="persist/PAUSE",gV="persist/PERSIST",mV="persist/PURGE",vV="persist/REGISTER",W3e=-1;function O4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O4=function(n){return typeof n}:O4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},O4(e)}function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U3e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(n,!0).forEach(function(r){j3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j3e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G3e(e,t,n,r){r.debug;var i=U3e({},n);return e&&O4(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function q3e(e){var t=e.blacklist||null,n=e.whitelist||null,r=e.transforms||[],i=e.throttle||0,o=e.debounce||0,a="".concat(e.keyPrefix!==void 0?e.keyPrefix:Ok).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(D){return D}:typeof e.serialize=="function"?l=e.serialize:l=Y3e;var u=e.writeFailHandler||null,f={},p={},m=[],v=null,y=null;let x=0;function E(I){clearTimeout(x),x=setTimeout(()=>{Object.keys(I).forEach(function(D){!T(D)||f[D]!==I[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(f).forEach(function(D){I[D]===void 0&&T(D)&&m.indexOf(D)===-1&&f[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(_,i)),f=I},o)}function _(){if(m.length===0){v&&clearInterval(v),v=null;return}var I=m.shift(),D=r.reduce(function(B,F){return F.in(B,I,f)},f[I]);if(D!==void 0)try{p[I]=l(D)}catch(B){console.error("redux-persist/createPersistoid: error serializing state",B)}else delete p[I];m.length===0&&C()}function C(){Object.keys(p).forEach(function(I){f[I]===void 0&&delete p[I]}),y=s.setItem(a,l(p)).catch(A)}function T(I){return!(n&&n.indexOf(I)===-1&&I!=="_persist"||t&&t.indexOf(I)!==-1)}function A(I){u&&u(I)}var M=function(){for(;m.length!==0;)_();return y||Promise.resolve()};return{update:E,flush:M}}function Y3e(e){return JSON.stringify(e)}function K3e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:Ok).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=X3e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,f){return f.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function X3e(e){return JSON.parse(e)}function Z3e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:Ok).concat(e.key);return t.removeItem(n,Q3e)}function Q3e(e){}function JO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ku(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JO(n,!0).forEach(function(r){J3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JO(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J3e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e4e(e,t){if(e==null)return{};var n=t4e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function t4e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var n4e=5e3;function r4e(e,t){var n=e.version!==void 0?e.version:W3e;e.debug;var r=e.stateReconciler===void 0?G3e:e.stateReconciler,i=e.getStoredState||K3e,o=e.timeout!==void 0?e.timeout:n4e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(f,p){var m=f||{},v=m._persist,y=e4e(m,["_persist"]),x=y;if(p.type===gV){var E=!1,_=function(B,F){E||(p.rehydrate(e.key,B,F),E=!0)};if(o&&setTimeout(function(){!E&&_(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=q3e(e)),v)return ku({},t(x,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")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 p.register(e.key),i(e).then(function(D){var B=e.migrate||function(F,H){return Promise.resolve(F)};B(D,n).then(function(F){_(F)},function(F){_(void 0,F)})},function(D){_(void 0,D)}),ku({},t(x,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===mV)return s=!0,p.result(Z3e(e)),ku({},t(x,p),{_persist:v});if(p.type===hV)return p.result(a&&a.flush()),ku({},t(x,p),{_persist:v});if(p.type===pV)l=!0;else if(p.type===Rk){if(s)return ku({},x,{_persist:ku({},v,{rehydrated:!0})});if(p.key===e.key){var C=t(x,p),T=p.payload,A=r!==!1&&T!==void 0?r(T,f,C,e):C,M=ku({},A,{_persist:ku({},v,{rehydrated:!0})});return u(M)}}}if(!v)return t(f,p);var I=t(x,p);return I===x?f:u(ku({},I,{_persist:v}))}}function eR(e){return a4e(e)||o4e(e)||i4e()}function i4e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function o4e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function a4e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function tR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tR(n,!0).forEach(function(r){s4e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s4e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yV={registry:[],bootstrapped:!1},l4e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yV,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case vV:return X7({},t,{registry:[].concat(eR(t.registry),[n.key])});case Rk:var r=t.registry.indexOf(n.key),i=eR(t.registry);return i.splice(r,1),X7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function u4e(e,t,n){var r=n||!1,i=Lk(l4e,yV,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:vV,key:u})},a=function(u,f,p){var m={type:Rk,payload:f,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=X7({},i,{purge:function(){var u=[];return e.dispatch({type:mV,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:hV,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:pV})},persist:function(){e.dispatch({type:gV,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var Mk={},Ik={};Ik.__esModule=!0;Ik.default=f4e;function R4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R4=function(n){return typeof n}:R4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},R4(e)}function g6(){}var c4e={getItem:g6,setItem:g6,removeItem:g6};function d4e(e){if((typeof self>"u"?"undefined":R4(self))!=="object"||!(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(r){return!1}return!0}function f4e(e){var t="".concat(e,"Storage");return d4e(t)?self[t]:c4e}Mk.__esModule=!0;Mk.default=g4e;var h4e=p4e(Ik);function p4e(e){return e&&e.__esModule?e:{default:e}}function g4e(e){var t=(0,h4e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var bV=void 0,m4e=v4e(Mk);function v4e(e){return e&&e.__esModule?e:{default:e}}var y4e=(0,m4e.default)("local");bV=y4e;var SV={},xV={},Ih={};Object.defineProperty(Ih,"__esModule",{value:!0});Ih.PLACEHOLDER_UNDEFINED=Ih.PACKAGE_NAME=void 0;Ih.PACKAGE_NAME="redux-deep-persist";Ih.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var Dk={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(Dk);(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;const t=Ih,n=Dk,r=function(G){return typeof G=="object"&&G!==null};e.isObjectLike=r;const i=function(G){return typeof G=="number"&&G>-1&&G%1==0&&G<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(G){return(0,e.isLength)(G&&G.length)&&Object.prototype.toString.call(G)==="[object Array]"};const o=function(G){return!!G&&typeof G=="object"&&!(0,e.isArray)(G)};e.isPlainObject=o;const a=function(G){return String(~~G)===G&&Number(G)>=0};e.isIntegerString=a;const s=function(G){return Object.prototype.toString.call(G)==="[object String]"};e.isString=s;const l=function(G){return Object.prototype.toString.call(G)==="[object Date]"};e.isDate=l;const u=function(G){return Object.keys(G).length===0};e.isEmpty=u;const f=Object.prototype.hasOwnProperty,p=function(G,z,W){W||(W=new Set([G])),z||(z="");for(const K in G){const Z=z?`${z}.${K}`:K,U=G[K];if((0,e.isObjectLike)(U))return W.has(U)?`${z}.${K}:<Circular>`:(W.add(U),(0,e.getCircularPath)(U,Z,W))}return null};e.getCircularPath=p;const m=function(G){if(!(0,e.isObjectLike)(G))return G;if((0,e.isDate)(G))return new Date(+G);const z=(0,e.isArray)(G)?[]:{};for(const W in G){const K=G[W];z[W]=(0,e._cloneDeep)(K)}return z};e._cloneDeep=m;const v=function(G){const z=(0,e.getCircularPath)(G);if(z)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${z}' of object you're trying to persist: ${G}`);return(0,e._cloneDeep)(G)};e.cloneDeep=v;const y=function(G,z){if(G===z)return{};if(!(0,e.isObjectLike)(G)||!(0,e.isObjectLike)(z))return z;const W=(0,e.cloneDeep)(G),K=(0,e.cloneDeep)(z),Z=Object.keys(W).reduce((Q,ue)=>(f.call(K,ue)||(Q[ue]=void 0),Q),{});if((0,e.isDate)(W)||(0,e.isDate)(K))return W.valueOf()===K.valueOf()?{}:K;const U=Object.keys(K).reduce((Q,ue)=>{if(!f.call(W,ue))return Q[ue]=K[ue],Q;const fe=(0,e.difference)(W[ue],K[ue]);return(0,e.isObjectLike)(fe)&&(0,e.isEmpty)(fe)&&!(0,e.isDate)(fe)?(0,e.isArray)(W)&&!(0,e.isArray)(K)||!(0,e.isArray)(W)&&(0,e.isArray)(K)?K:Q:(Q[ue]=fe,Q)},Z);return delete U._persist,U};e.difference=y;const x=function(G,z){return z.reduce((W,K)=>{if(W){const Z=parseInt(K,10),U=(0,e.isIntegerString)(K)&&Z<0?W.length+Z:K;return(0,e.isString)(W)?W.charAt(U):W[U]}},G)};e.path=x;const E=function(G,z){return[...G].reverse().reduce((Z,U,Q)=>{const ue=(0,e.isIntegerString)(U)?[]:{};return ue[U]=Q===0?z:Z,ue},{})};e.assocPath=E;const _=function(G,z){const W=(0,e.cloneDeep)(G);return z.reduce((K,Z,U)=>(U===z.length-1&&K&&(0,e.isObjectLike)(K)&&delete K[Z],K&&K[Z]),W),W};e.dissocPath=_;const C=function(G,z,...W){if(!W||!W.length)return z;const K=W.shift(),{preservePlaceholder:Z,preserveUndefined:U}=G;if((0,e.isObjectLike)(z)&&(0,e.isObjectLike)(K))for(const Q in K)if((0,e.isObjectLike)(K[Q])&&(0,e.isObjectLike)(z[Q]))z[Q]||(z[Q]={}),C(G,z[Q],K[Q]);else if((0,e.isArray)(z)){let ue=K[Q];const fe=Z?t.PLACEHOLDER_UNDEFINED:void 0;U||(ue=typeof ue<"u"?ue:z[parseInt(Q,10)]),ue=ue!==t.PLACEHOLDER_UNDEFINED?ue:fe,z[parseInt(Q,10)]=ue}else{const ue=K[Q]!==t.PLACEHOLDER_UNDEFINED?K[Q]:void 0;z[Q]=ue}return C(G,z,...W)},T=function(G,z,W){return C({preservePlaceholder:W==null?void 0:W.preservePlaceholder,preserveUndefined:W==null?void 0:W.preserveUndefined},(0,e.cloneDeep)(G),(0,e.cloneDeep)(z))};e.mergeDeep=T;const A=function(G,z=[],W,K,Z){if(!(0,e.isObjectLike)(G))return G;for(const U in G){const Q=G[U],ue=(0,e.isArray)(G),fe=K?K+"."+U:U;Q===null&&(W===n.ConfigType.WHITELIST&&z.indexOf(fe)===-1||W===n.ConfigType.BLACKLIST&&z.indexOf(fe)!==-1)&&ue&&(G[parseInt(U,10)]=void 0),Q===void 0&&Z&&W===n.ConfigType.BLACKLIST&&z.indexOf(fe)===-1&&ue&&(G[parseInt(U,10)]=t.PLACEHOLDER_UNDEFINED),A(Q,z,W,fe,Z)}},M=function(G,z,W,K){const Z=(0,e.cloneDeep)(G);return A(Z,z,W,"",K),Z};e.preserveUndefined=M;const I=function(G,z,W){return W.indexOf(G)===z};e.unique=I;const D=function(G){return G.reduce((z,W)=>{const K=G.filter(Te=>Te===W),Z=G.filter(Te=>(W+".").indexOf(Te+".")===0),{duplicates:U,subsets:Q}=z,ue=K.length>1&&U.indexOf(W)===-1,fe=Z.length>1;return{duplicates:[...U,...ue?K:[]],subsets:[...Q,...fe?Z:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const B=function(G,z,W){const K=W===n.ConfigType.WHITELIST?"whitelist":"blacklist",Z=`${t.PACKAGE_NAME}: incorrect ${K} configuration.`,U=`Check your create${W===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
`;if(!(0,e.isString)(z)||z.length<1)throw new Error(`${Z} Name (key) of reducer is required. ${U}`);if(!G||!G.length)return;const{duplicates:Q,subsets:ue}=(0,e.findDuplicatesAndSubsets)(G);if(Q.length>1)throw new Error(`${Z} Duplicated paths.
${JSON.stringify(Q)}
${U}`);if(ue.length>1)throw new Error(`${Z} You are trying to persist an entire property and also some of its subset.
${JSON.stringify(ue)}
${U}`)};e.singleTransformValidator=B;const F=function(G){if(!(0,e.isArray)(G))return;const z=(G==null?void 0:G.map(W=>W.deepPersistKey).filter(W=>W))||[];if(z.length){const W=z.filter((K,Z)=>z.indexOf(K)!==Z);if(W.length)throw new Error(`${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.
Duplicates: ${JSON.stringify(W)}`)}};e.transformsValidator=F;const H=function({whitelist:G,blacklist:z}){if(G&&G.length&&z&&z.length)throw new Error(`${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(G){const{duplicates:W,subsets:K}=(0,e.findDuplicatesAndSubsets)(G);(0,e.throwError)({duplicates:W,subsets:K},"whitelist")}if(z){const{duplicates:W,subsets:K}=(0,e.findDuplicatesAndSubsets)(z);(0,e.throwError)({duplicates:W,subsets:K},"blacklist")}};e.configValidator=H;const Y=function({duplicates:G,subsets:z},W){if(G.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${W}.
${JSON.stringify(G)}`);if(z.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${W}. You must decide if you want to persist an entire path or its specific subset.
${JSON.stringify(z)}`)};e.throwError=Y;const te=function(G){return(0,e.isArray)(G)?G.filter(e.unique).reduce((z,W)=>{const K=W.split("."),Z=K[0],U=K.slice(1).join(".")||void 0,Q=z.filter(fe=>Object.keys(fe)[0]===Z)[0],ue=Q?Object.values(Q)[0]:void 0;return Q||z.push({[Z]:U?[U]:void 0}),Q&&!ue&&U&&(Q[Z]=[U]),Q&&ue&&U&&ue.push(U),z},[]):[]};e.getRootKeysGroup=te})(xV);(function(e){var t=fo&&fo.__rest||function(p,m){var v={};for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&m.indexOf(y)<0&&(v[y]=p[y]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,y=Object.getOwnPropertySymbols(p);x<y.length;x++)m.indexOf(y[x])<0&&Object.prototype.propertyIsEnumerable.call(p,y[x])&&(v[y[x]]=p[y[x]]);return v};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=xV,r=Ih,i=Dk,o=function(p,m,v={}){const y=v.whitelist||null,x=v.blacklist||null;function E(_){return!!(y&&y.indexOf(_)===-1||x&&x.indexOf(_)!==-1)}return{in:(_,C,T)=>!E(C)&&p?p(_,C,T):_,out:(_,C,T)=>!E(C)&&m?m(_,C,T):_,deepPersistKey:y&&y[0]}},a=(p,m,v,{debug:y,whitelist:x,blacklist:E,transforms:_})=>{if(x||E)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)(_);const C=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const A=(0,n.difference)(m,v);(0,n.isEmpty)(A)||(T=(0,n.mergeDeep)(p,A,{preserveUndefined:!0}),y&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(A)}`)),Object.keys(T).forEach(M=>{if(M!=="_persist"){if((0,n.isObjectLike)(C[M])){C[M]=(0,n.mergeDeep)(C[M],T[M]);return}C[M]=T[M]}})}return y&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),C};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let y=null,x;return m.forEach(E=>{const _=E.split(".");x=(0,n.path)(v,_),typeof x>"u"&&(0,n.isIntegerString)(_[_.length-1])&&(x=r.PLACEHOLDER_UNDEFINED);const C=(0,n.assocPath)(_,x),T=(0,n.isArray)(C)?[]:{};y=(0,n.mergeDeep)(y||T,C,{preservePlaceholder:!0})}),y||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const y=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,_)=>(0,n.dissocPath)(E,_),y)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const y=Object.keys(v)[0],x=v[y];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(y,x):(0,e.createBlacklist)(y,x)})};e.getTransforms=u;const f=p=>{var{key:m,whitelist:v,blacklist:y,storage:x,transforms:E,rootReducer:_}=p,C=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:y});const T=(0,n.getRootKeysGroup)(v),A=(0,n.getRootKeysGroup)(y),M=Object.keys(_(void 0,{type:""})),I=T.map(te=>Object.keys(te)[0]),D=A.map(te=>Object.keys(te)[0]),B=M.filter(te=>I.indexOf(te)===-1&&D.indexOf(te)===-1),F=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),H=(0,e.getTransforms)(i.ConfigType.BLACKLIST,A),Y=(0,n.isArray)(v)?B.map(te=>(0,e.createBlacklist)(te)):[];return Object.assign(Object.assign({},C),{key:m,storage:x,transforms:[...F,...H,...Y,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=f})(SV);const M4=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),b4e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return Nk(r)?r:!1},Nk=e=>Boolean(typeof e=="string"?b4e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),Y5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),S4e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]),Bk=["txt2img","img2img","unifiedCanvas","nodes","postprocess","training"],wV={activeTab:0,cfgScale:7.5,codeformerFidelity:.75,currentTheme:"dark",facetoolStrength:.8,facetoolType:"gfpgan",height:512,hiresFix:!1,img2imgStrength:.75,infillMethod:"patchmatch",isLightBoxOpen:!1,iterations:1,maskPath:"",optionsPanelScrollPosition:0,perlin:0,prompt:"",sampler:"k_lms",seamBlur:16,seamless:!1,seamSize:96,seamSteps:10,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,shouldPinOptionsPanel:!0,shouldRandomizeSeed:!0,shouldRunESRGAN:!1,shouldRunFacetool:!1,shouldShowImageDetails:!1,shouldShowOptionsPanel:!0,showAdvancedOptions:!0,showDualDisplay:!0,steps:50,threshold:0,tileSize:32,upscalingLevel:4,upscalingStrength:.75,variationAmount:.1,width:512,shouldUseCanvasBetaLayout:!1},x4e=wV,CV=TS({name:"options",initialState:x4e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=M4(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:f,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=Y5(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=M4(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),typeof l>"u"?e.threshold=0:e.threshold=l,u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof f=="boolean"&&(e.seamless=f),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:f,seamless:p,hires_fix:m,width:v,height:y,strength:x,fit:E,init_image_path:_,mask_image_path:C}=t.payload.image;n==="img2img"&&(_&&(e.initialImage=_),C&&(e.maskPath=C),x&&(e.img2imgStrength=x),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=Y5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=M4(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),f&&(e.perlin=f),typeof f>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),y&&(e.height=y),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...wV}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=Bk.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload}}}),{clearInitialImage:_V,resetOptionsState:XRe,resetSeed:ZRe,setActiveTab:Do,setAllImageToImageParameters:w4e,setAllParameters:C4e,setAllTextToImageParameters:_4e,setCfgScale:kV,setCodeformerFidelity:EV,setCurrentTheme:k4e,setFacetoolStrength:I4,setFacetoolType:D4,setHeight:PV,setHiresFix:zk,setImg2imgStrength:Z7,setInfillMethod:TV,setInitialImage:j1,setIsLightBoxOpen:Iu,setIterations:E4e,setMaskPath:LV,setOptionsPanelScrollPosition:P4e,setParameter:QRe,setPerlin:AV,setPrompt:LS,setSampler:OV,setSeamBlur:nR,setSeamless:RV,setSeamSize:rR,setSeamSteps:iR,setSeamStrength:oR,setSeed:G2,setSeedWeights:MV,setShouldFitToWidthHeight:IV,setShouldGenerateVariations:T4e,setShouldHoldOptionsPanelOpen:L4e,setShouldLoopback:A4e,setShouldPinOptionsPanel:O4e,setShouldRandomizeSeed:R4e,setShouldRunESRGAN:M4e,setShouldRunFacetool:I4e,setShouldShowImageDetails:DV,setShouldShowOptionsPanel:Du,setShowAdvancedOptions:JRe,setShowDualDisplay:D4e,setSteps:NV,setThreshold:BV,setTileSize:aR,setUpscalingLevel:Q7,setUpscalingStrength:J7,setVariationAmount:N4e,setWidth:zV,setShouldUseCanvasBetaLayout:B4e}=CV.actions,z4e=CV.reducer;var ai={exports:{}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",p=1,m=2,v=4,y=1,x=2,E=1,_=2,C=4,T=8,A=16,M=32,I=64,D=128,B=256,F=512,H=30,Y="...",te=800,G=16,z=1,W=2,K=3,Z=1/0,U=9007199254740991,Q=17976931348623157e292,ue=0/0,fe=4294967295,Te=fe-1,Oe=fe>>>1,ve=[["ary",D],["bind",E],["bindKey",_],["curry",T],["curryRight",A],["flip",F],["partial",M],["partialRight",I],["rearg",B]],Ce="[object Arguments]",Re="[object Array]",Ye="[object AsyncFunction]",Ue="[object Boolean]",pt="[object Date]",wt="[object DOMException]",ut="[object Error]",ft="[object Function]",vt="[object GeneratorFunction]",ke="[object Map]",at="[object Number]",Rt="[object Null]",tt="[object Object]",yt="[object Promise]",dn="[object Proxy]",Pt="[object RegExp]",Yt="[object Set]",fn="[object String]",Cn="[object Symbol]",De="[object Undefined]",nt="[object WeakMap]",tn="[object WeakSet]",Zt="[object ArrayBuffer]",Ee="[object DataView]",Ct="[object Float32Array]",Wt="[object Float64Array]",$e="[object Int8Array]",ct="[object Int16Array]",hn="[object Int32Array]",Be="[object Uint8Array]",gt="[object Uint8ClampedArray]",rt="[object Uint16Array]",Bt="[object Uint32Array]",ln=/\b__p \+= '';/g,wr=/\b(__p \+=) '' \+/g,sr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vr=/&(?:amp|lt|gt|quot|#39);/g,Go=/[&<>"']/g,Q1=RegExp(Vr.source),Pa=RegExp(Go.source),Jh=/<%-([\s\S]+?)%>/g,J1=/<%([\s\S]+?)%>/g,oc=/<%=([\s\S]+?)%>/g,ep=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tp=/^\w*$/,qo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tf=/[\\^$.*+?()[\]{}|]/g,eg=RegExp(tf.source),ac=/^\s+/,nf=/\s/,tg=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,js=/\{\n\/\* \[wrapped with (.+)\] \*/,sc=/,? & /,ng=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,rg=/[()=,{}\[\]\/\s]/,ig=/\\(\\)?/g,og=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,is=/\w*$/,ag=/^[-+]0x[0-9a-f]+$/i,sg=/^0b[01]+$/i,lg=/^\[object .+?Constructor\]$/,ug=/^0o[0-7]+$/i,cg=/^(?:0|[1-9]\d*)$/,dg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gs=/($^)/,fg=/['\n\r\u2028\u2029\\]/g,os="\\ud800-\\udfff",ru="\\u0300-\\u036f",iu="\\ufe20-\\ufe2f",qs="\\u20d0-\\u20ff",ou=ru+iu+qs,np="\\u2700-\\u27bf",lc="a-z\\xdf-\\xf6\\xf8-\\xff",Ys="\\xac\\xb1\\xd7\\xf7",Yo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",On="\\u2000-\\u206f",_n=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ko="A-Z\\xc0-\\xd6\\xd8-\\xde",Or="\\ufe0e\\ufe0f",Qr=Ys+Yo+On+_n,Xo="['\u2019]",Ks="["+os+"]",Jr="["+Qr+"]",as="["+ou+"]",rf="\\d+",au="["+np+"]",ss="["+lc+"]",of="[^"+os+Qr+rf+np+lc+Ko+"]",Ci="\\ud83c[\\udffb-\\udfff]",rp="(?:"+as+"|"+Ci+")",ip="[^"+os+"]",af="(?:\\ud83c[\\udde6-\\uddff]){2}",Xs="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+Ko+"]",Zs="\\u200d",su="(?:"+ss+"|"+of+")",hg="(?:"+So+"|"+of+")",uc="(?:"+Xo+"(?:d|ll|m|re|s|t|ve))?",cc="(?:"+Xo+"(?:D|LL|M|RE|S|T|VE))?",sf=rp+"?",dc="["+Or+"]?",Ta="(?:"+Zs+"(?:"+[ip,af,Xs].join("|")+")"+dc+sf+")*",lf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ut=dc+sf+Ta,op="(?:"+[au,af,Xs].join("|")+")"+Ut,fc="(?:"+[ip+as+"?",as,af,Xs,Ks].join("|")+")",hc=RegExp(Xo,"g"),ap=RegExp(as,"g"),Zo=RegExp(Ci+"(?="+Ci+")|"+fc+Ut,"g"),qn=RegExp([So+"?"+ss+"+"+uc+"(?="+[Jr,So,"$"].join("|")+")",hg+"+"+cc+"(?="+[Jr,So+su,"$"].join("|")+")",So+"?"+su+"+"+uc,So+"+"+cc,lu,lf,rf,op].join("|"),"g"),uf=RegExp("["+Zs+os+ou+Or+"]"),sp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lp=-1,pn={};pn[Ct]=pn[Wt]=pn[$e]=pn[ct]=pn[hn]=pn[Be]=pn[gt]=pn[rt]=pn[Bt]=!0,pn[Ce]=pn[Re]=pn[Zt]=pn[Ue]=pn[Ee]=pn[pt]=pn[ut]=pn[ft]=pn[ke]=pn[at]=pn[tt]=pn[Pt]=pn[Yt]=pn[fn]=pn[nt]=!1;var jt={};jt[Ce]=jt[Re]=jt[Zt]=jt[Ee]=jt[Ue]=jt[pt]=jt[Ct]=jt[Wt]=jt[$e]=jt[ct]=jt[hn]=jt[ke]=jt[at]=jt[tt]=jt[Pt]=jt[Yt]=jt[fn]=jt[Cn]=jt[Be]=jt[gt]=jt[rt]=jt[Bt]=!0,jt[ut]=jt[ft]=jt[nt]=!1;var up={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},pg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},q={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Je=parseInt,$t=typeof fo=="object"&&fo&&fo.Object===Object&&fo,vn=typeof self=="object"&&self&&self.Object===Object&&self,St=$t||vn||Function("return this")(),Ot=t&&!t.nodeType&&t,Gt=Ot&&!0&&e&&!e.nodeType&&e,Wr=Gt&&Gt.exports===Ot,Cr=Wr&&$t.process,yn=function(){try{var ie=Gt&&Gt.require&&Gt.require("util").types;return ie||Cr&&Cr.binding&&Cr.binding("util")}catch(Se){}}(),ei=yn&&yn.isArrayBuffer,xo=yn&&yn.isDate,Qi=yn&&yn.isMap,La=yn&&yn.isRegExp,Qs=yn&&yn.isSet,gg=yn&&yn.isTypedArray;function _i(ie,Se,me){switch(me.length){case 0:return ie.call(Se);case 1:return ie.call(Se,me[0]);case 2:return ie.call(Se,me[0],me[1]);case 3:return ie.call(Se,me[0],me[1],me[2])}return ie.apply(Se,me)}function mg(ie,Se,me,Xe){for(var Lt=-1,nn=ie==null?0:ie.length;++Lt<nn;){var Dt=ie[Lt];Se(Xe,Dt,me(Dt),ie)}return Xe}function Yn(ie,Se){for(var me=-1,Xe=ie==null?0:ie.length;++me<Xe&&Se(ie[me],me,ie)!==!1;);return ie}function wo(ie,Se){for(var me=ie==null?0:ie.length;me--&&Se(ie[me],me,ie)!==!1;);return ie}function Vn(ie,Se){for(var me=-1,Xe=ie==null?0:ie.length;++me<Xe;)if(!Se(ie[me],me,ie))return!1;return!0}function Co(ie,Se){for(var me=-1,Xe=ie==null?0:ie.length,Lt=0,nn=[];++me<Xe;){var Dt=ie[me];Se(Dt,me,ie)&&(nn[Lt++]=Dt)}return nn}function $i(ie,Se){var me=ie==null?0:ie.length;return!!me&&mc(ie,Se,0)>-1}function cp(ie,Se,me){for(var Xe=-1,Lt=ie==null?0:ie.length;++Xe<Lt;)if(me(Se,ie[Xe]))return!0;return!1}function Wn(ie,Se){for(var me=-1,Xe=ie==null?0:ie.length,Lt=Array(Xe);++me<Xe;)Lt[me]=Se(ie[me],me,ie);return Lt}function Aa(ie,Se){for(var me=-1,Xe=Se.length,Lt=ie.length;++me<Xe;)ie[Lt+me]=Se[me];return ie}function df(ie,Se,me,Xe){var Lt=-1,nn=ie==null?0:ie.length;for(Xe&&nn&&(me=ie[++Lt]);++Lt<nn;)me=Se(me,ie[Lt],Lt,ie);return me}function ty(ie,Se,me,Xe){var Lt=ie==null?0:ie.length;for(Xe&&Lt&&(me=ie[--Lt]);Lt--;)me=Se(me,ie[Lt],Lt,ie);return me}function pc(ie,Se){for(var me=-1,Xe=ie==null?0:ie.length;++me<Xe;)if(Se(ie[me],me,ie))return!0;return!1}var ny=Js("length");function gc(ie){return ie.split("")}function vg(ie){return ie.match(ng)||[]}function ry(ie,Se,me){var Xe;return me(ie,function(Lt,nn,Dt){if(Se(Lt,nn,Dt))return Xe=nn,!1}),Xe}function uu(ie,Se,me,Xe){for(var Lt=ie.length,nn=me+(Xe?1:-1);Xe?nn--:++nn<Lt;)if(Se(ie[nn],nn,ie))return nn;return-1}function mc(ie,Se,me){return Se===Se?ly(ie,Se,me):uu(ie,ff,me)}function Qo(ie,Se,me,Xe){for(var Lt=me-1,nn=ie.length;++Lt<nn;)if(Xe(ie[Lt],Se))return Lt;return-1}function ff(ie){return ie!==ie}function hf(ie,Se){var me=ie==null?0:ie.length;return me?gf(ie,Se)/me:ue}function Js(ie){return function(Se){return Se==null?n:Se[ie]}}function pf(ie){return function(Se){return ie==null?n:ie[Se]}}function dp(ie,Se,me,Xe,Lt){return Lt(ie,function(nn,Dt,gn){me=Xe?(Xe=!1,nn):Se(me,nn,Dt,gn)}),me}function iy(ie,Se){var me=ie.length;for(ie.sort(Se);me--;)ie[me]=ie[me].value;return ie}function gf(ie,Se){for(var me,Xe=-1,Lt=ie.length;++Xe<Lt;){var nn=Se(ie[Xe]);nn!==n&&(me=me===n?nn:me+nn)}return me}function mf(ie,Se){for(var me=-1,Xe=Array(ie);++me<ie;)Xe[me]=Se(me);return Xe}function vc(ie,Se){return Wn(Se,function(me){return[me,ie[me]]})}function Ji(ie){return ie&&ie.slice(0,Sg(ie)+1).replace(ac,"")}function Rr(ie){return function(Se){return ie(Se)}}function vf(ie,Se){return Wn(Se,function(me){return ie[me]})}function yc(ie,Se){return ie.has(Se)}function Jo(ie,Se){for(var me=-1,Xe=ie.length;++me<Xe&&mc(Se,ie[me],0)>-1;);return me}function ls(ie,Se){for(var me=ie.length;me--&&mc(Se,ie[me],0)>-1;);return me}function yg(ie,Se){for(var me=ie.length,Xe=0;me--;)ie[me]===Se&&++Xe;return Xe}var oy=pf(up),us=pf(pg);function el(ie){return"\\"+re[ie]}function fp(ie,Se){return ie==null?n:ie[Se]}function cu(ie){return uf.test(ie)}function hp(ie){return sp.test(ie)}function ay(ie){for(var Se,me=[];!(Se=ie.next()).done;)me.push(Se.value);return me}function pp(ie){var Se=-1,me=Array(ie.size);return ie.forEach(function(Xe,Lt){me[++Se]=[Lt,Xe]}),me}function gp(ie,Se){return function(me){return ie(Se(me))}}function ea(ie,Se){for(var me=-1,Xe=ie.length,Lt=0,nn=[];++me<Xe;){var Dt=ie[me];(Dt===Se||Dt===f)&&(ie[me]=f,nn[Lt++]=me)}return nn}function yf(ie){var Se=-1,me=Array(ie.size);return ie.forEach(function(Xe){me[++Se]=Xe}),me}function sy(ie){var Se=-1,me=Array(ie.size);return ie.forEach(function(Xe){me[++Se]=[Xe,Xe]}),me}function ly(ie,Se,me){for(var Xe=me-1,Lt=ie.length;++Xe<Lt;)if(ie[Xe]===Se)return Xe;return-1}function bg(ie,Se,me){for(var Xe=me+1;Xe--;)if(ie[Xe]===Se)return Xe;return Xe}function Oa(ie){return cu(ie)?bc(ie):ny(ie)}function Fi(ie){return cu(ie)?cy(ie):gc(ie)}function Sg(ie){for(var Se=ie.length;Se--&&nf.test(ie.charAt(Se)););return Se}var uy=pf(q);function bc(ie){for(var Se=Zo.lastIndex=0;Zo.test(ie);)++Se;return Se}function cy(ie){return ie.match(Zo)||[]}function bf(ie){return ie.match(qn)||[]}var _o=function ie(Se){Se=Se==null?St:Ra.defaults(St.Object(),Se,Ra.pick(St,cf));var me=Se.Array,Xe=Se.Date,Lt=Se.Error,nn=Se.Function,Dt=Se.Math,gn=Se.Object,Sf=Se.RegExp,xg=Se.String,ki=Se.TypeError,Sc=me.prototype,du=nn.prototype,kn=gn.prototype,rr=Se["__core-js_shared__"],lr=du.toString,an=kn.hasOwnProperty,xf=0,xc=function(){var c=/[^.]+$/.exec(rr&&rr.keys&&rr.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),mp=kn.toString,fi=lr.call(gn),wg=St._,Cg=Sf("^"+lr.call(an).replace(tf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wc=Wr?Se.Buffer:n,ti=Se.Symbol,Ei=Se.Uint8Array,Cc=wc?wc.allocUnsafe:n,_c=gp(gn.getPrototypeOf,gn),vp=gn.create,_g=kn.propertyIsEnumerable,wf=Sc.splice,kg=ti?ti.isConcatSpreadable:n,kc=ti?ti.iterator:n,tl=ti?ti.toStringTag:n,Cf=function(){try{var c=Ht(gn,"defineProperty");return c({},"",{}),c}catch(g){}}(),dy=Se.clearTimeout!==St.clearTimeout&&Se.clearTimeout,fy=Xe&&Xe.now!==St.Date.now&&Xe.now,_f=Se.setTimeout!==St.setTimeout&&Se.setTimeout,kf=Dt.ceil,fu=Dt.floor,Ec=gn.getOwnPropertySymbols,hy=wc?wc.isBuffer:n,yp=Se.isFinite,py=Sc.join,gy=gp(gn.keys,gn),_r=Dt.max,ni=Dt.min,Eg=Xe.now,my=Se.parseInt,Pg=Dt.random,vy=Sc.reverse,Tg=Ht(Se,"DataView"),Pc=Ht(Se,"Map"),Lg=Ht(Se,"Promise"),Tc=Ht(Se,"Set"),Lc=Ht(Se,"WeakMap"),Ac=Ht(gn,"create"),Ef=Lc&&new Lc,cs={},gx=Ff(Tg),mx=Ff(Pc),vx=Ff(Lg),Oc=Ff(Tc),Ag=Ff(Lc),Rc=ti?ti.prototype:n,Pf=Rc?Rc.valueOf:n,Og=Rc?Rc.toString:n;function $(c){if(Tr(c)&&!Nt(c)&&!(c instanceof Kt)){if(c instanceof eo)return c;if(an.call(c,"__wrapped__"))return eP(c)}return new eo(c)}var hu=function(){function c(){}return function(g){if(!dr(g))return{};if(vp)return vp(g);c.prototype=g;var w=new c;return c.prototype=n,w}}();function Tf(){}function eo(c,g){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}$.templateSettings={escape:Jh,evaluate:J1,interpolate:oc,variable:"",imports:{_:$}},$.prototype=Tf.prototype,$.prototype.constructor=$,eo.prototype=hu(Tf.prototype),eo.prototype.constructor=eo;function Kt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fe,this.__views__=[]}function Hi(){var c=new Kt(this.__wrapped__);return c.__actions__=Ai(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Ai(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Ai(this.__views__),c}function Pi(){if(this.__filtered__){var c=new Kt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function yy(){var c=this.__wrapped__.value(),g=this.__dir__,w=Nt(c),O=g<0,N=w?c.length:0,V=GG(0,N,this.__views__),X=V.start,ne=V.end,ce=ne-X,we=O?ne:X-1,_e=this.__iteratees__,Ae=_e.length,Ke=0,mt=ni(ce,this.__takeCount__);if(!w||!O&&N==ce&&mt==ce)return ul(c,this.__actions__);var _t=[];e:for(;ce--&&Ke<mt;){we+=g;for(var Vt=-1,kt=c[we];++Vt<Ae;){var Xt=_e[Vt],rn=Xt.iteratee,ua=Xt.type,oo=rn(kt);if(ua==W)kt=oo;else if(!oo){if(ua==z)continue e;break e}}_t[Ke++]=kt}return _t}Kt.prototype=hu(Tf.prototype),Kt.prototype.constructor=Kt;function nl(c){var g=-1,w=c==null?0:c.length;for(this.clear();++g<w;){var O=c[g];this.set(O[0],O[1])}}function by(){this.__data__=Ac?Ac(null):{},this.size=0}function Sy(c){var g=this.has(c)&&delete this.__data__[c];return this.size-=g?1:0,g}function xy(c){var g=this.__data__;if(Ac){var w=g[c];return w===l?n:w}return an.call(g,c)?g[c]:n}function Rg(c){var g=this.__data__;return Ac?g[c]!==n:an.call(g,c)}function wy(c,g){var w=this.__data__;return this.size+=this.has(c)?0:1,w[c]=Ac&&g===n?l:g,this}nl.prototype.clear=by,nl.prototype.delete=Sy,nl.prototype.get=xy,nl.prototype.has=Rg,nl.prototype.set=wy;function ta(c){var g=-1,w=c==null?0:c.length;for(this.clear();++g<w;){var O=c[g];this.set(O[0],O[1])}}function Cy(){this.__data__=[],this.size=0}function _y(c){var g=this.__data__,w=Mr(g,c);if(w<0)return!1;var O=g.length-1;return w==O?g.pop():wf.call(g,w,1),--this.size,!0}function Mg(c){var g=this.__data__,w=Mr(g,c);return w<0?n:g[w][1]}function Ig(c){return Mr(this.__data__,c)>-1}function ky(c,g){var w=this.__data__,O=Mr(w,c);return O<0?(++this.size,w.push([c,g])):w[O][1]=g,this}ta.prototype.clear=Cy,ta.prototype.delete=_y,ta.prototype.get=Mg,ta.prototype.has=Ig,ta.prototype.set=ky;function na(c){var g=-1,w=c==null?0:c.length;for(this.clear();++g<w;){var O=c[g];this.set(O[0],O[1])}}function bp(){this.size=0,this.__data__={hash:new nl,map:new(Pc||ta),string:new nl}}function yx(c){var g=It(this,c).delete(c);return this.size-=g?1:0,g}function Ey(c){return It(this,c).get(c)}function Dg(c){return It(this,c).has(c)}function Py(c,g){var w=It(this,c),O=w.size;return w.set(c,g),this.size+=w.size==O?0:1,this}na.prototype.clear=bp,na.prototype.delete=yx,na.prototype.get=Ey,na.prototype.has=Dg,na.prototype.set=Py;function Ma(c){var g=-1,w=c==null?0:c.length;for(this.__data__=new na;++g<w;)this.add(c[g])}function ds(c){return this.__data__.set(c,l),this}function bx(c){return this.__data__.has(c)}Ma.prototype.add=Ma.prototype.push=ds,Ma.prototype.has=bx;function kr(c){var g=this.__data__=new ta(c);this.size=g.size}function Ty(){this.__data__=new ta,this.size=0}function Lf(c){var g=this.__data__,w=g.delete(c);return this.size=g.size,w}function Af(c){return this.__data__.get(c)}function Sp(c){return this.__data__.has(c)}function xp(c,g){var w=this.__data__;if(w instanceof ta){var O=w.__data__;if(!Pc||O.length<i-1)return O.push([c,g]),this.size=++w.size,this;w=this.__data__=new na(O)}return w.set(c,g),this.size=w.size,this}kr.prototype.clear=Ty,kr.prototype.delete=Lf,kr.prototype.get=Af,kr.prototype.has=Sp,kr.prototype.set=xp;function Ng(c,g){var w=Nt(c),O=!w&&Hf(c),N=!w&&!O&&Uc(c),V=!w&&!O&&!N&&qp(c),X=w||O||N||V,ne=X?mf(c.length,xg):[],ce=ne.length;for(var we in c)(g||an.call(c,we))&&!(X&&(we=="length"||N&&(we=="offset"||we=="parent")||V&&(we=="buffer"||we=="byteLength"||we=="byteOffset")||yu(we,ce)))&&ne.push(we);return ne}function Mc(c){var g=c.length;return g?c[Rf(0,g-1)]:n}function hi(c,g){return My(Ai(c),pu(g,0,c.length))}function Sx(c){return My(Ai(c))}function Bg(c,g,w){(w!==n&&!vs(c[g],w)||w===n&&!(g in c))&&ra(c,g,w)}function rl(c,g,w){var O=c[g];(!(an.call(c,g)&&vs(O,w))||w===n&&!(g in c))&&ra(c,g,w)}function Mr(c,g){for(var w=c.length;w--;)if(vs(c[w][0],g))return w;return-1}function xx(c,g,w,O){return fs(c,function(N,V,X){g(O,N,w(N),X)}),O}function et(c,g){return c&&Ia(g,yi(g),c)}function Ic(c,g){return c&&Ia(g,Ao(g),c)}function ra(c,g,w){g=="__proto__"&&Cf?Cf(c,g,{configurable:!0,enumerable:!0,value:w,writable:!0}):c[g]=w}function wp(c,g){for(var w=-1,O=g.length,N=me(O),V=c==null;++w<O;)N[w]=V?n:Dx(c,g[w]);return N}function pu(c,g,w){return c===c&&(w!==n&&(c=c<=w?c:w),g!==n&&(c=c>=g?c:g)),c}function pi(c,g,w,O,N,V){var X,ne=g&p,ce=g&m,we=g&v;if(w&&(X=N?w(c,O,N,V):w(c)),X!==n)return X;if(!dr(c))return c;var _e=Nt(c);if(_e){if(X=YG(c),!ne)return Ai(c,X)}else{var Ae=vi(c),Ke=Ae==ft||Ae==vt;if(Uc(c))return dl(c,ne);if(Ae==tt||Ae==Ce||Ke&&!N){if(X=ce||Ke?{}:jE(c),!ne)return ce?Qg(c,Ic(X,c)):To(c,et(X,c))}else{if(!jt[Ae])return N?c:{};X=KG(c,Ae,ne)}}V||(V=new kr);var mt=V.get(c);if(mt)return mt;V.set(c,X),SP(c)?c.forEach(function(kt){X.add(pi(kt,g,w,kt,c,V))}):yP(c)&&c.forEach(function(kt,Xt){X.set(Xt,pi(kt,g,w,Xt,c,V))});var _t=we?ce?ge:sa:ce?Ao:yi,Vt=_e?n:_t(c);return Yn(Vt||c,function(kt,Xt){Vt&&(Xt=kt,kt=c[Xt]),rl(X,Xt,pi(kt,g,w,Xt,c,V))}),X}function Cp(c){var g=yi(c);return function(w){return _p(w,c,g)}}function _p(c,g,w){var O=w.length;if(c==null)return!O;for(c=gn(c);O--;){var N=w[O],V=g[N],X=c[N];if(X===n&&!(N in c)||!V(X))return!1}return!0}function zg(c,g,w){if(typeof c!="function")throw new ki(a);return rm(function(){c.apply(n,w)},g)}function Dc(c,g,w,O){var N=-1,V=$i,X=!0,ne=c.length,ce=[],we=g.length;if(!ne)return ce;w&&(g=Wn(g,Rr(w))),O?(V=cp,X=!1):g.length>=i&&(V=yc,X=!1,g=new Ma(g));e:for(;++N<ne;){var _e=c[N],Ae=w==null?_e:w(_e);if(_e=O||_e!==0?_e:0,X&&Ae===Ae){for(var Ke=we;Ke--;)if(g[Ke]===Ae)continue e;ce.push(_e)}else V(g,Ae,O)||ce.push(_e)}return ce}var fs=Nf(aa),kp=Nf(Eo,!0);function $g(c,g){var w=!0;return fs(c,function(O,N,V){return w=!!g(O,N,V),w}),w}function Er(c,g,w){for(var O=-1,N=c.length;++O<N;){var V=c[O],X=g(V);if(X!=null&&(ne===n?X===X&&!la(X):w(X,ne)))var ne=X,ce=V}return ce}function ia(c,g,w,O){var N=c.length;for(w=zt(w),w<0&&(w=-w>N?0:N+w),O=O===n||O>N?N:zt(O),O<0&&(O+=N),O=w>O?0:wP(O);w<O;)c[w++]=g;return c}function oa(c,g){var w=[];return fs(c,function(O,N,V){g(O,N,V)&&w.push(O)}),w}function Ir(c,g,w,O,N){var V=-1,X=c.length;for(w||(w=ZG),N||(N=[]);++V<X;){var ne=c[V];g>0&&w(ne)?g>1?Ir(ne,g-1,w,O,N):Aa(N,ne):O||(N[N.length]=ne)}return N}var Ep=fl(),ko=fl(!0);function aa(c,g){return c&&Ep(c,g,yi)}function Eo(c,g){return c&&ko(c,g,yi)}function Pp(c,g){return Co(g,function(w){return bu(c[w])})}function il(c,g){g=cl(g,c);for(var w=0,O=g.length;c!=null&&w<O;)c=c[pl(g[w++])];return w&&w==O?c:n}function Fg(c,g,w){var O=g(c);return Nt(c)?O:Aa(O,w(c))}function gi(c){return c==null?c===n?De:Rt:tl&&tl in gn(c)?jr(c):iq(c)}function Tp(c,g){return c>g}function Lp(c,g){return c!=null&&an.call(c,g)}function Ap(c,g){return c!=null&&g in gn(c)}function Op(c,g,w){return c>=ni(g,w)&&c<_r(g,w)}function Nc(c,g,w){for(var O=w?cp:$i,N=c[0].length,V=c.length,X=V,ne=me(V),ce=1/0,we=[];X--;){var _e=c[X];X&&g&&(_e=Wn(_e,Rr(g))),ce=ni(_e.length,ce),ne[X]=!w&&(g||N>=120&&_e.length>=120)?new Ma(X&&_e):n}_e=c[0];var Ae=-1,Ke=ne[0];e:for(;++Ae<N&&we.length<ce;){var mt=_e[Ae],_t=g?g(mt):mt;if(mt=w||mt!==0?mt:0,!(Ke?yc(Ke,_t):O(we,_t,w))){for(X=V;--X;){var Vt=ne[X];if(!(Vt?yc(Vt,_t):O(c[X],_t,w)))continue e}Ke&&Ke.push(_t),we.push(mt)}}return we}function Rp(c,g,w,O){return aa(c,function(N,V,X){g(O,w(N),V,X)}),O}function hs(c,g,w){g=cl(g,c),c=KE(c,g);var O=c==null?c:c[pl(Da(g))];return O==null?n:_i(O,c,w)}function Mp(c){return Tr(c)&&gi(c)==Ce}function Hg(c){return Tr(c)&&gi(c)==Zt}function Vg(c){return Tr(c)&&gi(c)==pt}function Bc(c,g,w,O,N){return c===g?!0:c==null||g==null||!Tr(c)&&!Tr(g)?c!==c&&g!==g:Wg(c,g,w,O,Bc,N)}function Wg(c,g,w,O,N,V){var X=Nt(c),ne=Nt(g),ce=X?Re:vi(c),we=ne?Re:vi(g);ce=ce==Ce?tt:ce,we=we==Ce?tt:we;var _e=ce==tt,Ae=we==tt,Ke=ce==we;if(Ke&&Uc(c)){if(!Uc(g))return!1;X=!0,_e=!1}if(Ke&&!_e)return V||(V=new kr),X||qp(c)?Ze(c,g,w,O,N,V):Un(c,g,ce,w,O,N,V);if(!(w&y)){var mt=_e&&an.call(c,"__wrapped__"),_t=Ae&&an.call(g,"__wrapped__");if(mt||_t){var Vt=mt?c.value():c,kt=_t?g.value():g;return V||(V=new kr),N(Vt,kt,w,O,V)}}return Ke?(V||(V=new kr),Rn(c,g,w,O,N,V)):!1}function wx(c){return Tr(c)&&vi(c)==ke}function zc(c,g,w,O){var N=w.length,V=N,X=!O;if(c==null)return!V;for(c=gn(c);N--;){var ne=w[N];if(X&&ne[2]?ne[1]!==c[ne[0]]:!(ne[0]in c))return!1}for(;++N<V;){ne=w[N];var ce=ne[0],we=c[ce],_e=ne[1];if(X&&ne[2]){if(we===n&&!(ce in c))return!1}else{var Ae=new kr;if(O)var Ke=O(we,_e,ce,c,g,Ae);if(!(Ke===n?Bc(_e,we,y|x,O,Ae):Ke))return!1}}return!0}function Ip(c){if(!dr(c)||JG(c))return!1;var g=bu(c)?Cg:lg;return g.test(Ff(c))}function ur(c){return Tr(c)&&gi(c)==Pt}function Ft(c){return Tr(c)&&vi(c)==Yt}function Ur(c){return Tr(c)&&$y(c.length)&&!!pn[gi(c)]}function cr(c){return typeof c=="function"?c:c==null?Oo:typeof c=="object"?Nt(c)?al(c[0],c[1]):$c(c):MP(c)}function Dr(c){if(!nm(c))return gy(c);var g=[];for(var w in gn(c))an.call(c,w)&&w!="constructor"&&g.push(w);return g}function to(c){if(!dr(c))return rq(c);var g=nm(c),w=[];for(var O in c)O=="constructor"&&(g||!an.call(c,O))||w.push(O);return w}function ol(c,g){return c<g}function Pr(c,g){var w=-1,O=Lo(c)?me(c.length):[];return fs(c,function(N,V,X){O[++w]=g(N,V,X)}),O}function $c(c){var g=At(c);return g.length==1&&g[0][2]?qE(g[0][0],g[0][1]):function(w){return w===c||zc(w,c,g)}}function al(c,g){return kx(c)&&GE(g)?qE(pl(c),g):function(w){var O=Dx(w,c);return O===n&&O===g?Nx(w,c):Bc(g,O,y|x)}}function gu(c,g,w,O,N){c!==g&&Ep(g,function(V,X){if(N||(N=new kr),dr(V))Ug(c,g,X,w,gu,O,N);else{var ne=O?O(Px(c,X),V,X+"",c,g,N):n;ne===n&&(ne=V),Bg(c,X,ne)}},Ao)}function Ug(c,g,w,O,N,V,X){var ne=Px(c,w),ce=Px(g,w),we=X.get(ce);if(we){Bg(c,w,we);return}var _e=V?V(ne,ce,w+"",c,g,X):n,Ae=_e===n;if(Ae){var Ke=Nt(ce),mt=!Ke&&Uc(ce),_t=!Ke&&!mt&&qp(ce);_e=ce,Ke||mt||_t?Nt(ne)?_e=ne:Br(ne)?_e=Ai(ne):mt?(Ae=!1,_e=dl(ce,!0)):_t?(Ae=!1,_e=Ay(ce,!0)):_e=[]:im(ce)||Hf(ce)?(_e=ne,Hf(ne)?_e=CP(ne):(!dr(ne)||bu(ne))&&(_e=jE(ce))):Ae=!1}Ae&&(X.set(ce,_e),N(_e,ce,O,V,X),X.delete(ce)),Bg(c,w,_e)}function Fc(c,g){var w=c.length;if(!!w)return g+=g<0?w:0,yu(g,w)?c[g]:n}function Ti(c,g,w){g.length?g=Wn(g,function(V){return Nt(V)?function(X){return il(X,V.length===1?V[0]:V)}:V}):g=[Oo];var O=-1;g=Wn(g,Rr(Le()));var N=Pr(c,function(V,X,ne){var ce=Wn(g,function(we){return we(V)});return{criteria:ce,index:++O,value:V}});return iy(N,function(V,X){return _x(V,X,w)})}function jg(c,g){return Dp(c,g,function(w,O){return Nx(c,O)})}function Dp(c,g,w){for(var O=-1,N=g.length,V={};++O<N;){var X=g[O],ne=il(c,X);w(ne,X)&&mu(V,cl(X,c),ne)}return V}function ps(c){return function(g){return il(g,c)}}function sl(c,g,w,O){var N=O?Qo:mc,V=-1,X=g.length,ne=c;for(c===g&&(g=Ai(g)),w&&(ne=Wn(c,Rr(w)));++V<X;)for(var ce=0,we=g[V],_e=w?w(we):we;(ce=N(ne,_e,ce,O))>-1;)ne!==c&&wf.call(ne,ce,1),wf.call(c,ce,1);return c}function Of(c,g){for(var w=c?g.length:0,O=w-1;w--;){var N=g[w];if(w==O||N!==V){var V=N;yu(N)?wf.call(c,N,1):Hp(c,N)}}return c}function Rf(c,g){return c+fu(Pg()*(g-c+1))}function ll(c,g,w,O){for(var N=-1,V=_r(kf((g-c)/(w||1)),0),X=me(V);V--;)X[O?V:++N]=c,c+=w;return X}function Hc(c,g){var w="";if(!c||g<1||g>U)return w;do g%2&&(w+=c),g=fu(g/2),g&&(c+=c);while(g);return w}function Tt(c,g){return Tx(YE(c,g,Oo),c+"")}function Np(c){return Mc(Yp(c))}function Mf(c,g){var w=Yp(c);return My(w,pu(g,0,w.length))}function mu(c,g,w,O){if(!dr(c))return c;g=cl(g,c);for(var N=-1,V=g.length,X=V-1,ne=c;ne!=null&&++N<V;){var ce=pl(g[N]),we=w;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return c;if(N!=X){var _e=ne[ce];we=O?O(_e,ce,ne):n,we===n&&(we=dr(_e)?_e:yu(g[N+1])?[]:{})}rl(ne,ce,we),ne=ne[ce]}return c}var If=Ef?function(c,g){return Ef.set(c,g),c}:Oo,Bp=Cf?function(c,g){return Cf(c,"toString",{configurable:!0,enumerable:!1,value:zx(g),writable:!0})}:Oo;function mi(c){return My(Yp(c))}function Nr(c,g,w){var O=-1,N=c.length;g<0&&(g=-g>N?0:N+g),w=w>N?N:w,w<0&&(w+=N),N=g>w?0:w-g>>>0,g>>>=0;for(var V=me(N);++O<N;)V[O]=c[O+g];return V}function Po(c,g){var w;return fs(c,function(O,N,V){return w=g(O,N,V),!w}),!!w}function ri(c,g,w){var O=0,N=c==null?O:c.length;if(typeof g=="number"&&g===g&&N<=Oe){for(;O<N;){var V=O+N>>>1,X=c[V];X!==null&&!la(X)&&(w?X<=g:X<g)?O=V+1:N=V}return N}return zp(c,g,Oo,w)}function zp(c,g,w,O){var N=0,V=c==null?0:c.length;if(V===0)return 0;g=w(g);for(var X=g!==g,ne=g===null,ce=la(g),we=g===n;N<V;){var _e=fu((N+V)/2),Ae=w(c[_e]),Ke=Ae!==n,mt=Ae===null,_t=Ae===Ae,Vt=la(Ae);if(X)var kt=O||_t;else we?kt=_t&&(O||Ke):ne?kt=_t&&Ke&&(O||!mt):ce?kt=_t&&Ke&&!mt&&(O||!Vt):mt||Vt?kt=!1:kt=O?Ae<=g:Ae<g;kt?N=_e+1:V=_e}return ni(V,Te)}function $p(c,g){for(var w=-1,O=c.length,N=0,V=[];++w<O;){var X=c[w],ne=g?g(X):X;if(!w||!vs(ne,ce)){var ce=ne;V[N++]=X===0?0:X}}return V}function Fp(c){return typeof c=="number"?c:la(c)?ue:+c}function no(c){if(typeof c=="string")return c;if(Nt(c))return Wn(c,no)+"";if(la(c))return Og?Og.call(c):"";var g=c+"";return g=="0"&&1/c==-Z?"-0":g}function Li(c,g,w){var O=-1,N=$i,V=c.length,X=!0,ne=[],ce=ne;if(w)X=!1,N=cp;else if(V>=i){var we=g?null:j(c);if(we)return yf(we);X=!1,N=yc,ce=new Ma}else ce=g?[]:ne;e:for(;++O<V;){var _e=c[O],Ae=g?g(_e):_e;if(_e=w||_e!==0?_e:0,X&&Ae===Ae){for(var Ke=ce.length;Ke--;)if(ce[Ke]===Ae)continue e;g&&ce.push(Ae),ne.push(_e)}else N(ce,Ae,w)||(ce!==ne&&ce.push(Ae),ne.push(_e))}return ne}function Hp(c,g){return g=cl(g,c),c=KE(c,g),c==null||delete c[pl(Da(g))]}function Gg(c,g,w,O){return mu(c,g,w(il(c,g)),O)}function Vc(c,g,w,O){for(var N=c.length,V=O?N:-1;(O?V--:++V<N)&&g(c[V],V,c););return w?Nr(c,O?0:V,O?V+1:N):Nr(c,O?V+1:0,O?N:V)}function ul(c,g){var w=c;return w instanceof Kt&&(w=w.value()),df(g,function(O,N){return N.func.apply(N.thisArg,Aa([O],N.args))},w)}function Vp(c,g,w){var O=c.length;if(O<2)return O?Li(c[0]):[];for(var N=-1,V=me(O);++N<O;)for(var X=c[N],ne=-1;++ne<O;)ne!=N&&(V[N]=Dc(V[N]||X,c[ne],g,w));return Li(Ir(V,1),g,w)}function qg(c,g,w){for(var O=-1,N=c.length,V=g.length,X={};++O<N;){var ne=O<V?g[O]:n;w(X,c[O],ne)}return X}function Df(c){return Br(c)?c:[]}function Wc(c){return typeof c=="function"?c:Oo}function cl(c,g){return Nt(c)?c:kx(c,g)?[c]:JE(En(c))}var Cx=Tt;function gs(c,g,w){var O=c.length;return w=w===n?O:w,!g&&w>=O?c:Nr(c,g,w)}var Yg=dy||function(c){return St.clearTimeout(c)};function dl(c,g){if(g)return c.slice();var w=c.length,O=Cc?Cc(w):new c.constructor(w);return c.copy(O),O}function Kg(c){var g=new c.constructor(c.byteLength);return new Ei(g).set(new Ei(c)),g}function vu(c,g){var w=g?Kg(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.byteLength)}function Ly(c){var g=new c.constructor(c.source,is.exec(c));return g.lastIndex=c.lastIndex,g}function Kn(c){return Pf?gn(Pf.call(c)):{}}function Ay(c,g){var w=g?Kg(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.length)}function Xg(c,g){if(c!==g){var w=c!==n,O=c===null,N=c===c,V=la(c),X=g!==n,ne=g===null,ce=g===g,we=la(g);if(!ne&&!we&&!V&&c>g||V&&X&&ce&&!ne&&!we||O&&X&&ce||!w&&ce||!N)return 1;if(!O&&!V&&!we&&c<g||we&&w&&N&&!O&&!V||ne&&w&&N||!X&&N||!ce)return-1}return 0}function _x(c,g,w){for(var O=-1,N=c.criteria,V=g.criteria,X=N.length,ne=w.length;++O<X;){var ce=Xg(N[O],V[O]);if(ce){if(O>=ne)return ce;var we=w[O];return ce*(we=="desc"?-1:1)}}return c.index-g.index}function Oy(c,g,w,O){for(var N=-1,V=c.length,X=w.length,ne=-1,ce=g.length,we=_r(V-X,0),_e=me(ce+we),Ae=!O;++ne<ce;)_e[ne]=g[ne];for(;++N<X;)(Ae||N<V)&&(_e[w[N]]=c[N]);for(;we--;)_e[ne++]=c[N++];return _e}function Zg(c,g,w,O){for(var N=-1,V=c.length,X=-1,ne=w.length,ce=-1,we=g.length,_e=_r(V-ne,0),Ae=me(_e+we),Ke=!O;++N<_e;)Ae[N]=c[N];for(var mt=N;++ce<we;)Ae[mt+ce]=g[ce];for(;++X<ne;)(Ke||N<V)&&(Ae[mt+w[X]]=c[N++]);return Ae}function Ai(c,g){var w=-1,O=c.length;for(g||(g=me(O));++w<O;)g[w]=c[w];return g}function Ia(c,g,w,O){var N=!w;w||(w={});for(var V=-1,X=g.length;++V<X;){var ne=g[V],ce=O?O(w[ne],c[ne],ne,w,c):n;ce===n&&(ce=c[ne]),N?ra(w,ne,ce):rl(w,ne,ce)}return w}function To(c,g){return Ia(c,Qt(c),g)}function Qg(c,g){return Ia(c,ms(c),g)}function Wp(c,g){return function(w,O){var N=Nt(w)?mg:xx,V=g?g():{};return N(w,c,Le(O,2),V)}}function ro(c){return Tt(function(g,w){var O=-1,N=w.length,V=N>1?w[N-1]:n,X=N>2?w[2]:n;for(V=c.length>3&&typeof V=="function"?(N--,V):n,X&&io(w[0],w[1],X)&&(V=N<3?n:V,N=1),g=gn(g);++O<N;){var ne=w[O];ne&&c(g,ne,O,V)}return g})}function Nf(c,g){return function(w,O){if(w==null)return w;if(!Lo(w))return c(w,O);for(var N=w.length,V=g?N:-1,X=gn(w);(g?V--:++V<N)&&O(X[V],V,X)!==!1;);return w}}function fl(c){return function(g,w,O){for(var N=-1,V=gn(g),X=O(g),ne=X.length;ne--;){var ce=X[c?ne:++N];if(w(V[ce],ce,V)===!1)break}return g}}function Up(c,g,w){var O=g&E,N=Bf(c);function V(){var X=this&&this!==St&&this instanceof V?N:c;return X.apply(O?w:this,arguments)}return V}function jp(c){return function(g){g=En(g);var w=cu(g)?Fi(g):n,O=w?w[0]:g.charAt(0),N=w?gs(w,1).join(""):g.slice(1);return O[c]()+N}}function hl(c){return function(g){return df(OP(AP(g).replace(hc,"")),c,"")}}function Bf(c){return function(){var g=arguments;switch(g.length){case 0:return new c;case 1:return new c(g[0]);case 2:return new c(g[0],g[1]);case 3:return new c(g[0],g[1],g[2]);case 4:return new c(g[0],g[1],g[2],g[3]);case 5:return new c(g[0],g[1],g[2],g[3],g[4]);case 6:return new c(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new c(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var w=hu(c.prototype),O=c.apply(w,g);return dr(O)?O:w}}function Ry(c,g,w){var O=Bf(c);function N(){for(var V=arguments.length,X=me(V),ne=V,ce=qe(N);ne--;)X[ne]=arguments[ne];var we=V<3&&X[0]!==ce&&X[V-1]!==ce?[]:ea(X,ce);if(V-=we.length,V<w)return L(c,g,zf,N.placeholder,n,X,we,n,n,w-V);var _e=this&&this!==St&&this instanceof N?O:c;return _i(_e,this,X)}return N}function Jg(c){return function(g,w,O){var N=gn(g);if(!Lo(g)){var V=Le(w,3);g=yi(g),w=function(ne){return V(N[ne],ne,N)}}var X=c(g,w,O);return X>-1?N[V?g[X]:X]:n}}function em(c){return ir(function(g){var w=g.length,O=w,N=eo.prototype.thru;for(c&&g.reverse();O--;){var V=g[O];if(typeof V!="function")throw new ki(a);if(N&&!X&&be(V)=="wrapper")var X=new eo([],!0)}for(O=X?O:w;++O<w;){V=g[O];var ne=be(V),ce=ne=="wrapper"?le(V):n;ce&&Ex(ce[0])&&ce[1]==(D|T|M|B)&&!ce[4].length&&ce[9]==1?X=X[be(ce[0])].apply(X,ce[3]):X=V.length==1&&Ex(V)?X[ne]():X.thru(V)}return function(){var we=arguments,_e=we[0];if(X&&we.length==1&&Nt(_e))return X.plant(_e).value();for(var Ae=0,Ke=w?g[Ae].apply(this,we):_e;++Ae<w;)Ke=g[Ae].call(this,Ke);return Ke}})}function zf(c,g,w,O,N,V,X,ne,ce,we){var _e=g&D,Ae=g&E,Ke=g&_,mt=g&(T|A),_t=g&F,Vt=Ke?n:Bf(c);function kt(){for(var Xt=arguments.length,rn=me(Xt),ua=Xt;ua--;)rn[ua]=arguments[ua];if(mt)var oo=qe(kt),ca=yg(rn,oo);if(O&&(rn=Oy(rn,O,N,mt)),V&&(rn=Zg(rn,V,X,mt)),Xt-=ca,mt&&Xt<we){var zr=ea(rn,oo);return L(c,g,zf,kt.placeholder,w,rn,zr,ne,ce,we-Xt)}var ys=Ae?w:this,xu=Ke?ys[c]:c;return Xt=rn.length,ne?rn=oq(rn,ne):_t&&Xt>1&&rn.reverse(),_e&&ce<Xt&&(rn.length=ce),this&&this!==St&&this instanceof kt&&(xu=Vt||Bf(xu)),xu.apply(ys,rn)}return kt}function $f(c,g){return function(w,O){return Rp(w,c,g(O),{})}}function Gp(c,g){return function(w,O){var N;if(w===n&&O===n)return g;if(w!==n&&(N=w),O!==n){if(N===n)return O;typeof w=="string"||typeof O=="string"?(w=no(w),O=no(O)):(w=Fp(w),O=Fp(O)),N=c(w,O)}return N}}function tm(c){return ir(function(g){return g=Wn(g,Rr(Le())),Tt(function(w){var O=this;return c(g,function(N){return _i(N,O,w)})})})}function d(c,g){g=g===n?" ":no(g);var w=g.length;if(w<2)return w?Hc(g,c):g;var O=Hc(g,kf(c/Oa(g)));return cu(g)?gs(Fi(O),0,c).join(""):O.slice(0,c)}function h(c,g,w,O){var N=g&E,V=Bf(c);function X(){for(var ne=-1,ce=arguments.length,we=-1,_e=O.length,Ae=me(_e+ce),Ke=this&&this!==St&&this instanceof X?V:c;++we<_e;)Ae[we]=O[we];for(;ce--;)Ae[we++]=arguments[++ne];return _i(Ke,N?w:this,Ae)}return X}function S(c){return function(g,w,O){return O&&typeof O!="number"&&io(g,w,O)&&(w=O=n),g=Su(g),w===n?(w=g,g=0):w=Su(w),O=O===n?g<w?1:-1:Su(O),ll(g,w,O,c)}}function P(c){return function(g,w){return typeof g=="string"&&typeof w=="string"||(g=Na(g),w=Na(w)),c(g,w)}}function L(c,g,w,O,N,V,X,ne,ce,we){var _e=g&T,Ae=_e?X:n,Ke=_e?n:X,mt=_e?V:n,_t=_e?n:V;g|=_e?M:I,g&=~(_e?I:M),g&C||(g&=~(E|_));var Vt=[c,g,N,mt,Ae,_t,Ke,ne,ce,we],kt=w.apply(n,Vt);return Ex(c)&&XE(kt,Vt),kt.placeholder=O,ZE(kt,c,g)}function R(c){var g=Dt[c];return function(w,O){if(w=Na(w),O=O==null?0:ni(zt(O),292),O&&yp(w)){var N=(En(w)+"e").split("e"),V=g(N[0]+"e"+(+N[1]+O));return N=(En(V)+"e").split("e"),+(N[0]+"e"+(+N[1]-O))}return g(w)}}var j=Tc&&1/yf(new Tc([,-0]))[1]==Z?function(c){return new Tc(c)}:Hx;function se(c){return function(g){var w=vi(g);return w==ke?pp(g):w==Yt?sy(g):vc(g,c(g))}}function he(c,g,w,O,N,V,X,ne){var ce=g&_;if(!ce&&typeof c!="function")throw new ki(a);var we=O?O.length:0;if(we||(g&=~(M|I),O=N=n),X=X===n?X:_r(zt(X),0),ne=ne===n?ne:zt(ne),we-=N?N.length:0,g&I){var _e=O,Ae=N;O=N=n}var Ke=ce?n:le(c),mt=[c,g,w,O,N,_e,Ae,V,X,ne];if(Ke&&nq(mt,Ke),c=mt[0],g=mt[1],w=mt[2],O=mt[3],N=mt[4],ne=mt[9]=mt[9]===n?ce?0:c.length:_r(mt[9]-we,0),!ne&&g&(T|A)&&(g&=~(T|A)),!g||g==E)var _t=Up(c,g,w);else g==T||g==A?_t=Ry(c,g,ne):(g==M||g==(E|M))&&!N.length?_t=h(c,g,w,O):_t=zf.apply(n,mt);var Vt=Ke?If:XE;return ZE(Vt(_t,mt),c,g)}function ze(c,g,w,O){return c===n||vs(c,kn[w])&&!an.call(O,w)?g:c}function it(c,g,w,O,N,V){return dr(c)&&dr(g)&&(V.set(g,c),gu(c,g,n,it,V),V.delete(g)),c}function Mt(c){return im(c)?n:c}function Ze(c,g,w,O,N,V){var X=w&y,ne=c.length,ce=g.length;if(ne!=ce&&!(X&&ce>ne))return!1;var we=V.get(c),_e=V.get(g);if(we&&_e)return we==g&&_e==c;var Ae=-1,Ke=!0,mt=w&x?new Ma:n;for(V.set(c,g),V.set(g,c);++Ae<ne;){var _t=c[Ae],Vt=g[Ae];if(O)var kt=X?O(Vt,_t,Ae,g,c,V):O(_t,Vt,Ae,c,g,V);if(kt!==n){if(kt)continue;Ke=!1;break}if(mt){if(!pc(g,function(Xt,rn){if(!yc(mt,rn)&&(_t===Xt||N(_t,Xt,w,O,V)))return mt.push(rn)})){Ke=!1;break}}else if(!(_t===Vt||N(_t,Vt,w,O,V))){Ke=!1;break}}return V.delete(c),V.delete(g),Ke}function Un(c,g,w,O,N,V,X){switch(w){case Ee:if(c.byteLength!=g.byteLength||c.byteOffset!=g.byteOffset)return!1;c=c.buffer,g=g.buffer;case Zt:return!(c.byteLength!=g.byteLength||!V(new Ei(c),new Ei(g)));case Ue:case pt:case at:return vs(+c,+g);case ut:return c.name==g.name&&c.message==g.message;case Pt:case fn:return c==g+"";case ke:var ne=pp;case Yt:var ce=O&y;if(ne||(ne=yf),c.size!=g.size&&!ce)return!1;var we=X.get(c);if(we)return we==g;O|=x,X.set(c,g);var _e=Ze(ne(c),ne(g),O,N,V,X);return X.delete(c),_e;case Cn:if(Pf)return Pf.call(c)==Pf.call(g)}return!1}function Rn(c,g,w,O,N,V){var X=w&y,ne=sa(c),ce=ne.length,we=sa(g),_e=we.length;if(ce!=_e&&!X)return!1;for(var Ae=ce;Ae--;){var Ke=ne[Ae];if(!(X?Ke in g:an.call(g,Ke)))return!1}var mt=V.get(c),_t=V.get(g);if(mt&&_t)return mt==g&&_t==c;var Vt=!0;V.set(c,g),V.set(g,c);for(var kt=X;++Ae<ce;){Ke=ne[Ae];var Xt=c[Ke],rn=g[Ke];if(O)var ua=X?O(rn,Xt,Ke,g,c,V):O(Xt,rn,Ke,c,g,V);if(!(ua===n?Xt===rn||N(Xt,rn,w,O,V):ua)){Vt=!1;break}kt||(kt=Ke=="constructor")}if(Vt&&!kt){var oo=c.constructor,ca=g.constructor;oo!=ca&&"constructor"in c&&"constructor"in g&&!(typeof oo=="function"&&oo instanceof oo&&typeof ca=="function"&&ca instanceof ca)&&(Vt=!1)}return V.delete(c),V.delete(g),Vt}function ir(c){return Tx(YE(c,n,rP),c+"")}function sa(c){return Fg(c,yi,Qt)}function ge(c){return Fg(c,Ao,ms)}var le=Ef?function(c){return Ef.get(c)}:Hx;function be(c){for(var g=c.name+"",w=cs[g],O=an.call(cs,g)?w.length:0;O--;){var N=w[O],V=N.func;if(V==null||V==c)return N.name}return g}function qe(c){var g=an.call($,"placeholder")?$:c;return g.placeholder}function Le(){var c=$.iteratee||$x;return c=c===$x?cr:c,arguments.length?c(arguments[0],arguments[1]):c}function It(c,g){var w=c.__data__;return QG(g)?w[typeof g=="string"?"string":"hash"]:w.map}function At(c){for(var g=yi(c),w=g.length;w--;){var O=g[w],N=c[O];g[w]=[O,N,GE(N)]}return g}function Ht(c,g){var w=fp(c,g);return Ip(w)?w:n}function jr(c){var g=an.call(c,tl),w=c[tl];try{c[tl]=n;var O=!0}catch(V){}var N=mp.call(c);return O&&(g?c[tl]=w:delete c[tl]),N}var Qt=Ec?function(c){return c==null?[]:(c=gn(c),Co(Ec(c),function(g){return _g.call(c,g)}))}:Vx,ms=Ec?function(c){for(var g=[];c;)Aa(g,Qt(c)),c=_c(c);return g}:Vx,vi=gi;(Tg&&vi(new Tg(new ArrayBuffer(1)))!=Ee||Pc&&vi(new Pc)!=ke||Lg&&vi(Lg.resolve())!=yt||Tc&&vi(new Tc)!=Yt||Lc&&vi(new Lc)!=nt)&&(vi=function(c){var g=gi(c),w=g==tt?c.constructor:n,O=w?Ff(w):"";if(O)switch(O){case gx:return Ee;case mx:return ke;case vx:return yt;case Oc:return Yt;case Ag:return nt}return g});function GG(c,g,w){for(var O=-1,N=w.length;++O<N;){var V=w[O],X=V.size;switch(V.type){case"drop":c+=X;break;case"dropRight":g-=X;break;case"take":g=ni(g,c+X);break;case"takeRight":c=_r(c,g-X);break}}return{start:c,end:g}}function qG(c){var g=c.match(js);return g?g[1].split(sc):[]}function UE(c,g,w){g=cl(g,c);for(var O=-1,N=g.length,V=!1;++O<N;){var X=pl(g[O]);if(!(V=c!=null&&w(c,X)))break;c=c[X]}return V||++O!=N?V:(N=c==null?0:c.length,!!N&&$y(N)&&yu(X,N)&&(Nt(c)||Hf(c)))}function YG(c){var g=c.length,w=new c.constructor(g);return g&&typeof c[0]=="string"&&an.call(c,"index")&&(w.index=c.index,w.input=c.input),w}function jE(c){return typeof c.constructor=="function"&&!nm(c)?hu(_c(c)):{}}function KG(c,g,w){var O=c.constructor;switch(g){case Zt:return Kg(c);case Ue:case pt:return new O(+c);case Ee:return vu(c,w);case Ct:case Wt:case $e:case ct:case hn:case Be:case gt:case rt:case Bt:return Ay(c,w);case ke:return new O;case at:case fn:return new O(c);case Pt:return Ly(c);case Yt:return new O;case Cn:return Kn(c)}}function XG(c,g){var w=g.length;if(!w)return c;var O=w-1;return g[O]=(w>1?"& ":"")+g[O],g=g.join(w>2?", ":" "),c.replace(tg,`{
/* [wrapped with `+g+`] */
`)}function ZG(c){return Nt(c)||Hf(c)||!!(kg&&c&&c[kg])}function yu(c,g){var w=typeof c;return g=g==null?U:g,!!g&&(w=="number"||w!="symbol"&&cg.test(c))&&c>-1&&c%1==0&&c<g}function io(c,g,w){if(!dr(w))return!1;var O=typeof g;return(O=="number"?Lo(w)&&yu(g,w.length):O=="string"&&g in w)?vs(w[g],c):!1}function kx(c,g){if(Nt(c))return!1;var w=typeof c;return w=="number"||w=="symbol"||w=="boolean"||c==null||la(c)?!0:tp.test(c)||!ep.test(c)||g!=null&&c in gn(g)}function QG(c){var g=typeof c;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?c!=="__proto__":c===null}function Ex(c){var g=be(c),w=$[g];if(typeof w!="function"||!(g in Kt.prototype))return!1;if(c===w)return!0;var O=le(w);return!!O&&c===O[0]}function JG(c){return!!xc&&xc in c}var eq=rr?bu:Wx;function nm(c){var g=c&&c.constructor,w=typeof g=="function"&&g.prototype||kn;return c===w}function GE(c){return c===c&&!dr(c)}function qE(c,g){return function(w){return w==null?!1:w[c]===g&&(g!==n||c in gn(w))}}function tq(c){var g=By(c,function(O){return w.size===u&&w.clear(),O}),w=g.cache;return g}function nq(c,g){var w=c[1],O=g[1],N=w|O,V=N<(E|_|D),X=O==D&&w==T||O==D&&w==B&&c[7].length<=g[8]||O==(D|B)&&g[7].length<=g[8]&&w==T;if(!(V||X))return c;O&E&&(c[2]=g[2],N|=w&E?0:C);var ne=g[3];if(ne){var ce=c[3];c[3]=ce?Oy(ce,ne,g[4]):ne,c[4]=ce?ea(c[3],f):g[4]}return ne=g[5],ne&&(ce=c[5],c[5]=ce?Zg(ce,ne,g[6]):ne,c[6]=ce?ea(c[5],f):g[6]),ne=g[7],ne&&(c[7]=ne),O&D&&(c[8]=c[8]==null?g[8]:ni(c[8],g[8])),c[9]==null&&(c[9]=g[9]),c[0]=g[0],c[1]=N,c}function rq(c){var g=[];if(c!=null)for(var w in gn(c))g.push(w);return g}function iq(c){return mp.call(c)}function YE(c,g,w){return g=_r(g===n?c.length-1:g,0),function(){for(var O=arguments,N=-1,V=_r(O.length-g,0),X=me(V);++N<V;)X[N]=O[g+N];N=-1;for(var ne=me(g+1);++N<g;)ne[N]=O[N];return ne[g]=w(X),_i(c,this,ne)}}function KE(c,g){return g.length<2?c:il(c,Nr(g,0,-1))}function oq(c,g){for(var w=c.length,O=ni(g.length,w),N=Ai(c);O--;){var V=g[O];c[O]=yu(V,w)?N[V]:n}return c}function Px(c,g){if(!(g==="constructor"&&typeof c[g]=="function")&&g!="__proto__")return c[g]}var XE=QE(If),rm=_f||function(c,g){return St.setTimeout(c,g)},Tx=QE(Bp);function ZE(c,g,w){var O=g+"";return Tx(c,XG(O,aq(qG(O),w)))}function QE(c){var g=0,w=0;return function(){var O=Eg(),N=G-(O-w);if(w=O,N>0){if(++g>=te)return arguments[0]}else g=0;return c.apply(n,arguments)}}function My(c,g){var w=-1,O=c.length,N=O-1;for(g=g===n?O:g;++w<g;){var V=Rf(w,N),X=c[V];c[V]=c[w],c[w]=X}return c.length=g,c}var JE=tq(function(c){var g=[];return c.charCodeAt(0)===46&&g.push(""),c.replace(qo,function(w,O,N,V){g.push(N?V.replace(ig,"$1"):O||w)}),g});function pl(c){if(typeof c=="string"||la(c))return c;var g=c+"";return g=="0"&&1/c==-Z?"-0":g}function Ff(c){if(c!=null){try{return lr.call(c)}catch(g){}try{return c+""}catch(g){}}return""}function aq(c,g){return Yn(ve,function(w){var O="_."+w[0];g&w[1]&&!$i(c,O)&&c.push(O)}),c.sort()}function eP(c){if(c instanceof Kt)return c.clone();var g=new eo(c.__wrapped__,c.__chain__);return g.__actions__=Ai(c.__actions__),g.__index__=c.__index__,g.__values__=c.__values__,g}function sq(c,g,w){(w?io(c,g,w):g===n)?g=1:g=_r(zt(g),0);var O=c==null?0:c.length;if(!O||g<1)return[];for(var N=0,V=0,X=me(kf(O/g));N<O;)X[V++]=Nr(c,N,N+=g);return X}function lq(c){for(var g=-1,w=c==null?0:c.length,O=0,N=[];++g<w;){var V=c[g];V&&(N[O++]=V)}return N}function uq(){var c=arguments.length;if(!c)return[];for(var g=me(c-1),w=arguments[0],O=c;O--;)g[O-1]=arguments[O];return Aa(Nt(w)?Ai(w):[w],Ir(g,1))}var cq=Tt(function(c,g){return Br(c)?Dc(c,Ir(g,1,Br,!0)):[]}),dq=Tt(function(c,g){var w=Da(g);return Br(w)&&(w=n),Br(c)?Dc(c,Ir(g,1,Br,!0),Le(w,2)):[]}),fq=Tt(function(c,g){var w=Da(g);return Br(w)&&(w=n),Br(c)?Dc(c,Ir(g,1,Br,!0),n,w):[]});function hq(c,g,w){var O=c==null?0:c.length;return O?(g=w||g===n?1:zt(g),Nr(c,g<0?0:g,O)):[]}function pq(c,g,w){var O=c==null?0:c.length;return O?(g=w||g===n?1:zt(g),g=O-g,Nr(c,0,g<0?0:g)):[]}function gq(c,g){return c&&c.length?Vc(c,Le(g,3),!0,!0):[]}function mq(c,g){return c&&c.length?Vc(c,Le(g,3),!0):[]}function vq(c,g,w,O){var N=c==null?0:c.length;return N?(w&&typeof w!="number"&&io(c,g,w)&&(w=0,O=N),ia(c,g,w,O)):[]}function tP(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=w==null?0:zt(w);return N<0&&(N=_r(O+N,0)),uu(c,Le(g,3),N)}function nP(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=O-1;return w!==n&&(N=zt(w),N=w<0?_r(O+N,0):ni(N,O-1)),uu(c,Le(g,3),N,!0)}function rP(c){var g=c==null?0:c.length;return g?Ir(c,1):[]}function yq(c){var g=c==null?0:c.length;return g?Ir(c,Z):[]}function bq(c,g){var w=c==null?0:c.length;return w?(g=g===n?1:zt(g),Ir(c,g)):[]}function Sq(c){for(var g=-1,w=c==null?0:c.length,O={};++g<w;){var N=c[g];O[N[0]]=N[1]}return O}function iP(c){return c&&c.length?c[0]:n}function xq(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=w==null?0:zt(w);return N<0&&(N=_r(O+N,0)),mc(c,g,N)}function wq(c){var g=c==null?0:c.length;return g?Nr(c,0,-1):[]}var Cq=Tt(function(c){var g=Wn(c,Df);return g.length&&g[0]===c[0]?Nc(g):[]}),_q=Tt(function(c){var g=Da(c),w=Wn(c,Df);return g===Da(w)?g=n:w.pop(),w.length&&w[0]===c[0]?Nc(w,Le(g,2)):[]}),kq=Tt(function(c){var g=Da(c),w=Wn(c,Df);return g=typeof g=="function"?g:n,g&&w.pop(),w.length&&w[0]===c[0]?Nc(w,n,g):[]});function Eq(c,g){return c==null?"":py.call(c,g)}function Da(c){var g=c==null?0:c.length;return g?c[g-1]:n}function Pq(c,g,w){var O=c==null?0:c.length;if(!O)return-1;var N=O;return w!==n&&(N=zt(w),N=N<0?_r(O+N,0):ni(N,O-1)),g===g?bg(c,g,N):uu(c,ff,N,!0)}function Tq(c,g){return c&&c.length?Fc(c,zt(g)):n}var Lq=Tt(oP);function oP(c,g){return c&&c.length&&g&&g.length?sl(c,g):c}function Aq(c,g,w){return c&&c.length&&g&&g.length?sl(c,g,Le(w,2)):c}function Oq(c,g,w){return c&&c.length&&g&&g.length?sl(c,g,n,w):c}var Rq=ir(function(c,g){var w=c==null?0:c.length,O=wp(c,g);return Of(c,Wn(g,function(N){return yu(N,w)?+N:N}).sort(Xg)),O});function Mq(c,g){var w=[];if(!(c&&c.length))return w;var O=-1,N=[],V=c.length;for(g=Le(g,3);++O<V;){var X=c[O];g(X,O,c)&&(w.push(X),N.push(O))}return Of(c,N),w}function Lx(c){return c==null?c:vy.call(c)}function Iq(c,g,w){var O=c==null?0:c.length;return O?(w&&typeof w!="number"&&io(c,g,w)?(g=0,w=O):(g=g==null?0:zt(g),w=w===n?O:zt(w)),Nr(c,g,w)):[]}function Dq(c,g){return ri(c,g)}function Nq(c,g,w){return zp(c,g,Le(w,2))}function Bq(c,g){var w=c==null?0:c.length;if(w){var O=ri(c,g);if(O<w&&vs(c[O],g))return O}return-1}function zq(c,g){return ri(c,g,!0)}function $q(c,g,w){return zp(c,g,Le(w,2),!0)}function Fq(c,g){var w=c==null?0:c.length;if(w){var O=ri(c,g,!0)-1;if(vs(c[O],g))return O}return-1}function Hq(c){return c&&c.length?$p(c):[]}function Vq(c,g){return c&&c.length?$p(c,Le(g,2)):[]}function Wq(c){var g=c==null?0:c.length;return g?Nr(c,1,g):[]}function Uq(c,g,w){return c&&c.length?(g=w||g===n?1:zt(g),Nr(c,0,g<0?0:g)):[]}function jq(c,g,w){var O=c==null?0:c.length;return O?(g=w||g===n?1:zt(g),g=O-g,Nr(c,g<0?0:g,O)):[]}function Gq(c,g){return c&&c.length?Vc(c,Le(g,3),!1,!0):[]}function qq(c,g){return c&&c.length?Vc(c,Le(g,3)):[]}var Yq=Tt(function(c){return Li(Ir(c,1,Br,!0))}),Kq=Tt(function(c){var g=Da(c);return Br(g)&&(g=n),Li(Ir(c,1,Br,!0),Le(g,2))}),Xq=Tt(function(c){var g=Da(c);return g=typeof g=="function"?g:n,Li(Ir(c,1,Br,!0),n,g)});function Zq(c){return c&&c.length?Li(c):[]}function Qq(c,g){return c&&c.length?Li(c,Le(g,2)):[]}function Jq(c,g){return g=typeof g=="function"?g:n,c&&c.length?Li(c,n,g):[]}function Ax(c){if(!(c&&c.length))return[];var g=0;return c=Co(c,function(w){if(Br(w))return g=_r(w.length,g),!0}),mf(g,function(w){return Wn(c,Js(w))})}function aP(c,g){if(!(c&&c.length))return[];var w=Ax(c);return g==null?w:Wn(w,function(O){return _i(g,n,O)})}var eY=Tt(function(c,g){return Br(c)?Dc(c,g):[]}),tY=Tt(function(c){return Vp(Co(c,Br))}),nY=Tt(function(c){var g=Da(c);return Br(g)&&(g=n),Vp(Co(c,Br),Le(g,2))}),rY=Tt(function(c){var g=Da(c);return g=typeof g=="function"?g:n,Vp(Co(c,Br),n,g)}),iY=Tt(Ax);function oY(c,g){return qg(c||[],g||[],rl)}function aY(c,g){return qg(c||[],g||[],mu)}var sY=Tt(function(c){var g=c.length,w=g>1?c[g-1]:n;return w=typeof w=="function"?(c.pop(),w):n,aP(c,w)});function sP(c){var g=$(c);return g.__chain__=!0,g}function lY(c,g){return g(c),c}function Iy(c,g){return g(c)}var uY=ir(function(c){var g=c.length,w=g?c[0]:0,O=this.__wrapped__,N=function(V){return wp(V,c)};return g>1||this.__actions__.length||!(O instanceof Kt)||!yu(w)?this.thru(N):(O=O.slice(w,+w+(g?1:0)),O.__actions__.push({func:Iy,args:[N],thisArg:n}),new eo(O,this.__chain__).thru(function(V){return g&&!V.length&&V.push(n),V}))});function cY(){return sP(this)}function dY(){return new eo(this.value(),this.__chain__)}function fY(){this.__values__===n&&(this.__values__=xP(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function hY(){return this}function pY(c){for(var g,w=this;w instanceof Tf;){var O=eP(w);O.__index__=0,O.__values__=n,g?N.__wrapped__=O:g=O;var N=O;w=w.__wrapped__}return N.__wrapped__=c,g}function gY(){var c=this.__wrapped__;if(c instanceof Kt){var g=c;return this.__actions__.length&&(g=new Kt(this)),g=g.reverse(),g.__actions__.push({func:Iy,args:[Lx],thisArg:n}),new eo(g,this.__chain__)}return this.thru(Lx)}function mY(){return ul(this.__wrapped__,this.__actions__)}var vY=Wp(function(c,g,w){an.call(c,w)?++c[w]:ra(c,w,1)});function yY(c,g,w){var O=Nt(c)?Vn:$g;return w&&io(c,g,w)&&(g=n),O(c,Le(g,3))}function bY(c,g){var w=Nt(c)?Co:oa;return w(c,Le(g,3))}var SY=Jg(tP),xY=Jg(nP);function wY(c,g){return Ir(Dy(c,g),1)}function CY(c,g){return Ir(Dy(c,g),Z)}function _Y(c,g,w){return w=w===n?1:zt(w),Ir(Dy(c,g),w)}function lP(c,g){var w=Nt(c)?Yn:fs;return w(c,Le(g,3))}function uP(c,g){var w=Nt(c)?wo:kp;return w(c,Le(g,3))}var kY=Wp(function(c,g,w){an.call(c,w)?c[w].push(g):ra(c,w,[g])});function EY(c,g,w,O){c=Lo(c)?c:Yp(c),w=w&&!O?zt(w):0;var N=c.length;return w<0&&(w=_r(N+w,0)),Fy(c)?w<=N&&c.indexOf(g,w)>-1:!!N&&mc(c,g,w)>-1}var PY=Tt(function(c,g,w){var O=-1,N=typeof g=="function",V=Lo(c)?me(c.length):[];return fs(c,function(X){V[++O]=N?_i(g,X,w):hs(X,g,w)}),V}),TY=Wp(function(c,g,w){ra(c,w,g)});function Dy(c,g){var w=Nt(c)?Wn:Pr;return w(c,Le(g,3))}function LY(c,g,w,O){return c==null?[]:(Nt(g)||(g=g==null?[]:[g]),w=O?n:w,Nt(w)||(w=w==null?[]:[w]),Ti(c,g,w))}var AY=Wp(function(c,g,w){c[w?0:1].push(g)},function(){return[[],[]]});function OY(c,g,w){var O=Nt(c)?df:dp,N=arguments.length<3;return O(c,Le(g,4),w,N,fs)}function RY(c,g,w){var O=Nt(c)?ty:dp,N=arguments.length<3;return O(c,Le(g,4),w,N,kp)}function MY(c,g){var w=Nt(c)?Co:oa;return w(c,zy(Le(g,3)))}function IY(c){var g=Nt(c)?Mc:Np;return g(c)}function DY(c,g,w){(w?io(c,g,w):g===n)?g=1:g=zt(g);var O=Nt(c)?hi:Mf;return O(c,g)}function NY(c){var g=Nt(c)?Sx:mi;return g(c)}function BY(c){if(c==null)return 0;if(Lo(c))return Fy(c)?Oa(c):c.length;var g=vi(c);return g==ke||g==Yt?c.size:Dr(c).length}function zY(c,g,w){var O=Nt(c)?pc:Po;return w&&io(c,g,w)&&(g=n),O(c,Le(g,3))}var $Y=Tt(function(c,g){if(c==null)return[];var w=g.length;return w>1&&io(c,g[0],g[1])?g=[]:w>2&&io(g[0],g[1],g[2])&&(g=[g[0]]),Ti(c,Ir(g,1),[])}),Ny=fy||function(){return St.Date.now()};function FY(c,g){if(typeof g!="function")throw new ki(a);return c=zt(c),function(){if(--c<1)return g.apply(this,arguments)}}function cP(c,g,w){return g=w?n:g,g=c&&g==null?c.length:g,he(c,D,n,n,n,n,g)}function dP(c,g){var w;if(typeof g!="function")throw new ki(a);return c=zt(c),function(){return--c>0&&(w=g.apply(this,arguments)),c<=1&&(g=n),w}}var Ox=Tt(function(c,g,w){var O=E;if(w.length){var N=ea(w,qe(Ox));O|=M}return he(c,O,g,w,N)}),fP=Tt(function(c,g,w){var O=E|_;if(w.length){var N=ea(w,qe(fP));O|=M}return he(g,O,c,w,N)});function hP(c,g,w){g=w?n:g;var O=he(c,T,n,n,n,n,n,g);return O.placeholder=hP.placeholder,O}function pP(c,g,w){g=w?n:g;var O=he(c,A,n,n,n,n,n,g);return O.placeholder=pP.placeholder,O}function gP(c,g,w){var O,N,V,X,ne,ce,we=0,_e=!1,Ae=!1,Ke=!0;if(typeof c!="function")throw new ki(a);g=Na(g)||0,dr(w)&&(_e=!!w.leading,Ae="maxWait"in w,V=Ae?_r(Na(w.maxWait)||0,g):V,Ke="trailing"in w?!!w.trailing:Ke);function mt(zr){var ys=O,xu=N;return O=N=n,we=zr,X=c.apply(xu,ys),X}function _t(zr){return we=zr,ne=rm(Xt,g),_e?mt(zr):X}function Vt(zr){var ys=zr-ce,xu=zr-we,IP=g-ys;return Ae?ni(IP,V-xu):IP}function kt(zr){var ys=zr-ce,xu=zr-we;return ce===n||ys>=g||ys<0||Ae&&xu>=V}function Xt(){var zr=Ny();if(kt(zr))return rn(zr);ne=rm(Xt,Vt(zr))}function rn(zr){return ne=n,Ke&&O?mt(zr):(O=N=n,X)}function ua(){ne!==n&&Yg(ne),we=0,O=ce=N=ne=n}function oo(){return ne===n?X:rn(Ny())}function ca(){var zr=Ny(),ys=kt(zr);if(O=arguments,N=this,ce=zr,ys){if(ne===n)return _t(ce);if(Ae)return Yg(ne),ne=rm(Xt,g),mt(ce)}return ne===n&&(ne=rm(Xt,g)),X}return ca.cancel=ua,ca.flush=oo,ca}var HY=Tt(function(c,g){return zg(c,1,g)}),VY=Tt(function(c,g,w){return zg(c,Na(g)||0,w)});function WY(c){return he(c,F)}function By(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new ki(a);var w=function(){var O=arguments,N=g?g.apply(this,O):O[0],V=w.cache;if(V.has(N))return V.get(N);var X=c.apply(this,O);return w.cache=V.set(N,X)||V,X};return w.cache=new(By.Cache||na),w}By.Cache=na;function zy(c){if(typeof c!="function")throw new ki(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function UY(c){return dP(2,c)}var jY=Cx(function(c,g){g=g.length==1&&Nt(g[0])?Wn(g[0],Rr(Le())):Wn(Ir(g,1),Rr(Le()));var w=g.length;return Tt(function(O){for(var N=-1,V=ni(O.length,w);++N<V;)O[N]=g[N].call(this,O[N]);return _i(c,this,O)})}),Rx=Tt(function(c,g){var w=ea(g,qe(Rx));return he(c,M,n,g,w)}),mP=Tt(function(c,g){var w=ea(g,qe(mP));return he(c,I,n,g,w)}),GY=ir(function(c,g){return he(c,B,n,n,n,g)});function qY(c,g){if(typeof c!="function")throw new ki(a);return g=g===n?g:zt(g),Tt(c,g)}function YY(c,g){if(typeof c!="function")throw new ki(a);return g=g==null?0:_r(zt(g),0),Tt(function(w){var O=w[g],N=gs(w,0,g);return O&&Aa(N,O),_i(c,this,N)})}function KY(c,g,w){var O=!0,N=!0;if(typeof c!="function")throw new ki(a);return dr(w)&&(O="leading"in w?!!w.leading:O,N="trailing"in w?!!w.trailing:N),gP(c,g,{leading:O,maxWait:g,trailing:N})}function XY(c){return cP(c,1)}function ZY(c,g){return Rx(Wc(g),c)}function QY(){if(!arguments.length)return[];var c=arguments[0];return Nt(c)?c:[c]}function JY(c){return pi(c,v)}function eK(c,g){return g=typeof g=="function"?g:n,pi(c,v,g)}function tK(c){return pi(c,p|v)}function nK(c,g){return g=typeof g=="function"?g:n,pi(c,p|v,g)}function rK(c,g){return g==null||_p(c,g,yi(g))}function vs(c,g){return c===g||c!==c&&g!==g}var iK=P(Tp),oK=P(function(c,g){return c>=g}),Hf=Mp(function(){return arguments}())?Mp:function(c){return Tr(c)&&an.call(c,"callee")&&!_g.call(c,"callee")},Nt=me.isArray,aK=ei?Rr(ei):Hg;function Lo(c){return c!=null&&$y(c.length)&&!bu(c)}function Br(c){return Tr(c)&&Lo(c)}function sK(c){return c===!0||c===!1||Tr(c)&&gi(c)==Ue}var Uc=hy||Wx,lK=xo?Rr(xo):Vg;function uK(c){return Tr(c)&&c.nodeType===1&&!im(c)}function cK(c){if(c==null)return!0;if(Lo(c)&&(Nt(c)||typeof c=="string"||typeof c.splice=="function"||Uc(c)||qp(c)||Hf(c)))return!c.length;var g=vi(c);if(g==ke||g==Yt)return!c.size;if(nm(c))return!Dr(c).length;for(var w in c)if(an.call(c,w))return!1;return!0}function dK(c,g){return Bc(c,g)}function fK(c,g,w){w=typeof w=="function"?w:n;var O=w?w(c,g):n;return O===n?Bc(c,g,n,w):!!O}function Mx(c){if(!Tr(c))return!1;var g=gi(c);return g==ut||g==wt||typeof c.message=="string"&&typeof c.name=="string"&&!im(c)}function hK(c){return typeof c=="number"&&yp(c)}function bu(c){if(!dr(c))return!1;var g=gi(c);return g==ft||g==vt||g==Ye||g==dn}function vP(c){return typeof c=="number"&&c==zt(c)}function $y(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=U}function dr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function Tr(c){return c!=null&&typeof c=="object"}var yP=Qi?Rr(Qi):wx;function pK(c,g){return c===g||zc(c,g,At(g))}function gK(c,g,w){return w=typeof w=="function"?w:n,zc(c,g,At(g),w)}function mK(c){return bP(c)&&c!=+c}function vK(c){if(eq(c))throw new Lt(o);return Ip(c)}function yK(c){return c===null}function bK(c){return c==null}function bP(c){return typeof c=="number"||Tr(c)&&gi(c)==at}function im(c){if(!Tr(c)||gi(c)!=tt)return!1;var g=_c(c);if(g===null)return!0;var w=an.call(g,"constructor")&&g.constructor;return typeof w=="function"&&w instanceof w&&lr.call(w)==fi}var Ix=La?Rr(La):ur;function SK(c){return vP(c)&&c>=-U&&c<=U}var SP=Qs?Rr(Qs):Ft;function Fy(c){return typeof c=="string"||!Nt(c)&&Tr(c)&&gi(c)==fn}function la(c){return typeof c=="symbol"||Tr(c)&&gi(c)==Cn}var qp=gg?Rr(gg):Ur;function xK(c){return c===n}function wK(c){return Tr(c)&&vi(c)==nt}function CK(c){return Tr(c)&&gi(c)==tn}var _K=P(ol),kK=P(function(c,g){return c<=g});function xP(c){if(!c)return[];if(Lo(c))return Fy(c)?Fi(c):Ai(c);if(kc&&c[kc])return ay(c[kc]());var g=vi(c),w=g==ke?pp:g==Yt?yf:Yp;return w(c)}function Su(c){if(!c)return c===0?c:0;if(c=Na(c),c===Z||c===-Z){var g=c<0?-1:1;return g*Q}return c===c?c:0}function zt(c){var g=Su(c),w=g%1;return g===g?w?g-w:g:0}function wP(c){return c?pu(zt(c),0,fe):0}function Na(c){if(typeof c=="number")return c;if(la(c))return ue;if(dr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=dr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Ji(c);var w=sg.test(c);return w||ug.test(c)?Je(c.slice(2),w?2:8):ag.test(c)?ue:+c}function CP(c){return Ia(c,Ao(c))}function EK(c){return c?pu(zt(c),-U,U):c===0?c:0}function En(c){return c==null?"":no(c)}var PK=ro(function(c,g){if(nm(g)||Lo(g)){Ia(g,yi(g),c);return}for(var w in g)an.call(g,w)&&rl(c,w,g[w])}),_P=ro(function(c,g){Ia(g,Ao(g),c)}),Hy=ro(function(c,g,w,O){Ia(g,Ao(g),c,O)}),TK=ro(function(c,g,w,O){Ia(g,yi(g),c,O)}),LK=ir(wp);function AK(c,g){var w=hu(c);return g==null?w:et(w,g)}var OK=Tt(function(c,g){c=gn(c);var w=-1,O=g.length,N=O>2?g[2]:n;for(N&&io(g[0],g[1],N)&&(O=1);++w<O;)for(var V=g[w],X=Ao(V),ne=-1,ce=X.length;++ne<ce;){var we=X[ne],_e=c[we];(_e===n||vs(_e,kn[we])&&!an.call(c,we))&&(c[we]=V[we])}return c}),RK=Tt(function(c){return c.push(n,it),_i(kP,n,c)});function MK(c,g){return ry(c,Le(g,3),aa)}function IK(c,g){return ry(c,Le(g,3),Eo)}function DK(c,g){return c==null?c:Ep(c,Le(g,3),Ao)}function NK(c,g){return c==null?c:ko(c,Le(g,3),Ao)}function BK(c,g){return c&&aa(c,Le(g,3))}function zK(c,g){return c&&Eo(c,Le(g,3))}function $K(c){return c==null?[]:Pp(c,yi(c))}function FK(c){return c==null?[]:Pp(c,Ao(c))}function Dx(c,g,w){var O=c==null?n:il(c,g);return O===n?w:O}function HK(c,g){return c!=null&&UE(c,g,Lp)}function Nx(c,g){return c!=null&&UE(c,g,Ap)}var VK=$f(function(c,g,w){g!=null&&typeof g.toString!="function"&&(g=mp.call(g)),c[g]=w},zx(Oo)),WK=$f(function(c,g,w){g!=null&&typeof g.toString!="function"&&(g=mp.call(g)),an.call(c,g)?c[g].push(w):c[g]=[w]},Le),UK=Tt(hs);function yi(c){return Lo(c)?Ng(c):Dr(c)}function Ao(c){return Lo(c)?Ng(c,!0):to(c)}function jK(c,g){var w={};return g=Le(g,3),aa(c,function(O,N,V){ra(w,g(O,N,V),O)}),w}function GK(c,g){var w={};return g=Le(g,3),aa(c,function(O,N,V){ra(w,N,g(O,N,V))}),w}var qK=ro(function(c,g,w){gu(c,g,w)}),kP=ro(function(c,g,w,O){gu(c,g,w,O)}),YK=ir(function(c,g){var w={};if(c==null)return w;var O=!1;g=Wn(g,function(V){return V=cl(V,c),O||(O=V.length>1),V}),Ia(c,ge(c),w),O&&(w=pi(w,p|m|v,Mt));for(var N=g.length;N--;)Hp(w,g[N]);return w});function KK(c,g){return EP(c,zy(Le(g)))}var XK=ir(function(c,g){return c==null?{}:jg(c,g)});function EP(c,g){if(c==null)return{};var w=Wn(ge(c),function(O){return[O]});return g=Le(g),Dp(c,w,function(O,N){return g(O,N[0])})}function ZK(c,g,w){g=cl(g,c);var O=-1,N=g.length;for(N||(N=1,c=n);++O<N;){var V=c==null?n:c[pl(g[O])];V===n&&(O=N,V=w),c=bu(V)?V.call(c):V}return c}function QK(c,g,w){return c==null?c:mu(c,g,w)}function JK(c,g,w,O){return O=typeof O=="function"?O:n,c==null?c:mu(c,g,w,O)}var PP=se(yi),TP=se(Ao);function eX(c,g,w){var O=Nt(c),N=O||Uc(c)||qp(c);if(g=Le(g,4),w==null){var V=c&&c.constructor;N?w=O?new V:[]:dr(c)?w=bu(V)?hu(_c(c)):{}:w={}}return(N?Yn:aa)(c,function(X,ne,ce){return g(w,X,ne,ce)}),w}function tX(c,g){return c==null?!0:Hp(c,g)}function nX(c,g,w){return c==null?c:Gg(c,g,Wc(w))}function rX(c,g,w,O){return O=typeof O=="function"?O:n,c==null?c:Gg(c,g,Wc(w),O)}function Yp(c){return c==null?[]:vf(c,yi(c))}function iX(c){return c==null?[]:vf(c,Ao(c))}function oX(c,g,w){return w===n&&(w=g,g=n),w!==n&&(w=Na(w),w=w===w?w:0),g!==n&&(g=Na(g),g=g===g?g:0),pu(Na(c),g,w)}function aX(c,g,w){return g=Su(g),w===n?(w=g,g=0):w=Su(w),c=Na(c),Op(c,g,w)}function sX(c,g,w){if(w&&typeof w!="boolean"&&io(c,g,w)&&(g=w=n),w===n&&(typeof g=="boolean"?(w=g,g=n):typeof c=="boolean"&&(w=c,c=n)),c===n&&g===n?(c=0,g=1):(c=Su(c),g===n?(g=c,c=0):g=Su(g)),c>g){var O=c;c=g,g=O}if(w||c%1||g%1){var N=Pg();return ni(c+N*(g-c+pe("1e-"+((N+"").length-1))),g)}return Rf(c,g)}var lX=hl(function(c,g,w){return g=g.toLowerCase(),c+(w?LP(g):g)});function LP(c){return Bx(En(c).toLowerCase())}function AP(c){return c=En(c),c&&c.replace(dg,oy).replace(ap,"")}function uX(c,g,w){c=En(c),g=no(g);var O=c.length;w=w===n?O:pu(zt(w),0,O);var N=w;return w-=g.length,w>=0&&c.slice(w,N)==g}function cX(c){return c=En(c),c&&Pa.test(c)?c.replace(Go,us):c}function dX(c){return c=En(c),c&&eg.test(c)?c.replace(tf,"\\$&"):c}var fX=hl(function(c,g,w){return c+(w?"-":"")+g.toLowerCase()}),hX=hl(function(c,g,w){return c+(w?" ":"")+g.toLowerCase()}),pX=jp("toLowerCase");function gX(c,g,w){c=En(c),g=zt(g);var O=g?Oa(c):0;if(!g||O>=g)return c;var N=(g-O)/2;return d(fu(N),w)+c+d(kf(N),w)}function mX(c,g,w){c=En(c),g=zt(g);var O=g?Oa(c):0;return g&&O<g?c+d(g-O,w):c}function vX(c,g,w){c=En(c),g=zt(g);var O=g?Oa(c):0;return g&&O<g?d(g-O,w)+c:c}function yX(c,g,w){return w||g==null?g=0:g&&(g=+g),my(En(c).replace(ac,""),g||0)}function bX(c,g,w){return(w?io(c,g,w):g===n)?g=1:g=zt(g),Hc(En(c),g)}function SX(){var c=arguments,g=En(c[0]);return c.length<3?g:g.replace(c[1],c[2])}var xX=hl(function(c,g,w){return c+(w?"_":"")+g.toLowerCase()});function wX(c,g,w){return w&&typeof w!="number"&&io(c,g,w)&&(g=w=n),w=w===n?fe:w>>>0,w?(c=En(c),c&&(typeof g=="string"||g!=null&&!Ix(g))&&(g=no(g),!g&&cu(c))?gs(Fi(c),0,w):c.split(g,w)):[]}var CX=hl(function(c,g,w){return c+(w?" ":"")+Bx(g)});function _X(c,g,w){return c=En(c),w=w==null?0:pu(zt(w),0,c.length),g=no(g),c.slice(w,w+g.length)==g}function kX(c,g,w){var O=$.templateSettings;w&&io(c,g,w)&&(g=n),c=En(c),g=Hy({},g,O,ze);var N=Hy({},g.imports,O.imports,ze),V=yi(N),X=vf(N,V),ne,ce,we=0,_e=g.interpolate||Gs,Ae="__p += '",Ke=Sf((g.escape||Gs).source+"|"+_e.source+"|"+(_e===oc?og:Gs).source+"|"+(g.evaluate||Gs).source+"|$","g"),mt="//# sourceURL="+(an.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lp+"]")+`
`;c.replace(Ke,function(kt,Xt,rn,ua,oo,ca){return rn||(rn=ua),Ae+=c.slice(we,ca).replace(fg,el),Xt&&(ne=!0,Ae+=`' +
__e(`+Xt+`) +
'`),oo&&(ce=!0,Ae+=`';
`+oo+`;
__p += '`),rn&&(Ae+=`' +
((__t = (`+rn+`)) == null ? '' : __t) +
'`),we=ca+kt.length,kt}),Ae+=`';
`;var _t=an.call(g,"variable")&&g.variable;if(!_t)Ae=`with (obj) {
`+Ae+`
}
`;else if(rg.test(_t))throw new Lt(s);Ae=(ce?Ae.replace(ln,""):Ae).replace(wr,"$1").replace(sr,"$1;"),Ae="function("+(_t||"obj")+`) {
`+(_t?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ne?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Ae+`return __p
}`;var Vt=RP(function(){return nn(V,mt+"return "+Ae).apply(n,X)});if(Vt.source=Ae,Mx(Vt))throw Vt;return Vt}function EX(c){return En(c).toLowerCase()}function PX(c){return En(c).toUpperCase()}function TX(c,g,w){if(c=En(c),c&&(w||g===n))return Ji(c);if(!c||!(g=no(g)))return c;var O=Fi(c),N=Fi(g),V=Jo(O,N),X=ls(O,N)+1;return gs(O,V,X).join("")}function LX(c,g,w){if(c=En(c),c&&(w||g===n))return c.slice(0,Sg(c)+1);if(!c||!(g=no(g)))return c;var O=Fi(c),N=ls(O,Fi(g))+1;return gs(O,0,N).join("")}function AX(c,g,w){if(c=En(c),c&&(w||g===n))return c.replace(ac,"");if(!c||!(g=no(g)))return c;var O=Fi(c),N=Jo(O,Fi(g));return gs(O,N).join("")}function OX(c,g){var w=H,O=Y;if(dr(g)){var N="separator"in g?g.separator:N;w="length"in g?zt(g.length):w,O="omission"in g?no(g.omission):O}c=En(c);var V=c.length;if(cu(c)){var X=Fi(c);V=X.length}if(w>=V)return c;var ne=w-Oa(O);if(ne<1)return O;var ce=X?gs(X,0,ne).join(""):c.slice(0,ne);if(N===n)return ce+O;if(X&&(ne+=ce.length-ne),Ix(N)){if(c.slice(ne).search(N)){var we,_e=ce;for(N.global||(N=Sf(N.source,En(is.exec(N))+"g")),N.lastIndex=0;we=N.exec(_e);)var Ae=we.index;ce=ce.slice(0,Ae===n?ne:Ae)}}else if(c.indexOf(no(N),ne)!=ne){var Ke=ce.lastIndexOf(N);Ke>-1&&(ce=ce.slice(0,Ke))}return ce+O}function RX(c){return c=En(c),c&&Q1.test(c)?c.replace(Vr,uy):c}var MX=hl(function(c,g,w){return c+(w?" ":"")+g.toUpperCase()}),Bx=jp("toUpperCase");function OP(c,g,w){return c=En(c),g=w?n:g,g===n?hp(c)?bf(c):vg(c):c.match(g)||[]}var RP=Tt(function(c,g){try{return _i(c,n,g)}catch(w){return Mx(w)?w:new Lt(w)}}),IX=ir(function(c,g){return Yn(g,function(w){w=pl(w),ra(c,w,Ox(c[w],c))}),c});function DX(c){var g=c==null?0:c.length,w=Le();return c=g?Wn(c,function(O){if(typeof O[1]!="function")throw new ki(a);return[w(O[0]),O[1]]}):[],Tt(function(O){for(var N=-1;++N<g;){var V=c[N];if(_i(V[0],this,O))return _i(V[1],this,O)}})}function NX(c){return Cp(pi(c,p))}function zx(c){return function(){return c}}function BX(c,g){return c==null||c!==c?g:c}var zX=em(),$X=em(!0);function Oo(c){return c}function $x(c){return cr(typeof c=="function"?c:pi(c,p))}function FX(c){return $c(pi(c,p))}function HX(c,g){return al(c,pi(g,p))}var VX=Tt(function(c,g){return function(w){return hs(w,c,g)}}),WX=Tt(function(c,g){return function(w){return hs(c,w,g)}});function Fx(c,g,w){var O=yi(g),N=Pp(g,O);w==null&&!(dr(g)&&(N.length||!O.length))&&(w=g,g=c,c=this,N=Pp(g,yi(g)));var V=!(dr(w)&&"chain"in w)||!!w.chain,X=bu(c);return Yn(N,function(ne){var ce=g[ne];c[ne]=ce,X&&(c.prototype[ne]=function(){var we=this.__chain__;if(V||we){var _e=c(this.__wrapped__),Ae=_e.__actions__=Ai(this.__actions__);return Ae.push({func:ce,args:arguments,thisArg:c}),_e.__chain__=we,_e}return ce.apply(c,Aa([this.value()],arguments))})}),c}function UX(){return St._===this&&(St._=wg),this}function Hx(){}function jX(c){return c=zt(c),Tt(function(g){return Fc(g,c)})}var GX=tm(Wn),qX=tm(Vn),YX=tm(pc);function MP(c){return kx(c)?Js(pl(c)):ps(c)}function KX(c){return function(g){return c==null?n:il(c,g)}}var XX=S(),ZX=S(!0);function Vx(){return[]}function Wx(){return!1}function QX(){return{}}function JX(){return""}function eZ(){return!0}function tZ(c,g){if(c=zt(c),c<1||c>U)return[];var w=fe,O=ni(c,fe);g=Le(g),c-=fe;for(var N=mf(O,g);++w<c;)g(w);return N}function nZ(c){return Nt(c)?Wn(c,pl):la(c)?[c]:Ai(JE(En(c)))}function rZ(c){var g=++xf;return En(c)+g}var iZ=Gp(function(c,g){return c+g},0),oZ=R("ceil"),aZ=Gp(function(c,g){return c/g},1),sZ=R("floor");function lZ(c){return c&&c.length?Er(c,Oo,Tp):n}function uZ(c,g){return c&&c.length?Er(c,Le(g,2),Tp):n}function cZ(c){return hf(c,Oo)}function dZ(c,g){return hf(c,Le(g,2))}function fZ(c){return c&&c.length?Er(c,Oo,ol):n}function hZ(c,g){return c&&c.length?Er(c,Le(g,2),ol):n}var pZ=Gp(function(c,g){return c*g},1),gZ=R("round"),mZ=Gp(function(c,g){return c-g},0);function vZ(c){return c&&c.length?gf(c,Oo):0}function yZ(c,g){return c&&c.length?gf(c,Le(g,2)):0}return $.after=FY,$.ary=cP,$.assign=PK,$.assignIn=_P,$.assignInWith=Hy,$.assignWith=TK,$.at=LK,$.before=dP,$.bind=Ox,$.bindAll=IX,$.bindKey=fP,$.castArray=QY,$.chain=sP,$.chunk=sq,$.compact=lq,$.concat=uq,$.cond=DX,$.conforms=NX,$.constant=zx,$.countBy=vY,$.create=AK,$.curry=hP,$.curryRight=pP,$.debounce=gP,$.defaults=OK,$.defaultsDeep=RK,$.defer=HY,$.delay=VY,$.difference=cq,$.differenceBy=dq,$.differenceWith=fq,$.drop=hq,$.dropRight=pq,$.dropRightWhile=gq,$.dropWhile=mq,$.fill=vq,$.filter=bY,$.flatMap=wY,$.flatMapDeep=CY,$.flatMapDepth=_Y,$.flatten=rP,$.flattenDeep=yq,$.flattenDepth=bq,$.flip=WY,$.flow=zX,$.flowRight=$X,$.fromPairs=Sq,$.functions=$K,$.functionsIn=FK,$.groupBy=kY,$.initial=wq,$.intersection=Cq,$.intersectionBy=_q,$.intersectionWith=kq,$.invert=VK,$.invertBy=WK,$.invokeMap=PY,$.iteratee=$x,$.keyBy=TY,$.keys=yi,$.keysIn=Ao,$.map=Dy,$.mapKeys=jK,$.mapValues=GK,$.matches=FX,$.matchesProperty=HX,$.memoize=By,$.merge=qK,$.mergeWith=kP,$.method=VX,$.methodOf=WX,$.mixin=Fx,$.negate=zy,$.nthArg=jX,$.omit=YK,$.omitBy=KK,$.once=UY,$.orderBy=LY,$.over=GX,$.overArgs=jY,$.overEvery=qX,$.overSome=YX,$.partial=Rx,$.partialRight=mP,$.partition=AY,$.pick=XK,$.pickBy=EP,$.property=MP,$.propertyOf=KX,$.pull=Lq,$.pullAll=oP,$.pullAllBy=Aq,$.pullAllWith=Oq,$.pullAt=Rq,$.range=XX,$.rangeRight=ZX,$.rearg=GY,$.reject=MY,$.remove=Mq,$.rest=qY,$.reverse=Lx,$.sampleSize=DY,$.set=QK,$.setWith=JK,$.shuffle=NY,$.slice=Iq,$.sortBy=$Y,$.sortedUniq=Hq,$.sortedUniqBy=Vq,$.split=wX,$.spread=YY,$.tail=Wq,$.take=Uq,$.takeRight=jq,$.takeRightWhile=Gq,$.takeWhile=qq,$.tap=lY,$.throttle=KY,$.thru=Iy,$.toArray=xP,$.toPairs=PP,$.toPairsIn=TP,$.toPath=nZ,$.toPlainObject=CP,$.transform=eX,$.unary=XY,$.union=Yq,$.unionBy=Kq,$.unionWith=Xq,$.uniq=Zq,$.uniqBy=Qq,$.uniqWith=Jq,$.unset=tX,$.unzip=Ax,$.unzipWith=aP,$.update=nX,$.updateWith=rX,$.values=Yp,$.valuesIn=iX,$.without=eY,$.words=OP,$.wrap=ZY,$.xor=tY,$.xorBy=nY,$.xorWith=rY,$.zip=iY,$.zipObject=oY,$.zipObjectDeep=aY,$.zipWith=sY,$.entries=PP,$.entriesIn=TP,$.extend=_P,$.extendWith=Hy,Fx($,$),$.add=iZ,$.attempt=RP,$.camelCase=lX,$.capitalize=LP,$.ceil=oZ,$.clamp=oX,$.clone=JY,$.cloneDeep=tK,$.cloneDeepWith=nK,$.cloneWith=eK,$.conformsTo=rK,$.deburr=AP,$.defaultTo=BX,$.divide=aZ,$.endsWith=uX,$.eq=vs,$.escape=cX,$.escapeRegExp=dX,$.every=yY,$.find=SY,$.findIndex=tP,$.findKey=MK,$.findLast=xY,$.findLastIndex=nP,$.findLastKey=IK,$.floor=sZ,$.forEach=lP,$.forEachRight=uP,$.forIn=DK,$.forInRight=NK,$.forOwn=BK,$.forOwnRight=zK,$.get=Dx,$.gt=iK,$.gte=oK,$.has=HK,$.hasIn=Nx,$.head=iP,$.identity=Oo,$.includes=EY,$.indexOf=xq,$.inRange=aX,$.invoke=UK,$.isArguments=Hf,$.isArray=Nt,$.isArrayBuffer=aK,$.isArrayLike=Lo,$.isArrayLikeObject=Br,$.isBoolean=sK,$.isBuffer=Uc,$.isDate=lK,$.isElement=uK,$.isEmpty=cK,$.isEqual=dK,$.isEqualWith=fK,$.isError=Mx,$.isFinite=hK,$.isFunction=bu,$.isInteger=vP,$.isLength=$y,$.isMap=yP,$.isMatch=pK,$.isMatchWith=gK,$.isNaN=mK,$.isNative=vK,$.isNil=bK,$.isNull=yK,$.isNumber=bP,$.isObject=dr,$.isObjectLike=Tr,$.isPlainObject=im,$.isRegExp=Ix,$.isSafeInteger=SK,$.isSet=SP,$.isString=Fy,$.isSymbol=la,$.isTypedArray=qp,$.isUndefined=xK,$.isWeakMap=wK,$.isWeakSet=CK,$.join=Eq,$.kebabCase=fX,$.last=Da,$.lastIndexOf=Pq,$.lowerCase=hX,$.lowerFirst=pX,$.lt=_K,$.lte=kK,$.max=lZ,$.maxBy=uZ,$.mean=cZ,$.meanBy=dZ,$.min=fZ,$.minBy=hZ,$.stubArray=Vx,$.stubFalse=Wx,$.stubObject=QX,$.stubString=JX,$.stubTrue=eZ,$.multiply=pZ,$.nth=Tq,$.noConflict=UX,$.noop=Hx,$.now=Ny,$.pad=gX,$.padEnd=mX,$.padStart=vX,$.parseInt=yX,$.random=sX,$.reduce=OY,$.reduceRight=RY,$.repeat=bX,$.replace=SX,$.result=ZK,$.round=gZ,$.runInContext=ie,$.sample=IY,$.size=BY,$.snakeCase=xX,$.some=zY,$.sortedIndex=Dq,$.sortedIndexBy=Nq,$.sortedIndexOf=Bq,$.sortedLastIndex=zq,$.sortedLastIndexBy=$q,$.sortedLastIndexOf=Fq,$.startCase=CX,$.startsWith=_X,$.subtract=mZ,$.sum=vZ,$.sumBy=yZ,$.template=kX,$.times=tZ,$.toFinite=Su,$.toInteger=zt,$.toLength=wP,$.toLower=EX,$.toNumber=Na,$.toSafeInteger=EK,$.toString=En,$.toUpper=PX,$.trim=TX,$.trimEnd=LX,$.trimStart=AX,$.truncate=OX,$.unescape=RX,$.uniqueId=rZ,$.upperCase=MX,$.upperFirst=Bx,$.each=lP,$.eachRight=uP,$.first=iP,Fx($,function(){var c={};return aa($,function(g,w){an.call($.prototype,w)||(c[w]=g)}),c}(),{chain:!1}),$.VERSION=r,Yn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){$[c].placeholder=$}),Yn(["drop","take"],function(c,g){Kt.prototype[c]=function(w){w=w===n?1:_r(zt(w),0);var O=this.__filtered__&&!g?new Kt(this):this.clone();return O.__filtered__?O.__takeCount__=ni(w,O.__takeCount__):O.__views__.push({size:ni(w,fe),type:c+(O.__dir__<0?"Right":"")}),O},Kt.prototype[c+"Right"]=function(w){return this.reverse()[c](w).reverse()}}),Yn(["filter","map","takeWhile"],function(c,g){var w=g+1,O=w==z||w==K;Kt.prototype[c]=function(N){var V=this.clone();return V.__iteratees__.push({iteratee:Le(N,3),type:w}),V.__filtered__=V.__filtered__||O,V}}),Yn(["head","last"],function(c,g){var w="take"+(g?"Right":"");Kt.prototype[c]=function(){return this[w](1).value()[0]}}),Yn(["initial","tail"],function(c,g){var w="drop"+(g?"":"Right");Kt.prototype[c]=function(){return this.__filtered__?new Kt(this):this[w](1)}}),Kt.prototype.compact=function(){return this.filter(Oo)},Kt.prototype.find=function(c){return this.filter(c).head()},Kt.prototype.findLast=function(c){return this.reverse().find(c)},Kt.prototype.invokeMap=Tt(function(c,g){return typeof c=="function"?new Kt(this):this.map(function(w){return hs(w,c,g)})}),Kt.prototype.reject=function(c){return this.filter(zy(Le(c)))},Kt.prototype.slice=function(c,g){c=zt(c);var w=this;return w.__filtered__&&(c>0||g<0)?new Kt(w):(c<0?w=w.takeRight(-c):c&&(w=w.drop(c)),g!==n&&(g=zt(g),w=g<0?w.dropRight(-g):w.take(g-c)),w)},Kt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Kt.prototype.toArray=function(){return this.take(fe)},aa(Kt.prototype,function(c,g){var w=/^(?:filter|find|map|reject)|While$/.test(g),O=/^(?:head|last)$/.test(g),N=$[O?"take"+(g=="last"?"Right":""):g],V=O||/^find/.test(g);!N||($.prototype[g]=function(){var X=this.__wrapped__,ne=O?[1]:arguments,ce=X instanceof Kt,we=ne[0],_e=ce||Nt(X),Ae=function(Xt){var rn=N.apply($,Aa([Xt],ne));return O&&Ke?rn[0]:rn};_e&&w&&typeof we=="function"&&we.length!=1&&(ce=_e=!1);var Ke=this.__chain__,mt=!!this.__actions__.length,_t=V&&!Ke,Vt=ce&&!mt;if(!V&&_e){X=Vt?X:new Kt(this);var kt=c.apply(X,ne);return kt.__actions__.push({func:Iy,args:[Ae],thisArg:n}),new eo(kt,Ke)}return _t&&Vt?c.apply(this,ne):(kt=this.thru(Ae),_t?O?kt.value()[0]:kt.value():kt)})}),Yn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Sc[c],w=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);$.prototype[c]=function(){var N=arguments;if(O&&!this.__chain__){var V=this.value();return g.apply(Nt(V)?V:[],N)}return this[w](function(X){return g.apply(Nt(X)?X:[],N)})}}),aa(Kt.prototype,function(c,g){var w=$[g];if(w){var O=w.name+"";an.call(cs,O)||(cs[O]=[]),cs[O].push({name:g,func:w})}}),cs[zf(n,_).name]=[{name:"wrapper",func:n}],Kt.prototype.clone=Hi,Kt.prototype.reverse=Pi,Kt.prototype.value=yy,$.prototype.at=uY,$.prototype.chain=cY,$.prototype.commit=dY,$.prototype.next=fY,$.prototype.plant=pY,$.prototype.reverse=gY,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=mY,$.prototype.first=$.prototype.head,kc&&($.prototype[kc]=hY),$},Ra=_o();Gt?((Gt.exports=Ra)._=Ra,Ot._=Ra):St._=Ra}).call(fo)})(ai,ai.exports);const We=ai.exports,$4e={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},$V=TS({name:"gallery",initialState:$4e,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=ai.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r<n.length-1){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload},setShouldUseSingleGalleryColumn:(e,t)=>{e.shouldUseSingleGalleryColumn=t.payload}}}),{addImage:A0,clearIntermediateImage:m6,removeImage:FV,setCurrentImage:sR,addGalleryImages:F4e,setIntermediateImage:H4e,selectNextImage:$k,selectPrevImage:Fk,setShouldPinGallery:V4e,setShouldShowGallery:kd,setGalleryScrollPosition:W4e,setGalleryImageMinimumWidth:xm,setGalleryImageObjectFit:U4e,setShouldHoldGalleryOpen:HV,setShouldAutoSwitchToNewImages:j4e,setCurrentCategory:L3,setGalleryWidth:G4e,setShouldUseSingleGalleryColumn:q4e}=$V.actions,Y4e=$V.reducer;function Bs(e){return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bs(e)}function eu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K4e(e,t){if(Bs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VV(e){var t=K4e(e,"string");return Bs(t)==="symbol"?t:String(t)}function lR(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,VV(r.key),r)}}function tu(e,t,n){return t&&lR(e.prototype,t),n&&lR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ed(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e9(e,t){return e9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},e9(e,t)}function AS(e,t){if(typeof t!="function"&&t!==null)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&&e9(e,t)}function q2(e,t){if(t&&(Bs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ed(e)}function ql(e){return ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ql(e)}function Yd(e,t,n){return t=VV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X4e(e){if(Array.isArray(e))return e}function Z4e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Q4e(e,t){if(!!e){if(typeof e=="string")return uR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uR(e,t)}}function J4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e5e(e){return X4e(e)||Z4e(e)||Q4e(e)||J4e()}function cR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var t5e={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},n5e=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};eu(this,e),this.init(t,n)}return tu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||t5e,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,dR(dR({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Ml=new n5e,Dd=function(){function e(){eu(this,e),this.observers={}}return tu(e,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),e}();function wm(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}function fR(e){return e==null?"":""+e}function r5e(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Hk(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function hR(e,t,n){var r=Hk(e,t,Object),i=r.obj,o=r.k;i[o]=n}function i5e(e,t,n,r){var i=Hk(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function K5(e,t){var n=Hk(e,t),r=n.obj,i=n.k;if(!!r)return r[i]}function pR(e,t,n){var r=K5(e,n);return r!==void 0?r:K5(t,n)}function WV(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):WV(e[r],t[r],n):e[r]=t[r]);return e}function i0(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var o5e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function a5e(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return o5e[t]}):e}var OS=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,s5e=[" ",",","?","!",";"];function l5e(e,t,n){t=t||"",n=n||"";var r=s5e.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function gR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function A3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u5e(e){var t=c5e();return function(){var r=ql(e),i;if(t){var o=ql(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return q2(this,i)}}function c5e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function UV(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];l===void 0&&r.length>o+a;)a++,s=r.slice(o,o+a).join(n),l=i[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(o+a).join(n);return u?UV(l,u,n):void 0}i=i[r[o]]}return i}}var d5e=function(e){AS(n,e);var t=u5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return eu(this,n),i=t.call(this),OS&&Dd.call(Ed(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return tu(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[i,o];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(f=i.split("."));var p=K5(this.data,f);return p||!u||typeof a!="string"?p:UV(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[i,o];a&&(f=f.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(f=i.split("."),s=o,o=f[1]),this.addNamespaces(o),hR(this.data,f,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[i,o];i.indexOf(".")>-1&&(f=i.split("."),s=a,a=o,o=f[1]),this.addNamespaces(o);var p=K5(this.data,f)||{};s?WV(p,a,l):p=A3(A3({},p),a),hR(this.data,f,p),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?A3(A3({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Dd),jV={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function mR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function f5e(e){var t=h5e();return function(){var r=ql(e),i;if(t){var o=ql(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return q2(this,i)}}function h5e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}var vR={},yR=function(e){AS(n,e);var t=f5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return eu(this,n),i=t.call(this),OS&&Dd.call(Ed(i)),r5e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Ed(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Ml.create("translator"),i}return tu(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!l5e(i,a,s);if(u&&!f){var p=i.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:i,namespaces:l};var m=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),i=m.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Bs(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(i[i.length-1],o),p=f.key,m=f.namespaces,v=m[m.length-1],y=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y&&y.toLowerCase()==="cimode"){if(x){var E=o.nsSeparator||this.options.nsSeparator;return l?(_.res="".concat(v).concat(E).concat(p),_):"".concat(v).concat(E).concat(p)}return l?(_.res=p,_):p}var _=this.resolve(i,o),C=_&&_.res,T=_&&_.usedKey||p,A=_&&_.exactUsedKey||p,M=Object.prototype.toString.apply(C),I=["[object Number]","[object Function]","[object RegExp]"],D=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,B=!this.i18nFormat||this.i18nFormat.handleAsObject,F=typeof C!="string"&&typeof C!="boolean"&&typeof C!="number";if(B&&C&&F&&I.indexOf(M)<0&&!(typeof D=="string"&&M==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var H=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,C,so(so({},o),{},{ns:m})):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");return l?(_.res=H,_):H}if(u){var Y=M==="[object Array]",te=Y?[]:{},G=Y?A:T;for(var z in C)if(Object.prototype.hasOwnProperty.call(C,z)){var W="".concat(G).concat(u).concat(z);te[z]=this.translate(W,so(so({},o),{joinArrays:!1,ns:m})),te[z]===W&&(te[z]=C[z])}C=te}}else if(B&&typeof D=="string"&&M==="[object Array]")C=C.join(D),C&&(C=this.extendTranslation(C,i,o,a));else{var K=!1,Z=!1,U=o.count!==void 0&&typeof o.count!="string",Q=n.hasDefaultValue(o),ue=U?this.pluralResolver.getSuffix(y,o.count,o):"",fe=o["defaultValue".concat(ue)]||o.defaultValue;!this.isValidLookup(C)&&Q&&(K=!0,C=fe),this.isValidLookup(C)||(Z=!0,C=p);var Te=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Oe=Te&&Z?void 0:C,ve=Q&&fe!==C&&this.options.updateMissing;if(Z||K||ve){if(this.logger.log(ve?"updateKey":"missingKey",y,v,p,ve?fe:C),u){var Ce=this.resolve(p,so(so({},o),{},{keySeparator:!1}));Ce&&Ce.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 Re=[],Ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ye&&Ye[0])for(var Ue=0;Ue<Ye.length;Ue++)Re.push(Ye[Ue]);else this.options.saveMissingTo==="all"?Re=this.languageUtils.toResolveHierarchy(o.lng||this.language):Re.push(o.lng||this.language);var pt=function(ut,ft,vt){var ke=Q&&vt!==C?vt:Oe;s.options.missingKeyHandler?s.options.missingKeyHandler(ut,v,ft,ke,ve,o):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(ut,v,ft,ke,ve,o),s.emit("missingKey",ut,v,ft,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?Re.forEach(function(wt){s.pluralResolver.getSuffixes(wt,o).forEach(function(ut){pt([wt],p+ut,o["defaultValue".concat(ut)]||fe)})}):pt(Re,p,fe))}C=this.extendTranslation(C,i,o,_,a),Z&&C===p&&this.options.appendNamespaceToMissingKey&&(C="".concat(v,":").concat(p)),(Z||K)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(v,":").concat(p):p,K?C:void 0):C=this.options.parseMissingKeyHandler(C))}return l?(_.res=C,_):C}},{key:"extendTranslation",value:function(i,o,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,so(so({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(so(so({},a),{interpolation:so(so({},this.options.interpolation),a.interpolation)}));var f=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),p;if(f){var m=i.match(this.interpolator.nestingRegexp);p=m&&m.length}var v=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(v=so(so({},this.options.interpolation.defaultVariables),v)),i=this.interpolator.interpolate(i,v,a.lng||this.language,a),f){var y=i.match(this.interpolator.nestingRegexp),x=y&&y.length;p<x&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var C=arguments.length,T=new Array(C),A=0;A<C;A++)T[A]=arguments[A];return l&&l[0]===T[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(T[0]," in key: ").concat(o[0])),null):u.translate.apply(u,T.concat([o]))},a)),a.interpolation&&this.interpolator.reset()}var E=a.postProcess||this.options.postProcess,_=typeof E=="string"?[E]:E;return i!=null&&_&&_.length&&a.applyPostProcessor!==!1&&(i=jV.handle(_,i,o,this.options&&this.options.postProcessPassResolved?so({i18nResolved:s},a):a,this)),i}},{key:"resolve",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,p;return typeof i=="string"&&(i=[i]),i.forEach(function(m){if(!o.isValidLookup(s)){var v=o.extractFromKey(m,a),y=v.key;l=y;var x=v.namespaces;o.options.fallbackNS&&(x=x.concat(o.options.fallbackNS));var E=a.count!==void 0&&typeof a.count!="string",_=E&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),C=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);x.forEach(function(A){o.isValidLookup(s)||(p=A,!vR["".concat(T[0],"-").concat(A)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(p)&&(vR["".concat(T[0],"-").concat(A)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(T.join(", "),`" won't get resolved as namespace "`).concat(p,'" 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!!!")),T.forEach(function(M){if(!o.isValidLookup(s)){f=M;var I=[y];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(I,y,M,A,a);else{var D;E&&(D=o.pluralResolver.getSuffix(M,a.count,a));var B="".concat(o.options.pluralSeparator,"zero");if(E&&(I.push(y+D),_&&I.push(y+B)),C){var F="".concat(y).concat(o.options.contextSeparator).concat(a.context);I.push(F),E&&(I.push(F+D),_&&I.push(F+B))}}for(var H;H=I.pop();)o.isValidLookup(s)||(u=H,s=o.getResource(M,A,H,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:p}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(Dd);function v6(e){return e.charAt(0).toUpperCase()+e.slice(1)}var bR=function(){function e(t){eu(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ml.create("languageUtils")}return tu(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=v6(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=v6(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=v6(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){!u||(i.isSupportedCode(u)?a.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),p5e=[{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}],g5e={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},m5e=["v1","v2","v3"],SR={zero:0,one:1,two:2,few:3,many:4,other:5};function v5e(){var e={};return p5e.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:g5e[t.fc]}})}),e}var y5e=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};eu(this,e),this.languageUtils=t,this.options=n,this.logger=Ml.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!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=v5e()}return tu(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch(i){return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return SR[a]-SR[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!m5e.includes(this.options.compatibilityJSON)}}]),e}();function xR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var b5e=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};eu(this,e),this.logger=Ml.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return tu(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:a5e,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?i0(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?i0(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?i0(r.nestingPrefix):r.nestingPrefixEscaped||i0("$t("),this.nestingSuffix=r.nestingSuffix?i0(r.nestingSuffix):r.nestingSuffixEscaped||i0(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(E){return E.replace(/\$/g,"$$$$")}var m=function(_){if(_.indexOf(a.formatSeparator)<0){var C=pR(r,f,_);return a.alwaysFormat?a.format(C,void 0,i,Cs(Cs(Cs({},o),r),{},{interpolationkey:_})):C}var T=_.split(a.formatSeparator),A=T.shift().trim(),M=T.join(a.formatSeparator).trim();return a.format(pR(r,f,A),M,i,Cs(Cs(Cs({},o),r),{},{interpolationkey:A}))};this.resetRegExp();var v=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,y=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(_){return p(_)}},{regex:this.regexp,safeValue:function(_){return a.escapeValue?p(a.escape(_)):p(_)}}];return x.forEach(function(E){for(u=0;s=E.regex.exec(n);){var _=s[1].trim();if(l=m(_),l===void 0)if(typeof v=="function"){var C=v(n,s,o);l=typeof C=="string"?C:""}else if(o&&o.hasOwnProperty(_))l="";else if(y){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(_," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=fR(l));var T=E.safeValue(l);if(n=n.replace(s[0],T),y?(E.regex.lastIndex+=l.length,E.regex.lastIndex-=s[0].length):E.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(v,y){var x=this.nestingOptionsSeparator;if(v.indexOf(x)<0)return v;var E=v.split(new RegExp("".concat(x,"[ ]*{"))),_="{".concat(E[1]);v=E[0],_=this.interpolate(_,l);var C=_.match(/'/g),T=_.match(/"/g);(C&&C.length%2===0&&!T||T.length%2!==0)&&(_=_.replace(/'/g,'"'));try{l=JSON.parse(_),y&&(l=Cs(Cs({},y),l))}catch(A){return this.logger.warn("failed parsing options string in nesting for key ".concat(v),A),"".concat(v).concat(x).concat(_)}return delete l.defaultValue,v}for(;a=this.nestingRegexp.exec(n);){var f=[];l=Cs({},o),l.applyPostProcessor=!1,delete l.defaultValue;var p=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var m=a[1].split(this.formatSeparator).map(function(v){return v.trim()});a[1]=m.shift(),f=m,p=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=fR(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),p&&(s=f.reduce(function(v,y){return i.format(v,y,o.lng,Cs(Cs({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function wR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S5e(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(!!a){var s=a.split(":"),l=e5e(s),u=l[0],f=l.slice(1),p=f.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=p),p==="false"&&(n[u.trim()]=!1),p==="true"&&(n[u.trim()]=!0),isNaN(p)||(n[u.trim()]=parseInt(p,10))}})}}return{formatName:t,formatOptions:n}}function o0(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var x5e=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};eu(this,e),this.logger=Ml.create("formatter"),this.options=t,this.formats={number:o0(function(n,r){var i=new Intl.NumberFormat(n,r);return function(o){return i.format(o)}}),currency:o0(function(n,r){var i=new Intl.NumberFormat(n,Kc(Kc({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:o0(function(n,r){var i=new Intl.DateTimeFormat(n,Kc({},r));return function(o){return i.format(o)}}),relativetime:o0(function(n,r){var i=new Intl.RelativeTimeFormat(n,Kc({},r));return function(o){return i.format(o,r.range||"day")}}),list:o0(function(n,r){var i=new Intl.ListFormat(n,Kc({},r));return function(o){return i.format(o)}})},this.init(t)}return tu(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=o0(r)}},{key:"format",value:function(n,r,i,o){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(u,f){var p=S5e(f),m=p.formatName,v=p.formatOptions;if(a.formats[m]){var y=u;try{var x=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},E=x.locale||x.lng||o.locale||o.lng||i;y=a.formats[m](u,E,Kc(Kc(Kc({},v),o),x))}catch(_){a.logger.warn(_)}return y}else a.logger.warn("there was no format function for ".concat(m));return u},n);return l}}]),e}();function CR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _R(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w5e(e){var t=C5e();return function(){var r=ql(e),i;if(t){var o=ql(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return q2(this,i)}}function C5e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _5e(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var k5e=function(e){AS(n,e);var t=w5e(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return eu(this,n),a=t.call(this),OS&&Dd.call(Ed(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=Ml.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,s.backend,s),a}return tu(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},f={},p={},m={};return i.forEach(function(v){var y=!0;o.forEach(function(x){var E="".concat(v,"|").concat(x);!a.reload&&l.store.hasResourceBundle(v,x)?l.state[E]=2:l.state[E]<0||(l.state[E]===1?f[E]===void 0&&(f[E]=!0):(l.state[E]=1,y=!1,f[E]===void 0&&(f[E]=!0),u[E]===void 0&&(u[E]=!0),m[x]===void 0&&(m[x]=!0)))}),y||(p[v]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(m)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var f={};this.queue.forEach(function(p){i5e(p.loaded,[l],u),_5e(p,i),o&&p.errors.push(o),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(function(m){f[m]||(f[m]={});var v=p.loaded[m];v.length&&v.forEach(function(y){f[m][y]===void 0&&(f[m][y]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(p){return!p.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!i.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:f});return}this.readingCalls++;var p=function(x,E){if(s.readingCalls--,s.waitingReads.length>0){var _=s.waitingReads.shift();s.read(_.lng,_.ns,_.fcName,_.tried,_.wait,_.callback)}if(x&&E&&l<s.maxRetries){setTimeout(function(){s.read.call(s,i,o,a,l+1,u*2,f)},u);return}f(x,E)},m=this.backend[a].bind(this.backend);if(m.length===2){try{var v=m(i,o);v&&typeof v.then=="function"?v.then(function(y){return p(null,y)}).catch(p):p(null,v)}catch(y){p(y)}return}return m(i,o,p)}},{key:"prepareLoading",value:function(i,o){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=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."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,p){f&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&p&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),p),o.loaded(i,f,p)})}},{key:"saveMissing",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},f=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" 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!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var p=_R(_R({},u),{},{isUpdate:l}),m=this.backend.create.bind(this.backend);if(m.length<6)try{var v;m.length===5?v=m(i,o,a,s,p):v=m(i,o,a,s),v&&typeof v.then=="function"?v.then(function(y){return f(null,y)}).catch(f):f(null,v)}catch(y){f(y)}else m(i,o,a,s,f,p)}!i||!i[0]||this.store.addResource(i[0],o,a,s)}}}]),n}(Dd);function kR(){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(t){var n={};if(Bs(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Bs(t[2])==="object"||Bs(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ER(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function PR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PR(Object(n),!0).forEach(function(r){Yd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E5e(e){var t=P5e();return function(){var r=ql(e),i;if(t){var o=ql(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return q2(this,i)}}function P5e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function O3(){}function T5e(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var X5=function(e){AS(n,e);var t=E5e(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(eu(this,n),r=t.call(this),OS&&Dd.call(Ed(r)),r.options=ER(i),r.services={},r.logger=Ml,r.modules={external:[]},T5e(Ed(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),q2(r,Ed(r));setTimeout(function(){r.init(i,o)},0)}return r}return tu(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=kR();this.options=bl(bl(bl({},s),this.options),ER(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=bl(bl({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(_){return _?typeof _=="function"?new _:_:null}if(!this.options.isClone){this.modules.logger?Ml.init(l(this.modules.logger),this.options):Ml.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=x5e);var f=new bR(this.options);this.store=new d5e(this.options.resources,this.options);var p=this.services;p.logger=Ml,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new y5e(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(p.formatter=l(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new b5e(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new k5e(l(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(_){for(var C=arguments.length,T=new Array(C>1?C-1:0),A=1;A<C;A++)T[A-1]=arguments[A];i.emit.apply(i,[_].concat(T))}),this.modules.languageDetector&&(p.languageDetector=l(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=l(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new yR(this.services,this.options),this.translator.on("*",function(_){for(var C=arguments.length,T=new Array(C>1?C-1:0),A=1;A<C;A++)T[A-1]=arguments[A];i.emit.apply(i,[_].concat(T))}),this.modules.external.forEach(function(_){_.init&&_.init(i)})}if(this.format=this.options.interpolation.format,a||(a=O3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var v=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];v.forEach(function(_){i[_]=function(){var C;return(C=i.store)[_].apply(C,arguments)}});var y=["addResource","addResources","addResourceBundle","removeResourceBundle"];y.forEach(function(_){i[_]=function(){var C;return(C=i.store)[_].apply(C,arguments),i}});var x=wm(),E=function(){var C=function(A,M){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),x.resolve(M),a(A,M)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return C(null,i.t.bind(i));i.changeLanguage(i.options.lng,C)};return this.options.resources||!this.options.initImmediate?E():setTimeout(E,0),x}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O3,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(v){if(!!v){var y=o.services.languageUtils.toResolveHierarchy(v);y.forEach(function(x){u.indexOf(x)<0&&u.push(x)})}};if(l)f(l);else{var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.forEach(function(m){return f(m)})}this.options.preload&&this.options.preload.forEach(function(m){return f(m)}),this.services.backendConnector.load(u,this.options.ns,function(m){!m&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(m)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=wm();return i||(i=this.languages),o||(o=this.options.ns),a||(a=O3),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&jV.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var a=this.languages[o];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=wm();this.emit("languageChanging",i);var l=function(m){a.language=m,a.languages=a.services.languageUtils.toResolveHierarchy(m),a.resolvedLanguage=void 0,a.setResolvedLanguage(m)},u=function(m,v){v?(l(v),a.translator.changeLanguage(v),a.isLanguageChangingTo=void 0,a.emit("languageChanged",v),a.logger.log("languageChanged",v)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(m,function(){return a.t.apply(a,arguments)})},f=function(m){!i&&!m&&a.services.languageDetector&&(m=[]);var v=typeof m=="string"?m:a.services.languageUtils.getBestMatchFromCodes(m);v&&(a.language||l(v),a.translator.language||a.translator.changeLanguage(v),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(v)),a.loadResources(v,function(y){u(y,v)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(f,p){var m;if(Bs(p)!=="object"){for(var v=arguments.length,y=new Array(v>2?v-2:0),x=2;x<v;x++)y[x-2]=arguments[x];m=s.options.overloadTranslationOptionHandler([f,p].concat(y))}else m=bl({},p);m.lng=m.lng||u.lng,m.lngs=m.lngs||u.lngs,m.ns=m.ns||u.ns,m.keyPrefix=m.keyPrefix||a||u.keyPrefix;var E=s.options.keySeparator||".",_=m.keyPrefix?"".concat(m.keyPrefix).concat(E).concat(f):f;return s.t(_,m)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?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 s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(v,y){var x=o.services.backendConnector.state["".concat(v,"|").concat(y)];return x===-1||x===2};if(a.precheck){var p=a.precheck(this,f);if(p!==void 0)return p}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,i)&&(!l||f(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=wm();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=wm();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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"],a=this.services&&this.services.languageUtils||new bR(kR());return o.indexOf(a.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O3,s=bl(bl(bl({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(f){l[f]=i[f]}),l.services=bl({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new yR(l.services,l.options),l.translator.on("*",function(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),v=1;v<p;v++)m[v-1]=arguments[v];l.emit.apply(l,[f].concat(m))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Dd);Yd(X5,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new X5(e,t)});var qt=X5.createInstance();qt.createInstance=X5.createInstance;qt.createInstance;qt.dir;qt.init;qt.loadResources;qt.reloadResources;qt.use;qt.changeLanguage;qt.getFixedT;qt.t;qt.exists;qt.setDefaultNamespace;qt.hasLoadedNamespace;qt.loadNamespaces;qt.loadLanguages;function L5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m2(e){return m2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m2(e)}function A5e(e,t){if(m2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(m2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O5e(e){var t=A5e(e,"string");return m2(t)==="symbol"?t:String(t)}function TR(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,O5e(r.key),r)}}function R5e(e,t,n){return t&&TR(e.prototype,t),n&&TR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var GV=[],M5e=GV.forEach,I5e=GV.slice;function D5e(e){return M5e.call(I5e.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var LR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,N5e=function(t,n,r){var i=r||{};i.path=i.path||"/";var o=encodeURIComponent(n),a="".concat(t,"=").concat(o);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!LR.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!LR.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},AR={create:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),i&&(o.domain=i),document.cookie=N5e(t,encodeURIComponent(n),o)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var o=r[i];o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(n)===0)return o.substring(n.length,o.length)}return null},remove:function(t){this.create(t,"",-1)}},B5e={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=AR.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&AR.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},z5e={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),o=i.split("&"),a=0;a<o.length;a++){var s=o[a].indexOf("=");if(s>0){var l=o[a].substring(0,s);l===t.lookupQuerystring&&(n=o[a].substring(s+1))}}}return n}},Cm=null,OR=function(){if(Cm!==null)return Cm;try{Cm=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(n){Cm=!1}return Cm},$5e={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&OR()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&OR()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},_m=null,RR=function(){if(_m!==null)return _m;try{_m=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(n){_m=!1}return _m},F5e={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&RR()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&RR()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},H5e={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},V5e={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},W5e={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},U5e={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(!!r)return r[n]}};function j5e(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var qV=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};L5e(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return R5e(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=D5e(r,this.options||{},j5e()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(B5e),this.addDetector(z5e),this.addDetector($5e),this.addDetector(F5e),this.addDetector(H5e),this.addDetector(V5e),this.addDetector(W5e),this.addDetector(U5e)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(o){if(r.detectors[o]){var a=r.detectors[o].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(o){i.detectors[o]&&i.detectors[o].cacheUserLanguage(n,i.options)}))}}]),e}();qV.type="languageDetector";function t9(e){return t9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t9(e)}var YV=[],G5e=YV.forEach,q5e=YV.slice;function n9(e){return G5e.call(q5e.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function KV(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":t9(XMLHttpRequest))==="object"}function Y5e(e){return!!e&&typeof e.then=="function"}function K5e(e){return Y5e(e)?e:Promise.resolve(e)}function X5e(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 Z5={exports:{}},R3={exports:{}},MR;function Z5e(){return MR||(MR=1,function(e,t){var n=typeof self<"u"?self:fo,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var s={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(z){return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(z){return z&&DataView.prototype.isPrototypeOf(z)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(z){return z&&u.indexOf(Object.prototype.toString.call(z))>-1};function p(z){if(typeof z!="string"&&(z=String(z)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(z))throw new TypeError("Invalid character in header field name");return z.toLowerCase()}function m(z){return typeof z!="string"&&(z=String(z)),z}function v(z){var W={next:function(){var K=z.shift();return{done:K===void 0,value:K}}};return s.iterable&&(W[Symbol.iterator]=function(){return W}),W}function y(z){this.map={},z instanceof y?z.forEach(function(W,K){this.append(K,W)},this):Array.isArray(z)?z.forEach(function(W){this.append(W[0],W[1])},this):z&&Object.getOwnPropertyNames(z).forEach(function(W){this.append(W,z[W])},this)}y.prototype.append=function(z,W){z=p(z),W=m(W);var K=this.map[z];this.map[z]=K?K+", "+W:W},y.prototype.delete=function(z){delete this.map[p(z)]},y.prototype.get=function(z){return z=p(z),this.has(z)?this.map[z]:null},y.prototype.has=function(z){return this.map.hasOwnProperty(p(z))},y.prototype.set=function(z,W){this.map[p(z)]=m(W)},y.prototype.forEach=function(z,W){for(var K in this.map)this.map.hasOwnProperty(K)&&z.call(W,this.map[K],K,this)},y.prototype.keys=function(){var z=[];return this.forEach(function(W,K){z.push(K)}),v(z)},y.prototype.values=function(){var z=[];return this.forEach(function(W){z.push(W)}),v(z)},y.prototype.entries=function(){var z=[];return this.forEach(function(W,K){z.push([K,W])}),v(z)},s.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function x(z){if(z.bodyUsed)return Promise.reject(new TypeError("Already read"));z.bodyUsed=!0}function E(z){return new Promise(function(W,K){z.onload=function(){W(z.result)},z.onerror=function(){K(z.error)}})}function _(z){var W=new FileReader,K=E(W);return W.readAsArrayBuffer(z),K}function C(z){var W=new FileReader,K=E(W);return W.readAsText(z),K}function T(z){for(var W=new Uint8Array(z),K=new Array(W.length),Z=0;Z<W.length;Z++)K[Z]=String.fromCharCode(W[Z]);return K.join("")}function A(z){if(z.slice)return z.slice(0);var W=new Uint8Array(z.byteLength);return W.set(new Uint8Array(z)),W.buffer}function M(){return this.bodyUsed=!1,this._initBody=function(z){this._bodyInit=z,z?typeof z=="string"?this._bodyText=z:s.blob&&Blob.prototype.isPrototypeOf(z)?this._bodyBlob=z:s.formData&&FormData.prototype.isPrototypeOf(z)?this._bodyFormData=z:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)?this._bodyText=z.toString():s.arrayBuffer&&s.blob&&l(z)?(this._bodyArrayBuffer=A(z.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(z)||f(z))?this._bodyArrayBuffer=A(z):this._bodyText=z=Object.prototype.toString.call(z):this._bodyText="",this.headers.get("content-type")||(typeof z=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(z)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var z=x(this);if(z)return z;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?x(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var z=x(this);if(z)return z;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function D(z){var W=z.toUpperCase();return I.indexOf(W)>-1?W:z}function B(z,W){W=W||{};var K=W.body;if(z instanceof B){if(z.bodyUsed)throw new TypeError("Already read");this.url=z.url,this.credentials=z.credentials,W.headers||(this.headers=new y(z.headers)),this.method=z.method,this.mode=z.mode,this.signal=z.signal,!K&&z._bodyInit!=null&&(K=z._bodyInit,z.bodyUsed=!0)}else this.url=String(z);if(this.credentials=W.credentials||this.credentials||"same-origin",(W.headers||!this.headers)&&(this.headers=new y(W.headers)),this.method=D(W.method||this.method||"GET"),this.mode=W.mode||this.mode||null,this.signal=W.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&K)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(K)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function F(z){var W=new FormData;return z.trim().split("&").forEach(function(K){if(K){var Z=K.split("="),U=Z.shift().replace(/\+/g," "),Q=Z.join("=").replace(/\+/g," ");W.append(decodeURIComponent(U),decodeURIComponent(Q))}}),W}function H(z){var W=new y,K=z.replace(/\r?\n[\t ]+/g," ");return K.split(/\r?\n/).forEach(function(Z){var U=Z.split(":"),Q=U.shift().trim();if(Q){var ue=U.join(":").trim();W.append(Q,ue)}}),W}M.call(B.prototype);function Y(z,W){W||(W={}),this.type="default",this.status=W.status===void 0?200:W.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in W?W.statusText:"OK",this.headers=new y(W.headers),this.url=W.url||"",this._initBody(z)}M.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},Y.error=function(){var z=new Y(null,{status:0,statusText:""});return z.type="error",z};var te=[301,302,303,307,308];Y.redirect=function(z,W){if(te.indexOf(W)===-1)throw new RangeError("Invalid status code");return new Y(null,{status:W,headers:{location:z}})},a.DOMException=o.DOMException;try{new a.DOMException}catch(z){a.DOMException=function(W,K){this.message=W,this.name=K;var Z=Error(W);this.stack=Z.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function G(z,W){return new Promise(function(K,Z){var U=new B(z,W);if(U.signal&&U.signal.aborted)return Z(new a.DOMException("Aborted","AbortError"));var Q=new XMLHttpRequest;function ue(){Q.abort()}Q.onload=function(){var fe={status:Q.status,statusText:Q.statusText,headers:H(Q.getAllResponseHeaders()||"")};fe.url="responseURL"in Q?Q.responseURL:fe.headers.get("X-Request-URL");var Te="response"in Q?Q.response:Q.responseText;K(new Y(Te,fe))},Q.onerror=function(){Z(new TypeError("Network request failed"))},Q.ontimeout=function(){Z(new TypeError("Network request failed"))},Q.onabort=function(){Z(new a.DOMException("Aborted","AbortError"))},Q.open(U.method,U.url,!0),U.credentials==="include"?Q.withCredentials=!0:U.credentials==="omit"&&(Q.withCredentials=!1),"responseType"in Q&&s.blob&&(Q.responseType="blob"),U.headers.forEach(function(fe,Te){Q.setRequestHeader(Te,fe)}),U.signal&&(U.signal.addEventListener("abort",ue),Q.onreadystatechange=function(){Q.readyState===4&&U.signal.removeEventListener("abort",ue)}),Q.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return G.polyfill=!0,o.fetch||(o.fetch=G,o.Headers=y,o.Request=B,o.Response=Y),a.Headers=y,a.Request=B,a.Response=Y,a.fetch=G,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(R3,R3.exports)),R3.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof fo<"u"&&fo.fetch?n=fo.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof X5e<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||Z5e();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Z5,Z5.exports);const XV=Z5.exports,IR=KI({__proto__:null,default:XV},[Z5.exports]);function Q5(e){return Q5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q5(e)}var Nu;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Nu=global.fetch:typeof window<"u"&&window.fetch?Nu=window.fetch:Nu=fetch);var v2;KV()&&(typeof global<"u"&&global.XMLHttpRequest?v2=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(v2=window.XMLHttpRequest));var J5;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?J5=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(J5=window.ActiveXObject));!Nu&&IR&&!v2&&!J5&&(Nu=XV||IR);typeof Nu!="function"&&(Nu=void 0);var r9=function(t,n){if(n&&Q5(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},DR=function(t,n,r){Nu(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},NR=!1,Q5e=function(t,n,r,i){t.queryStringParams&&(n=r9(n,t.queryStringParams));var o=n9({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=n9({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},NR?{}:a);try{DR(n,s,i)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(a).forEach(function(u){delete s[u]}),DR(n,s,i),NR=!0}catch(u){i(u)}}},J5e=function(t,n,r,i){r&&Q5(r)==="object"&&(r=r9("",r).slice(1)),t.queryStringParams&&(n=r9(n,t.queryStringParams));try{var o;v2?o=new v2:o=new J5("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)o.setRequestHeader(s,a[s]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},ebe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Nu&&n.indexOf("file:")!==0)return Q5e(t,n,r,i);if(KV()||typeof ActiveXObject=="function")return J5e(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function y2(e){return y2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y2(e)}function tbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BR(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,ZV(r.key),r)}}function nbe(e,t,n){return t&&BR(e.prototype,t),n&&BR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rbe(e,t,n){return t=ZV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZV(e){var t=ibe(e,"string");return y2(t)==="symbol"?t:String(t)}function ibe(e,t){if(y2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(y2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var obe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return rbe({},r,i||"")},request:ebe,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},QV=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};tbe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return nbe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=n9(i,this.options||{},obe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=K5e(l),l.then(function(u){if(!u)return a(null,{});var f=s.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});s.loadUrl(f,a,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var a=this;this.options.request(this.options,n,void 0,function(s,l){if(l&&(l.status>=500&&l.status<600||!l.status))return r("failed loading "+n+"; status code: "+l.status,!0);if(l&&l.status>=400&&l.status<500)return r("failed loading "+n+"; status code: "+l.status,!1);if(!l&&s&&s.message&&s.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+s.message,!0);if(s)return r(s,!1);var u,f;try{typeof l.data=="string"?u=a.options.parse(l.data,i,o):u=l.data}catch(p){f="failed parsing "+n+" to json"}if(f)return r(f,!1);r(null,u)})}},{key:"create",value:function(n,r,i,o,a){var s=this;if(!!this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,f=[],p=[];n.forEach(function(m){var v=s.options.addPath;typeof s.options.addPath=="function"&&(v=s.options.addPath(m,r));var y=s.services.interpolator.interpolate(v,{lng:m,ns:r});s.options.request(s.options,y,l,function(x,E){u+=1,f.push(x),p.push(E),u===n.length&&a&&a(f,p)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,a=r.logger,s=i.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],u=function(p){var m=o.toResolveHierarchy(p);m.forEach(function(v){l.indexOf(v)<0&&l.push(v)})};u(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return u(f)}),l.forEach(function(f){n.allOptions.ns.forEach(function(p){i.read(f,p,"read",null,null,function(m,v){m&&a.warn("loading namespace ".concat(p," for language ").concat(f," failed"),m),!m&&v&&a.log("loaded namespace ".concat(p," for language ").concat(f),v),i.loaded("".concat(f,"|").concat(p),m,v)})})})}}}]),e}();QV.type="backend";function b2(e){return b2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b2(e)}function abe(e,t){if(b2(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(b2(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JV(e){var t=abe(e,"string");return b2(t)==="symbol"?t:String(t)}function eW(e,t,n){return t=JV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sbe(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var zR={};function i9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&zR[t[0]]||(typeof t[0]=="string"&&(zR[t[0]]=new Date),sbe.apply(void 0,t))}function $R(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function i(){setTimeout(function(){e.off("initialized",i)},0),n()};e.on("initialized",r)}})}function lbe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,u){var f=t.services.backendConnector.state["".concat(l,"|").concat(u)];return f===-1||f===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function ube(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return i9("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):lbe(e,t,n)}var cbe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dbe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},fbe=function(t){return dbe[t]},hbe=function(t){return t.replace(cbe,fbe)};function FR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FR(Object(n),!0).forEach(function(r){eW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var o9={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:hbe};function pbe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o9=HR(HR({},o9),e)}function gbe(){return o9}var tW;function mbe(e){tW=e}function vbe(){return tW}function ybe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VR(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,JV(r.key),r)}}function bbe(e,t,n){return t&&VR(e.prototype,t),n&&VR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Sbe={type:"3rdParty",init:function(t){pbe(t.options.react),mbe(t)}},xbe=k.exports.createContext(),wbe=function(){function e(){ybe(this,e),this.usedNamespaces={}}return bbe(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function Cbe(e){if(Array.isArray(e))return e}function _be(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function WR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kbe(e,t){if(!!e){if(typeof e=="string")return WR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WR(e,t)}}function Ebe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pbe(e,t){return Cbe(e)||_be(e,t)||kbe(e,t)||Ebe()}function UR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function y6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UR(Object(n),!0).forEach(function(r){eW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Tbe=function(t,n){var r=k.exports.useRef();return k.exports.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function Ge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=k.exports.useContext(xbe)||{},i=r.i18n,o=r.defaultNS,a=n||i||vbe();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new wbe),!a){i9("You will need to pass in an i18next instance by using initReactI18next");var s=function(F){return Array.isArray(F)?F[F.length-1]:F},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&i9("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=y6(y6(y6({},gbe()),a.options.react),t),f=u.useSuspense,p=u.keyPrefix,m=e||o||a.options&&a.options.defaultNS;m=typeof m=="string"?[m]:m||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(m);var v=(a.isInitialized||a.initializedStoreOnce)&&m.every(function(B){return ube(B,a,u)});function y(){return a.getFixedT(null,u.nsMode==="fallback"?m:m[0],p)}var x=k.exports.useState(y),E=Pbe(x,2),_=E[0],C=E[1],T=m.join(),A=Tbe(T),M=k.exports.useRef(!0);k.exports.useEffect(function(){var B=u.bindI18n,F=u.bindI18nStore;M.current=!0,!v&&!f&&$R(a,m,function(){M.current&&C(y)}),v&&A&&A!==T&&M.current&&C(y);function H(){M.current&&C(y)}return B&&a&&a.on(B,H),F&&a&&a.store.on(F,H),function(){M.current=!1,B&&a&&B.split(" ").forEach(function(Y){return a.off(Y,H)}),F&&a&&F.split(" ").forEach(function(Y){return a.store.off(Y,H)})}},[a,T]);var I=k.exports.useRef(!0);k.exports.useEffect(function(){M.current&&!I.current&&C(y),I.current=!1},[a,p]);var D=[_,a,v];if(D.t=_,D.i18n=a,D.ready=v,v||!v&&!f)return D;throw new Promise(function(B){$R(a,m,function(){B()})})}qt.use(QV).use(qV).use(Sbe).init({fallbackLng:"en",debug:!1,ns:["common","options","unifiedcanvas","gallery","toast","hotkeys","settings"],backend:{loadPath:"/locales/{{ns}}/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const Lbe={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:qt.isInitialized?qt.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:[]},nW=TS({name:"system",initialState:Lbe,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred: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=qt.t("common:statusError"),e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?qt.t("common:statusConnected"):qt.t("common:statusDisconnected")},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(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:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=qt.t("common:statusProcessingCanceled")},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus=qt.t("common:statusPreparing")},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus=qt.t("common:statusLoadingModel"),e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:Abe,setIsProcessing:Bu,addLogEntry:Mo,setShouldShowLogViewer:b6,setIsConnected:jR,setSocketId:eMe,setShouldConfirmOnDelete:rW,setOpenAccordions:Obe,setSystemStatus:Rbe,setCurrentStatus:N4,setSystemConfig:Mbe,setShouldDisplayGuides:Ibe,processingCanceled:Dbe,errorOccurred:GR,errorSeen:iW,setModelList:qR,setIsCancelable:O0,modelChangeRequested:Nbe,setSaveIntermediatesInterval:Bbe,setEnableImageDebugging:zbe,generationRequested:$be,addToast:Wm,clearToastQueue:Fbe,setProcessingIndeterminateTask:Hbe}=nW.actions,Vbe=nW.reducer,hd=(e,t)=>Math.floor(e/t)*t,Il=(e,t)=>Math.round(e/t)*t,a0=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},s0=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Wbe=.999,Ube=.1,jbe=20,km=.95,YR=30,a9=10,KR=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),Uf=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let a=t*n,s=448;for(;a<i;)if(s+=64,t===n){r.width=512,r.height=512;break}else o>1?(r.width=s,r.height=Il(s/o,64)):o<1&&(r.height=s,r.width=Il(s*o,64)),a=r.width*r.height;return r},Gbe=e=>({width:Il(e.width,64),height:Il(e.height,64)}),oW=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],qbe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],Vk=e=>e.kind==="line"&&e.layer==="mask",Ybe=e=>e.kind==="line"&&e.layer==="base",eb=e=>e.kind==="image"&&e.layer==="base",Kbe=e=>e.kind==="fillRect"&&e.layer==="base",Xbe=e=>e.kind==="eraseRect"&&e.layer==="base",Zbe=e=>e.kind==="line",Um={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},Qbe={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:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:Um,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,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},aW=TS({name:"canvas",initialState:Qbe,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!Vk(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:hd(We.clamp(n.width,64,512),64),height:hd(We.clamp(n.height,64,512),64)},o={x:Il(n.width/2-i.width/2,64),y:Il(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=Uf(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState={...Um,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=s0(r.width,r.height,n.width,n.height,km),s=a0(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=Gbe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=Uf(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=KR(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...Um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:a}=e;if(n==="move"||n==="colorPicker")return;const s=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:s,points:t.payload,...l};a&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(Zbe);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(We.cloneDeep(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState=Um,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(eb),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const f=s0(i.width,i.height,512,512,km),p=a0(i.width,i.height,0,0,512,512,f),m={width:512,height:512};if(e.stageScale=f,e.stageCoordinates=p,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const v=Uf(m);e.scaledBoundingBoxDimensions=v}return}const{width:o,height:a}=r,l=s0(t,n,o,a,.95),u=a0(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=KR(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(eb)){const i=s0(r.width,r.height,512,512,km),o=a0(r.width,r.height,0,0,512,512,i),a={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=a,e.boundingBoxScaleMethod==="auto"){const s=Uf(a);e.scaledBoundingBoxDimensions=s}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=s0(r,i,s,l,km),f=a0(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=f}else{const u=s0(r,i,512,512,km),f=a0(r,i,0,0,512,512,u),p={width:512,height:512};if(e.stageScale=u,e.stageCoordinates=f,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=p,e.boundingBoxScaleMethod==="auto"){const m=Uf(p);e.scaledBoundingBoxDimensions=m}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...Um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:hd(We.clamp(o,64,512),64),height:hd(We.clamp(a,64,512),64)},l={x:Il(o/2-s.width/2,64),y:Il(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=Uf(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=Uf(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState: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:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}}}),{addEraseRect:sW,addFillRect:lW,addImageToStagingArea:Jbe,addLine:eSe,addPointToCurrentLine:uW,clearCanvasHistory:cW,clearMask:Wk,commitColorPickerColor:tSe,commitStagingAreaImage:nSe,discardStagedImages:rSe,fitBoundingBoxToStage:tMe,mouseLeftCanvas:iSe,nextStagingAreaImage:oSe,prevStagingAreaImage:aSe,redo:sSe,resetCanvas:Uk,resetCanvasInteractionState:lSe,resetCanvasView:dW,resizeAndScaleCanvas:RS,resizeCanvas:uSe,setBoundingBoxCoordinates:S6,setBoundingBoxDimensions:jm,setBoundingBoxPreviewFill:nMe,setBoundingBoxScaleMethod:cSe,setBrushColor:a1,setBrushSize:s1,setCanvasContainerDimensions:dSe,setColorPickerColor:fSe,setCursorPosition:hSe,setDoesCanvasNeedScaling:li,setInitialCanvasImage:MS,setInpaintReplace:XR,setIsDrawing:fW,setIsMaskEnabled:Y2,setIsMouseOverBoundingBox:M3,setIsMoveBoundingBoxKeyHeld:rMe,setIsMoveStageKeyHeld:iMe,setIsMovingBoundingBox:x6,setIsMovingStage:tb,setIsTransformingBoundingBox:w6,setLayer:nb,setMaskColor:hW,setMergedCanvas:pSe,setShouldAutoSave:pW,setShouldCropToBoundingBoxOnSave:gW,setShouldDarkenOutsideBoundingBox:mW,setShouldLockBoundingBox:oMe,setShouldPreserveMaskedArea:vW,setShouldShowBoundingBox:gSe,setShouldShowBrush:aMe,setShouldShowBrushPreview:sMe,setShouldShowCanvasDebugInfo:yW,setShouldShowCheckboardTransparency:lMe,setShouldShowGrid:bW,setShouldShowIntermediates:SW,setShouldShowStagingImage:mSe,setShouldShowStagingOutline:ZR,setShouldSnapToGrid:rb,setShouldUseInpaintReplace:vSe,setStageCoordinates:xW,setStageScale:ySe,setTool:Vl,toggleShouldLockBoundingBox:uMe,toggleTool:cMe,undo:bSe,setScaledBoundingBoxDimensions:I3,setShouldRestrictStrokesToBox:wW}=aW.actions,SSe=aW.reducer,Yl=Object.create(null);Yl.open="0";Yl.close="1";Yl.ping="2";Yl.pong="3";Yl.message="4";Yl.upgrade="5";Yl.noop="6";const B4=Object.create(null);Object.keys(Yl).forEach(e=>{B4[Yl[e]]=e});const xSe={type:"error",data:"parser error"},wSe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",CSe=typeof ArrayBuffer=="function",_Se=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CW=({type:e,data:t},n,r)=>wSe&&t instanceof Blob?n?r(t):QR(t,r):CSe&&(t instanceof ArrayBuffer||_Se(t))?n?r(t):QR(new Blob([t]),r):r(Yl[e]+(t||"")),QR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},JR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<JR.length;e++)Gm[JR.charCodeAt(e)]=e;const kSe=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)o=Gm[e.charCodeAt(r)],a=Gm[e.charCodeAt(r+1)],s=Gm[e.charCodeAt(r+2)],l=Gm[e.charCodeAt(r+3)],f[i++]=o<<2|a>>4,f[i++]=(a&15)<<4|s>>2,f[i++]=(s&3)<<6|l&63;return u},ESe=typeof ArrayBuffer=="function",_W=(e,t)=>{if(typeof e!="string")return{type:"message",data:kW(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:PSe(e.substring(1),t)}:B4[n]?e.length>1?{type:B4[n],data:e.substring(1)}:{type:B4[n]}:xSe},PSe=(e,t)=>{if(ESe){const n=kSe(e);return kW(n,t)}else return{base64:!0,data:e}},kW=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EW=String.fromCharCode(30),TSe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CW(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EW))})})},LSe=(e,t)=>{const n=e.split(EW),r=[];for(let i=0;i<n.length;i++){const o=_W(n[i],t);if(r.push(o),o.type==="error")break}return r},PW=4;function Zr(e){if(e)return ASe(e)}function ASe(e){for(var t in Zr.prototype)e[t]=Zr.prototype[t];return e}Zr.prototype.on=Zr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Zr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Zr.prototype.off=Zr.prototype.removeListener=Zr.prototype.removeAllListeners=Zr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Zr.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){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Zr.prototype.emitReserved=Zr.prototype.emit;Zr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Zr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const pd=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TW(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const OSe=setTimeout,RSe=clearTimeout;function IS(e,t){t.useNativeTimers?(e.setTimeoutFn=OSe.bind(pd),e.clearTimeoutFn=RSe.bind(pd)):(e.setTimeoutFn=setTimeout.bind(pd),e.clearTimeoutFn=clearTimeout.bind(pd))}const MSe=1.33;function ISe(e){return typeof e=="string"?DSe(e):Math.ceil((e.byteLength||e.size)*MSe)}function DSe(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class NSe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class LW extends Zr{constructor(t){super(),this.writable=!1,IS(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new NSe(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=_W(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const AW="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),s9=64,BSe={};let eM=0,D3=0,tM;function nM(e){let t="";do t=AW[e%s9]+t,e=Math.floor(e/s9);while(e>0);return t}function OW(){const e=nM(+new Date);return e!==tM?(eM=0,tM=e):e+"."+nM(eM++)}for(;D3<s9;D3++)BSe[AW[D3]]=D3;function RW(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function zSe(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let MW=!1;try{MW=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(e){}const $Se=MW;function IW(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||$Se))return new XMLHttpRequest}catch(n){}if(!t)try{return new pd[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}function FSe(){}const HSe=function(){return new IW({xdomain:!1}).responseType!=null}();class VSe extends LW{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=HSe&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};LSe(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,TSe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=OW()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=RW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Wl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Wl extends Zr{constructor(t,n){super(),IS(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=TW(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new IW(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch(r){}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{n.setRequestHeader("Accept","*/*")}catch(r){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Wl.requestsCount++,Wl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=FSe,t)try{this.xhr.abort()}catch(n){}typeof document<"u"&&delete Wl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Wl.requestsCount=0;Wl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",rM);else if(typeof addEventListener=="function"){const e="onpagehide"in pd?"pagehide":"unload";addEventListener(e,rM,!1)}}function rM(){for(let e in Wl.requests)Wl.requests.hasOwnProperty(e)&&Wl.requests[e].abort()}const DW=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),N3=pd.WebSocket||pd.MozWebSocket,iM=!0,WSe="arraybuffer",oM=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class USe extends LW{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=oM?{}:TW(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=iM&&!oM?n?new N3(t,n):new N3(t):new N3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||WSe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;CW(r,this.supportsBinary,o=>{const a={};try{iM&&this.ws.send(o)}catch(s){}i&&DW(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=OW()),this.supportsBinary||(t.b64=1);const i=RW(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!N3}}const jSe={websocket:USe,polling:VSe},GSe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,qSe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function l9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=GSe.exec(e||""),o={},a=14;for(;a--;)o[qSe[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=YSe(o,o.path),o.queryKey=KSe(o,o.query),o}function YSe(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function KSe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class sd extends Zr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=l9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=l9(n.host).host),IS(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=zSe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=PW,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new jSe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&sd.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;sd.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;sd.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",sd.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=ISe(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){sd.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}sd.protocol=PW;function XSe(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=l9(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const ZSe=typeof ArrayBuffer=="function",QSe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,NW=Object.prototype.toString,JSe=typeof Blob=="function"||typeof Blob<"u"&&NW.call(Blob)==="[object BlobConstructor]",exe=typeof File=="function"||typeof File<"u"&&NW.call(File)==="[object FileConstructor]";function jk(e){return ZSe&&(e instanceof ArrayBuffer||QSe(e))||JSe&&e instanceof Blob||exe&&e instanceof File}function z4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(z4(e[n]))return!0;return!1}if(jk(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return z4(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&z4(e[n]))return!0;return!1}function txe(e){const t=[],n=e.data,r=e;return r.data=u9(n,t),r.attachments=t.length,{packet:r,buffers:t}}function u9(e,t){if(!e)return e;if(jk(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=u9(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=u9(e[r],t));return n}return e}function nxe(e,t){return e.data=c9(e.data,t),e.attachments=void 0,e}function c9(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=c9(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=c9(e[n],t));return e}const rxe=5;var sn;(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"})(sn||(sn={}));class ixe{constructor(t){this.replacer=t}encode(t){return(t.type===sn.EVENT||t.type===sn.ACK)&&z4(t)?(t.type=t.type===sn.EVENT?sn.BINARY_EVENT:sn.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===sn.BINARY_EVENT||t.type===sn.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=txe(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Gk extends Zr{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t),n.type===sn.BINARY_EVENT||n.type===sn.BINARY_ACK?(this.reconstructor=new oxe(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(jk(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(sn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===sn.BINARY_EVENT||r.type===sn.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(o,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Gk.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case sn.CONNECT:return typeof n=="object";case sn.DISCONNECT:return n===void 0;case sn.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case sn.EVENT:case sn.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case sn.ACK:case sn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class oxe{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=nxe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const axe=Object.freeze(Object.defineProperty({__proto__:null,protocol:rxe,get PacketType(){return sn},Encoder:ixe,Decoder:Gk},Symbol.toStringTag,{value:"Module"}));function Ps(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sxe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class BW extends Zr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ps(t,"open",this.onopen.bind(this)),Ps(t,"packet",this.onpacket.bind(this)),Ps(t,"error",this.onerror.bind(this)),Ps(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(sxe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:sn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:sn.CONNECT,data:t})}):this.packet({type:sn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case sn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}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 sn.EVENT:case sn.BINARY_EVENT:this.onevent(t);break;case sn.ACK:case sn.BINARY_ACK:this.onack(t);break;case sn.DISCONNECT:this.ondisconnect();break;case sn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:sn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:sn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function G1(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}G1.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=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};G1.prototype.reset=function(){this.attempts=0};G1.prototype.setMin=function(e){this.ms=e};G1.prototype.setMax=function(e){this.max=e};G1.prototype.setJitter=function(e){this.jitter=e};class d9 extends Zr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,IS(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new G1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||axe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new sd(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Ps(n,"open",function(){r.onopen(),t&&t()}),o=Ps(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ps(t,"ping",this.onping.bind(this)),Ps(t,"data",this.ondata.bind(this)),Ps(t,"error",this.onerror.bind(this)),Ps(t,"close",this.onclose.bind(this)),Ps(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){DW(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new BW(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Em={};function $4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=XSe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Em[i]&&o in Em[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new d9(r,t):(Em[i]||(Em[i]=new d9(r,t)),l=Em[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign($4,{Manager:d9,Socket:BW,io:$4,connect:$4});let B3;const lxe=new Uint8Array(16);function uxe(){if(!B3&&(B3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!B3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return B3(lxe)}const Ri=[];for(let e=0;e<256;++e)Ri.push((e+256).toString(16).slice(1));function cxe(e,t=0){return(Ri[e[t+0]]+Ri[e[t+1]]+Ri[e[t+2]]+Ri[e[t+3]]+"-"+Ri[e[t+4]]+Ri[e[t+5]]+"-"+Ri[e[t+6]]+Ri[e[t+7]]+"-"+Ri[e[t+8]]+Ri[e[t+9]]+"-"+Ri[e[t+10]]+Ri[e[t+11]]+Ri[e[t+12]]+Ri[e[t+13]]+Ri[e[t+14]]+Ri[e[t+15]]).toLowerCase()}const dxe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aM={randomUUID:dxe};function R0(e,t,n){if(aM.randomUUID&&!t&&!e)return aM.randomUUID();e=e||{};const r=e.random||(e.rng||uxe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return cxe(r)}var fxe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,hxe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,pxe=/[^-+\dA-Z]/g;function Io(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(sM[t]||t||sM.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},f=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},y=function(){return n?0:e.getTimezoneOffset()},x=function(){return gxe(e)},E=function(){return mxe(e)},_={d:function(){return a()},dd:function(){return da(a())},ddd:function(){return Ro.dayNames[s()]},DDD:function(){return lM({y:u(),m:l(),d:a(),_:o(),dayName:Ro.dayNames[s()],short:!0})},dddd:function(){return Ro.dayNames[s()+7]},DDDD:function(){return lM({y:u(),m:l(),d:a(),_:o(),dayName:Ro.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return da(l()+1)},mmm:function(){return Ro.monthNames[l()]},mmmm:function(){return Ro.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return da(u(),4)},h:function(){return f()%12||12},hh:function(){return da(f()%12||12)},H:function(){return f()},HH:function(){return da(f())},M:function(){return p()},MM:function(){return da(p())},s:function(){return m()},ss:function(){return da(m())},l:function(){return da(v(),3)},L:function(){return da(Math.floor(v()/10))},t:function(){return f()<12?Ro.timeNames[0]:Ro.timeNames[1]},tt:function(){return f()<12?Ro.timeNames[2]:Ro.timeNames[3]},T:function(){return f()<12?Ro.timeNames[4]:Ro.timeNames[5]},TT:function(){return f()<12?Ro.timeNames[6]:Ro.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":vxe(e)},o:function(){return(y()>0?"-":"+")+da(Math.floor(Math.abs(y())/60)*100+Math.abs(y())%60,4)},p:function(){return(y()>0?"-":"+")+da(Math.floor(Math.abs(y())/60),2)+":"+da(Math.floor(Math.abs(y())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return x()},WW:function(){return da(x())},N:function(){return E()}};return t.replace(fxe,function(C){return C in _?_[C]():C.slice(1,C.length-1)})}var sM={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"},Ro={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"]},da=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},lM=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,f=new Date;f.setDate(f[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},y=function(){return u[o+"FullYear"]()},x=function(){return f[o+"Date"]()},E=function(){return f[o+"Month"]()},_=function(){return f[o+"FullYear"]()},C=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},A=function(){return p[o+"FullYear"]()};return y()===n&&v()===r&&m()===i?l?"Tdy":"Today":_()===n&&E()===r&&x()===i?l?"Ysd":"Yesterday":A()===n&&T()===r&&C()===i?l?"Tmw":"Tomorrow":a},gxe=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},mxe=function(t){var n=t.getDay();return n===0&&(n=7),n},vxe=function(t){return(String(t).match(hxe)||[""]).pop().replace(pxe,"").replace(/GMT\+0000/g,"UTC")};const f9=ui("socketio/generateImage"),yxe=ui("socketio/runESRGAN"),bxe=ui("socketio/runFacetool"),Sxe=ui("socketio/deleteImage"),h9=ui("socketio/requestImages"),uM=ui("socketio/requestNewImages"),xxe=ui("socketio/cancelProcessing"),wxe=ui("socketio/requestSystemConfig"),zW=ui("socketio/requestModelChange"),Cxe=ui("socketio/saveStagingAreaImageToGallery"),_xe=ui("socketio/requestEmptyTempFolder"),kxe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(jR(!0)),t(N4(qt.t("common:statusConnected"))),t(wxe());const r=n().gallery;r.categories.result.latest_mtime?t(uM("result")):t(h9("result")),r.categories.user.latest_mtime?t(uM("user")):t(h9("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(jR(!1)),t(N4(qt.t("common:statusDisconnected"))),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,f={uuid:R0(),...u};if(["txt2img","img2img"].includes(l)&&t(A0({category:"result",image:{...f,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(Jbe({image:{...f,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(A0({image:{...f,category:"result"},category:"result"}))}if(o)switch(Bk[a]){case"img2img":{t(j1(f));break}}t(m6()),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(H4e({uuid:R0(),...r,category:"result"})),r.isBase64||t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(A0({category:"result",image:{uuid:R0(),...r,category:"result"}})),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(Bu(!0)),t(Rbe(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(GR()),t(m6())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:R0(),...l}));t(F4e({images:s,areMoreImagesAvailable:o,category:a})),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(Dbe());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(A0({category:"result",image:r})),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(m6())),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(FV(r));const{initialImage:o,maskPath:a}=n().options;(o===i||(o==null?void 0:o.url)===i)&&t(_V()),a===i&&t(LV("")),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(Mbe(r)),r.infill_methods.includes("patchmatch")||t(TV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(qR(o)),t(N4(qt.t("common:statusModelChanged"))),t(Bu(!1)),t(O0(!0)),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(qR(o)),t(Bu(!1)),t(O0(!0)),t(GR()),t(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(Wm({title:qt.t("toast:tempFoldersEmptied"),status:"success",duration:2500,isClosable:!0}))}}},Exe=["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"],Pxe=[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],Txe=[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],Lxe=[{key:"2x",value:2},{key:"4x",value:4}],qk=0,Yk=4294967295,Axe=["gfpgan","codeformer"],Oxe=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$W=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);var Rxe=Math.PI/180;function Mxe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const l1=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},lt={_global:l1,version:"8.3.14",isBrowser:Mxe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return lt.angleDeg?e*Rxe: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:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return lt.DD.isDragging},isDragReady(){return!!lt.DD.node},releaseCanvasOnDestroy:!0,document:l1.document,_injectGlobal(e){l1.Konva=e}},br=e=>{lt[e.prototype.getClassName()]=e};lt._injectGlobal(lt);class pa{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new pa(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var f=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/f):-Math.acos(r/f)),l.scaleX=s/f,l.scaleY=f,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var Ixe="[object Array]",Dxe="[object Number]",Nxe="[object String]",Bxe="[object Boolean]",zxe=Math.PI/180,$xe=180/Math.PI,C6="#",Fxe="",Hxe="0",Vxe="Konva warning: ",cM="Konva error: ",Wxe="rgb(",_6={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]},Uxe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,z3=[];const jxe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},de={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===Ixe},_isNumber(e){return Object.prototype.toString.call(e)===Dxe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===Nxe},_isBoolean(e){return Object.prototype.toString.call(e)===Bxe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){z3.push(e),z3.length===1&&jxe(function(){const t=z3;z3=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(t){}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=de.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(C6,Fxe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=Hxe+e;return C6+e},getRGB(e){var t;return e in _6?(t=_6[e],{r:t[0],g:t[1],b:t[2]}):e[0]===C6?this._hexToRgb(e.substring(1)):e.substr(0,4)===Wxe?(t=Uxe.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(e){return e=e||"black",de._namedColorToRBA(e)||de._hex3ColorToRGBA(e)||de._hex6ColorToRGBA(e)||de._rgbColorToRGBA(e)||de._rgbaColorToRGBA(e)||de._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_6[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)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(e){if(e[0]==="#"&&e.length===4)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(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,f=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,f[p]=l*255;return{r:Math.round(f[0]),g:Math.round(f[1]),b:Math.round(f[2]),a:1}}},haveIntersection(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(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(e){return e.slice(0)},degToRad(e){return e*zxe},radToDeg(e){return e*$xe},_degToRad(e){return de.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),de.degToRad(e)},_radToDeg(e){return de.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),de.radToDeg(e)},_getRotation(e){return lt.angleDeg?de.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(cM+e)},error(e){console.error(cM+e)},warn(e){!lt.showWarnings||console.warn(Vxe+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,o){var a,s,l,u=(e-n)*(e-n)+(t-r)*(t-r);if(u==0)a=e,s=t,l=(i-n)*(i-n)+(o-r)*(o-r);else{var f=((i-e)*(n-e)+(o-t)*(r-t))/u;f<0?(a=e,s=t,l=(e-i)*(e-i)+(t-o)*(t-o)):f>1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+f*(n-e),s=t+f*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=de.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=de._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],f=l[1],p=l[2];p<i&&(r.x=u,r.y=f,i=p)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],o=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});var s=[];return o.forEach(function(l){var u=de._getProjectionToLine(l,i,n);s.push(u.x),s.push(u.y)}),s},_prepareToStringify(e){var t;e.visitedByCircularReferenceRemoval=!0;for(var n in e)if(!!(e.hasOwnProperty(n)&&e[n]&&typeof e[n]=="object")){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||de._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(de._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999},releaseCanvas(...e){!lt.releaseCanvasOnDestroy||e.forEach(t=>{t.width=0,t.height=0})}};function Kd(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function FW(e){return e>255?255:e<0?0:Math.round(e)}function He(){if(lt.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Kd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function HW(e){if(lt.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Kd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function Kk(){if(lt.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Kd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function q1(){if(lt.isUnminified)return function(e,t){return de._isString(e)||de.warn(Kd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function VW(){if(lt.isUnminified)return function(e,t){const n=de._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||de.warn(Kd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Gxe(){if(lt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(de._isArray(e)?e.forEach(function(r){de._isNumber(r)||de.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):de.warn(Kd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ws(){if(lt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Kd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function qxe(e){if(lt.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Kd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Pm="get",Tm="set";const J={addGetterSetter(e,t,n,r,i){J.addGetter(e,t,n),J.addSetter(e,t,r,i),J.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Pm+de._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Tm+de._capitalize(t);e.prototype[i]||J.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Tm+de._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=de._capitalize,s=Pm+a(t),l=Tm+a(t),u,f;e.prototype[s]=function(){var m={};for(u=0;u<o;u++)f=n[u],m[f]=this.getAttr(t+a(f));return m};var p=qxe(n);e.prototype[l]=function(m){var v=this.attrs[t],y;r&&(m=r.call(this,m)),p&&p.call(this,m,t);for(y in m)!m.hasOwnProperty(y)||this._setAttr(t+a(y),m[y]);return m||n.forEach(x=>{this._setAttr(t+a(x),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},J.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=Tm+n,i=Pm+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){de.error("Adding deprecated "+t);var i=Pm+de._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){de.error(o);var a=this.attrs[t];return a===void 0?n:a},J.addSetter(e,t,r,function(){de.error(o)}),J.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=Pm+de._capitalize(n),a=Tm+de._capitalize(n);function s(){i.apply(this,arguments),de.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function Yxe(e){var t=[],n=e.length,r=de,i,o;for(i=0;i<n;i++)o=e[i],r._isNumber(o)?o=Math.round(o*1e3)/1e3:r._isString(o)||(o=o+""),t.push(o);return t}var dM=",",Kxe="(",Xxe=")",Zxe="([",Qxe="])",Jxe=";",ewe="()",twe="=",fM=["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"],nwe=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const rwe=100;class DS{constructor(t){this.canvas=t,lt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,i=r.length,o="",a,s,l,u;for(a=0;a<i;a++)s=r[a],l=s.method,l?(u=s.args,o+=l,t?o+=ewe:de._isArray(u[0])?o+=Zxe+u.join(dM)+Qxe:(n&&(u=u.map(f=>typeof f=="number"?Math.floor(f):f)),o+=Kxe+u.join(dM)+Xxe)):(o+=s.property,t||(o+=twe+s.val)),o+=Jxe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=rwe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var f=arguments,p=this._context;f.length===3?p.drawImage(t,n,r):f.length===5?p.drawImage(t,n,r,i,o):f.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=fM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=Yxe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i<n;i++)a(fM[i]);t.setAttr=function(){r.apply(t,arguments);var s=arguments[0],l=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:s,val:l})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}nwe.forEach(function(e){Object.defineProperty(DS.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class iwe extends DS{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){var n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){var n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}var i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}var o=t.getFillLinearGradientColorStops();if(o&&r==="linear-gradient"){this._fillLinearGradient(t);return}var a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):i?this._fillPattern(t):o?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){var n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var o=t.getStrokeLinearGradientColorStops();o?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,i,o=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,s=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),f=l.x*u,p=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(f),Math.abs(p))),this.setAttr("shadowOffsetX",s.x*f),this.setAttr("shadowOffsetY",s.y*p)}}class owe extends DS{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var n=t.getStrokeScaleEnabled();if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),o=i==="auto"?t.strokeWidth():i;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),n||this.restore()}}}var $3;function awe(){if($3)return $3;var e=de.createCanvasElement(),t=e.getContext("2d");return $3=function(){var n=lt._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),de.releaseCanvas(e),$3}class NS{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||lt.pixelRatio||awe();this.pixelRatio=r,this._canvas=de.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"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch(r){try{return this._canvas.toDataURL()}catch(i){return de.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}J.addGetterSetter(NS,"pixelRatio",void 0,He());class u1 extends NS{constructor(t={width:0,height:0}){super(t),this.context=new iwe(this),this.setSize(t.width,t.height)}}class Xk extends NS{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new owe(this),this.setSize(t.width,t.height)}}const mn={get isDragging(){var e=!1;return mn._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return mn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];mn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=de._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];mn._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(mn.justDragged=!0,lt._mouseListenClick=!1,lt._touchListenClick=!1,lt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof lt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){mn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&mn._dragElements.delete(n)})}};lt.isBrowser&&(window.addEventListener("mouseup",mn._endDragBefore,!0),window.addEventListener("touchend",mn._endDragBefore,!0),window.addEventListener("mousemove",mn._drag),window.addEventListener("touchmove",mn._drag),window.addEventListener("mouseup",mn._endDragAfter,!1),window.addEventListener("touchend",mn._endDragAfter,!1));var F4="absoluteOpacity",F3="allEventListeners",Eu="absoluteTransform",hM="absoluteScale",jf="canvas",swe="Change",lwe="children",uwe="konva",p9="listening",pM="mouseenter",gM="mouseleave",mM="set",vM="Shape",H4=" ",yM="stage",Jc="transform",cwe="Stage",g9="visible",dwe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(H4);let fwe=1;class Ve{constructor(t){this._id=fwe++,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}hasChildren(){return!1}_clearCache(t){(t===Jc||t===Eu)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===Jc||t===Eu,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(H4);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(jf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Eu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(jf)){const{scene:t,filter:n,hit:r}=this._cache.get(jf);de.releaseCanvas(t,n,r),this._cache.delete(jf)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,f=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){de.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new u1({pixelRatio:a,width:i,height:o}),v=new u1({pixelRatio:a,width:0,height:0}),y=new Xk({pixelRatio:p,width:i,height:o}),x=m.getContext(),E=y.getContext();return y.isCache=!0,m.isCache=!0,this._cache.delete(jf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),x.save(),E.save(),x.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(F4),this._clearSelfAndDescendantCache(hM),this.drawScene(m,this),this.drawHit(y,this),this._isUnderCache=!1,x.restore(),E.restore(),f&&(x.save(),x.beginPath(),x.rect(0,0,i,o),x.closePath(),x.setAttr("strokeStyle","red"),x.setAttr("lineWidth",5),x.stroke(),x.restore()),this._cache.set(jf,{scene:m,filter:v,hit:y,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(jf)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var f=l.point(u);i===void 0&&(i=a=f.x,o=s=f.y),i=Math.min(i,f.x),o=Math.min(o,f.y),a=Math.max(a,f.x),s=Math.max(s,f.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var f=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/f,r.getHeight()/f),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<a;l++){if(u=t[l],typeof u!="function"){de.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,s),o.putImageData(s,0,0)}}catch(p){de.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,n){if(this._cache&&this._cache.delete(F3),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(H4),i=r.length,o,a,s,l,u;for(o=0;o<i;o++)a=r[o],s=a.split("."),l=s[0],u=s[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(H4),i=r.length,o,a,s,l,u,f;if(this._cache&&this._cache.delete(F3),!t)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=r[o],l=s.split("."),u=l[0],f=l[1],u)this.eventListeners[u]&&this._off(u,f,n);else for(a in this.eventListeners)this._off(a,f,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var i=this;this.on(t,function(o){for(var a=o.target.findAncestors(n,!0,i),s=0;s<a.length;s++)o=de.cloneObject(o),o.currentTarget=a[s],r.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),mn._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Eu),this._clearSelfAndDescendantCache(F4),this._clearSelfAndDescendantCache(hM),this._clearSelfAndDescendantCache(yM),this._clearSelfAndDescendantCache(g9),this._clearSelfAndDescendantCache(p9)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+de._capitalize(t);return de._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==lwe&&(r=mM+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(p9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(g9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;mn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!lt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a<o;a++)s=u[a],r++,s.nodeType!==vM&&(i=i.concat(s.getChildren().slice())),s._id===n._id&&(a=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==cwe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Jc),this._clearSelfAndDescendantCache(Eu)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new pa,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(Jc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(Jc),this._clearSelfAndDescendantCache(Eu),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={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,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a<o;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return de.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return de.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return de.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return de.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return de.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&de.warn("Unexpected value "+t+" 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 n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(F4,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=de.isObject(i)&&!de._isPlainObject(i)&&!de._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),de._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i<r;i++)if(o=n[i],de.isValidSelector(o)||(de.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),de.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),de.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(yM,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Eu,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new pa,this._eachAncestorReverse(function(i){var o=i.transformsEnabled();o==="all"?n.multiply(i.getTransform()):o==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),n;n=this._cache.get(Eu)||new pa,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(i-a,o-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Jc,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(Jc)||new pa;r.reset();var i=this.x(),o=this.y(),a=lt.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,f=this.attrs.skewY||0,p=this.attrs.offsetX||0,m=this.attrs.offsetY||0;return(i!==0||o!==0)&&r.translate(i,o),a!==0&&r.rotate(a),(u!==0||f!==0)&&r.skew(u,f),(s!==1||l!==1)&&r.scale(s,l),(p!==0||m!==0)&&r.translate(-1*p,-1*m),r.dirty=!1,r}clone(t){var n=de.cloneObject(this.attrs),r,i,o,a,s;for(r in t)n[r]=t[r];var l=new this.constructor(n);for(r in this.eventListeners)for(i=this.eventListeners[r],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf(uwe)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(s));return l}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(n.x),o=t.y!==void 0?t.y:Math.floor(n.y),a=t.pixelRatio||1,s=new u1({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:a}),l=s.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||o)&&l.translate(-1*i,-1*o),this.drawScene(s),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,de._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():lt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||n==="konva")&&(!n||a===n)&&(!r||r===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[t];break}o--}}_fireChangeEvent(t,n,r){this._fire(t+swe,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[mM+de._capitalize(t)];return de._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(lt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!de.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,n,r){n&&this.nodeType===vM&&(n.target=this);var i=(t===pM||t===gM)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===pM||t===gM)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!o&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){let n=this._cache.get(F3);if(!n){n={};let i=Object.getPrototypeOf(this);for(;i;){if(!i.eventListeners){i=Object.getPrototypeOf(i);continue}for(var r in i.eventListeners){const o=i.eventListeners[r],a=n[r]||[];n[r]=o.concat(a)}i=Object.getPrototypeOf(i)}this._cache.set(F3,n)}return n[t]}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,n);const o=this.eventListeners[t];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition(),o=r._getPointerById(n)||r._changedPointerPositions[0]||i;mn._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){mn._dragElements.has(this._id)||this._createDragElement(t);const r=mn._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(!!r){var i={x:r.x-n.offset.x,y:r.y-n.offset.y},o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,t);a?i=a:de.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const n=mn._dragElements.get(this._id);n&&(n.dragStatus="stopped"),mn._endDragBefore(t),mn._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=mn._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||lt.dragButtons.indexOf(t.evt.button)>=0;if(!!r&&!this.isDragging()){var i=!1;mn._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=mn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&mn._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return de.haveIntersection(r,this.getClientRect())}static create(t,n){return de._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Ve.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),lt[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=lt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(Ve._createNode(i[s]));return o}}Ve.prototype.nodeType="Node";Ve.prototype._attrsAffectingSize=[];Ve.prototype.eventListeners={};Ve.prototype.on.call(Ve.prototype,dwe,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Jc),this._clearSelfAndDescendantCache(Eu)});Ve.prototype.on.call(Ve.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(g9)});Ve.prototype.on.call(Ve.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(p9)});Ve.prototype.on.call(Ve.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(F4)});const Gn=J.addGetterSetter;Gn(Ve,"zIndex");Gn(Ve,"absolutePosition");Gn(Ve,"position");Gn(Ve,"x",0,He());Gn(Ve,"y",0,He());Gn(Ve,"globalCompositeOperation","source-over",q1());Gn(Ve,"opacity",1,He());Gn(Ve,"name","",q1());Gn(Ve,"id","",q1());Gn(Ve,"rotation",0,He());J.addComponentsGetterSetter(Ve,"scale",["x","y"]);Gn(Ve,"scaleX",1,He());Gn(Ve,"scaleY",1,He());J.addComponentsGetterSetter(Ve,"skew",["x","y"]);Gn(Ve,"skewX",0,He());Gn(Ve,"skewY",0,He());J.addComponentsGetterSetter(Ve,"offset",["x","y"]);Gn(Ve,"offsetX",0,He());Gn(Ve,"offsetY",0,He());Gn(Ve,"dragDistance",null,He());Gn(Ve,"width",0,He());Gn(Ve,"height",0,He());Gn(Ve,"listening",!0,Ws());Gn(Ve,"preventDefault",!0,Ws());Gn(Ve,"filters",null,function(e){return this._filterUpToDate=!1,e});Gn(Ve,"visible",!0,Ws());Gn(Ve,"transformsEnabled","all",q1());Gn(Ve,"size");Gn(Ve,"dragBoundFunc");Gn(Ve,"draggable",!1,Ws());J.backCompat(Ve,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class ba extends Ve{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(i){t(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}var r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Ve.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Ve.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const f=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),y=this.clipY();o.rect(v,y,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var x=!f&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),x&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},f=this;(n=this.children)===null||n===void 0||n.forEach(function(x){if(!!x.visible()){var E=x.getClientRect({relativeTo:f,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;v<p.length;v++){var y=p[v];if(y._isVisible(this)){m=!0;break}}return m&&o!==void 0?u={x:o,y:a,width:s-o,height:l-a}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,i)}}J.addComponentsGetterSetter(ba,"clip",["x","y","width","height"]);J.addGetterSetter(ba,"clipX",void 0,He());J.addGetterSetter(ba,"clipY",void 0,He());J.addGetterSetter(ba,"clipWidth",void 0,He());J.addGetterSetter(ba,"clipHeight",void 0,He());J.addGetterSetter(ba,"clipFunc");const S2=new Map,WW=lt._global.PointerEvent!==void 0;function k6(e){return S2.get(e)}function Zk(e){return{evt:e,pointerId:e.pointerId}}function UW(e,t){return S2.get(e)===t}function jW(e,t){Cv(e),t.getStage()&&(S2.set(e,t),WW&&t._fire("gotpointercapture",Zk(new PointerEvent("gotpointercapture"))))}function Cv(e,t){const n=S2.get(e);if(!n)return;const r=n.getStage();r&&r.content,S2.delete(e),WW&&n._fire("lostpointercapture",Zk(new PointerEvent("lostpointercapture")))}var hwe="Stage",pwe="string",bM="px",gwe="mouseout",GW="mouseleave",qW="mouseover",YW="mouseenter",KW="mousemove",XW="mousedown",ZW="mouseup",qm="pointermove",Ym="pointerdown",M0="pointerup",Km="pointercancel",mwe="lostpointercapture",H3="pointerout",V3="pointerleave",W3="pointerover",U3="pointerenter",m9="contextmenu",QW="touchstart",JW="touchend",eU="touchmove",tU="touchcancel",v9="wheel",vwe=5,ywe=[[YW,"_pointerenter"],[XW,"_pointerdown"],[KW,"_pointermove"],[ZW,"_pointerup"],[GW,"_pointerleave"],[QW,"_pointerdown"],[eU,"_pointermove"],[JW,"_pointerup"],[tU,"_pointercancel"],[qW,"_pointerover"],[v9,"_wheel"],[m9,"_contextmenu"],[Ym,"_pointerdown"],[qm,"_pointermove"],[M0,"_pointerup"],[Km,"_pointercancel"],[mwe,"_lostpointercapture"]];const E6={mouse:{[H3]:gwe,[V3]:GW,[W3]:qW,[U3]:YW,[qm]:KW,[Ym]:XW,[M0]:ZW,[Km]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[H3]:"touchout",[V3]:"touchleave",[W3]:"touchover",[U3]:"touchenter",[qm]:eU,[Ym]:QW,[M0]:JW,[Km]:tU,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[H3]:H3,[V3]:V3,[W3]:W3,[U3]:U3,[qm]:qm,[Ym]:Ym,[M0]:M0,[Km]:Km,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Xm=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",l0=e=>{const t=Xm(e);if(t==="pointer")return lt.pointerEventsEnabled&&E6.pointer;if(t==="touch")return E6.touch;if(t==="mouse")return E6.mouse};function SM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const bwe="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);",V4=[];class BS extends ba{constructor(t){super(SM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),V4.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{SM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||de.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===pwe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r<n;r++)t[r].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),ba.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&de._isInDocument(t)&&this.container().removeChild(t);var n=V4.indexOf(this);return n>-1&&V4.splice(n,1),de.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(de.warn(bwe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new u1({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+bM,this.content.style.height=n+bM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(t);var i=this.children.length;return i>vwe&&de.warn("The stage has "+i+" 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."),t.setSize({width:this.width(),height:this.height()}),t.draw(),lt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return UW(t,this)}setPointerCapture(t){jW(t,this)}releaseCapture(t){Cv(t)}getLayers(){return this.children}_bindContentEvents(){!lt.isBrowser||ywe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=l0(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=l0(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=l0(t.type),r=Xm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!mn.isDragging||lt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=l0(t.type),r=Xm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(mn.justDragged=!1,lt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;lt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=l0(t.type),r=Xm(t.type);if(!n)return;mn.isDragging&&mn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!mn.isDragging||lt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l),f=l.id,p={evt:t,pointerId:f};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:f}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=l0(t.type),r=Xm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=k6(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const f=l.id,p={evt:t,pointerId:f};let m=!1;lt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):mn.justDragged||(lt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){lt["_"+r+"InDblClickWindow"]=!1},lt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),lt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,lt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:f}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:f}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),lt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(m9,{evt:t}):this._fire(m9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(v9,{evt:t}):this._fire(v9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=k6(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(M0,Zk(t)),Cv(t.pointerId)}_lostpointercapture(t){Cv(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:de._getFirstPointerId(t)}])}_setPointerPosition(t){de.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new u1({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Xk({pixelRatio:1,width:this.width(),height:this.height()}),!!lt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.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"),t.appendChild(this.content),this._resizeDOM()}}cache(){return de.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}BS.prototype.nodeType=hwe;br(BS);J.addGetterSetter(BS,"container");var nU="hasShadow",rU="shadowRGBA",iU="patternImage",oU="linearGradient",aU="radialGradient";let j3;function P6(){return j3||(j3=de.createCanvasElement().getContext("2d"),j3)}const _v={};function Swe(e){e.fill()}function xwe(e){e.stroke()}function wwe(e){e.fill()}function Cwe(e){e.stroke()}function _we(){this._clearCache(nU)}function kwe(){this._clearCache(rU)}function Ewe(){this._clearCache(iU)}function Pwe(){this._clearCache(oU)}function Twe(){this._clearCache(aU)}class Me extends Ve{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in _v)););this.colorKey=n,_v[n]=this}getContext(){return de.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return de.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(nU,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(iU,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=P6();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new pa;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(lt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(oU,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=P6(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}_getRadialGradient(){return this._getCache(aU,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=P6(),r=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),o=n.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}getShadowRGBA(){return this._getCache(rU,this._getShadowRGBA)}_getShadowRGBA(){if(!!this.hasShadow()){var t=de.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Ve.prototype.destroy.call(this),delete _v[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){de.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),f=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(f),v=l+Math.abs(p),y=u&&this.shadowBlur()||0,x=m+y*2,E=v+y*2,_={width:x,height:E,x:-(a/2+y)+Math.min(f,0)+i.x,y:-(a/2+y)+Math.min(p,0)+i.y};return n?_:this._transformedRect(_,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,f,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var y=this.getAbsoluteTransform(n).getMatrix();return o.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),f=u.bufferCanvas,p=f.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var x=this.getAbsoluteTransform(n).getMatrix();p.transform(x[0],x[1],x[2],x[3],x[4],x[5]),s.call(this,p,this),p.restore();var E=f.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(f._canvas,0,0,f.width/E,f.height/E)}else{if(o._applyLineJoin(this),!v){var x=this.getAbsoluteTransform(n).getMatrix();o.transform(x[0],x[1],x[2],x[3],x[4],x[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||de.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()"),u){a.save();var f=this.getAbsoluteTransform(n).getMatrix();return a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,f,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,f=u.length,p=de._hexToRgb(this.colorKey),m=0;m<f;m+=4)v=u[m+3],v>t?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(y){de.error("Unable to draw hit graph from cached scene canvas. "+y.message)}return this}hasPointerCapture(t){return UW(t,this)}setPointerCapture(t){jW(t,this)}releaseCapture(t){Cv(t)}}Me.prototype._fillFunc=Swe;Me.prototype._strokeFunc=xwe;Me.prototype._fillFuncHit=wwe;Me.prototype._strokeFuncHit=Cwe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";br(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",_we);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",kwe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Ewe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Pwe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Twe);J.addGetterSetter(Me,"stroke",void 0,VW());J.addGetterSetter(Me,"strokeWidth",2,He());J.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);J.addGetterSetter(Me,"hitStrokeWidth","auto",Kk());J.addGetterSetter(Me,"strokeHitEnabled",!0,Ws());J.addGetterSetter(Me,"perfectDrawEnabled",!0,Ws());J.addGetterSetter(Me,"shadowForStrokeEnabled",!0,Ws());J.addGetterSetter(Me,"lineJoin");J.addGetterSetter(Me,"lineCap");J.addGetterSetter(Me,"sceneFunc");J.addGetterSetter(Me,"hitFunc");J.addGetterSetter(Me,"dash");J.addGetterSetter(Me,"dashOffset",0,He());J.addGetterSetter(Me,"shadowColor",void 0,q1());J.addGetterSetter(Me,"shadowBlur",0,He());J.addGetterSetter(Me,"shadowOpacity",1,He());J.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);J.addGetterSetter(Me,"shadowOffsetX",0,He());J.addGetterSetter(Me,"shadowOffsetY",0,He());J.addGetterSetter(Me,"fillPatternImage");J.addGetterSetter(Me,"fill",void 0,VW());J.addGetterSetter(Me,"fillPatternX",0,He());J.addGetterSetter(Me,"fillPatternY",0,He());J.addGetterSetter(Me,"fillLinearGradientColorStops");J.addGetterSetter(Me,"strokeLinearGradientColorStops");J.addGetterSetter(Me,"fillRadialGradientStartRadius",0);J.addGetterSetter(Me,"fillRadialGradientEndRadius",0);J.addGetterSetter(Me,"fillRadialGradientColorStops");J.addGetterSetter(Me,"fillPatternRepeat","repeat");J.addGetterSetter(Me,"fillEnabled",!0);J.addGetterSetter(Me,"strokeEnabled",!0);J.addGetterSetter(Me,"shadowEnabled",!0);J.addGetterSetter(Me,"dashEnabled",!0);J.addGetterSetter(Me,"strokeScaleEnabled",!0);J.addGetterSetter(Me,"fillPriority","color");J.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);J.addGetterSetter(Me,"fillPatternOffsetX",0,He());J.addGetterSetter(Me,"fillPatternOffsetY",0,He());J.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);J.addGetterSetter(Me,"fillPatternScaleX",1,He());J.addGetterSetter(Me,"fillPatternScaleY",1,He());J.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);J.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);J.addGetterSetter(Me,"fillLinearGradientStartPointX",0);J.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);J.addGetterSetter(Me,"fillLinearGradientStartPointY",0);J.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);J.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);J.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);J.addGetterSetter(Me,"fillLinearGradientEndPointX",0);J.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);J.addGetterSetter(Me,"fillLinearGradientEndPointY",0);J.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);J.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);J.addGetterSetter(Me,"fillRadialGradientStartPointX",0);J.addGetterSetter(Me,"fillRadialGradientStartPointY",0);J.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);J.addGetterSetter(Me,"fillRadialGradientEndPointX",0);J.addGetterSetter(Me,"fillRadialGradientEndPointY",0);J.addGetterSetter(Me,"fillPatternRotation",0);J.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Lwe="#",Awe="beforeDraw",Owe="draw",sU=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Rwe=sU.length;class jh extends ba{constructor(t){super(t),this.canvas=new u1,this.hitCanvas=new Xk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Ve.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=Ve.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Ve.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Ve.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return Ve.prototype.remove.call(this),t&&t.parentNode&&de._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Ve.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){de.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){de.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,de.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<Rwe;i++){const o=sU[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=de._rgbToHex(r[0],r[1],r[2]),a=_v[Lwe+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(Awe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ba.prototype.drawScene.call(this,i,n),this._fire(Owe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ba.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return de.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return de.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}jh.prototype.nodeType="Layer";br(jh);J.addGetterSetter(jh,"imageSmoothingEnabled",!0);J.addGetterSetter(jh,"clearBeforeDraw",!0);J.addGetterSetter(jh,"hitGraphEnabled",!0,Ws());class Qk extends jh{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Qk.prototype.nodeType="FastLayer";br(Qk);class P1 extends ba{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}P1.prototype.nodeType="Group";br(P1);var T6=function(){return l1.performance&&l1.performance.now?function(){return l1.performance.now()}:function(){return new Date().getTime()}}();class Wa{constructor(t,n){this.id=Wa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:T6(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;i<r;i++)if(n[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=Wa,n=t.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=T6(),Wa._addAnimation(this),this}stop(){return Wa._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,i=r.length,o;for(o=0;o<i;o++)if(r[o].id===n){this.animations.splice(o,1);break}}static _runFrames(){var t={},n=this.animations,r,i,o,a,s,l,u,f,p;for(a=0;a<n.length;a++)if(r=n[a],i=r.layers,o=r.func,r._updateFrameObject(T6()),l=i.length,o?p=o.call(r,r.frame)!==!1:p=!0,!!p)for(s=0;s<l;s++)u=i[s],u._id!==void 0&&(t[u._id]=u);for(f in t)!t.hasOwnProperty(f)||t[f].batchDraw()}static _animationLoop(){var t=Wa;t.animations.length?(t._runFrames(),de.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,de.requestAnimFrame(this._animationLoop))}}Wa.animations=[];Wa.animIdCounter=0;Wa.animRunning=!1;var Mwe={node:1,duration:1,easing:1,onFinish:1,yoyo:1},Iwe=1,xM=2,wM=3,Dwe=0,CM=["fill","stroke","shadowColor"];class Nwe{constructor(t,n,r,i,o,a,s){this.prop=t,this.propFunc=n,this.begin=i,this._pos=i,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=o-this.begin,this.pause()}fire(t){var n=this[t];n&&n()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=xM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=wM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===xM?this.setTime(t):this.state===wM&&this.setTime(this.duration-t)}pause(){this.state=Iwe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class $r{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||kv.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=Dwe++;var u=r.getLayer()||(r instanceof lt.Stage?r.getLayers():null);u||de.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Wa(function(){n.tween.onEnterFrame()},u),this.tween=new Nwe(l,function(f){n._tweenFunc(f)},a,0,1,o*1e3,s),this._addListeners(),$r.attrs[i]||($r.attrs[i]={}),$r.attrs[i][this._id]||($r.attrs[i][this._id]={}),$r.tweens[i]||($r.tweens[i]={});for(l in t)Mwe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,f,p,m;if(s=$r.tweens[i][t],s&&delete $r.attrs[i][s][t],o=r.getAttr(t),de._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=de._prepareArrayForTween(o,n,r.closed())):(f=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l<u;l++)if(l%2===0)a.push(n[l]-o[l]);else{var v=de.colorToRGBA(o[l]);m=de.colorToRGBA(n[l]),o[l]=v,a.push({r:m.r-v.r,g:m.g-v.g,b:m.b-v.b,a:m.a-v.a})}else for(l=0;l<u;l++)a.push(n[l]-o[l]);else CM.indexOf(t)!==-1?(o=de.colorToRGBA(o),m=de.colorToRGBA(n),a={r:m.r-o.r,g:m.g-o.g,b:m.b-o.b,a:m.a-o.a}):a=n-o;$r.attrs[i][this._id][t]={start:o,diff:a,end:n,trueEnd:f,trueStart:p},$r.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=$r.attrs[n._id][this._id],i,o,a,s,l,u,f,p;for(i in r){if(o=r[i],a=o.start,s=o.diff,p=o.end,de._isArray(a))if(l=[],f=Math.max(a.length,p.length),i.indexOf("fill")===0)for(u=0;u<f;u++)u%2===0?l.push((a[u]||0)+s[u]*t):l.push("rgba("+Math.round(a[u].r+s[u].r*t)+","+Math.round(a[u].g+s[u].g*t)+","+Math.round(a[u].b+s[u].b*t)+","+(a[u].a+s[u].a*t)+")");else for(u=0;u<f;u++)l.push((a[u]||0)+s[u]*t);else CM.indexOf(i)!==-1?l="rgba("+Math.round(a.r+s.r*t)+","+Math.round(a.g+s.g*t)+","+Math.round(a.b+s.b*t)+","+(a.a+s.a*t)+")":l=a+s*t;n.setAttr(i,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=$r.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=$r.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=$r.tweens[t],i;this.pause();for(i in r)delete $r.tweens[t][i];delete $r.attrs[t][n]}}$r.attrs={};$r.tweens={};Ve.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new $r(e);n.play()};const kv={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t)},ElasticEaseOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/o)+n+t)},ElasticEaseInOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r/2)===2?t+n:(o||(o=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o)*.5+n+t)},BounceEaseOut(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(e,t,n,r){return n-kv.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?kv.BounceEaseIn(e*2,0,n,r)*.5+t:kv.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(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(e,t,n,r){return n*e/r+t}},Dh=de._assign(lt,{Util:de,Transform:pa,Node:Ve,Container:ba,Stage:BS,stages:V4,Layer:jh,FastLayer:Qk,Group:P1,DD:mn,Shape:Me,shapes:_v,Animation:Wa,Tween:$r,Easings:kv,Context:DS,Canvas:NS});class Qu extends Me{_sceneFunc(t){var n=lt.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,n,r),t.arc(0,0,this.innerRadius(),n,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),i=lt.getAngle(r?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),u=o*(o>0?t:n),f=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:f-u,height:m-p}}}Qu.prototype._centroid=!0;Qu.prototype.className="Arc";Qu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];br(Qu);J.addGetterSetter(Qu,"innerRadius",0,He());J.addGetterSetter(Qu,"outerRadius",0,He());J.addGetterSetter(Qu,"angle",0,He());J.addGetterSetter(Qu,"clockwise",!1,Ws());function y9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),f=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+f*(i-e),y=r+f*(o-t);return[p,m,v,y]}function _M(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=y9(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(o[0])&&(r.push(o[0]),r.push(o[1]),r.push(e[i]),r.push(e[i+1]),r.push(o[2]),r.push(o[3]));return r}class Ju extends Me{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,l,u;if(!!r){if(t.beginPath(),t.moveTo(n[0],n[1]),i!==0&&r>4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u<l-2;)t.bezierCurveTo(s[u++],s[u++],s[u++],s[u++],s[u++],s[u++]);o||t.quadraticCurveTo(s[l-2],s[l-1],n[r-2],n[r-1])}else if(a)for(u=2;u<r;)t.bezierCurveTo(n[u++],n[u++],n[u++],n[u++],n[u++],n[u++]);else for(u=2;u<r;u+=2)t.lineTo(n[u],n[u+1]);o?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():_M(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=y9(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=y9(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=_M(t,r),s=[i[2],i[3]].concat(a).concat([o[0],o[1],t[n-2],t[n-1],o[2],o[3],i[0],i[1],t[0],t[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);return{x:n,y:i,width:r-n,height:o-i}}}Ju.prototype.className="Line";Ju.prototype._attrsAffectingSize=["points","bezier","tension"];br(Ju);J.addGetterSetter(Ju,"closed",!1);J.addGetterSetter(Ju,"bezier",!1);J.addGetterSetter(Ju,"tension",0,He());J.addGetterSetter(Ju,"points",[],Gxe());class Fn extends Me{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=Fn.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on("dataChange.konva",function(){this.dataArray=Fn.parsePathData(this.data()),this.pathLength=0;for(var r=0;r<this.dataArray.length;++r)this.pathLength+=this.dataArray[r].pathLength})}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;i<n.length;i++){var o=n[i].command,a=n[i].points;switch(o){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var s=a[0],l=a[1],u=a[2],f=a[3],p=a[4],m=a[5],v=a[6],y=a[7],x=u>f?u:f,E=u>f?1:u/f,_=u>f?f/u:1;t.translate(s,l),t.rotate(v),t.scale(E,_),t.arc(0,0,x,p,p+m,1-y),t.scale(1/E,1/_),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var f=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(f-m)<v&&(v=Math.abs(f-m)),p<0)for(let y=f-v;y>m;y-=v){const x=Fn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],y,0);t.push(x.x,x.y)}else for(let y=f+v;y<m;y+=v){const x=Fn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],y,0);t.push(x.x,x.y)}}else if(u.command==="C")for(let y=0;y<=1;y+=.01){const x=Fn.getPointOnCubicBezier(y,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);t.push(x.x,x.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],isNaN(a)||(n=Math.min(n,a),r=Math.max(r,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:n,y:i,width:r-n,height:o-i}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Fn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Fn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Fn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],f=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,Fn.getPointOnEllipticalArc(s,l,u,f,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i<n&&(u*=-1);var f=l*u,p;if(i===n)p={x:a,y:s+f};else if((s-r)/(a-n+1e-8)===l)p={x:a+u,y:s+f};else{var m,v,y=this.getLineLength(n,r,i,o),x=(a-n)*(i-n)+(s-r)*(o-r);x=x/(y*y),m=n+x*(i-n),v=r+x*(o-r);var E=this.getLineLength(a,s,m,v),_=Math.sqrt(t*t-E*E);u=Math.sqrt(_*_/(1+l*l)),i<n&&(u*=-1),f=l*u,p={x:m+u,y:v+f}}return p}static getPointOnCubicBezier(t,n,r,i,o,a,s,l,u){function f(E){return E*E*E}function p(E){return 3*E*E*(1-E)}function m(E){return 3*E*(1-E)*(1-E)}function v(E){return(1-E)*(1-E)*(1-E)}var y=l*f(t)+a*p(t)+i*m(t)+n*v(t),x=u*f(t)+s*p(t)+o*m(t)+r*v(t);return{x:y,y:x}}static getPointOnQuadraticBezier(t,n,r,i,o,a,s){function l(v){return v*v}function u(v){return 2*v*(1-v)}function f(v){return(1-v)*(1-v)}var p=a*l(t)+i*u(t)+n*f(t),m=s*l(t)+o*u(t)+r*f(t);return{x:p,y:m}}static getPointOnEllipticalArc(t,n,r,i,o,a){var s=Math.cos(a),l=Math.sin(a),u={x:r*Math.cos(o),y:i*Math.sin(o)};return{x:t+(u.x*s-u.y*l),y:n+(u.x*l+u.y*s)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(new RegExp(r[i],"g"),"|"+r[i]);var o=n.split("|"),a=[],s=[],l=0,u=0,f=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(i=1;i<o.length;i++){var m=o[i],v=m.charAt(0);for(m=m.slice(1),s.length=0;p=f.exec(m);)s.push(p[0]);for(var y=[],x=0,E=s.length;x<E;x++){if(s[x]==="00"){y.push(0,0);continue}var _=parseFloat(s[x]);isNaN(_)?y.push(0):y.push(_)}for(;y.length>0&&!isNaN(y[0]);){var C=null,T=[],A=l,M=u,I,D,B,F,H,Y,te,G,z,W;switch(v){case"l":l+=y.shift(),u+=y.shift(),C="L",T.push(l,u);break;case"L":l=y.shift(),u=y.shift(),T.push(l,u);break;case"m":var K=y.shift(),Z=y.shift();if(l+=K,u+=Z,C="M",a.length>2&&a[a.length-1].command==="z"){for(var U=a.length-2;U>=0;U--)if(a[U].command==="M"){l=a[U].points[0]+K,u=a[U].points[1]+Z;break}}T.push(l,u),v="l";break;case"M":l=y.shift(),u=y.shift(),C="M",T.push(l,u),v="L";break;case"h":l+=y.shift(),C="L",T.push(l,u);break;case"H":l=y.shift(),C="L",T.push(l,u);break;case"v":u+=y.shift(),C="L",T.push(l,u);break;case"V":u=y.shift(),C="L",T.push(l,u);break;case"C":T.push(y.shift(),y.shift(),y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"c":T.push(l+y.shift(),u+y.shift(),l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),C="C",T.push(l,u);break;case"S":D=l,B=u,I=a[a.length-1],I.command==="C"&&(D=l+(l-I.points[2]),B=u+(u-I.points[3])),T.push(D,B,y.shift(),y.shift()),l=y.shift(),u=y.shift(),C="C",T.push(l,u);break;case"s":D=l,B=u,I=a[a.length-1],I.command==="C"&&(D=l+(l-I.points[2]),B=u+(u-I.points[3])),T.push(D,B,l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),C="C",T.push(l,u);break;case"Q":T.push(y.shift(),y.shift()),l=y.shift(),u=y.shift(),T.push(l,u);break;case"q":T.push(l+y.shift(),u+y.shift()),l+=y.shift(),u+=y.shift(),C="Q",T.push(l,u);break;case"T":D=l,B=u,I=a[a.length-1],I.command==="Q"&&(D=l+(l-I.points[0]),B=u+(u-I.points[1])),l=y.shift(),u=y.shift(),C="Q",T.push(D,B,l,u);break;case"t":D=l,B=u,I=a[a.length-1],I.command==="Q"&&(D=l+(l-I.points[0]),B=u+(u-I.points[1])),l+=y.shift(),u+=y.shift(),C="Q",T.push(D,B,l,u);break;case"A":F=y.shift(),H=y.shift(),Y=y.shift(),te=y.shift(),G=y.shift(),z=l,W=u,l=y.shift(),u=y.shift(),C="A",T=this.convertEndpointToCenterParameterization(z,W,l,u,te,G,F,H,Y);break;case"a":F=y.shift(),H=y.shift(),Y=y.shift(),te=y.shift(),G=y.shift(),z=l,W=u,l+=y.shift(),u+=y.shift(),C="A",T=this.convertEndpointToCenterParameterization(z,W,l,u,te,G,F,H,Y);break}a.push({command:C||v,points:T,start:{x:A,y:M},pathLength:this.calcLength(A,M,C||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Fn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var f=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(f-m)<v&&(v=Math.abs(f-m)),a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],f,0),p<0)for(l=f-v;l>m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=f+v;l<m;l+=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],m,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(t,n,r,i,o,a,s,l,u){var f=u*(Math.PI/180),p=Math.cos(f)*(t-r)/2+Math.sin(f)*(n-i)/2,m=-1*Math.sin(f)*(t-r)/2+Math.cos(f)*(n-i)/2,v=p*p/(s*s)+m*m/(l*l);v>1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var y=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(y*=-1),isNaN(y)&&(y=0);var x=y*s*m/l,E=y*-l*p/s,_=(t+r)/2+Math.cos(f)*x-Math.sin(f)*E,C=(n+i)/2+Math.sin(f)*x+Math.cos(f)*E,T=function(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])},A=function(H,Y){return(H[0]*Y[0]+H[1]*Y[1])/(T(H)*T(Y))},M=function(H,Y){return(H[0]*Y[1]<H[1]*Y[0]?-1:1)*Math.acos(A(H,Y))},I=M([1,0],[(p-x)/s,(m-E)/l]),D=[(p-x)/s,(m-E)/l],B=[(-1*p-x)/s,(-1*m-E)/l],F=M(D,B);return A(D,B)<=-1&&(F=Math.PI),A(D,B)>=1&&(F=0),a===0&&F>0&&(F=F-2*Math.PI),a===1&&F<0&&(F=F+2*Math.PI),[_,C,s,l,I,F,f,a]}}Fn.prototype.className="Path";Fn.prototype._attrsAffectingSize=["data"];br(Fn);J.addGetterSetter(Fn,"data");class Gh extends Ju{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Fn.calcLength(i[i.length-4],i[i.length-3],"C",m),y=Fn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-y.x,u=r[s-1]-y.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var f=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(f),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}Gh.prototype.className="Arrow";br(Gh);J.addGetterSetter(Gh,"pointerLength",10,He());J.addGetterSetter(Gh,"pointerWidth",10,He());J.addGetterSetter(Gh,"pointerAtBeginning",!1);J.addGetterSetter(Gh,"pointerAtEnding",!0);class Y1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}Y1.prototype._centroid=!0;Y1.prototype.className="Circle";Y1.prototype._attrsAffectingSize=["radius"];br(Y1);J.addGetterSetter(Y1,"radius",0,He());class Xd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Xd.prototype.className="Ellipse";Xd.prototype._centroid=!0;Xd.prototype._attrsAffectingSize=["radiusX","radiusY"];br(Xd);J.addComponentsGetterSetter(Xd,"radius",["x","y"]);J.addGetterSetter(Xd,"radiusX",0,He());J.addGetterSetter(Xd,"radiusY",0,He());class Us extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=de.createImageElement();i.onload=function(){var o=new Us({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Us.prototype.className="Image";br(Us);J.addGetterSetter(Us,"image");J.addComponentsGetterSetter(Us,"crop",["x","y","width","height"]);J.addGetterSetter(Us,"cropX",0,He());J.addGetterSetter(Us,"cropY",0,He());J.addGetterSetter(Us,"cropWidth",0,He());J.addGetterSetter(Us,"cropHeight",0,He());var lU=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],Bwe="Change.konva",zwe="none",b9="up",S9="right",x9="down",w9="left",$we=lU.length;class Jk extends P1{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r<$we;r++)t.on(lU[r]+Bwe,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),n=this.getTag(),r,i,o,a,s,l,u;if(t&&n){switch(r=t.width(),i=t.height(),o=n.pointerDirection(),a=n.pointerWidth(),u=n.pointerHeight(),s=0,l=0,o){case b9:s=r/2,l=-1*u;break;case S9:s=r+a,l=i/2;break;case x9:s=r/2,l=i+u;break;case w9:s=-1*a,l=i/2;break}n.setAttrs({x:-1*s,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*s,y:-1*l})}}}Jk.prototype.className="Label";br(Jk);class qh extends Me{_sceneFunc(t){var n=this.width(),r=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let l=0,u=0,f=0,p=0;typeof s=="number"?l=u=f=p=Math.min(s,n/2,r/2):(l=Math.min(s[0]||0,n/2,r/2),u=Math.min(s[1]||0,n/2,r/2),p=Math.min(s[2]||0,n/2,r/2),f=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===b9&&(t.lineTo((n-o)/2,0),t.lineTo(n/2,-1*a),t.lineTo((n+o)/2,0)),t.lineTo(n-u,0),t.arc(n-u,u,u,Math.PI*3/2,0,!1),i===S9&&(t.lineTo(n,(r-a)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+a)/2)),t.lineTo(n,r-p),t.arc(n-p,r-p,p,0,Math.PI/2,!1),i===x9&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+a),t.lineTo((n-o)/2,r)),t.lineTo(f,r),t.arc(f,r-f,f,Math.PI/2,Math.PI,!1),i===w9&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*o,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,n=0,r=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===b9?(n-=i,s+=i):o===x9?s+=i:o===w9?(t-=r*1.5,a+=r):o===S9&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}qh.prototype.className="Tag";br(qh);J.addGetterSetter(qh,"pointerDirection",zwe);J.addGetterSetter(qh,"pointerWidth",0,He());J.addGetterSetter(qh,"pointerHeight",0,He());J.addGetterSetter(qh,"cornerRadius",0,HW(4));class K2 extends Me{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),i=this.height();if(t.beginPath(),!n)t.rect(0,0,r,i);else{let o=0,a=0,s=0,l=0;typeof n=="number"?o=a=s=l=Math.min(n,r/2,i/2):(o=Math.min(n[0]||0,r/2,i/2),a=Math.min(n[1]||0,r/2,i/2),l=Math.min(n[2]||0,r/2,i/2),s=Math.min(n[3]||0,r/2,i/2)),t.moveTo(o,0),t.lineTo(r-a,0),t.arc(r-a,a,a,Math.PI*3/2,0,!1),t.lineTo(r,i-l),t.arc(r-l,i-l,l,0,Math.PI/2,!1),t.lineTo(s,i),t.arc(s,i-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,o),t.arc(o,o,o,Math.PI,Math.PI*3/2,!1)}t.closePath(),t.fillStrokeShape(this)}}K2.prototype.className="Rect";br(K2);J.addGetterSetter(K2,"cornerRadius",0,HW(4));class Yh extends Me{_sceneFunc(t){const n=this._getPoints();t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:n*Math.sin(i*2*Math.PI/t),y:-1*n*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var n=t[0].x,r=t[0].y,i=t[0].x,o=t[0].y;return t.forEach(a=>{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Yh.prototype.className="RegularPolygon";Yh.prototype._centroid=!0;Yh.prototype._attrsAffectingSize=["radius"];br(Yh);J.addGetterSetter(Yh,"radius",0,He());J.addGetterSetter(Yh,"sides",0,He());var kM=Math.PI*2;class Kh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,kM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),kM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Kh.prototype.className="Ring";Kh.prototype._centroid=!0;Kh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];br(Kh);J.addGetterSetter(Kh,"innerRadius",0,He());J.addGetterSetter(Kh,"outerRadius",0,He());class nu extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Wa(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],f=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,f),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,f,m[v+0],m[v+1],u,f)}else t.drawImage(p,s,l,u,f,0,0,u,f)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],f=r*2;t.rect(u[f+0],u[f+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t<o-1?this.frameIndex(t+1):this.frameIndex(0)}}nu.prototype.className="Sprite";br(nu);J.addGetterSetter(nu,"animation");J.addGetterSetter(nu,"animations");J.addGetterSetter(nu,"frameOffsets");J.addGetterSetter(nu,"image");J.addGetterSetter(nu,"frameIndex",0,He());J.addGetterSetter(nu,"frameRate",17,He());J.backCompat(nu,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Zd extends Me{_sceneFunc(t){var n=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var o=1;o<i*2;o++){var a=o%2===0?r:n,s=a*Math.sin(o*Math.PI/i),l=-1*a*Math.cos(o*Math.PI/i);t.lineTo(s,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Zd.prototype.className="Star";Zd.prototype._centroid=!0;Zd.prototype._attrsAffectingSize=["innerRadius","outerRadius"];br(Zd);J.addGetterSetter(Zd,"numPoints",5,He());J.addGetterSetter(Zd,"innerRadius",0,He());J.addGetterSetter(Zd,"outerRadius",0,He());function uU(e){return Array.from(e)}var u0="auto",Fwe="center",Lm="justify",Hwe="Change.konva",Vwe="2d",EM="-",cU="left",Wwe="text",Uwe="Text",jwe="top",Gwe="bottom",PM="middle",dU="normal",qwe="px ",G3=" ",Ywe="right",Kwe="word",Xwe="char",TM="none",L6="\u2026",fU=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],Zwe=fU.length;function Qwe(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var q3;function A6(){return q3||(q3=de.createCanvasElement().getContext(Vwe),q3)}function Jwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function e6e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function t6e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class yr extends Me{constructor(t){super(t6e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<Zwe;n++)this.on(fU[n]+Hwe,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(!!this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),l=0,u=this.align(),f=this.getWidth(),p=this.letterSpacing(),m=this.fill(),v=this.textDecoration(),y=v.indexOf("underline")!==-1,x=v.indexOf("line-through")!==-1,E,_=0,_=a/2,C=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",PM),t.setAttr("textAlign",cU),s===PM?l=(this.getHeight()-r*a-i*2)/2:s===Gwe&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),E=0;E<r;E++){var C=0,T=0,A=n[E],M=A.text,I=A.width,D=A.lastInParagraph,B,F,H;if(t.save(),u===Ywe?C+=f-I-i*2:u===Fwe&&(C+=(f-I-i*2)/2),y&&(t.save(),t.beginPath(),t.moveTo(C,_+T+Math.round(o/2)),B=M.split(" ").length-1,F=B===0,H=u===Lm&&D&&!F?f-i*2:I,t.lineTo(C+Math.round(H),_+T+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),x&&(t.save(),t.beginPath(),t.moveTo(C,_+T),B=M.split(" ").length-1,F=B===0,H=u===Lm&&D&&!F?f-i*2:I,t.lineTo(C+Math.round(H),_+T),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),p!==0||u===Lm){B=M.split(" ").length-1;for(var Y=uU(M),te=0;te<Y.length;te++){var G=Y[te];G===" "&&!D&&u===Lm&&(C+=(f-i*2-I)/B),this._partialTextX=C,this._partialTextY=_+T,this._partialText=G,t.fillStrokeShape(this),C+=this.measureSize(G).width+p}}else this._partialTextX=C,this._partialTextY=_+T,this._partialText=M,t.fillStrokeShape(this);t.restore(),r>1&&(_+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=de._isString(t)?t:t==null?"":t+"";return this._setAttr(Wwe,n),this}getWidth(){var t=this.attrs.width===u0||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===u0||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=A6(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+G3+this.fontVariant()+G3+(this.fontSize()+qwe)+Qwe(this.fontFamily())}_addTextLine(t){this.align()===Lm&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return A6().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(`
`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==u0&&o!==void 0,l=a!==u0&&a!==void 0,u=this.padding(),f=o-u*2,p=a-u*2,m=0,v=this.wrap(),y=v!==TM,x=v!==Xwe&&y,E=this.ellipsis();this.textArr=[],A6().font=this._getContextFont();for(var _=E?this._getTextWidth(L6):0,C=0,T=t.length;C<T;++C){var A=t[C],M=this._getTextWidth(A);if(s&&M>f)for(;A.length>0;){for(var I=0,D=A.length,B="",F=0;I<D;){var H=I+D>>>1,Y=A.slice(0,H+1),te=this._getTextWidth(Y)+_;te<=f?(I=H+1,B=Y,F=te):D=H}if(B){if(x){var G,z=A[B.length],W=z===G3||z===EM;W&&F<=f?G=B.length:G=Math.max(B.lastIndexOf(G3),B.lastIndexOf(EM))+1,G>0&&(I=G,B=B.slice(0,I),F=this._getTextWidth(B))}B=B.trimRight(),this._addTextLine(B),r=Math.max(r,F),m+=i;var K=this._shouldHandleEllipsis(m);if(K){this._tryToAddEllipsisToLastLine();break}if(A=A.slice(I),A=A.trimLeft(),A.length>0&&(M=this._getTextWidth(A),M<=f)){this._addTextLine(A),m+=i,r=Math.max(r,M);break}}else break}else this._addTextLine(A),m+=i,r=Math.max(r,M),this._shouldHandleEllipsis(m)&&C<T-1&&this._tryToAddEllipsisToLastLine();if(l&&m+i>p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==u0&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==TM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==u0&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+L6)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+L6)}}getStrokeScaleEnabled(){return!0}}yr.prototype._fillFunc=Jwe;yr.prototype._strokeFunc=e6e;yr.prototype.className=Uwe;yr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];br(yr);J.overWriteSetter(yr,"width",Kk());J.overWriteSetter(yr,"height",Kk());J.addGetterSetter(yr,"fontFamily","Arial");J.addGetterSetter(yr,"fontSize",12,He());J.addGetterSetter(yr,"fontStyle",dU);J.addGetterSetter(yr,"fontVariant",dU);J.addGetterSetter(yr,"padding",0,He());J.addGetterSetter(yr,"align",cU);J.addGetterSetter(yr,"verticalAlign",jwe);J.addGetterSetter(yr,"lineHeight",1,He());J.addGetterSetter(yr,"wrap",Kwe);J.addGetterSetter(yr,"ellipsis",!1,Ws());J.addGetterSetter(yr,"letterSpacing",0,He());J.addGetterSetter(yr,"text","",q1());J.addGetterSetter(yr,"textDecoration","");var n6e="",hU="normal";function pU(e){e.fillText(this.partialText,0,0)}function gU(e){e.strokeText(this.partialText,0,0)}class di extends Me{constructor(t){super(t),this.dummyCanvas=de.createCanvasElement(),this.dataArray=[],this.dataArray=Fn.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=Fn.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a<o.length;a++){t.save();var s=o[a].p0;t.translate(s.x,s.y),t.rotate(o[a].rotation),this.partialText=o[a].text,t.fillStrokeShape(this),n==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}n==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<n.length;i++){var o=n[i].p1;t.lineTo(o.x,o.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return de.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return yr.prototype.setText.call(this,t)}_getContextFont(){return yr.prototype._getContextFont.call(this)}_getTextSize(t){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,n=this._getTextSize(this.attrs.text),r=this.letterSpacing(),i=this.align(),o=this.kerningFunc();this.textWidth=n.width,this.textHeight=n.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);this.glyphInfo=[];for(var s=0,l=0;l<t.dataArray.length;l++)t.dataArray[l].pathLength>0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var f=uU(this.text()),p=this.text().split(" ").length-1,m,v,y,x=-1,E=0,_=function(){E=0;for(var te=t.dataArray,G=x+1;G<te.length;G++){if(te[G].pathLength>0)return x=G,te[G];te[G].command==="M"&&(m={x:te[G].points[0],y:te[G].points[1]})}return{}},C=function(te){var G=t._getTextSize(te).width+r;te===" "&&i==="justify"&&(G+=(s-a)/p);var z=0,W=0;for(v=void 0;Math.abs(G-z)/G>.01&&W<20;){W++;for(var K=z;y===void 0;)y=_(),y&&K+y.pathLength<G&&(K+=y.pathLength,y=void 0);if(Object.keys(y).length===0||m===void 0)return;var Z=!1;switch(y.command){case"L":Fn.getLineLength(m.x,m.y,y.points[0],y.points[1])>G?v=Fn.getPointOnLine(G,m.x,m.y,y.points[0],y.points[1],m.x,m.y):y=void 0;break;case"A":var U=y.points[4],Q=y.points[5],ue=y.points[4]+Q;E===0?E=U+1e-8:G>z?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E<ue||Q>=0&&E>ue)&&(E=ue,Z=!0),v=Fn.getPointOnEllipticalArc(y.points[0],y.points[1],y.points[2],y.points[3],E,y.points[6]);break;case"C":E===0?G>y.pathLength?E=1e-8:E=G/y.pathLength:G>z?E+=(G-z)/y.pathLength/2:E=Math.max(E-(z-G)/y.pathLength/2,0),E>1&&(E=1,Z=!0),v=Fn.getPointOnCubicBezier(E,y.start.x,y.start.y,y.points[0],y.points[1],y.points[2],y.points[3],y.points[4],y.points[5]);break;case"Q":E===0?E=G/y.pathLength:G>z?E+=(G-z)/y.pathLength:E-=(z-G)/y.pathLength,E>1&&(E=1,Z=!0),v=Fn.getPointOnQuadraticBezier(E,y.start.x,y.start.y,y.points[0],y.points[1],y.points[2],y.points[3]);break}v!==void 0&&(z=Fn.getLineLength(m.x,m.y,v.x,v.y)),Z&&(Z=!1,y=void 0)}},T="C",A=t._getTextSize(T).width+r,M=u/A-1,I=0;I<M&&(C(T),!(m===void 0||v===void 0));I++)m=v;for(var D=0;D<f.length&&(C(f[D]),!(m===void 0||v===void 0));D++){var B=Fn.getLineLength(m.x,m.y,v.x,v.y),F=0;if(o)try{F=o(f[D-1],f[D])*this.fontSize()}catch(te){F=0}m.x+=F,v.x+=F,this.textWidth+=F;var H=Fn.getPointOnLine(F+B/2,m.x,m.y,v.x,v.y),Y=Math.atan2(v.y-m.y,v.x-m.x);this.glyphInfo.push({transposeX:H.x,transposeY:H.y,text:f[D],rotation:Y,p0:m,p1:v}),m=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(f){t.push(f.p0.x),t.push(f.p0.y),t.push(f.p1.x),t.push(f.p1.y)});for(var n=t[0]||0,r=t[0]||0,i=t[1]||0,o=t[1]||0,a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);var u=this.fontSize();return{x:n-u/2,y:i-u/2,width:r-n+u,height:o-i+u}}destroy(){return de.releaseCanvas(this.dummyCanvas),super.destroy()}}di.prototype._fillFunc=pU;di.prototype._strokeFunc=gU;di.prototype._fillFuncHit=pU;di.prototype._strokeFuncHit=gU;di.prototype.className="TextPath";di.prototype._attrsAffectingSize=["text","fontSize","data"];br(di);J.addGetterSetter(di,"data");J.addGetterSetter(di,"fontFamily","Arial");J.addGetterSetter(di,"fontSize",12,He());J.addGetterSetter(di,"fontStyle",hU);J.addGetterSetter(di,"align","left");J.addGetterSetter(di,"letterSpacing",0,He());J.addGetterSetter(di,"textBaseline","middle");J.addGetterSetter(di,"fontVariant",hU);J.addGetterSetter(di,"text",n6e);J.addGetterSetter(di,"textDecoration",null);J.addGetterSetter(di,"kerningFunc",null);var mU="tr-konva",r6e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${mU}`).join(" "),LM="nodesRect",i6e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],o6e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const a6e="ontouchstart"in lt._global;function s6e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(o6e[e]||0);var n=(de.radToDeg(t)%360+360)%360;return de._inRange(n,315+22.5,360)||de._inRange(n,0,22.5)?"ns-resize":de._inRange(n,45-22.5,45+22.5)?"nesw-resize":de._inRange(n,90-22.5,90+22.5)?"ew-resize":de._inRange(n,135-22.5,135+22.5)?"nwse-resize":de._inRange(n,180-22.5,180+22.5)?"ns-resize":de._inRange(n,225-22.5,225+22.5)?"nesw-resize":de._inRange(n,270-22.5,270+22.5)?"ew-resize":de._inRange(n,315-22.5,315+22.5)?"nwse-resize":(de.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var ib=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],AM=1e8;function l6e(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)}}function vU(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=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:i})}function u6e(e,t){const n=l6e(e);return vU(e,t,n)}function c6e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=lt.getAngle(e[i]),a=Math.abs(o-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<n&&(r=o)}return r}class An extends P1{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(r6e,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return de.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return mU+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(i6e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(LM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(LM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(lt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),f={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return vU(f,-lt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-AM,y:-AM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const f=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:f.x,y:f.y},{x:f.x+f.width,y:f.y},{x:f.x+f.width,y:f.y+f.height},{x:f.x,y:f.y+f.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var y=m.point(v);n.push(y)})});const r=new pa;r.rotate(-lt.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var f=r.point(u);i===void 0&&(i=a=f.x,o=s=f.y),i=Math.min(i,f.x),o=Math.min(o,f.y),a=Math.max(a,f.x),s=Math.max(s,f.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:lt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),ib.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new K2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:a6e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=lt.getAngle(this.rotation()),o=s6e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*de._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(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 a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const f=o.getAbsolutePosition();if(!(u.x===f.x&&u.y===f.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let te=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(te-=Math.PI);var m=lt.getAngle(this.rotation());const G=m+te,z=lt.getAngle(this.rotationSnapTolerance()),K=c6e(this.rotationSnaps(),G,z)-p.rotation,Z=u6e(p,K);this._fitNodesInto(Z,t);return}var v=this.keepRatio()||t.shiftKey,C=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var y=C?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(y.x-o.x(),2)+Math.pow(y.y-o.y(),2));var x=this.findOne(".top-left").x()>y.x?-1:1,E=this.findOne(".top-left").y()>y.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,this.findOne(".top-left").x(y.x-n),this.findOne(".top-left").y(y.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var y=C?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-y.x,2)+Math.pow(y.y-o.y(),2));var x=this.findOne(".top-right").x()<y.x?-1:1,E=this.findOne(".top-right").y()>y.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,this.findOne(".top-right").x(y.x+n),this.findOne(".top-right").y(y.y-r)}var _=o.position();this.findOne(".top-left").y(_.y),this.findOne(".bottom-right").x(_.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var y=C?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(y.x-o.x(),2)+Math.pow(o.y()-y.y,2));var x=y.x<o.x()?-1:1,E=o.y()<y.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,o.x(y.x-n),o.y(y.y+r)}_=o.position(),this.findOne(".top-left").x(_.x),this.findOne(".bottom-right").y(_.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var y=C?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-y.x,2)+Math.pow(o.y()-y.y,2));var x=this.findOne(".bottom-right").x()<y.x?-1:1,E=this.findOne(".bottom-right").y()<y.y?-1:1;n=i*this.cos*x,r=i*this.sin*E,this.findOne(".bottom-right").x(y.x+n),this.findOne(".bottom-right").y(y.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var C=this.centeredScaling()||t.altKey;if(C){var T=this.findOne(".top-left"),A=this.findOne(".bottom-right"),M=T.x(),I=T.y(),D=this.getWidth()-A.x(),B=this.getHeight()-A.y();A.move({x:-M,y:-I}),T.move({x:D,y:B})}var F=this.findOne(".top-left").getAbsolutePosition();n=F.x,r=F.y;var H=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),Y=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:H,height:Y,rotation:lt.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var n=this.getNode();this._fire("transformend",{evt:t,target:n}),n&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(de._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(de._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new pa;if(a.rotate(lt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new pa;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new pa;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const f=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),y=p.getTransform().copy();y.translate(p.offsetX(),p.offsetY());const x=new pa;x.multiply(v.copy().invert()).multiply(f).multiply(v).multiply(y);const E=x.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(de._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(de._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*de._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),P1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Ve.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function d6e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){ib.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+ib.join(", "))}),e||[]}An.prototype.className="Transformer";br(An);J.addGetterSetter(An,"enabledAnchors",ib,d6e);J.addGetterSetter(An,"flipEnabled",!0,Ws());J.addGetterSetter(An,"resizeEnabled",!0);J.addGetterSetter(An,"anchorSize",10,He());J.addGetterSetter(An,"rotateEnabled",!0);J.addGetterSetter(An,"rotationSnaps",[]);J.addGetterSetter(An,"rotateAnchorOffset",50,He());J.addGetterSetter(An,"rotationSnapTolerance",5,He());J.addGetterSetter(An,"borderEnabled",!0);J.addGetterSetter(An,"anchorStroke","rgb(0, 161, 255)");J.addGetterSetter(An,"anchorStrokeWidth",1,He());J.addGetterSetter(An,"anchorFill","white");J.addGetterSetter(An,"anchorCornerRadius",0,He());J.addGetterSetter(An,"borderStroke","rgb(0, 161, 255)");J.addGetterSetter(An,"borderStrokeWidth",1,He());J.addGetterSetter(An,"borderDash");J.addGetterSetter(An,"keepRatio",!0);J.addGetterSetter(An,"centeredScaling",!1);J.addGetterSetter(An,"ignoreStroke",!1);J.addGetterSetter(An,"padding",0,He());J.addGetterSetter(An,"node");J.addGetterSetter(An,"nodes");J.addGetterSetter(An,"boundBoxFunc");J.addGetterSetter(An,"anchorDragBoundFunc");J.addGetterSetter(An,"shouldOverdrawWholeArea",!1);J.addGetterSetter(An,"useSingleNodeRotation",!0);J.backCompat(An,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class ec extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,lt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}ec.prototype.className="Wedge";ec.prototype._centroid=!0;ec.prototype._attrsAffectingSize=["radius"];br(ec);J.addGetterSetter(ec,"radius",0,He());J.addGetterSetter(ec,"angle",0,He());J.addGetterSetter(ec,"clockwise",!1);J.backCompat(ec,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function OM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var f6e=[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],h6e=[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];function p6e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,f,p,m,v,y,x,E,_,C,T,A,M,I,D,B,F,H,Y,te,G=t+t+1,z=r-1,W=i-1,K=t+1,Z=K*(K+1)/2,U=new OM,Q=null,ue=U,fe=null,Te=null,Oe=f6e[t],ve=h6e[t];for(s=1;s<G;s++)ue=ue.next=new OM,s===K&&(Q=ue);for(ue.next=U,p=f=0,a=0;a<i;a++){for(A=M=I=D=m=v=y=x=0,E=K*(B=n[f]),_=K*(F=n[f+1]),C=K*(H=n[f+2]),T=K*(Y=n[f+3]),m+=Z*B,v+=Z*F,y+=Z*H,x+=Z*Y,ue=U,s=0;s<K;s++)ue.r=B,ue.g=F,ue.b=H,ue.a=Y,ue=ue.next;for(s=1;s<K;s++)l=f+((z<s?z:s)<<2),m+=(ue.r=B=n[l])*(te=K-s),v+=(ue.g=F=n[l+1])*te,y+=(ue.b=H=n[l+2])*te,x+=(ue.a=Y=n[l+3])*te,A+=B,M+=F,I+=H,D+=Y,ue=ue.next;for(fe=U,Te=Q,o=0;o<r;o++)n[f+3]=Y=x*Oe>>ve,Y!==0?(Y=255/Y,n[f]=(m*Oe>>ve)*Y,n[f+1]=(v*Oe>>ve)*Y,n[f+2]=(y*Oe>>ve)*Y):n[f]=n[f+1]=n[f+2]=0,m-=E,v-=_,y-=C,x-=T,E-=fe.r,_-=fe.g,C-=fe.b,T-=fe.a,l=p+((l=o+t+1)<z?l:z)<<2,A+=fe.r=n[l],M+=fe.g=n[l+1],I+=fe.b=n[l+2],D+=fe.a=n[l+3],m+=A,v+=M,y+=I,x+=D,fe=fe.next,E+=B=Te.r,_+=F=Te.g,C+=H=Te.b,T+=Y=Te.a,A-=B,M-=F,I-=H,D-=Y,Te=Te.next,f+=4;p+=r}for(o=0;o<r;o++){for(M=I=D=A=v=y=x=m=0,f=o<<2,E=K*(B=n[f]),_=K*(F=n[f+1]),C=K*(H=n[f+2]),T=K*(Y=n[f+3]),m+=Z*B,v+=Z*F,y+=Z*H,x+=Z*Y,ue=U,s=0;s<K;s++)ue.r=B,ue.g=F,ue.b=H,ue.a=Y,ue=ue.next;for(u=r,s=1;s<=t;s++)f=u+o<<2,m+=(ue.r=B=n[f])*(te=K-s),v+=(ue.g=F=n[f+1])*te,y+=(ue.b=H=n[f+2])*te,x+=(ue.a=Y=n[f+3])*te,A+=B,M+=F,I+=H,D+=Y,ue=ue.next,s<W&&(u+=r);for(f=o,fe=U,Te=Q,a=0;a<i;a++)l=f<<2,n[l+3]=Y=x*Oe>>ve,Y>0?(Y=255/Y,n[l]=(m*Oe>>ve)*Y,n[l+1]=(v*Oe>>ve)*Y,n[l+2]=(y*Oe>>ve)*Y):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=_,y-=C,x-=T,E-=fe.r,_-=fe.g,C-=fe.b,T-=fe.a,l=o+((l=a+K)<W?l:W)*r<<2,m+=A+=fe.r=n[l],v+=M+=fe.g=n[l+1],y+=I+=fe.b=n[l+2],x+=D+=fe.a=n[l+3],fe=fe.next,E+=B=Te.r,_+=F=Te.g,C+=H=Te.b,T+=Y=Te.a,A-=B,M-=F,I-=H,D-=Y,Te=Te.next,f+=r}}const g6e=function(t){var n=Math.round(this.blurRadius());n>0&&p6e(t,n)};J.addGetterSetter(Ve,"blurRadius",0,He(),J.afterSetFilter);const m6e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};J.addGetterSetter(Ve,"brightness",0,He(),J.afterSetFilter);const v6e=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,i=150,o=150,a=150,s;for(s=0;s<r;s+=4)i=n[s],o=n[s+1],a=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};J.addGetterSetter(Ve,"contrast",0,He(),J.afterSetFilter);const y6e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,f=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:de.error("Unknown emboss direction: "+r)}do{var m=(p-1)*f,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var y=(p-1+v)*l*4,x=l;do{var E=m+(x-1)*4,_=a;x+_<1&&(_=0),x+_>l&&(_=0);var C=y+(x-1+_)*4,T=s[E]-s[C],A=s[E+1]-s[C+1],M=s[E+2]-s[C+2],I=T,D=I>0?I:-I,B=A>0?A:-A,F=M>0?M:-M;if(B>D&&(I=A),F>D&&(I=M),I*=t,i){var H=s[E]+I,Y=s[E+1]+I,te=s[E+2]+I;s[E]=H>255?255:H<0?0:H,s[E+1]=Y>255?255:Y<0?0:Y,s[E+2]=te>255?255:te<0?0:te}else{var G=n-I;G<0?G=0:G>255&&(G=255),s[E]=s[E+1]=s[E+2]=G}}while(--x)}while(--p)};J.addGetterSetter(Ve,"embossStrength",.5,He(),J.afterSetFilter);J.addGetterSetter(Ve,"embossWhiteLevel",.5,He(),J.afterSetFilter);J.addGetterSetter(Ve,"embossDirection","top-left",null,J.afterSetFilter);J.addGetterSetter(Ve,"embossBlend",!1,null,J.afterSetFilter);function O6(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const b6e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],f=u,p,m,v=this.enhance();if(v!==0){for(m=0;m<n;m+=4)o=t[m+0],o<r?r=o:o>i&&(i=o),l=t[m+1],l<a?a=l:l>s&&(s=l),p=t[m+2],p<u?u=p:p>f&&(f=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),f===u&&(f=255,u=0);var y,x,E,_,C,T,A,M,I;for(v>0?(x=i+v*(255-i),E=r-v*(r-0),C=s+v*(255-s),T=a-v*(a-0),M=f+v*(255-f),I=u-v*(u-0)):(y=(i+r)*.5,x=i+v*(i-y),E=r+v*(r-y),_=(s+a)*.5,C=s+v*(s-_),T=a+v*(a-_),A=(f+u)*.5,M=f+v*(f-A),I=u+v*(u-A)),m=0;m<n;m+=4)t[m+0]=O6(t[m+0],r,i,E,x),t[m+1]=O6(t[m+1],a,s,T,C),t[m+2]=O6(t[m+2],u,f,I,M)}};J.addGetterSetter(Ve,"enhance",0,He(),J.afterSetFilter);const S6e=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};J.addGetterSetter(Ve,"hue",0,He(),J.afterSetFilter);J.addGetterSetter(Ve,"saturation",0,He(),J.afterSetFilter);J.addGetterSetter(Ve,"luminance",0,He(),J.afterSetFilter);const x6e=function(e){var t=e.data,n=t.length,r=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s,l=r*i*Math.cos(o*Math.PI/180),u=r*i*Math.sin(o*Math.PI/180),f=.299*r+.701*l+.167*u,p=.587*r-.587*l+.33*u,m=.114*r-.114*l-.497*u,v=.299*r-.299*l-.328*u,y=.587*r+.413*l+.035*u,x=.114*r-.114*l+.293*u,E=.299*r-.3*l+1.25*u,_=.587*r-.586*l-1.05*u,C=.114*r+.886*l-.2*u,T,A,M,I;for(s=0;s<n;s+=4)T=t[s+0],A=t[s+1],M=t[s+2],I=t[s+3],t[s+0]=f*T+p*A+m*M+a,t[s+1]=v*T+y*A+x*M+a,t[s+2]=E*T+_*A+C*M+a,t[s+3]=I},w6e=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a,s=r*i*Math.cos(o*Math.PI/180),l=r*i*Math.sin(o*Math.PI/180),u=.299*r+.701*s+.167*l,f=.587*r-.587*s+.33*l,p=.114*r-.114*s-.497*l,m=.299*r-.299*s-.328*l,v=.587*r+.413*s+.035*l,y=.114*r-.114*s+.293*l,x=.299*r-.3*s+1.25*l,E=.587*r-.586*s-1.05*l,_=.114*r+.886*s-.2*l,C,T,A,M;for(a=0;a<n;a+=4)C=t[a+0],T=t[a+1],A=t[a+2],M=t[a+3],t[a+0]=u*C+f*T+p*A,t[a+1]=m*C+v*T+y*A,t[a+2]=x*C+E*T+_*A,t[a+3]=M};J.addGetterSetter(Ve,"hue",0,He(),J.afterSetFilter);J.addGetterSetter(Ve,"saturation",0,He(),J.afterSetFilter);J.addGetterSetter(Ve,"value",0,He(),J.afterSetFilter);const C6e=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};var _6e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,f,p,m=0,v=0,y=0,x=0,E,_=Math.sqrt(s*s+l*l);f=o-s,p=a-l,E=Math.sqrt(f*f+p*p),_=E>_?E:_;var C=a,T=o,A,M,I=360/T*Math.PI/180,D,B;for(M=0;M<T;M+=1)for(D=Math.sin(M*I),B=Math.cos(M*I),A=0;A<C;A+=1)f=Math.floor(s+_*A/C*B),p=Math.floor(l+_*A/C*D),u=(p*o+f)*4,m=r[u+0],v=r[u+1],y=r[u+2],x=r[u+3],u=(M+A*o)*4,i[u+0]=m,i[u+1]=v,i[u+2]=y,i[u+3]=x},k6e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,f,p,m,v,y=0,x=0,E=0,_=0,C,T=Math.sqrt(s*s+l*l);f=o-s,p=a-l,C=Math.sqrt(f*f+p*p),T=C>T?C:T;var A=a,M=o,I,D,B=n.polarRotation||0,F,H;for(f=0;f<o;f+=1)for(p=0;p<a;p+=1)m=f-s,v=p-l,I=Math.sqrt(m*m+v*v)*A/T,D=(Math.atan2(v,m)*180/Math.PI+360+B)%360,D=D*M/360,F=Math.floor(D),H=Math.floor(I),u=(H*o+F)*4,y=r[u+0],x=r[u+1],E=r[u+2],_=r[u+3],u=(p*o+f)*4,i[u+0]=y,i[u+1]=x,i[u+2]=E,i[u+3]=_};const E6e=function(e){var t=e.width,n=e.height,r,i,o,a,s,l,u,f,p,m,v=Math.round(this.kaleidoscopePower()),y=Math.round(this.kaleidoscopeAngle()),x=Math.floor(t*(y%360)/360);if(!(v<1)){var E=de.createCanvasElement();E.width=t,E.height=n;var _=E.getContext("2d").getImageData(0,0,t,n);de.releaseCanvas(E),_6e(e,_,{polarCenterX:t/2,polarCenterY:n/2});for(var C=t/Math.pow(2,v);C<=8;)C=C*2,v-=1;C=Math.ceil(C);var T=C,A=0,M=T,I=1;for(x+C>t&&(A=T,M=0,I=-1),i=0;i<n;i+=1)for(r=A;r!==M;r+=I)o=Math.round(r+x)%t,p=(t*i+o)*4,s=_.data[p+0],l=_.data[p+1],u=_.data[p+2],f=_.data[p+3],m=(t*i+r)*4,_.data[m+0]=s,_.data[m+1]=l,_.data[m+2]=u,_.data[m+3]=f;for(i=0;i<n;i+=1)for(T=Math.floor(C),a=0;a<v;a+=1){for(r=0;r<T+1;r+=1)p=(t*i+r)*4,s=_.data[p+0],l=_.data[p+1],u=_.data[p+2],f=_.data[p+3],m=(t*i+T*2-r-1)*4,_.data[m+0]=s,_.data[m+1]=l,_.data[m+2]=u,_.data[m+3]=f;T*=2}k6e(_,e,{polarRotation:0})}};J.addGetterSetter(Ve,"kaleidoscopePower",2,He(),J.afterSetFilter);J.addGetterSetter(Ve,"kaleidoscopeAngle",0,He(),J.afterSetFilter);function Y3(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function Am(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))}function P6e(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}function T6e(e,t){var n=Y3(e,0,0),r=Y3(e,e.width-1,0),i=Y3(e,0,e.height-1),o=Y3(e,e.width-1,e.height-1),a=t||10;if(Am(n,r)<a&&Am(r,o)<a&&Am(o,i)<a&&Am(i,n)<a){for(var s=P6e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var f=Am(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=f<a?0:255}return l}}function L6e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function A6e(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,f=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,y=l+m-o;if(v>=0&&v<n&&y>=0&&y<t){var x=v*t+y,E=r[p*i+m];f+=e[x]*E}}a[u]=f===255*8?255:0}return a}function O6e(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,f=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,y=l+m-o;if(v>=0&&v<n&&y>=0&&y<t){var x=v*t+y,E=r[p*i+m];f+=e[x]*E}}a[u]=f>=255*4?255:0}return a}function R6e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,f=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,y=l+m-o;if(v>=0&&v<n&&y>=0&&y<t){var x=v*t+y,E=r[p*i+m];f+=e[x]*E}}a[u]=f}return a}const M6e=function(e){var t=this.threshold(),n=T6e(e,t);return n&&(n=A6e(n,e.width,e.height),n=O6e(n,e.width,e.height),n=R6e(n,e.width,e.height),L6e(e,n)),e};J.addGetterSetter(Ve,"threshold",0,He(),J.afterSetFilter);const I6e=function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,o;for(o=0;o<r;o+=4)n[o+0]+=i-2*i*Math.random(),n[o+1]+=i-2*i*Math.random(),n[o+2]+=i-2*i*Math.random()};J.addGetterSetter(Ve,"noise",.2,He(),J.afterSetFilter);const D6e=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,a,s,l,u,f,p=Math.ceil(n/t),m=Math.ceil(r/t),v,y,x,E,_,C,T,A=e.data;if(t<=0){de.error("pixelSize value can not be <= 0");return}for(_=0;_<p;_+=1)for(C=0;C<m;C+=1){for(s=0,l=0,u=0,f=0,v=_*t,y=v+t,x=C*t,E=x+t,T=0,i=v;i<y;i+=1)if(!(i>=n))for(o=x;o<E;o+=1)o>=r||(a=(n*o+i)*4,s+=A[a+0],l+=A[a+1],u+=A[a+2],f+=A[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,f=f/T,i=v;i<y;i+=1)if(!(i>=n))for(o=x;o<E;o+=1)o>=r||(a=(n*o+i)*4,A[a+0]=s,A[a+1]=l,A[a+2]=u,A[a+3]=f)}};J.addGetterSetter(Ve,"pixelSize",8,He(),J.afterSetFilter);const N6e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o<r;o+=1)n[o]=Math.floor(n[o]/i)*i};J.addGetterSetter(Ve,"levels",.5,He(),J.afterSetFilter);const B6e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a,s;for(a=0;a<n;a+=4)s=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=s*r,t[a+1]=s*i,t[a+2]=s*o,t[a+3]=t[a+3]};J.addGetterSetter(Ve,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});J.addGetterSetter(Ve,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});J.addGetterSetter(Ve,"blue",0,FW,J.afterSetFilter);const z6e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s<n;s+=4)l=1-a,t[s]=r*a+t[s]*l,t[s+1]=i*a+t[s+1]*l,t[s+2]=o*a+t[s+2]*l};J.addGetterSetter(Ve,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});J.addGetterSetter(Ve,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});J.addGetterSetter(Ve,"blue",0,FW,J.afterSetFilter);J.addGetterSetter(Ve,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const $6e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r<n;r+=4)i=t[r+0],o=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+o*.769+a*.189),t[r+1]=Math.min(255,i*.349+o*.686+a*.168),t[r+2]=Math.min(255,i*.272+o*.534+a*.131)},F6e=function(e){var t=e.data,n=e.width,r=e.height,i=n*4,o=r;do{var a=(o-1)*i,s=n;do{var l=a+(s-1)*4,u=t[l],f=t[l+1],p=t[l+2];u>127&&(u=255-u),f>127&&(f=255-f),p>127&&(p=255-p),t[l]=u,t[l+1]=f,t[l+2]=p}while(--s)}while(--o)},H6e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255};J.addGetterSetter(Ve,"threshold",.5,He(),J.afterSetFilter);const h0=Dh.Util._assign(Dh,{Arc:Qu,Arrow:Gh,Circle:Y1,Ellipse:Xd,Image:Us,Label:Jk,Tag:qh,Line:Ju,Path:Fn,Rect:K2,RegularPolygon:Yh,Ring:Kh,Sprite:nu,Star:Zd,Text:yr,TextPath:di,Transformer:An,Wedge:ec,Filters:{Blur:g6e,Brighten:m6e,Contrast:v6e,Emboss:y6e,Enhance:b6e,Grayscale:S6e,HSL:x6e,HSV:w6e,Invert:C6e,Kaleidoscope:E6e,Mask:M6e,Noise:I6e,Pixelate:D6e,Posterize:N6e,RGB:B6e,RGBA:z6e,Sepia:$6e,Solarize:F6e,Threshold:H6e}}),V6e=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new h0.Stage({container:i,width:n,height:r}),a=new h0.Layer,s=new h0.Layer;a.add(new h0.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new h0.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},W6e=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("</br>"),t.document.write(r.outerHTML),t.document.write("</br></br>")})};let yU=null,bU=null;const U6e=e=>{yU=e},Fs=()=>yU,j6e=e=>{bU=e},SU=()=>bU,G6e=e=>{const t=Fs(),{generationMode:n,optionsState:r,canvasState:i,systemState:o}=e,{cfgScale:a,codeformerFidelity:s,facetoolStrength:l,facetoolType:u,height:f,hiresFix:p,img2imgStrength:m,infillMethod:v,initialImage:y,iterations:x,perlin:E,prompt:_,sampler:C,seamBlur:T,seamless:A,seamSize:M,seamSteps:I,seamStrength:D,seed:B,seedWeights:F,shouldFitToWidthHeight:H,shouldGenerateVariations:Y,shouldRandomizeSeed:te,shouldRunESRGAN:G,shouldRunFacetool:z,steps:W,threshold:K,tileSize:Z,upscalingLevel:U,upscalingStrength:Q,variationAmount:ue,width:fe}=r,{shouldDisplayInProgressType:Te,saveIntermediatesInterval:Oe,enableImageDebugging:ve}=o,Ce={prompt:_,iterations:x,steps:W,cfg_scale:a,threshold:K,perlin:E,height:f,width:fe,sampler_name:C,seed:B,progress_images:Te==="full-res",progress_latents:Te==="latents",save_intermediates:Oe,generation_mode:n,init_mask:""};let Re=!1,Ye=!1;if(Ce.seed=te?$W(qk,Yk):B,["txt2img","img2img"].includes(n)&&(Ce.seamless=A,Ce.hires_fix=p,G&&(Re={level:U,strength:Q}),z&&(Ye={type:u,strength:l},u==="codeformer"&&(Ye.codeformer_fidelity=s))),n==="img2img"&&y&&(Ce.init_img=typeof y=="string"?y:y.url,Ce.strength=m,Ce.fit=H),n==="unifiedCanvas"&&t){const{layerState:{objects:Ue},boundingBoxCoordinates:pt,boundingBoxDimensions:wt,inpaintReplace:ut,shouldUseInpaintReplace:ft,stageScale:vt,isMaskEnabled:ke,shouldPreserveMaskedArea:at,boundingBoxScaleMethod:Rt,scaledBoundingBoxDimensions:tt}=i,yt={...pt,...wt},dn=V6e(ke?Ue.filter(Vk):[],yt);Ce.init_mask=dn,Ce.fit=!1,Ce.strength=m,Ce.invert_mask=at,ft&&(Ce.inpaint_replace=ut),Ce.bounding_box=yt;const Pt=t.scale();t.scale({x:1/vt,y:1/vt});const Yt=t.getAbsolutePosition(),fn=t.toDataURL({x:yt.x+Yt.x,y:yt.y+Yt.y,width:yt.width,height:yt.height});ve&&W6e([{base64:dn,caption:"mask sent as init_mask"},{base64:fn,caption:"image sent as init_img"}]),t.scale(Pt),Ce.init_img=fn,Ce.progress_images=!1,Rt!=="none"&&(Ce.inpaint_width=tt.width,Ce.inpaint_height=tt.height),Ce.seam_size=M,Ce.seam_blur=T,Ce.seam_strength=D,Ce.seam_steps=I,Ce.tile_size=Z,Ce.infill_method=v,Ce.force_outpaint=!1}return Y?(Ce.variation_amount=ue,F&&(Ce.with_variations=S4e(F))):Ce.variation_amount=0,ve&&(Ce.enable_image_debugging=ve),{generationParameters:Ce,esrganParameters:Re,facetoolParameters:Ye}},q6e=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(Bu(!0));const o=r(),{options:a,system:s,canvas:l}=o,u={generationMode:i,optionsState:a,canvasState:l,systemState:s};n($be());const{generationParameters:f,esrganParameters:p,facetoolParameters:m}=G6e(u);t.emit("generateImage",f,p,m),f.init_mask&&(f.init_mask=f.init_mask.substr(0,64).concat("...")),f.init_img&&(f.init_img=f.init_img.substr(0,64).concat("...")),n(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...f,...p,...m})}`}))},emitRunESRGAN:i=>{n(Bu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Mo({timestamp:Io(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(Bu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Mo({timestamp:Io(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(FV(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(Nbe()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},Y6e=()=>{const{origin:e}=new URL(window.location.href),t=$4(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:f,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:y,onProcessingCanceled:x,onImageDeleted:E,onSystemConfig:_,onModelChanged:C,onModelChangeFailed:T,onTempFolderEmptied:A}=kxe(i),{emitGenerateImage:M,emitRunESRGAN:I,emitRunFacetool:D,emitDeleteImage:B,emitRequestImages:F,emitRequestNewImages:H,emitCancelProcessing:Y,emitRequestSystemConfig:te,emitRequestModelChange:G,emitSaveStagingAreaImageToGallery:z,emitRequestEmptyTempFolder:W}=q6e(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",K=>u(K)),t.on("generationResult",K=>p(K)),t.on("postprocessingResult",K=>f(K)),t.on("intermediateResult",K=>m(K)),t.on("progressUpdate",K=>v(K)),t.on("galleryImages",K=>y(K)),t.on("processingCanceled",()=>{x()}),t.on("imageDeleted",K=>{E(K)}),t.on("systemConfig",K=>{_(K)}),t.on("modelChanged",K=>{C(K)}),t.on("modelChangeFailed",K=>{T(K)}),t.on("tempFolderEmptied",()=>{A()}),n=!0),a.type){case"socketio/generateImage":{M(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{D(a.payload);break}case"socketio/deleteImage":{B(a.payload);break}case"socketio/requestImages":{F(a.payload);break}case"socketio/requestNewImages":{H(a.payload);break}case"socketio/cancelProcessing":{Y();break}case"socketio/requestSystemConfig":{te();break}case"socketio/requestModelChange":{G(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{z(a.payload);break}case"socketio/requestEmptyTempFolder":{W();break}}o(a)}},K6e=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),X6e=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),Z6e=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),xU=uV({options:z4e,gallery:Y4e,system:Vbe,canvas:SSe}),Q6e=SV.getPersistConfig({key:"root",storage:bV,rootReducer:xU,blacklist:[...K6e,...X6e,...Z6e],debounce:300}),J6e=r4e(Q6e,xU),wU=M3e({reducer:J6e,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(Y6e()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}});var CU={exports:{}},_U={};/**
* @license React
* use-sync-external-store-shim.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 T1=k.exports;function eCe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tCe=typeof Object.is=="function"?Object.is:eCe,nCe=T1.useState,rCe=T1.useEffect,iCe=T1.useLayoutEffect,oCe=T1.useDebugValue;function aCe(e,t){var n=t(),r=nCe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return iCe(function(){i.value=n,i.getSnapshot=t,R6(i)&&o({inst:i})},[e,n,t]),rCe(function(){return R6(i)&&o({inst:i}),e(function(){R6(i)&&o({inst:i})})},[e]),oCe(n),n}function R6(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tCe(e,n)}catch(r){return!0}}function sCe(e,t){return t()}var lCe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sCe:aCe;_U.useSyncExternalStore=T1.useSyncExternalStore!==void 0?T1.useSyncExternalStore:lCe;(function(e){e.exports=_U})(CU);var kU={exports:{}},EU={};/**
* @license React
* use-sync-external-store-shim/with-selector.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 zS=k.exports,uCe=CU.exports;function cCe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dCe=typeof Object.is=="function"?Object.is:cCe,fCe=uCe.useSyncExternalStore,hCe=zS.useRef,pCe=zS.useEffect,gCe=zS.useMemo,mCe=zS.useDebugValue;EU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=hCe(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=gCe(function(){function l(v){if(!u){if(u=!0,f=v,v=r(v),i!==void 0&&a.hasValue){var y=a.value;if(i(y,v))return p=y}return p=v}if(y=p,dCe(f,v))return y;var x=r(v);return i!==void 0&&i(y,x)?y:(f=v,p=x)}var u=!1,f,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=fCe(e,o[0],o[1]);return pCe(function(){a.hasValue=!0,a.value=s},[s]),mCe(s),s};(function(e){e.exports=EU})(kU);function vCe(e){e()}let PU=vCe;const yCe=e=>PU=e,bCe=()=>PU,Nd=k.exports.createContext(null);function TU(){return k.exports.useContext(Nd)}const SCe=()=>{throw new Error("uSES not initialized!")};let LU=SCe;const xCe=e=>{LU=e},wCe=(e,t)=>e===t;function CCe(e=Nd){const t=e===Nd?TU:()=>k.exports.useContext(e);return function(r,i=wCe){const{store:o,subscription:a,getServerState:s}=t(),l=LU(a.addNestedSub,o.getState,s||o.getState,r,i);return k.exports.useDebugValue(l),l}}const _Ce=CCe();var kCe={exports:{}},Bn={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var eE=Symbol.for("react.element"),tE=Symbol.for("react.portal"),$S=Symbol.for("react.fragment"),FS=Symbol.for("react.strict_mode"),HS=Symbol.for("react.profiler"),VS=Symbol.for("react.provider"),WS=Symbol.for("react.context"),ECe=Symbol.for("react.server_context"),US=Symbol.for("react.forward_ref"),jS=Symbol.for("react.suspense"),GS=Symbol.for("react.suspense_list"),qS=Symbol.for("react.memo"),YS=Symbol.for("react.lazy"),PCe=Symbol.for("react.offscreen"),AU;AU=Symbol.for("react.module.reference");function rs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case eE:switch(e=e.type,e){case $S:case HS:case FS:case jS:case GS:return e;default:switch(e=e&&e.$$typeof,e){case ECe:case WS:case US:case YS:case qS:case VS:return e;default:return t}}case tE:return t}}}Bn.ContextConsumer=WS;Bn.ContextProvider=VS;Bn.Element=eE;Bn.ForwardRef=US;Bn.Fragment=$S;Bn.Lazy=YS;Bn.Memo=qS;Bn.Portal=tE;Bn.Profiler=HS;Bn.StrictMode=FS;Bn.Suspense=jS;Bn.SuspenseList=GS;Bn.isAsyncMode=function(){return!1};Bn.isConcurrentMode=function(){return!1};Bn.isContextConsumer=function(e){return rs(e)===WS};Bn.isContextProvider=function(e){return rs(e)===VS};Bn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===eE};Bn.isForwardRef=function(e){return rs(e)===US};Bn.isFragment=function(e){return rs(e)===$S};Bn.isLazy=function(e){return rs(e)===YS};Bn.isMemo=function(e){return rs(e)===qS};Bn.isPortal=function(e){return rs(e)===tE};Bn.isProfiler=function(e){return rs(e)===HS};Bn.isStrictMode=function(e){return rs(e)===FS};Bn.isSuspense=function(e){return rs(e)===jS};Bn.isSuspenseList=function(e){return rs(e)===GS};Bn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$S||e===HS||e===FS||e===jS||e===GS||e===PCe||typeof e=="object"&&e!==null&&(e.$$typeof===YS||e.$$typeof===qS||e.$$typeof===VS||e.$$typeof===WS||e.$$typeof===US||e.$$typeof===AU||e.getModuleId!==void 0)};Bn.typeOf=rs;(function(e){e.exports=Bn})(kCe);function TCe(){const e=bCe();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const RM={notify(){},get:()=>[]};function LCe(e,t){let n,r=RM;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){f.onStateChange&&f.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=TCe())}function u(){n&&(n(),n=void 0,r.clear(),r=RM)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return f}const ACe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OCe=ACe?k.exports.useLayoutEffect:k.exports.useEffect;function RCe({store:e,context:t,children:n,serverState:r}){const i=k.exports.useMemo(()=>{const s=LCe(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=k.exports.useMemo(()=>e.getState(),[e]);return OCe(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),b((t||Nd).Provider,{value:i,children:n})}function OU(e=Nd){const t=e===Nd?TU:()=>k.exports.useContext(e);return function(){const{store:r}=t();return r}}const MCe=OU();function ICe(e=Nd){const t=e===Nd?MCe:OU(e);return function(){return t().dispatch}}const DCe=ICe();xCe(kU.exports.useSyncExternalStoreWithSelector);yCe(Zl.exports.unstable_batchedUpdates);function W4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W4=function(n){return typeof n}:W4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W4(e)}function NCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MM(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 BCe(e,t,n){return t&&MM(e.prototype,t),n&&MM(e,n),e}function zCe(e,t){return t&&(W4(t)==="object"||typeof t=="function")?t:U4(e)}function C9(e){return C9=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},C9(e)}function U4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $Ce(e,t){if(typeof t!="function"&&t!==null)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&&_9(e,t)}function _9(e,t){return _9=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},_9(e,t)}function j4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RU=function(e){$Ce(t,e);function t(){var n,r;NCe(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=zCe(this,(n=C9(t)).call.apply(n,[this].concat(o))),j4(U4(r),"state",{bootstrapped:!1}),j4(U4(r),"_unsubscribe",void 0),j4(U4(r),"handlePersistorState",function(){var s=r.props.persistor,l=s.getState(),u=l.bootstrapped;u&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}return BCe(t,[{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 typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(k.exports.PureComponent);j4(RU,"defaultProps",{children:null,loading:null});const MU=u4e(wU),IM=()=>b(bt,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:b(z2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),Ie=DCe,ye=_Ce,FCe=ot(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),HCe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ye(FCe),i=t?Math.round(t*100/n):0;return b(RH,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};var IU={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},DM=oe.createContext&&oe.createContext(IU),Pd=globalThis&&globalThis.__assign||function(){return Pd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pd.apply(this,arguments)},VCe=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(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function DU(e){return e&&e.map(function(t,n){return oe.createElement(t.tag,Pd({key:n},t.attr),DU(t.child))})}function ht(e){return function(t){return b(WCe,{...Pd({attr:Pd({},e.attr)},t),children:DU(e.child)})}}function WCe(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=VCe(e,["attr","size","title"]),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),ee("svg",{...Pd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Pd(Pd({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),children:[o&&b("title",{children:o}),e.children]})};return DM!==void 0?b(DM.Consumer,{children:function(n){return t(n)}}):t(IU)}function UCe(e){return ht({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 jCe(e){return ht({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 GCe(e){return ht({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 NU(e){return ht({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 BU(e){return ht({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 qCe(e){return ht({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 YCe(e){return ht({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 zU(e){return ht({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 KCe(e){return ht({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 XCe(e){return ht({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 nE(e){return ht({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 $U(e){return ht({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 X2(e){return ht({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 FU(e){return ht({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 rE(e){return ht({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 HU(e){return ht({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 ZCe(e){return ht({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 ht({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 VU(e){return ht({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 JCe(e){return ht({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 e7e(e){return ht({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 WU(e){return ht({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 t7e(e){return ht({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 n7e(e){return ht({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 r7e(e){return ht({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 i7e(e){return ht({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 UU(e){return ht({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 o7e(e){return ht({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 a7e(e){return ht({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 jU(e){return ht({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 s7e(e){return ht({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 l7e(e){return ht({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 iE(e){return ht({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 u7e(e){return ht({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 c7e(e){return ht({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 d7e(e){return ht({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 oE(e){return ht({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 f7e(e){return ht({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 h7e(e){return ht({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 NM(e){return ht({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 aE(e){return ht({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 p7e(e){return ht({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 Xh(e){return ht({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 g7e(e){return ht({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 KS(e){return ht({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 m7e(e){return ht({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 XS(e){return ht({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)}const GU=""+new URL("logo.13003d72.png",import.meta.url).href,Qe=Pe((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return b(Zi,{label:n,hasArrow:!0,...i,...i!=null&&i.placement?{placement:i.placement}:{placement:"top"},children:b(Qa,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function v7e(e){const{title:t,hotkey:n,description:r}=e;return ee("div",{className:"hotkey-modal-item",children:[ee("div",{className:"hotkey-info",children:[b("p",{className:"hotkey-title",children:t}),r&&b("p",{className:"hotkey-description",children:r})]}),b("div",{className:"hotkey-key",children:n})]})}function y7e({children:e}){const{isOpen:t,onOpen:n,onClose:r}=s2(),{t:i}=Ge(),o=[{title:i("hotkeys:invoke.title"),desc:i("hotkeys:invoke.desc"),hotkey:"Ctrl+Enter"},{title:i("hotkeys:cancel.title"),desc:i("hotkeys:cancel.desc"),hotkey:"Shift+X"},{title:i("hotkeys:focusPrompt.title"),desc:i("hotkeys:focusPrompt.desc"),hotkey:"Alt+A"},{title:i("hotkeys:toggleOptions.title"),desc:i("hotkeys:toggleOptions.desc"),hotkey:"O"},{title:i("hotkeys:pinOptions.title"),desc:i("hotkeys:pinOptions.desc"),hotkey:"Shift+O"},{title:i("hotkeys:toggleViewer.title"),desc:i("hotkeys:toggleViewer.desc"),hotkey:"Z"},{title:i("hotkeys:toggleGallery.title"),desc:i("hotkeys:toggleGallery.desc"),hotkey:"G"},{title:i("hotkeys:maximizeWorkSpace.title"),desc:i("hotkeys:maximizeWorkSpace.desc"),hotkey:"F"},{title:i("hotkeys:changeTabs.title"),desc:i("hotkeys:changeTabs.desc"),hotkey:"1-5"},{title:i("hotkeys:consoleToggle.title"),desc:i("hotkeys:consoleToggle.desc"),hotkey:"`"}],a=[{title:i("hotkeys:setPrompt.title"),desc:i("hotkeys:setPrompt.desc"),hotkey:"P"},{title:i("hotkeys:setSeed.title"),desc:i("hotkeys:setSeed.desc"),hotkey:"S"},{title:i("hotkeys:setParameters.title"),desc:i("hotkeys:setParameters.desc"),hotkey:"A"},{title:i("hotkeys:restoreFaces.title"),desc:i("hotkeys:restoreFaces.desc"),hotkey:"Shift+R"},{title:i("hotkeys:upscale.title"),desc:i("hotkeys:upscale.desc"),hotkey:"Shift+U"},{title:i("hotkeys:showInfo.title"),desc:i("hotkeys:showInfo.desc"),hotkey:"I"},{title:i("hotkeys:sendToImageToImage.title"),desc:i("hotkeys:sendToImageToImage.desc"),hotkey:"Shift+I"},{title:i("hotkeys:deleteImage.title"),desc:i("hotkeys:deleteImage.desc"),hotkey:"Del"},{title:i("hotkeys:closePanels.title"),desc:i("hotkeys:closePanels.desc"),hotkey:"Esc"}],s=[{title:i("hotkeys:previousImage.title"),desc:i("hotkeys:previousImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys:nextImage.title"),desc:i("hotkeys:nextImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys:toggleGalleryPin.title"),desc:i("hotkeys:toggleGalleryPin.desc"),hotkey:"Shift+G"},{title:i("hotkeys:increaseGalleryThumbSize.title"),desc:i("hotkeys:increaseGalleryThumbSize.desc"),hotkey:"Shift+Up"},{title:i("hotkeys:decreaseGalleryThumbSize.title"),desc:i("hotkeys:decreaseGalleryThumbSize.desc"),hotkey:"Shift+Down"}],l=[{title:i("hotkeys:selectBrush.title"),desc:i("hotkeys:selectBrush.desc"),hotkey:"B"},{title:i("hotkeys:selectEraser.title"),desc:i("hotkeys:selectEraser.desc"),hotkey:"E"},{title:i("hotkeys:decreaseBrushSize.title"),desc:i("hotkeys:decreaseBrushSize.desc"),hotkey:"["},{title:i("hotkeys:increaseBrushSize.title"),desc:i("hotkeys:increaseBrushSize.desc"),hotkey:"]"},{title:i("hotkeys:decreaseBrushOpacity.title"),desc:i("hotkeys:decreaseBrushOpacity.desc"),hotkey:"Shift + ["},{title:i("hotkeys:increaseBrushOpacity.title"),desc:i("hotkeys:increaseBrushOpacity.desc"),hotkey:"Shift + ]"},{title:i("hotkeys:moveTool.title"),desc:i("hotkeys:moveTool.desc"),hotkey:"V"},{title:i("hotkeys:fillBoundingBox.title"),desc:i("hotkeys:fillBoundingBox.desc"),hotkey:"Shift + F"},{title:i("hotkeys:eraseBoundingBox.title"),desc:i("hotkeys:eraseBoundingBox.desc"),hotkey:"Delete / Backspace"},{title:i("hotkeys:colorPicker.title"),desc:i("hotkeys:colorPicker.desc"),hotkey:"C"},{title:i("hotkeys:toggleSnap.title"),desc:i("hotkeys:toggleSnap.desc"),hotkey:"N"},{title:i("hotkeys:quickToggleMove.title"),desc:i("hotkeys:quickToggleMove.desc"),hotkey:"Hold Space"},{title:i("hotkeys:toggleLayer.title"),desc:i("hotkeys:toggleLayer.desc"),hotkey:"Q"},{title:i("hotkeys:clearMask.title"),desc:i("hotkeys:clearMask.desc"),hotkey:"Shift+C"},{title:i("hotkeys:hideMask.title"),desc:i("hotkeys:hideMask.desc"),hotkey:"H"},{title:i("hotkeys:showHideBoundingBox.title"),desc:i("hotkeys:showHideBoundingBox.desc"),hotkey:"Shift+H"},{title:i("hotkeys:mergeVisible.title"),desc:i("hotkeys:mergeVisible.desc"),hotkey:"Shift+M"},{title:i("hotkeys:saveToGallery.title"),desc:i("hotkeys:saveToGallery.desc"),hotkey:"Shift+S"},{title:i("hotkeys:copyToClipboard.title"),desc:i("hotkeys:copyToClipboard.desc"),hotkey:"Ctrl+C"},{title:i("hotkeys:downloadImage.title"),desc:i("hotkeys:downloadImage.desc"),hotkey:"Shift+D"},{title:i("hotkeys:undoStroke.title"),desc:i("hotkeys:undoStroke.desc"),hotkey:"Ctrl+Z"},{title:i("hotkeys:redoStroke.title"),desc:i("hotkeys:redoStroke.desc"),hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:i("hotkeys:resetView.title"),desc:i("hotkeys:resetView.desc"),hotkey:"R"},{title:i("hotkeys:previousStagingImage.title"),desc:i("hotkeys:previousStagingImage.desc"),hotkey:"Arrow Left"},{title:i("hotkeys:nextStagingImage.title"),desc:i("hotkeys:nextStagingImage.desc"),hotkey:"Arrow Right"},{title:i("hotkeys:acceptStagingImage.title"),desc:i("hotkeys:acceptStagingImage.desc"),hotkey:"Enter"}],u=f=>{const p=[];return f.forEach((m,v)=>{p.push(b(v7e,{title:m.title,description:m.desc,hotkey:m.hotkey},v))}),b("div",{className:"hotkey-modal-category",children:p})};return ee(In,{children:[k.exports.cloneElement(e,{onClick:n}),ee(k1,{isOpen:t,onClose:r,children:[b(E1,{}),ee(h2,{className:" modal hotkeys-modal",children:[b(ck,{className:"modal-close-btn"}),b("h1",{children:"Keyboard Shorcuts"}),b("div",{className:"hotkeys-modal-items",children:ee(fS,{allowMultiple:!0,children:[ee(hh,{children:[ee(dh,{className:"hotkeys-modal-button",children:[b("h2",{children:i("hotkeys:appHotkeys")}),b(fh,{})]}),b(ph,{children:u(o)})]}),ee(hh,{children:[ee(dh,{className:"hotkeys-modal-button",children:[b("h2",{children:i("hotkeys:generalHotkeys")}),b(fh,{})]}),b(ph,{children:u(a)})]}),ee(hh,{children:[ee(dh,{className:"hotkeys-modal-button",children:[b("h2",{children:i("hotkeys:galleryHotkeys")}),b(fh,{})]}),b(ph,{children:u(s)})]}),ee(hh,{children:[ee(dh,{className:"hotkeys-modal-button",children:[b("h2",{children:i("hotkeys:unifiedCanvasHotkeys")}),b(fh,{})]}),b(ph,{children:u(l)})]})]})})]})]})]})}const b7e=e=>{const{isProcessing:t,isConnected:n}=ye(u=>u.system),r=Ie(),{name:i,status:o,description:a}=e,s=()=>{r(zW(i))},{t:l}=Ge();return ee("div",{className:"model-list-item",children:[b(Zi,{label:a,hasArrow:!0,placement:"bottom",children:b("div",{className:"model-list-item-name",children:i})}),b(oF,{}),b("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),b("div",{className:"model-list-item-load-btn",children:b(Za,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:l("common:load")})})]})},S7e=ot(e=>e.system,e=>{const t=We.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),x7e=()=>{const{models:e}=ye(S7e),{t}=Ge();return b(fS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(hh,{children:[b(dh,{children:ee("div",{className:"model-list-button",children:[b(qi,{fontSize:"sm",fontWeight:"bold",color:"var(--text-color-secondary)",children:t("settings:models")}),b(fh,{})]})}),b(ph,{children:b("div",{className:"model-list-list",children:e.map((n,r)=>b(b7e,{name:n.name,status:n.status,description:n.description},r))})})]})})},ja=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return ee(Wd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,display:"flex",columnGap:"1rem",alignItems:"center",justifyContent:"space-between",...i,children:[b(Fh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",marginRight:0,marginTop:.5,marginBottom:.5,fontSize:"sm",fontWeight:"bold",width:"auto",...o,children:t}),b(wk,{className:"invokeai__switch-root",...s})]})},Hs=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="sm",styleClass:l,...u}=e;return ee(Wd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:f=>{f.stopPropagation(),f.nativeEvent.stopImmediatePropagation(),f.nativeEvent.stopPropagation(),f.nativeEvent.cancelBubble=!0},children:[t&&b(Fh,{className:"invokeai__select-label",fontSize:s,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",children:t}),b(Zi,{label:i,...o,children:b(IH,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(f=>typeof f=="string"||typeof f=="number"?b("option",{value:f,className:"invokeai__select-option",children:f},f):b("option",{value:f.value,className:"invokeai__select-option",children:f.key},f.value))})})]})},BM=/^-?(0\.)?\.?$/,Vs=e=>{const{label:t,labelFontSize:n="sm",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:f,min:p,max:m,isInteger:v=!0,formControlProps:y,formLabelProps:x,numberInputFieldProps:E,numberInputStepperProps:_,tooltipProps:C,...T}=e,[A,M]=k.exports.useState(String(u));k.exports.useEffect(()=>{!A.match(BM)&&u!==Number(A)&&M(String(u))},[u,A]);const I=B=>{M(B),B.match(BM)||f(v?Math.floor(Number(B)):Number(B))},D=B=>{const F=We.clamp(v?Math.floor(Number(B.target.value)):Number(B.target.value),p,m);M(String(F)),f(F)};return b(Zi,{...C,children:ee(Wd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...y,children:[t&&b(Fh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,fontWeight:"bold",marginRight:0,marginBottom:0,whiteSpace:"nowrap",...x,children:t}),ee(fk,{className:"invokeai__number-input-root",value:A,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:D,width:a,...T,children:[b(hk,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[b(gk,{..._,className:"invokeai__number-input-stepper-button"}),b(pk,{..._,className:"invokeai__number-input-stepper-button"})]})]})]})})},tc=e=>e.system,w7e=e=>e.system.toastQueue,Sr=ot(e=>e.options,e=>Bk[e.activeTab],{memoizeOptions:{equalityCheck:We.isEqual}});ot(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:We.isEqual}});const sE=e=>e.options,C7e=ot([tc,sE],(e,t)=>{const{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,model_list:o,saveIntermediatesInterval:a,enableImageDebugging:s}=e,{shouldUseCanvasBetaLayout:l}=t;return{shouldDisplayInProgressType:n,shouldConfirmOnDelete:r,shouldDisplayGuides:i,models:We.map(o,(u,f)=>f),saveIntermediatesInterval:a,enableImageDebugging:s,shouldUseCanvasBetaLayout:l}},{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),_7e=({children:e})=>{const t=Ie(),{t:n}=Ge(),r=ye(C=>C.options.steps),{isOpen:i,onOpen:o,onClose:a}=s2(),{isOpen:s,onOpen:l,onClose:u}=s2(),{shouldDisplayInProgressType:f,shouldConfirmOnDelete:p,shouldDisplayGuides:m,saveIntermediatesInterval:v,enableImageDebugging:y,shouldUseCanvasBetaLayout:x}=ye(C7e),E=()=>{MU.purge().then(()=>{a(),l()})},_=C=>{C>r&&(C=r),C<1&&(C=1),t(Bbe(C))};return ee(In,{children:[k.exports.cloneElement(e,{onClick:o}),ee(k1,{isOpen:i,onClose:a,size:"lg",children:[b(E1,{}),ee(h2,{className:"modal settings-modal",children:[b(CS,{className:"settings-modal-header",children:n("common:settingsLabel")}),b(ck,{className:"modal-close-btn"}),ee(f2,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[b("div",{className:"settings-modal-item",children:b(x7e,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[b(Hs,{label:n("settings:displayInProgress"),validValues:Oxe,value:f,onChange:C=>t(Abe(C.target.value))}),f==="full-res"&&b(Vs,{label:n("settings:saveSteps"),min:1,max:r,step:1,onChange:_,value:v,width:"auto",textAlign:"center"})]}),b(ja,{styleClass:"settings-modal-item",label:n("settings:confirmOnDelete"),isChecked:p,onChange:C=>t(rW(C.target.checked))}),b(ja,{styleClass:"settings-modal-item",label:n("settings:displayHelpIcons"),isChecked:m,onChange:C=>t(Ibe(C.target.checked))}),b(ja,{styleClass:"settings-modal-item",label:n("settings:useCanvasBeta"),isChecked:x,onChange:C=>t(B4e(C.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[b("h2",{style:{fontWeight:"bold"},children:"Developer"}),b(ja,{styleClass:"settings-modal-item",label:n("settings:enableImageDebugging"),isChecked:y,onChange:C=>t(zbe(C.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[b(wh,{size:"md",children:n("settings:resetWebUI")}),b(Za,{colorScheme:"red",onClick:E,children:n("settings:resetWebUI")}),b(qi,{children:n("settings:resetWebUIDesc1")}),b(qi,{children:n("settings:resetWebUIDesc2")})]})]}),b(wS,{children:b(Za,{onClick:a,className:"modal-close-btn",children:n("common:close")})})]})]}),ee(k1,{closeOnOverlayClick:!1,isOpen:s,onClose:u,isCentered:!0,children:[b(E1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),b(h2,{children:b(f2,{pb:6,pt:6,children:b(bt,{justifyContent:"center",children:b(qi,{fontSize:"lg",children:b(qi,{children:n("settings:resetComplete")})})})})})]})]})},k7e=ot(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),E7e=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ye(k7e),s=Ie(),{t:l}=Ge();let u;e&&!o?u="status-good":u="status-bad";let f=i;return[l("common:statusGenerating"),l("common:statusPreparing"),l("common:statusSavingImage"),l("common:statusRestoringFaces"),l("common:statusUpscaling")].includes(f)&&(u="status-working"),f&&t&&r>1&&(f+=` (${n}/${r})`),b(Zi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:b(qi,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(iW())},className:`status ${u}`,children:l(f)})})},zs=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(mk,{...o,children:[b(bk,{children:t}),ee(yk,{className:`invokeai__popover-content ${r}`,children:[i&&b(vk,{className:"invokeai__popover-arrow"}),n]})]})},co=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return b(Zi,{label:r,...i,children:b(Za,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function P7e(){const{t:e}=Ge(),{setColorMode:t,colorMode:n}=T2(),r=Ie(),i=ye(l=>l.options.currentTheme),o={dark:e("common:darkTheme"),light:e("common:lightTheme"),green:e("common:greenTheme")};k.exports.useEffect(()=>{n!==i&&t(i)},[t,n,i]);const a=l=>{r(k4e(l))},s=()=>{const l=[];return Object.keys(o).forEach(u=>{l.push(b(co,{style:{width:"6rem"},leftIcon:i===u?b(nE,{}):void 0,size:"sm",onClick:()=>a(u),children:o[u]},u))}),l};return b(zs,{trigger:"hover",triggerComponent:b(Qe,{"aria-label":e("common:themeLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:b(s7e,{})}),children:b(W_,{align:"stretch",children:s()})})}const T7e=ot([tc],e=>{const{isProcessing:t,model_list:n}=e,r=We.map(n,(a,s)=>s),i=We.reduce(n,(a,s,l)=>(s.status==="active"&&(a=l),a),""),o=n[i].description;return{models:r,activeModel:i,isProcessing:t,activeDesc:o}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),L7e=()=>{const e=Ie(),{models:t,activeModel:n,isProcessing:r,activeDesc:i}=ye(T7e);return b(bt,{style:{paddingLeft:"0.3rem"},children:b(Hs,{style:{fontSize:"0.8rem"},tooltip:i,isDisabled:r,value:n,validValues:t,onChange:a=>{e(zW(a.target.value))}})})};function A7e(){const{t:e,i18n:t}=Ge(),n={en:e("common:langEnglish"),ru:e("common:langRussian"),it:e("common:langItalian"),pt_br:e("common:langBrPortuguese"),de:e("common:langGerman"),pl:e("common:langPolish")},r=()=>{const i=[];return Object.keys(n).forEach(o=>{i.push(b(co,{"data-selected":localStorage.getItem("i18nextLng")===o,onClick:()=>t.changeLanguage(o),className:"modal-close-btn lang-select-btn","aria-label":n[o],tooltip:n[o],size:"sm",minWidth:"200px",children:n[o]},o))}),i};return b(zs,{trigger:"hover",triggerComponent:b(Qe,{"aria-label":e("common:languagePickerLabel"),tooltip:e("common:languagePickerLabel"),icon:b(i7e,{}),size:"sm",variant:"link","data-variant":"link",fontSize:26}),children:b(W_,{children:r()})})}const O7e=()=>{const{t:e}=Ge();return ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[b("img",{src:GU,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",b("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[b(E7e,{}),b(L7e,{}),b(y7e,{children:b(Qe,{"aria-label":e("common:hotkeysLabel"),tooltip:e("common:hotkeysLabel"),size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:b(r7e,{})})}),b(P7e,{}),b(A7e,{}),b(Qe,{"aria-label":e("common:reportBugLabel"),tooltip:e("common:reportBugLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(Ch,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:b(XCe,{})})}),b(Qe,{"aria-label":e("common:githubLabel"),tooltip:e("common:githubLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(Ch,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:b(jCe,{})})}),b(Qe,{"aria-label":e("common:discordLabel"),tooltip:e("common:discordLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(Ch,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:b(UCe,{})})}),b(_7e,{children:b(Qe,{"aria-label":e("common:settingsLabel"),tooltip:e("common:settingsLabel"),variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(XS,{})})})]})]})};var R7e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gr=globalThis&&globalThis.__assign||function(){return Gr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Gr.apply(this,arguments)},zM={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},$M={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},K3={width:"20px",height:"20px",position:"absolute"},M7e={top:Gr(Gr({},zM),{top:"-5px"}),right:Gr(Gr({},$M),{left:void 0,right:"-5px"}),bottom:Gr(Gr({},zM),{top:void 0,bottom:"-5px"}),left:Gr(Gr({},$M),{left:"-5px"}),topRight:Gr(Gr({},K3),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Gr(Gr({},K3),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Gr(Gr({},K3),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Gr(Gr({},K3),{left:"-10px",top:"-10px",cursor:"nw-resize"})},I7e=function(e){R7e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return b("div",{className:this.props.className||"",style:Gr(Gr({position:"absolute",userSelect:"none"},M7e[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(k.exports.PureComponent),D7e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cl=globalThis&&globalThis.__assign||function(){return Cl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cl.apply(this,arguments)},N7e={width:"auto",height:"auto"},X3=function(e,t,n){return Math.max(Math.min(e,n),t)},FM=function(e,t){return Math.round(e/t)*t},c0=function(e,t){return new RegExp(e,"i").test(t)},Z3=function(e){return Boolean(e.touches&&e.touches.length)},B7e=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},HM=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},M6=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Q3=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return n*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},z7e=function(e,t,n,r,i,o,a){return r=Q3(r,e.width,t,n),i=Q3(i,e.height,t,n),o=Q3(o,e.width,t,n),a=Q3(a,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},$7e=["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"],VM="__resizable_base__",qU=function(e){D7e(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(VM):o.className+=VM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.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},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return 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?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||N7e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),f=u/l[s]*100;return f+"%"}return M6(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?M6(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?M6(r.height):i("height");return{width:o,height:a}},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 n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),o},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 n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&c0("left",o),s=i&&c0("top",o),l,u;if(this.props.bounds==="parent"){var f=this.parentNode;f&&(l=a?this.resizableRight-this.parentLeft:f.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:f.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),u&&Number.isFinite(u)&&(r=r&&r<u?r:u),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var i=this.props.scale||1,o=this.props.resizeRatio||1,a=this.state,s=a.direction,l=a.original,u=this.props,f=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=l.width,y=l.height,x=p||0,E=m||0;return c0("right",s)&&(v=l.width+(n-l.x)*o/i,f&&(y=(v-E)/this.ratio+x)),c0("left",s)&&(v=l.width-(n-l.x)*o/i,f&&(y=(v-E)/this.ratio+x)),c0("bottom",s)&&(y=l.height+(r-l.y)*o/i,f&&(v=(y-x)*this.ratio+E)),c0("top",s)&&(y=l.height-(r-l.y)*o/i,f&&(v=(y-x)*this.ratio+E)),{newWidth:v,newHeight:y}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,i,o){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,f=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,y=l||0,x=u||0;if(s){var E=(m-y)*this.ratio+x,_=(v-y)*this.ratio+x,C=(f-x)/this.ratio+y,T=(p-x)/this.ratio+y,A=Math.max(f,E),M=Math.min(p,_),I=Math.max(m,C),D=Math.min(v,T);n=X3(n,A,M),r=X3(r,I,D)}else n=X3(n,f,p),r=X3(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&B7e(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Z3(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var f=this.window.getComputedStyle(u).flexDirection;this.flexDir=f.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Cl(Cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Z3(n))try{n.preventDefault(),n.stopPropagation()}catch(W){}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Z3(n)?n.touches[0].clientX:n.clientX,f=Z3(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,y=p.width,x=p.height,E=this.getParentSize(),_=z7e(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=_.maxWidth,a=_.maxHeight,s=_.minWidth,l=_.minHeight;var C=this.calculateNewSizeFromDirection(u,f),T=C.newHeight,A=C.newWidth,M=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(A=HM(A,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=HM(T,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(A,T,{width:M.maxWidth,height:M.maxHeight},{width:s,height:l});if(A=I.newWidth,T=I.newHeight,this.props.grid){var D=FM(A,this.props.grid[0]),B=FM(T,this.props.grid[1]),F=this.props.snapGap||0;A=F===0||Math.abs(D-A)<=F?D:A,T=F===0||Math.abs(B-T)<=F?B:T}var H={width:A-v.width,height:T-v.height};if(y&&typeof y=="string"){if(y.endsWith("%")){var Y=A/E.width*100;A=Y+"%"}else if(y.endsWith("vw")){var te=A/this.window.innerWidth*100;A=te+"vw"}else if(y.endsWith("vh")){var G=A/this.window.innerHeight*100;A=G+"vh"}}if(x&&typeof x=="string"){if(x.endsWith("%")){var Y=T/E.height*100;T=Y+"%"}else if(x.endsWith("vw")){var te=T/this.window.innerWidth*100;T=te+"vw"}else if(x.endsWith("vh")){var G=T/this.window.innerHeight*100;T=G+"vh"}}var z={width:this.createSizeForCssProperty(A,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?z.flexBasis=z.width:this.flexDir==="column"&&(z.flexBasis=z.height),Zl.exports.flushSync(function(){r.setState(z)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,H)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Cl(Cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var f=Object.keys(i).map(function(p){return i[p]!==!1?b(I7e,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return b("div",{className:l,style:s,children:f})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return $7e.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=Cl(Cl(Cl({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&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return ee(o,{...Cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&b("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}(k.exports.PureComponent),F7e=Object.create,YU=Object.defineProperty,H7e=Object.getOwnPropertyDescriptor,V7e=Object.getOwnPropertyNames,W7e=Object.getPrototypeOf,U7e=Object.prototype.hasOwnProperty,Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),j7e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of V7e(t))!U7e.call(e,i)&&i!==n&&YU(e,i,{get:()=>t[i],enumerable:!(r=H7e(t,i))||r.enumerable});return e},KU=(e,t,n)=>(n=e!=null?F7e(W7e(e)):{},j7e(t||!e||!e.__esModule?YU(n,"default",{value:e,enumerable:!0}):n,e)),G7e=Fe((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),XU=Fe((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),ZS=Fe((e,t)=>{var n=XU();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),q7e=Fe((e,t)=>{var n=ZS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),Y7e=Fe((e,t)=>{var n=ZS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),K7e=Fe((e,t)=>{var n=ZS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),X7e=Fe((e,t)=>{var n=ZS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),QS=Fe((e,t)=>{var n=G7e(),r=q7e(),i=Y7e(),o=K7e(),a=X7e();function s(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Z7e=Fe((e,t)=>{var n=QS();function r(){this.__data__=new n,this.size=0}t.exports=r}),Q7e=Fe((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),J7e=Fe((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),e9e=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),ZU=Fe((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),nc=Fe((e,t)=>{var n=ZU(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),lE=Fe((e,t)=>{var n=nc(),r=n.Symbol;t.exports=r}),t9e=Fe((e,t)=>{var n=lE(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),f=l[a];try{l[a]=void 0;var p=!0}catch(v){}var m=o.call(l);return p&&(u?l[a]=f:delete l[a]),m}t.exports=s}),n9e=Fe((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),JS=Fe((e,t)=>{var n=lE(),r=t9e(),i=n9e(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),QU=Fe((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),JU=Fe((e,t)=>{var n=JS(),r=QU(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var f=n(u);return f==o||f==a||f==i||f==s}t.exports=l}),r9e=Fe((e,t)=>{var n=nc(),r=n["__core-js_shared__"];t.exports=r}),i9e=Fe((e,t)=>{var n=r9e(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),ej=Fe((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch(a){}try{return o+""}catch(a){}}return""}t.exports=i}),o9e=Fe((e,t)=>{var n=JU(),r=i9e(),i=QU(),o=ej(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,f=l.toString,p=u.hasOwnProperty,m=RegExp("^"+f.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(y){if(!i(y)||r(y))return!1;var x=n(y)?m:s;return x.test(o(y))}t.exports=v}),a9e=Fe((e,t)=>{function n(r,i){return r==null?void 0:r[i]}t.exports=n}),K1=Fe((e,t)=>{var n=o9e(),r=a9e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),uE=Fe((e,t)=>{var n=K1(),r=nc(),i=n(r,"Map");t.exports=i}),ex=Fe((e,t)=>{var n=K1(),r=n(Object,"create");t.exports=r}),s9e=Fe((e,t)=>{var n=ex();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),l9e=Fe((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),u9e=Fe((e,t)=>{var n=ex(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),c9e=Fe((e,t)=>{var n=ex(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),d9e=Fe((e,t)=>{var n=ex(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),f9e=Fe((e,t)=>{var n=s9e(),r=l9e(),i=u9e(),o=c9e(),a=d9e();function s(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),h9e=Fe((e,t)=>{var n=f9e(),r=QS(),i=uE();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),p9e=Fe((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),tx=Fe((e,t)=>{var n=p9e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),g9e=Fe((e,t)=>{var n=tx();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),m9e=Fe((e,t)=>{var n=tx();function r(i){return n(this,i).get(i)}t.exports=r}),v9e=Fe((e,t)=>{var n=tx();function r(i){return n(this,i).has(i)}t.exports=r}),y9e=Fe((e,t)=>{var n=tx();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),tj=Fe((e,t)=>{var n=h9e(),r=g9e(),i=m9e(),o=v9e(),a=y9e();function s(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),b9e=Fe((e,t)=>{var n=QS(),r=uE(),i=tj(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var f=u.__data__;if(!r||f.length<o-1)return f.push([s,l]),this.size=++u.size,this;u=this.__data__=new i(f)}return u.set(s,l),this.size=u.size,this}t.exports=a}),S9e=Fe((e,t)=>{var n=QS(),r=Z7e(),i=Q7e(),o=J7e(),a=e9e(),s=b9e();function l(u){var f=this.__data__=new n(u);this.size=f.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),x9e=Fe((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),w9e=Fe((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),C9e=Fe((e,t)=>{var n=tj(),r=x9e(),i=w9e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s<l;)this.add(a[s])}o.prototype.add=o.prototype.push=r,o.prototype.has=i,t.exports=o}),_9e=Fe((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o<a;)if(i(r[o],o,r))return!0;return!1}t.exports=n}),k9e=Fe((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),nj=Fe((e,t)=>{var n=C9e(),r=_9e(),i=k9e(),o=1,a=2;function s(l,u,f,p,m,v){var y=f&o,x=l.length,E=u.length;if(x!=E&&!(y&&E>x))return!1;var _=v.get(l),C=v.get(u);if(_&&C)return _==u&&C==l;var T=-1,A=!0,M=f&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T<x;){var I=l[T],D=u[T];if(p)var B=y?p(D,I,T,u,l,v):p(I,D,T,l,u,v);if(B!==void 0){if(B)continue;A=!1;break}if(M){if(!r(u,function(F,H){if(!i(M,H)&&(I===F||m(I,F,f,p,v)))return M.push(H)})){A=!1;break}}else if(!(I===D||m(I,D,f,p,v))){A=!1;break}}return v.delete(l),v.delete(u),A}t.exports=s}),E9e=Fe((e,t)=>{var n=nc(),r=n.Uint8Array;t.exports=r}),P9e=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),T9e=Fe((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),L9e=Fe((e,t)=>{var n=lE(),r=E9e(),i=XU(),o=nj(),a=P9e(),s=T9e(),l=1,u=2,f="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",y="[object Number]",x="[object RegExp]",E="[object Set]",_="[object String]",C="[object Symbol]",T="[object ArrayBuffer]",A="[object DataView]",M=n?n.prototype:void 0,I=M?M.valueOf:void 0;function D(B,F,H,Y,te,G,z){switch(H){case A:if(B.byteLength!=F.byteLength||B.byteOffset!=F.byteOffset)return!1;B=B.buffer,F=F.buffer;case T:return!(B.byteLength!=F.byteLength||!G(new r(B),new r(F)));case f:case p:case y:return i(+B,+F);case m:return B.name==F.name&&B.message==F.message;case x:case _:return B==F+"";case v:var W=a;case E:var K=Y&l;if(W||(W=s),B.size!=F.size&&!K)return!1;var Z=z.get(B);if(Z)return Z==F;Y|=u,z.set(B,F);var U=o(W(B),W(F),Y,te,G,z);return z.delete(B),U;case C:if(I)return I.call(B)==I.call(F)}return!1}t.exports=D}),A9e=Fe((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o<a;)r[s+o]=i[o];return r}t.exports=n}),cE=Fe((e,t)=>{var n=Array.isArray;t.exports=n}),O9e=Fe((e,t)=>{var n=A9e(),r=cE();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),R9e=Fe((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o<a;){var u=r[o];i(u,o,r)&&(l[s++]=u)}return l}t.exports=n}),M9e=Fe((e,t)=>{function n(){return[]}t.exports=n}),I9e=Fe((e,t)=>{var n=R9e(),r=M9e(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),D9e=Fe((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),nx=Fe((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),N9e=Fe((e,t)=>{var n=JS(),r=nx(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),B9e=Fe((e,t)=>{var n=N9e(),r=nx(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),z9e=Fe((e,t)=>{function n(){return!1}t.exports=n}),rj=Fe((e,t)=>{var n=nc(),r=z9e(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),$9e=Fe((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a!=null?a:n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o<a}t.exports=i}),ij=Fe((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),F9e=Fe((e,t)=>{var n=JS(),r=ij(),i=nx(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",y="[object RegExp]",x="[object Set]",E="[object String]",_="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",A="[object Float32Array]",M="[object Float64Array]",I="[object Int8Array]",D="[object Int16Array]",B="[object Int32Array]",F="[object Uint8Array]",H="[object Uint8ClampedArray]",Y="[object Uint16Array]",te="[object Uint32Array]",G={};G[A]=G[M]=G[I]=G[D]=G[B]=G[F]=G[H]=G[Y]=G[te]=!0,G[o]=G[a]=G[C]=G[s]=G[T]=G[l]=G[u]=G[f]=G[p]=G[m]=G[v]=G[y]=G[x]=G[E]=G[_]=!1;function z(W){return i(W)&&r(W.length)&&!!G[n(W)]}t.exports=z}),H9e=Fe((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),V9e=Fe((e,t)=>{var n=ZU(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch(u){}}();t.exports=s}),oj=Fe((e,t)=>{var n=F9e(),r=H9e(),i=V9e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),W9e=Fe((e,t)=>{var n=D9e(),r=B9e(),i=cE(),o=rj(),a=$9e(),s=oj(),l=Object.prototype,u=l.hasOwnProperty;function f(p,m){var v=i(p),y=!v&&r(p),x=!v&&!y&&o(p),E=!v&&!y&&!x&&s(p),_=v||y||x||E,C=_?n(p.length,String):[],T=C.length;for(var A in p)(m||u.call(p,A))&&!(_&&(A=="length"||x&&(A=="offset"||A=="parent")||E&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||a(A,T)))&&C.push(A);return C}t.exports=f}),U9e=Fe((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),j9e=Fe((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),G9e=Fe((e,t)=>{var n=j9e(),r=n(Object.keys,Object);t.exports=r}),q9e=Fe((e,t)=>{var n=U9e(),r=G9e(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),Y9e=Fe((e,t)=>{var n=JU(),r=ij();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),K9e=Fe((e,t)=>{var n=W9e(),r=q9e(),i=Y9e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),X9e=Fe((e,t)=>{var n=O9e(),r=I9e(),i=K9e();function o(a){return n(a,i,r)}t.exports=o}),Z9e=Fe((e,t)=>{var n=X9e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,f,p,m){var v=u&r,y=n(s),x=y.length,E=n(l),_=E.length;if(x!=_&&!v)return!1;for(var C=x;C--;){var T=y[C];if(!(v?T in l:o.call(l,T)))return!1}var A=m.get(s),M=m.get(l);if(A&&M)return A==l&&M==s;var I=!0;m.set(s,l),m.set(l,s);for(var D=v;++C<x;){T=y[C];var B=s[T],F=l[T];if(f)var H=v?f(F,B,T,l,s,m):f(B,F,T,s,l,m);if(!(H===void 0?B===F||p(B,F,u,f,m):H)){I=!1;break}D||(D=T=="constructor")}if(I&&!D){var Y=s.constructor,te=l.constructor;Y!=te&&"constructor"in s&&"constructor"in l&&!(typeof Y=="function"&&Y instanceof Y&&typeof te=="function"&&te instanceof te)&&(I=!1)}return m.delete(s),m.delete(l),I}t.exports=a}),Q9e=Fe((e,t)=>{var n=K1(),r=nc(),i=n(r,"DataView");t.exports=i}),J9e=Fe((e,t)=>{var n=K1(),r=nc(),i=n(r,"Promise");t.exports=i}),e8e=Fe((e,t)=>{var n=K1(),r=nc(),i=n(r,"Set");t.exports=i}),t8e=Fe((e,t)=>{var n=K1(),r=nc(),i=n(r,"WeakMap");t.exports=i}),n8e=Fe((e,t)=>{var n=Q9e(),r=uE(),i=J9e(),o=e8e(),a=t8e(),s=JS(),l=ej(),u="[object Map]",f="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",y="[object DataView]",x=l(n),E=l(r),_=l(i),C=l(o),T=l(a),A=s;(n&&A(new n(new ArrayBuffer(1)))!=y||r&&A(new r)!=u||i&&A(i.resolve())!=p||o&&A(new o)!=m||a&&A(new a)!=v)&&(A=function(M){var I=s(M),D=I==f?M.constructor:void 0,B=D?l(D):"";if(B)switch(B){case x:return y;case E:return u;case _:return p;case C:return m;case T:return v}return I}),t.exports=A}),r8e=Fe((e,t)=>{var n=S9e(),r=nj(),i=L9e(),o=Z9e(),a=n8e(),s=cE(),l=rj(),u=oj(),f=1,p="[object Arguments]",m="[object Array]",v="[object Object]",y=Object.prototype,x=y.hasOwnProperty;function E(_,C,T,A,M,I){var D=s(_),B=s(C),F=D?m:a(_),H=B?m:a(C);F=F==p?v:F,H=H==p?v:H;var Y=F==v,te=H==v,G=F==H;if(G&&l(_)){if(!l(C))return!1;D=!0,Y=!1}if(G&&!Y)return I||(I=new n),D||u(_)?r(_,C,T,A,M,I):i(_,C,F,T,A,M,I);if(!(T&f)){var z=Y&&x.call(_,"__wrapped__"),W=te&&x.call(C,"__wrapped__");if(z||W){var K=z?_.value():_,Z=W?C.value():C;return I||(I=new n),M(K,Z,T,A,I)}}return G?(I||(I=new n),o(_,C,T,A,M,I)):!1}t.exports=E}),i8e=Fe((e,t)=>{var n=r8e(),r=nx();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),aj=Fe((e,t)=>{var n=i8e();function r(i,o){return n(i,o)}t.exports=r}),o8e=["ctrl","shift","alt","meta","mod"],a8e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function I6(e,t=","){return typeof e=="string"?e.split(t):e}function Ev(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>a8e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!o8e.includes(o));return{...r,keys:i}}function s8e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function l8e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function u8e(e){return sj(e,["input","textarea","select"])}function sj({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function c8e(e,t){return e.length===0&&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(n=>t.includes(n))||e.includes("*"):!0}var d8e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:f,metaKey:p,shiftKey:m,key:v,code:y}=e,x=y.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!f)return!1}else if(p!==o&&x!=="meta"||f!==i&&x!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(x))?!0:l?l.every(_=>n.has(_)):!l},f8e=k.exports.createContext(void 0),h8e=()=>k.exports.useContext(f8e),p8e=k.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),g8e=()=>k.exports.useContext(p8e),m8e=KU(aj());function v8e(e){let t=k.exports.useRef(void 0);return(0,m8e.default)(t.current,e)||(t.current=e),t.current}var WM=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function je(e,t,n,r){let i=k.exports.useRef(null),{current:o}=k.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=k.exports.useCallback(t,[...s]),u=v8e(a),{enabledScopes:f}=g8e(),p=h8e();return k.exports.useLayoutEffect(()=>{if((u==null?void 0:u.enabled)===!1||!c8e(f,u==null?void 0:u.scopes))return;let m=x=>{var E;if(!(u8e(x)&&!sj(x,u==null?void 0:u.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){WM(x);return}((E=x.target)==null?void 0:E.isContentEditable)&&!(u!=null&&u.enableOnContentEditable)||I6(e,u==null?void 0:u.splitKey).forEach(_=>{var T;let C=Ev(_,u==null?void 0:u.combinationKey);if(d8e(x,C,o)||((T=C.keys)==null?void 0:T.includes("*"))){if(s8e(x,C,u==null?void 0:u.preventDefault),!l8e(x,C,u==null?void 0:u.enabled)){WM(x);return}l(x,C)}})}},v=x=>{o.add(x.key.toLowerCase()),((u==null?void 0:u.keydown)===void 0&&(u==null?void 0:u.keyup)!==!0||(u==null?void 0:u.keydown))&&m(x)},y=x=>{x.key.toLowerCase()!=="meta"?o.delete(x.key.toLowerCase()):o.clear(),u!=null&&u.keyup&&m(x)};return(i.current||document).addEventListener("keyup",y),(i.current||document).addEventListener("keydown",v),p&&I6(e,u==null?void 0:u.splitKey).forEach(x=>p.addHotkey(Ev(x,u==null?void 0:u.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",y),(i.current||document).removeEventListener("keydown",v),p&&I6(e,u==null?void 0:u.splitKey).forEach(x=>p.removeHotkey(Ev(x,u==null?void 0:u.combinationKey)))}},[e,l,u,f]),i}KU(aj());var k9=new Set;function y8e(e){(Array.isArray(e)?e:[e]).forEach(t=>k9.add(Ev(t)))}function b8e(e){(Array.isArray(e)?e:[e]).forEach(t=>{var r;let n=Ev(t);for(let i of k9)(r=i.keys)!=null&&r.every(o=>{var a;return(a=n.keys)==null?void 0:a.includes(o)})&&k9.delete(i)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{y8e(e.key)}),document.addEventListener("keyup",e=>{b8e(e.key)})});const S8e=ot(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),x8e=ot(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),w8e=()=>{const e=Ie(),t=ye(S8e),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ye(x8e),[o,a]=k.exports.useState(!0),s=k.exports.useRef(null);k.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(iW()),e(b6(!n))};return je("`",()=>{e(b6(!n))},[n]),je("esc",()=>{e(b6(!1))}),ee(In,{children:[n&&b(qU,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:b("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop<s.current.scrollHeight-s.current.clientHeight&&a(!1)},children:t.map((f,p)=>{const{timestamp:m,message:v,level:y}=f;return ee("div",{className:`console-entry console-${y}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),b("p",{className:"console-message",children:v})]},p)})})}),n&&b(Zi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:b(Qa,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:b(GCe,{}),onClick:()=>a(!o)})}),b(Zi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:b(Qa,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?b(a7e,{}):b($U,{}),onClick:l})})]})};function C8e(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}function _8e(){const{t:e}=Ge();return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[b("h1",{children:e("common:nodes")}),b("p",{children:e("common:nodesDesc")})]})}const k8e=()=>{const{t:e}=Ge();return ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[b("h1",{children:e("common:postProcessing")}),b("p",{children:e("common:postProcessDesc1")}),b("p",{children:e("common:postProcessDesc2")}),b("p",{children:e("common:postProcessDesc3")})]})},E8e=dt({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:b("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:b("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"})})}),P8e=dt({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:b("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"})}),T8e=dt({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:b("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"})}),L8e=dt({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:b("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:b("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"})})});var Ki=(e=>(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))(Ki||{});const A8e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"Image to Image allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[8]:{text:"The bounding box is analogous to the Width and Height settings for Text to Image or Image to Image. Only the area in the box will be processed.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{text:"Control the handling of visible seams which may occur when a generated image is pasted back onto the canvas.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[10]:{text:"Manage infill methods (used on masked or erased areas of the canvas) and scaling (useful for small bounding box sizes).",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},O8e=ot(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),R8e=ot(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),dE=()=>{const e=Ie(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=ye(O8e),{isGFPGANAvailable:i}=ye(R8e),o=u=>e(I4(u)),a=u=>e(EV(u)),s=u=>e(D4(u.target.value)),{t:l}=Ge();return ee(bt,{direction:"column",gap:2,children:[b(Hs,{label:l("options:type"),validValues:Axe.concat(),value:n,onChange:s}),b(Vs,{isDisabled:!i,label:l("options:strength"),step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&b(Vs,{isDisabled:!i,label:l("options:codeformerFidelity"),step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function lj(){const e=ye(i=>i.system.isGFPGANAvailable),t=ye(i=>i.options.shouldRunFacetool),n=Ie();return b(ja,{isDisabled:!e,isChecked:t,onChange:i=>n(I4e(i.target.checked))})}function M8e(){const e=Ie(),t=ye(i=>i.options.shouldFitToWidthHeight),n=i=>e(IV(i.target.checked)),{t:r}=Ge();return b(ja,{label:r("options:imageFit"),isChecked:t,onChange:n})}function I8e(e){return ht({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 fE(e){return ht({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 D8e(e){return ht({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 N8e(e){return ht({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 B8e(e){return ht({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 z8e(e){return ht({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 $o(e){const[t,n]=k.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,width:u="100%",tooltipSuffix:f="",withSliderMarks:p=!1,sliderMarkLeftOffset:m=0,sliderMarkRightOffset:v=-7,withInput:y=!1,isInteger:x=!1,inputWidth:E="5rem",inputReadOnly:_=!0,withReset:C=!1,hideTooltip:T=!1,isCompact:A=!1,handleReset:M,isResetDisabled:I,isSliderDisabled:D,isInputDisabled:B,styleClass:F,sliderFormControlProps:H,sliderFormLabelProps:Y,sliderMarkProps:te,sliderTrackProps:G,sliderThumbProps:z,sliderNumberInputProps:W,sliderNumberInputFieldProps:K,sliderNumberInputStepperProps:Z,sliderTooltipProps:U,sliderIAIIconButtonProps:Q,...ue}=e,[fe,Te]=k.exports.useState(String(i)),Oe=k.exports.useMemo(()=>W!=null&&W.max?W.max:a,[a,W==null?void 0:W.max]);k.exports.useEffect(()=>{String(i)!==fe&&fe!==""&&Te(String(i))},[i,fe,Te]);const ve=Ye=>{const Ue=We.clamp(x?Math.floor(Number(Ye.target.value)):Number(Ye.target.value),o,Oe);Te(String(Ue)),l(Ue)},Ce=Ye=>{Te(String(Ye)),l(Number(Ye))},Re=()=>{!M||M()};return ee(Wd,{className:F?`invokeai__slider-component ${F}`:"invokeai__slider-component","data-markers":p,style:A?{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"1rem",margin:0,padding:0}:{},...H,children:[b(Fh,{className:"invokeai__slider-component-label",...Y,children:r}),ee(sF,{w:"100%",gap:2,alignItems:"center",children:[ee(xk,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Ce,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:D,width:u,...ue,children:[p&&ee(In,{children:[b(H7,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:m,...te,children:o}),b(H7,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:v,...te,children:a})]}),b(jH,{className:"invokeai__slider_track",...G,children:b(GH,{className:"invokeai__slider_track-filled"})}),b(Zi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${f}`,hidden:T,...U,children:b(UH,{className:"invokeai__slider-thumb",...z})})]}),y&&ee(fk,{min:o,max:Oe,step:s,value:fe,onChange:Ce,onBlur:ve,className:"invokeai__slider-number-field",isDisabled:B,...W,children:[b(hk,{className:"invokeai__slider-number-input",width:E,readOnly:_,...K}),ee(PH,{...Z,children:[b(gk,{className:"invokeai__slider-number-stepper"}),b(pk,{className:"invokeai__slider-number-stepper"})]})]}),C&&b(Qe,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:b(fE,{}),onClick:Re,isDisabled:I,...Q})]})]})}function uj(e){const{t}=Ge(),{label:n=`${t("options:strength")}`,styleClass:r}=e,i=ye(l=>l.options.img2imgStrength),o=Ie();return b($o,{label:n,step:.01,min:.01,max:.99,onChange:l=>o(Z7(l)),value:i,isInteger:!1,styleClass:r,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{o(Z7(.75))}})}const cj=()=>{const e=Ie(),t=ye(i=>i.options.seamless),n=i=>e(RV(i.target.checked)),{t:r}=Ge();return b(bt,{gap:2,direction:"column",children:b(ja,{label:r("options:seamlessTiling"),fontSize:"md",isChecked:t,onChange:n})})},$8e=()=>b(bt,{gap:2,direction:"column",children:b(cj,{})});function F8e(){const e=Ie(),{t}=Ge(),n=ye(i=>i.options.shouldRandomizeSeed),r=i=>e(R4e(i.target.checked));return b(ja,{label:t("options:randomizeSeed"),isChecked:n,onChange:r})}function H8e(){const e=ye(a=>a.options.seed),t=ye(a=>a.options.shouldRandomizeSeed),n=ye(a=>a.options.shouldGenerateVariations),{t:r}=Ge(),i=Ie(),o=a=>i(G2(a));return b(Vs,{label:r("options:seed"),step:1,precision:0,flexGrow:1,min:qk,max:Yk,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"10rem"})}function V8e(){const e=Ie(),t=ye(i=>i.options.shouldRandomizeSeed),{t:n}=Ge();return b(Za,{size:"sm",isDisabled:t,onClick:()=>e(G2($W(qk,Yk))),children:b("p",{children:n("options:shuffle")})})}function W8e(){const e=Ie(),t=ye(i=>i.options.threshold),{t:n}=Ge(),r=i=>e(BV(i));return b(Vs,{label:n("options:noiseThreshold"),min:0,max:1e3,step:.1,onChange:r,value:t,isInteger:!1})}function U8e(){const e=Ie(),t=ye(i=>i.options.perlin),{t:n}=Ge(),r=i=>e(AV(i));return b(Vs,{label:n("options:perlinNoise"),min:0,max:1,step:.05,onChange:r,value:t,isInteger:!1})}const hE=()=>ee(bt,{gap:2,direction:"column",children:[b(F8e,{}),ee(bt,{gap:2,children:[b(H8e,{}),b(V8e,{})]}),b(bt,{gap:2,children:b(W8e,{})}),b(bt,{gap:2,children:b(U8e,{})})]}),j8e=ot(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),G8e=ot(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),pE=()=>{const e=Ie(),{upscalingLevel:t,upscalingStrength:n}=ye(j8e),{isESRGANAvailable:r}=ye(G8e),{t:i}=Ge(),o=s=>e(Q7(Number(s.target.value))),a=s=>e(J7(s));return ee("div",{className:"upscale-options",children:[b(Hs,{isDisabled:!r,label:i("options:scale"),value:t,onChange:o,validValues:Lxe}),b(Vs,{isDisabled:!r,label:i("options:strength"),step:.05,min:0,max:1,onChange:a,value:n,isInteger:!1})]})};function dj(){const e=ye(i=>i.system.isESRGANAvailable),t=ye(i=>i.options.shouldRunESRGAN),n=Ie();return b(ja,{isDisabled:!e,isChecked:t,onChange:i=>n(M4e(i.target.checked))})}function gE(){const e=ye(r=>r.options.shouldGenerateVariations),t=Ie();return b(ja,{isChecked:e,width:"auto",onChange:r=>t(T4e(r.target.checked))})}function q8e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="sm",width:o,isInvalid:a,...s}=e;return ee(Wd,{className:`input ${n}`,isInvalid:a,isDisabled:r,children:[b(Fh,{fontSize:i,fontWeight:"bold",alignItems:"center",whiteSpace:"nowrap",marginBottom:0,marginRight:0,className:"input-label",children:t}),b($_,{...s,className:"input-entry",size:"sm",width:o})]})}function Y8e(){const e=ye(o=>o.options.seedWeights),t=ye(o=>o.options.shouldGenerateVariations),{t:n}=Ge(),r=Ie(),i=o=>r(MV(o.target.value));return b(q8e,{label:n("options:seedWeights"),value:e,isInvalid:t&&!(Nk(e)||e===""),isDisabled:!t,onChange:i})}function K8e(){const e=ye(o=>o.options.variationAmount),t=ye(o=>o.options.shouldGenerateVariations),{t:n}=Ge(),r=Ie(),i=o=>r(N4e(o));return b(Vs,{label:n("options:variationAmount"),value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i,isInteger:!1})}const mE=()=>ee(bt,{gap:2,direction:"column",children:[b(K8e,{}),b(Y8e,{})]});function X8e(){const e=Ie(),t=ye(i=>i.options.cfgScale),{t:n}=Ge(),r=i=>e(kV(i));return b(Vs,{label:n("options:cfgScale"),step:.5,min:1.01,max:200,onChange:r,value:t,width:"auto",styleClass:"main-option-block",textAlign:"center",isInteger:!1})}function Z8e(){const e=ye(o=>o.options.height),t=ye(Sr),n=Ie(),{t:r}=Ge(),i=o=>n(PV(Number(o.target.value)));return b(Hs,{isDisabled:t==="unifiedCanvas",label:r("options:height"),value:e,flexGrow:1,onChange:i,validValues:Txe,styleClass:"main-option-block"})}const Q8e=ot([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function J8e(){const e=Ie(),{iterations:t}=ye(Q8e),{t:n}=Ge(),r=i=>e(E4e(i));return b(Vs,{label:n("options:images"),step:1,min:1,max:9999,onChange:r,value:t,width:"auto",labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function e_e(){const e=ye(i=>i.options.sampler),t=Ie(),{t:n}=Ge(),r=i=>t(OV(i.target.value));return b(Hs,{label:n("options:sampler"),value:e,onChange:r,validValues:Exe,styleClass:"main-option-block"})}function t_e(){const e=Ie(),t=ye(i=>i.options.steps),{t:n}=Ge(),r=i=>e(NV(i));return b(Vs,{label:n("options:steps"),min:1,max:9999,step:1,onChange:r,value:t,width:"auto",styleClass:"main-option-block",textAlign:"center"})}function n_e(){const e=ye(o=>o.options.width),t=ye(Sr),{t:n}=Ge(),r=Ie(),i=o=>r(zV(Number(o.target.value)));return b(Hs,{isDisabled:t==="unifiedCanvas",label:n("options:width"),value:e,flexGrow:1,onChange:i,validValues:Pxe,styleClass:"main-option-block"})}function vE(){return b("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[b(J8e,{}),b(t_e,{}),b(X8e,{})]}),ee("div",{className:"main-options-row",children:[b(n_e,{}),b(Z8e,{}),b(e_e,{})]})]})})}function r_e(e){return ht({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 i_e(e){return ht({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 fj(e){return ht({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 o_e(e){return ht({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 a_e(e){return ht({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)}const s_e=ot(e=>e.system,e=>e.shouldDisplayGuides),l_e=({children:e,feature:t})=>{const n=ye(s_e),{text:r}=A8e[t];return n?ee(mk,{trigger:"hover",children:[b(bk,{children:b(Ud,{children:e})}),ee(yk,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[b(vk,{className:"guide-popover-arrow"}),b("div",{className:"guide-popover-guide-content",children:r})]})]}):null},u_e=Pe(({feature:e,icon:t=r_e},n)=>b(l_e,{feature:e,children:b(Ud,{ref:n,children:b(Ea,{marginBottom:"-.15rem",as:t})})}));function c_e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(hh,{className:"advanced-settings-item",children:[b(dh,{className:"advanced-settings-header",children:ee(bt,{width:"100%",gap:"0.5rem",align:"center",children:[b(Ud,{flexGrow:1,textAlign:"left",children:t}),i,n&&b(u_e,{feature:n}),b(fh,{})]})}),b(ph,{className:"advanced-settings-panel",children:r})]})}const yE=e=>{const{accordionInfo:t}=e,n=ye(a=>a.system.openAccordions),r=Ie();return b(fS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(Obe(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:f,additionalHeaderComponents:p}=t[s];a.push(b(c_e,{header:l,feature:u,content:f,additionalHeaderComponents:p},s))}),a})()})},en=e=>e.canvas,xr=ot([en,Sr,tc],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),hj=e=>e.canvas.layerState.objects.find(eb),pj=ot([e=>e.options,e=>e.system,hj,Sr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:f}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),f||(p=!1,m.push("System Disconnected")),o&&(!(Nk(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:We.isEqual,resultEqualityCheck:We.isEqual}});function bE(e){const{iconButton:t=!1,...n}=e,r=Ie(),{isReady:i}=ye(pj),o=ye(Sr),a=()=>{r(f9(o))},{t:s}=Ge();return je(["ctrl+enter","meta+enter"],()=>{r(f9(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),b("div",{style:{flexGrow:4},children:t?b(Qe,{"aria-label":s("options:invoke"),type:"submit",icon:b(l7e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:s("options:invoke"),tooltipProps:{placement:"bottom"},...n}):b(co,{"aria-label":s("options:invoke"),type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const d_e=ot(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:We.isEqual}});function SE(e){const{...t}=e,n=Ie(),{isProcessing:r,isConnected:i,isCancelable:o}=ye(d_e),a=()=>n(xxe()),{t:s}=Ge();return je("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),b(Qe,{icon:b(a_e,{}),tooltip:s("options:cancel"),"aria-label":s("options:cancel"),isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const f_e=ot(e=>e.options,e=>e.shouldLoopback),h_e=()=>{const e=Ie(),t=ye(f_e),{t:n}=Ge();return b(Qe,{"aria-label":n("options:toggleLoopback"),tooltip:n("options:toggleLoopback"),styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:b(c7e,{}),onClick:()=>{e(A4e(!t))}})},xE=()=>{const e=ye(Sr);return ee("div",{className:"process-buttons",children:[b(bE,{}),e==="img2img"&&b(h_e,{}),b(SE,{})]})},p_e=ot([e=>e.options,Sr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),wE=()=>{const e=Ie(),{prompt:t,activeTabName:n}=ye(p_e),{isReady:r}=ye(pj),i=k.exports.useRef(null),{t:o}=Ge(),a=l=>{e(LS(l.target.value))};je("alt+a",()=>{var l;(l=i.current)==null||l.focus()},[]);const s=l=>{l.key==="Enter"&&l.shiftKey===!1&&r&&(l.preventDefault(),e(f9(n)))};return b("div",{className:"prompt-bar",children:b(Wd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:b(eV,{id:"prompt",name:"prompt",placeholder:o("options:promptPlaceholder"),size:"lg",value:t,onChange:a,onKeyDown:s,resize:"vertical",height:30,ref:i,_placeholder:{color:"var(--text-color-secondary)"}})})})};function gj(e){return ht({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 mj(e){return ht({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 g_e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function m_e(e,t){e.classList?e.classList.add(t):g_e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function UM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function v_e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=UM(e.className,t):e.setAttribute("class",UM(e.className&&e.className.baseVal||"",t))}const jM={disabled:!1},vj=oe.createContext(null);var yj=function(t){return t.scrollTop},Zm="unmounted",Qf="exited",Jf="entering",p0="entered",E9="exiting",rc=function(e){tk(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Qf,o.appearStatus=Jf):l=p0:r.unmountOnExit||r.mountOnEnter?l=Zm:l=Qf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Zm?{status:Qf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Jf&&a!==p0&&(o=Jf):(a===Jf||a===p0)&&(o=E9)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Jf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:o3.findDOMNode(this);a&&yj(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qf&&this.setState({status:Zm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[o3.findDOMNode(this),s],u=l[0],f=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||jM.disabled){this.safeSetState({status:p0},function(){o.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Jf},function(){o.props.onEntering(u,f),o.onTransitionEnd(m,function(){o.safeSetState({status:p0},function(){o.props.onEntered(u,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:o3.findDOMNode(this);if(!o||jM.disabled){this.safeSetState({status:Qf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:E9},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Qf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:o3.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Zm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Q_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return b(vj.Provider,{value:null,children:typeof a=="function"?a(i,s):oe.cloneElement(oe.Children.only(a),s)})},t}(oe.Component);rc.contextType=vj;rc.propTypes={};function d0(){}rc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d0,onEntering:d0,onEntered:d0,onExit:d0,onExiting:d0,onExited:d0};rc.UNMOUNTED=Zm;rc.EXITED=Qf;rc.ENTERING=Jf;rc.ENTERED=p0;rc.EXITING=E9;const y_e=rc;var b_e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return m_e(t,r)})},D6=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return v_e(t,r)})},CE=function(e){tk(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),f=u[0],p=u[1];r.removeClasses(f,"exit"),r.addClass(f,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),f=u[0],p=u[1],m=p?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),f=u[0],p=u[1],m=p?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",f=u&&l?l+"-":"",p=u?""+f+s:l[s],m=u?p+"-active":l[s+"Active"],v=u?p+"-done":l[s+"Done"];return{baseClassName:p,activeClassName:m,doneClassName:v}},r}var n=t.prototype;return n.addClass=function(i,o,a){var s=this.getClassNames(o)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;o==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&i&&yj(i),s&&(this.appliedClasses[o][a]=s,b_e(i,s))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],s=a.base,l=a.active,u=a.done;this.appliedClasses[o]={},s&&D6(i,s),l&&D6(i,l),u&&D6(i,u)},n.render=function(){var i=this.props;i.classNames;var o=Q_(i,["classNames"]);return b(y_e,{...o,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(oe.Component);CE.defaultProps={classNames:""};CE.propTypes={};const bj=CE,S_e=ot(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),_E=e=>{const t=Ie(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=ye(S_e),o=k.exports.useRef(null),a=k.exports.useRef(null),s=k.exports.useRef(null),{children:l}=e;je("o",()=>{t(Du(!n)),i&&setTimeout(()=>t(li(!0)),400)},[n,i]),je("esc",()=>{t(Du(!1))},{enabled:()=>!i,preventDefault:!0},[i]),je("shift+o",()=>{m(),t(li(!0))},[i]);const u=k.exports.useCallback(()=>{i||(t(P4e(a.current?a.current.scrollTop:0)),t(Du(!1)),t(L4e(!1)))},[t,i]),f=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(O4e(!i)),t(li(!0))};return k.exports.useEffect(()=>{function v(y){o.current&&!o.current.contains(y.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),b(bj,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:b("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:b("div",{className:"options-panel-margin",children:ee("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&f()},children:[b(Zi,{label:"Pin Options Panel",children:b("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?b(gj,{}):b(mj,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[b("img",{src:GU,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",b("strong",{children:"ai"})]})]}),l]})})})})};function x_e(){const{t:e}=Ge(),t={seed:{header:`${e("options:seed")}`,feature:Ki.SEED,content:b(hE,{})},variations:{header:`${e("options:variations")}`,feature:Ki.VARIATIONS,content:b(mE,{}),additionalHeaderComponents:b(gE,{})},face_restore:{header:`${e("options:faceRestoration")}`,feature:Ki.FACE_CORRECTION,content:b(dE,{}),additionalHeaderComponents:b(lj,{})},upscale:{header:`${e("options:upscaling")}`,feature:Ki.UPSCALE,content:b(pE,{}),additionalHeaderComponents:b(dj,{})},other:{header:`${e("options:otherOptions")}`,feature:Ki.OTHER,content:b($8e,{})}},n=Ie(),r=ye(Sr);return k.exports.useEffect(()=>{r==="img2img"&&n(zk(!1))},[r,n]),ee(_E,{children:[b(wE,{}),b(xE,{}),b(vE,{}),b(uj,{label:e("options:img2imgStrength"),styleClass:"main-option-block image-to-image-strength-main-option"}),b(M8e,{}),b(yE,{accordionInfo:t})]})}const kE=k.exports.createContext(null),w_e=e=>{const{styleClass:t}=e,n=k.exports.useContext(kE),r=()=>{n&&n()};return b("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[b(KS,{}),b(wh,{size:"lg",children:"Click or Drag and Drop"})]})})},C_e=ot(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),P9=k.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=s2(),a=Ie(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ye(C_e),f=k.exports.useRef(null),p=y=>{y.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(Sxe(e)),o()};je("delete",()=>{s?i():m()},[e,s]);const v=y=>a(rW(!y.target.checked));return ee(In,{children:[k.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),b(_H,{isOpen:r,leastDestructiveRef:f,onClose:o,children:b(E1,{children:ee(kH,{className:"modal",children:[b(CS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),b(f2,{children:ee(bt,{direction:"column",gap:5,children:[b(qi,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),b(Wd,{children:ee(bt,{alignItems:"center",children:[b(Fh,{mb:0,children:"Don't ask me again"}),b(wk,{checked:!s,onChange:v})]})})]})}),ee(wS,{children:[b(Za,{ref:f,onClick:o,className:"modal-close-btn",children:"Cancel"}),b(Za,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),__e=ot([e=>e.system,e=>e.options,e=>e.gallery,Sr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:f,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:f,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:ai.exports.isEqual}}),Sj=()=>{var B,F,H,Y,te,G;const e=Ie(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:f,activeTabName:p}=ye(__e),m=j2(),{t:v}=Ge(),y=()=>{!u||(f&&e(Iu(!1)),e(j1(u)),e(Do("img2img")))},x=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:v("toast:imageLinkCopied"),status:"success",duration:2500,isClosable:!0})})};je("shift+i",()=>{u?(y(),m({title:v("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:imageNotLoaded"),description:v("toast:imageNotLoadedDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{var z,W;!u||(u.metadata&&e(C4e(u.metadata)),((z=u.metadata)==null?void 0:z.image.type)==="img2img"?e(Do("img2img")):((W=u.metadata)==null?void 0:W.image.type)==="txt2img"&&e(Do("txt2img")))};je("a",()=>{var z,W;["txt2img","img2img"].includes((W=(z=u==null?void 0:u.metadata)==null?void 0:z.image)==null?void 0:W.type)?(E(),m({title:v("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:parametersNotSet"),description:v("toast:parametersNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u!=null&&u.metadata&&e(G2(u.metadata.image.seed))};je("s",()=>{var z,W;(W=(z=u==null?void 0:u.metadata)==null?void 0:z.image)!=null&&W.seed?(_(),m({title:v("toast:seedSet"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:seedNotSet"),description:v("toast:seedNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const C=()=>{var z,W;return((W=(z=u==null?void 0:u.metadata)==null?void 0:z.image)==null?void 0:W.prompt)&&e(LS(u.metadata.image.prompt))};je("p",()=>{var z,W;(W=(z=u==null?void 0:u.metadata)==null?void 0:z.image)!=null&&W.prompt?(C(),m({title:v("toast:promptSet"),status:"success",duration:2500,isClosable:!0})):m({title:v("toast:promptNotSet"),description:v("toast:promptNotSetDesc"),status:"error",duration:2500,isClosable:!0})},[u]);const T=()=>{u&&e(yxe(u))};je("Shift+U",()=>{i&&!s&&n&&!t&&o?T():m({title:v("toast:upscalingFailed"),status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const A=()=>{u&&e(bxe(u))};je("Shift+R",()=>{r&&!s&&n&&!t&&a?A():m({title:v("toast:faceRestoreFailed"),status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(DV(!l)),I=()=>{!u||(f&&e(Iu(!1)),e(MS(u)),e(li(!0)),p!=="unifiedCanvas"&&e(Do("unifiedCanvas")),m({title:v("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0}))};je("i",()=>{u?M():m({title:v("toast:metadataLoadFailed"),status:"error",duration:2500,isClosable:!0})},[u,l]);const D=()=>{e(Iu(!f))};return ee("div",{className:"current-image-options",children:[ee(Yi,{isAttached:!0,children:[b(zs,{trigger:"hover",triggerComponent:b(Qe,{"aria-label":`${v("options:sendTo")}...`,icon:b(h7e,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[b(co,{size:"sm",onClick:y,leftIcon:b(NM,{}),children:v("options:sendToImg2Img")}),b(co,{size:"sm",onClick:I,leftIcon:b(NM,{}),children:v("options:sendToUnifiedCanvas")}),b(co,{size:"sm",onClick:x,leftIcon:b(X2,{}),children:v("options:copyImageToLink")}),b(co,{leftIcon:b(rE,{}),size:"sm",children:b(Ch,{download:!0,href:u==null?void 0:u.url,children:v("options:downloadImage")})})]})}),b(Qe,{icon:b(QCe,{}),tooltip:f?`${v("options:closeViewer")} (Z)`:`${v("options:openInViewer")} (Z)`,"aria-label":f?`${v("options:closeViewer")} (Z)`:`${v("options:openInViewer")} (Z)`,"data-selected":f,onClick:D})]}),ee(Yi,{isAttached:!0,children:[b(Qe,{icon:b(u7e,{}),tooltip:`${v("options:usePrompt")} (P)`,"aria-label":`${v("options:usePrompt")} (P)`,isDisabled:!((F=(B=u==null?void 0:u.metadata)==null?void 0:B.image)!=null&&F.prompt),onClick:C}),b(Qe,{icon:b(f7e,{}),tooltip:`${v("options:useSeed")} (S)`,"aria-label":`${v("options:useSeed")} (S)`,isDisabled:!((Y=(H=u==null?void 0:u.metadata)==null?void 0:H.image)!=null&&Y.seed),onClick:_}),b(Qe,{icon:b(KCe,{}),tooltip:`${v("options:useAll")} (A)`,"aria-label":`${v("options:useAll")} (A)`,isDisabled:!["txt2img","img2img"].includes((G=(te=u==null?void 0:u.metadata)==null?void 0:te.image)==null?void 0:G.type),onClick:E})]}),ee(Yi,{isAttached:!0,children:[b(zs,{trigger:"hover",triggerComponent:b(Qe,{icon:b(t7e,{}),"aria-label":v("options:restoreFaces")}),children:ee("div",{className:"current-image-postprocessing-popover",children:[b(dE,{}),b(co,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:A,children:v("options:restoreFaces")})]})}),b(zs,{trigger:"hover",triggerComponent:b(Qe,{icon:b(ZCe,{}),"aria-label":v("options:upscale")}),children:ee("div",{className:"current-image-postprocessing-popover",children:[b(pE,{}),b(co,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:T,children:v("options:upscaleImage")})]})})]}),b(Yi,{isAttached:!0,children:b(Qe,{icon:b($U,{}),tooltip:`${v("options:info")} (I)`,"aria-label":`${v("options:info")} (I)`,"data-selected":l,onClick:M})}),b(P9,{image:u,children:b(Qe,{icon:b(Xh,{}),tooltip:`${v("options:deleteImage")} (Del)`,"aria-label":`${v("options:deleteImage")} (Del)`,isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})};dt({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"});dt({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"});dt({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"});dt({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"});dt({displayName:"SunIcon",path:ee("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[b("circle",{cx:"12",cy:"12",r:"5"}),b("path",{d:"M12 1v2"}),b("path",{d:"M12 21v2"}),b("path",{d:"M4.22 4.22l1.42 1.42"}),b("path",{d:"M18.36 18.36l1.42 1.42"}),b("path",{d:"M1 12h2"}),b("path",{d:"M21 12h2"}),b("path",{d:"M4.22 19.78l1.42-1.42"}),b("path",{d:"M18.36 5.64l1.42-1.42"})]})});dt({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"});dt({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:b("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"})});dt({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"});dt({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"});dt({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"});dt({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"});dt({displayName:"ViewIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("circle",{cx:"12",cy:"12",r:"2"})]})});dt({displayName:"ViewOffIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({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"});dt({displayName:"DeleteIcon",path:b("g",{fill:"currentColor",children:b("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"})})});dt({displayName:"RepeatIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({displayName:"RepeatClockIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({displayName:"EditIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[b("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),b("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});dt({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});dt({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});dt({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});dt({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});dt({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});dt({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});dt({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});dt({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"});dt({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var xj=dt({displayName:"ExternalLinkIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[b("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),b("path",{d:"M15 3h6v6"}),b("path",{d:"M10 14L21 3"})]})});dt({displayName:"LinkIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({displayName:"PlusSquareIcon",path:ee("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[b("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),b("path",{d:"M12 8v8"}),b("path",{d:"M8 12h8"})]})});dt({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"});dt({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"});dt({displayName:"TimeIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({displayName:"ArrowRightIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({displayName:"ArrowLeftIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({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"});dt({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"});dt({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"});dt({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"});dt({displayName:"EmailIcon",path:ee("g",{fill:"currentColor",children:[b("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"}),b("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"})]})});dt({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"});dt({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"});dt({displayName:"SpinnerIcon",path:ee(In,{children:[b("defs",{children:ee("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[b("stop",{stopColor:"currentColor",offset:"0%"}),b("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ee("g",{transform:"translate(2)",fill:"none",children:[b("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),b("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),b("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});dt({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"});dt({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:b("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"})});dt({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"});dt({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"});dt({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"});dt({displayName:"InfoOutlineIcon",path:ee("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[b("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),b("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),b("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});dt({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"});dt({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"});dt({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"});dt({displayName:"QuestionOutlineIcon",path:ee("g",{stroke:"currentColor",strokeWidth:"1.5",children:[b("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"}),b("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),b("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});dt({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"});dt({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"});dt({viewBox:"0 0 14 14",path:b("g",{fill:"currentColor",children:b("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});dt({displayName:"MinusIcon",path:b("g",{fill:"currentColor",children:b("rect",{height:"4",width:"20",x:"2",y:"10"})})});dt({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"});function k_e(e){return ht({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)}const zn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(bt,{gap:2,children:[n&&b(Zi,{label:`Recall ${e}`,children:b(Qa,{"aria-label":"Use this parameter",icon:b(k_e,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&b(Zi,{label:`Copy ${e}`,children:b(Qa,{"aria-label":`Copy ${e}`,icon:b(X2,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(bt,{direction:i?"column":"row",children:[ee(qi,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(Ch,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",b(xj,{mx:"2px"})]}):b(qi,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),E_e=(e,t)=>e.image.uuid===t.image.uuid,wj=k.exports.memo(({image:e,styleClass:t})=>{var H,Y;const n=Ie();je("esc",()=>{n(DV(!1))});const r=((H=e==null?void 0:e.metadata)==null?void 0:H.image)||{},i=e==null?void 0:e.dreamPrompt,{cfg_scale:o,fit:a,height:s,hires_fix:l,init_image_path:u,mask_image_path:f,orig_path:p,perlin:m,postprocessing:v,prompt:y,sampler:x,scale:E,seamless:_,seed:C,steps:T,strength:A,threshold:M,type:I,variations:D,width:B}=r,F=JSON.stringify(e.metadata,null,2);return b("div",{className:`image-metadata-viewer ${t}`,children:ee(bt,{gap:1,direction:"column",width:"100%",children:[ee(bt,{gap:2,children:[b(qi,{fontWeight:"semibold",children:"File:"}),ee(Ch,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,b(xj,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(In,{children:[I&&b(zn,{label:"Generation type",value:I}),((Y=e.metadata)==null?void 0:Y.model_weights)&&b(zn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(I)&&b(zn,{label:"Original image",value:p}),I==="gfpgan"&&A!==void 0&&b(zn,{label:"Fix faces strength",value:A,onClick:()=>n(I4(A))}),I==="esrgan"&&E!==void 0&&b(zn,{label:"Upscaling scale",value:E,onClick:()=>n(Q7(E))}),I==="esrgan"&&A!==void 0&&b(zn,{label:"Upscaling strength",value:A,onClick:()=>n(J7(A))}),y&&b(zn,{label:"Prompt",labelPosition:"top",value:M4(y),onClick:()=>n(LS(y))}),C!==void 0&&b(zn,{label:"Seed",value:C,onClick:()=>n(G2(C))}),M!==void 0&&b(zn,{label:"Noise Threshold",value:M,onClick:()=>n(BV(M))}),m!==void 0&&b(zn,{label:"Perlin Noise",value:m,onClick:()=>n(AV(m))}),x&&b(zn,{label:"Sampler",value:x,onClick:()=>n(OV(x))}),T&&b(zn,{label:"Steps",value:T,onClick:()=>n(NV(T))}),o!==void 0&&b(zn,{label:"CFG scale",value:o,onClick:()=>n(kV(o))}),D&&D.length>0&&b(zn,{label:"Seed-weight pairs",value:Y5(D),onClick:()=>n(MV(Y5(D)))}),_&&b(zn,{label:"Seamless",value:_,onClick:()=>n(RV(_))}),l&&b(zn,{label:"High Resolution Optimization",value:l,onClick:()=>n(zk(l))}),B&&b(zn,{label:"Width",value:B,onClick:()=>n(zV(B))}),s&&b(zn,{label:"Height",value:s,onClick:()=>n(PV(s))}),u&&b(zn,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(j1(u))}),f&&b(zn,{label:"Mask image",value:f,isLink:!0,onClick:()=>n(LV(f))}),I==="img2img"&&A&&b(zn,{label:"Image to image strength",value:A,onClick:()=>n(Z7(A))}),a&&b(zn,{label:"Image to image fit",value:a,onClick:()=>n(IV(a))}),v&&v.length>0&&ee(In,{children:[b(wh,{size:"sm",children:"Postprocessing"}),v.map((te,G)=>{if(te.type==="esrgan"){const{scale:z,strength:W}=te;return ee(bt,{pl:"2rem",gap:1,direction:"column",children:[b(qi,{size:"md",children:`${G+1}: Upscale (ESRGAN)`}),b(zn,{label:"Scale",value:z,onClick:()=>n(Q7(z))}),b(zn,{label:"Strength",value:W,onClick:()=>n(J7(W))})]},G)}else if(te.type==="gfpgan"){const{strength:z}=te;return ee(bt,{pl:"2rem",gap:1,direction:"column",children:[b(qi,{size:"md",children:`${G+1}: Face restoration (GFPGAN)`}),b(zn,{label:"Strength",value:z,onClick:()=>{n(I4(z)),n(D4("gfpgan"))}})]},G)}else if(te.type==="codeformer"){const{strength:z,fidelity:W}=te;return ee(bt,{pl:"2rem",gap:1,direction:"column",children:[b(qi,{size:"md",children:`${G+1}: Face restoration (Codeformer)`}),b(zn,{label:"Strength",value:z,onClick:()=>{n(I4(z)),n(D4("codeformer"))}}),W&&b(zn,{label:"Fidelity",value:W,onClick:()=>{n(EV(W)),n(D4("codeformer"))}})]},G)}})]}),i&&b(zn,{withCopy:!0,label:"Dream Prompt",value:i}),ee(bt,{gap:2,direction:"column",children:[ee(bt,{gap:2,children:[b(Zi,{label:"Copy metadata JSON",children:b(Qa,{"aria-label":"Copy metadata JSON",icon:b(X2,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(F)})}),b(qi,{fontWeight:"semibold",children:"Metadata JSON:"})]}),b("div",{className:"image-json-viewer",children:b("pre",{children:F})})]})]}):b(nF,{width:"100%",pt:10,children:b(qi,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},E_e),Cj=ot([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>{var f;return u.uuid===((f=e==null?void 0:e.currentImage)==null?void 0:f.uuid)}),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function P_e(){const e=Ie(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ye(Cj),[a,s]=k.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},f=()=>{e(Fk())},p=()=>{e($k())};return ee("div",{className:"current-image-preview",children:[i&&b(pS,{src:i.url,width:i.width,height:i.height,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[b("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&b(Qa,{"aria-label":"Previous image",icon:b(NU,{className:"next-prev-button"}),variant:"unstyled",onClick:f})}),b("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&b(Qa,{"aria-label":"Next image",icon:b(BU,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&b(wj,{image:i,styleClass:"current-image-metadata"})]})}const T_e=ot([e=>e.gallery,e=>e.options,Sr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),_j=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ye(T_e);return b("div",{className:"current-image-area","data-tab-name":t,children:e?ee(In,{children:[b(Sj,{}),b(P_e,{})]}):b("div",{className:"current-image-display-placeholder",children:b(o_e,{})})})},L_e=()=>{const e=k.exports.useContext(kE);return b(Qe,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:b(KS,{}),onClick:e||void 0})};function A_e(){const e=ye(o=>o.options.initialImage),{t}=Ge(),n=Ie(),r=j2(),i=()=>{r({title:t("toast:parametersFailed"),description:t("toast:parametersFailedDesc"),status:"error",isClosable:!0}),n(_V())};return ee(In,{children:[ee("div",{className:"init-image-preview-header",children:[b("h2",{children:t("options:initialImage")}),b(L_e,{})]}),e&&b("div",{className:"init-image-preview",children:b(pS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:i})})]})}const O_e=()=>{const e=ye(r=>r.options.initialImage),{currentImage:t}=ye(r=>r.gallery);return ee("div",{className:"workarea-split-view",children:[b("div",{className:"workarea-split-view-left",children:e?b("div",{className:"image-to-image-area",children:b(A_e,{})}):b(w_e,{})}),t&&b("div",{className:"workarea-split-view-right",children:b(_j,{})})]})};function R_e(e){return ht({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)}function Qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Z2(e,t=[]){let n=[];function r(o,a){const s=k.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...y}=p,x=(m==null?void 0:m[e][l])||s,E=k.exports.useMemo(()=>y,Object.values(y));return k.exports.createElement(x.Provider,{value:E},v)}function f(p,m){const v=(m==null?void 0:m[e][l])||s,y=k.exports.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,f]}const i=()=>{const o=n.map(a=>k.exports.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return k.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,M_e(i,...t)]}function M_e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return k.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function I_e(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kj(...e){return t=>e.forEach(n=>I_e(n,t))}function ts(...e){return k.exports.useCallback(kj(...e),e)}const x2=k.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=k.exports.Children.toArray(n),o=i.find(N_e);if(o){const a=o.props.children,s=i.map(l=>l===o?k.exports.Children.count(a)>1?k.exports.Children.only(null):k.exports.isValidElement(a)?a.props.children:null:l);return k.exports.createElement(T9,Dn({},r,{ref:t}),k.exports.isValidElement(a)?k.exports.cloneElement(a,void 0,s):null)}return k.exports.createElement(T9,Dn({},r,{ref:t}),n)});x2.displayName="Slot";const T9=k.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return k.exports.isValidElement(n)?k.exports.cloneElement(n,{...B_e(r,n.props),ref:kj(t,n.ref)}):k.exports.Children.count(n)>1?k.exports.Children.only(null):null});T9.displayName="SlotClone";const D_e=({children:e})=>k.exports.createElement(k.exports.Fragment,null,e);function N_e(e){return k.exports.isValidElement(e)&&e.type===D_e}function B_e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const z_e=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Gu=z_e.reduce((e,t)=>{const n=k.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?x2:t;return k.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),k.exports.createElement(s,Dn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ej(e,t){e&&Zl.exports.flushSync(()=>e.dispatchEvent(t))}function Pj(e){const t=e+"CollectionProvider",[n,r]=Z2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:x}=v,E=oe.useRef(null),_=oe.useRef(new Map).current;return oe.createElement(i,{scope:y,itemMap:_,collectionRef:E},x)},s=e+"CollectionSlot",l=oe.forwardRef((v,y)=>{const{scope:x,children:E}=v,_=o(s,x),C=ts(y,_.collectionRef);return oe.createElement(x2,{ref:C},E)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",p=oe.forwardRef((v,y)=>{const{scope:x,children:E,..._}=v,C=oe.useRef(null),T=ts(y,C),A=o(u,x);return oe.useEffect(()=>(A.itemMap.set(C,{ref:C,..._}),()=>void A.itemMap.delete(C))),oe.createElement(x2,{[f]:"",ref:T},E)});function m(v){const y=o(e+"CollectionConsumer",v);return oe.useCallback(()=>{const E=y.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((A,M)=>_.indexOf(A.ref.current)-_.indexOf(M.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const $_e=k.exports.createContext(void 0);function Tj(e){const t=k.exports.useContext($_e);return e||t||"ltr"}function Kl(e){const t=k.exports.useRef(e);return k.exports.useEffect(()=>{t.current=e}),k.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function F_e(e,t=globalThis==null?void 0:globalThis.document){const n=Kl(e);k.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const L9="dismissableLayer.update",H_e="dismissableLayer.pointerDownOutside",V_e="dismissableLayer.focusOutside";let GM;const W_e=k.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),U_e=k.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=k.exports.useContext(W_e),[p,m]=k.exports.useState(null),v=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,y]=k.exports.useState({}),x=ts(t,B=>m(B)),E=Array.from(f.layers),[_]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(_),T=p?E.indexOf(p):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,M=T>=C,I=j_e(B=>{const F=B.target,H=[...f.branches].some(Y=>Y.contains(F));!M||H||(o==null||o(B),s==null||s(B),B.defaultPrevented||l==null||l())},v),D=G_e(B=>{const F=B.target;[...f.branches].some(Y=>Y.contains(F))||(a==null||a(B),s==null||s(B),B.defaultPrevented||l==null||l())},v);return F_e(B=>{T===f.layers.size-1&&(i==null||i(B),!B.defaultPrevented&&l&&(B.preventDefault(),l()))},v),k.exports.useEffect(()=>{if(!!p)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(GM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),qM(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=GM)}},[p,v,r,f]),k.exports.useEffect(()=>()=>{!p||(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),qM())},[p,f]),k.exports.useEffect(()=>{const B=()=>y({});return document.addEventListener(L9,B),()=>document.removeEventListener(L9,B)},[]),k.exports.createElement(Gu.div,Dn({},u,{ref:x,style:{pointerEvents:A?M?"auto":"none":void 0,...e.style},onFocusCapture:Qn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Qn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Qn(e.onPointerDownCapture,I.onPointerDownCapture)}))});function j_e(e,t=globalThis==null?void 0:globalThis.document){const n=Kl(e),r=k.exports.useRef(!1),i=k.exports.useRef(()=>{});return k.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){Lj(H_e,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function G_e(e,t=globalThis==null?void 0:globalThis.document){const n=Kl(e),r=k.exports.useRef(!1);return k.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&Lj(V_e,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qM(){const e=new CustomEvent(L9);document.dispatchEvent(e)}function Lj(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ej(i,o):i.dispatchEvent(o)}let N6=0;function q_e(){k.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:YM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:YM()),N6++,()=>{N6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),N6--}},[])}function YM(){const 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}const B6="focusScope.autoFocusOnMount",z6="focusScope.autoFocusOnUnmount",KM={bubbles:!1,cancelable:!0},Y_e=k.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=k.exports.useState(null),u=Kl(i),f=Kl(o),p=k.exports.useRef(null),m=ts(t,x=>l(x)),v=k.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.exports.useEffect(()=>{if(r){let x=function(_){if(v.paused||!s)return;const C=_.target;s.contains(C)?p.current=C:eh(p.current,{select:!0})},E=function(_){v.paused||!s||s.contains(_.relatedTarget)||eh(p.current,{select:!0})};return document.addEventListener("focusin",x),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),k.exports.useEffect(()=>{if(s){ZM.add(v);const x=document.activeElement;if(!s.contains(x)){const _=new CustomEvent(B6,KM);s.addEventListener(B6,u),s.dispatchEvent(_),_.defaultPrevented||(K_e(eke(Aj(s)),{select:!0}),document.activeElement===x&&eh(s))}return()=>{s.removeEventListener(B6,u),setTimeout(()=>{const _=new CustomEvent(z6,KM);s.addEventListener(z6,f),s.dispatchEvent(_),_.defaultPrevented||eh(x!=null?x:document.body,{select:!0}),s.removeEventListener(z6,f),ZM.remove(v)},0)}}},[s,u,f,v]);const y=k.exports.useCallback(x=>{if(!n&&!r||v.paused)return;const E=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,_=document.activeElement;if(E&&_){const C=x.currentTarget,[T,A]=X_e(C);T&&A?!x.shiftKey&&_===A?(x.preventDefault(),n&&eh(T,{select:!0})):x.shiftKey&&_===T&&(x.preventDefault(),n&&eh(A,{select:!0})):_===C&&x.preventDefault()}},[n,r,v.paused]);return k.exports.createElement(Gu.div,Dn({tabIndex:-1},a,{ref:m,onKeyDown:y}))});function K_e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(eh(r,{select:t}),document.activeElement!==n)return}function X_e(e){const t=Aj(e),n=XM(t,e),r=XM(t.reverse(),e);return[n,r]}function Aj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XM(e,t){for(const n of e)if(!Z_e(n,{upTo:t}))return n}function Z_e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Q_e(e){return e instanceof HTMLInputElement&&"select"in e}function eh(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Q_e(e)&&t&&e.select()}}const ZM=J_e();function J_e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=QM(e,t),e.unshift(t)},remove(t){var n;e=QM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function QM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function eke(e){return e.filter(t=>t.tagName!=="A")}const L1=Boolean(globalThis==null?void 0:globalThis.document)?k.exports.useLayoutEffect:()=>{},tke=U6["useId".toString()]||(()=>{});let nke=0;function rke(e){const[t,n]=k.exports.useState(tke());return L1(()=>{e||n(r=>r!=null?r:String(nke++))},[e]),e||(t?`radix-${t}`:"")}function X1(e){return e.split("-")[0]}function rx(e){return e.split("-")[1]}function Z1(e){return["top","bottom"].includes(X1(e))?"x":"y"}function EE(e){return e==="y"?"height":"width"}function JM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=Z1(t),l=EE(s),u=r[l]/2-i[l]/2,f=X1(t),p=s==="x";let m;switch(f){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(rx(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const ike=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=JM(l,r,s),p=r,m={},v=0;for(let y=0;y<o.length;y++){const{name:x,fn:E}=o[y],{x:_,y:C,data:T,reset:A}=await E({x:u,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=_!=null?_:u,f=C!=null?C:f,m={...m,[x]:{...m[x],...T}},A&&v<=50){v++,typeof A=="object"&&(A.placement&&(p=A.placement),A.rects&&(l=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:u,y:f}=JM(l,p,s)),y=-1;continue}}return{x:u,y:f,placement:p,strategy:i,middlewareData:m}};function oke(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oj(e){return typeof e!="number"?oke(e):{top:e,right:e,bottom:e,left:e}}function ob(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function ab(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=t,y=Oj(v),E=s[m?p==="floating"?"reference":"floating":p],_=ob(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(E)))==null||n?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),C=ob(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[p]);return{top:_.top-C.top+y.top,bottom:C.bottom-_.bottom+y.bottom,left:_.left-C.left+y.left,right:C.right-_.right+y.right}}const ake=Math.min,ske=Math.max;function A9(e,t,n){return ske(e,ake(t,n))}const eI=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e!=null?e:{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=Oj(r),f={x:i,y:o},p=Z1(a),m=rx(a),v=EE(p),y=await l.getDimensions(n),x=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=s.reference[v]+s.reference[p]-f[p]-s.floating[v],C=f[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let A=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;A===0&&(A=s.floating[v]);const M=_/2-C/2,I=u[x],D=A-y[v]-u[E],B=A/2-y[v]/2+M,F=A9(I,B,D),te=(m==="start"?u[x]:u[E])>0&&B!==F&&s.reference[v]<=s.floating[v]?B<I?I-B:D-B:0;return{[p]:f[p]-te,data:{[p]:F,centerOffset:B-F}}}}),lke={left:"right",right:"left",bottom:"top",top:"bottom"};function sb(e){return e.replace(/left|right|bottom|top/g,t=>lke[t])}function uke(e,t,n){n===void 0&&(n=!1);const r=rx(e),i=Z1(e),o=EE(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=sb(a)),{main:a,cross:sb(a)}}const cke={start:"end",end:"start"};function tI(e){return e.replace(/start|end/g,t=>cke[t])}const dke=["top","right","bottom","left"];function fke(e){const t=sb(e);return[tI(e),t,tI(t)]}const hke=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...y}=e,x=X1(r),_=p||(x===a||!v?[sb(a)]:fke(a)),C=[a,..._],T=await ab(t,y),A=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&A.push(T[x]),f){const{main:F,cross:H}=uke(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));A.push(T[F],T[H])}if(M=[...M,{placement:r,overflows:A}],!A.every(F=>F<=0)){var I,D;const F=((I=(D=i.flip)==null?void 0:D.index)!=null?I:0)+1,H=C[F];if(H)return{data:{index:F,overflows:M},reset:{placement:H}};let Y="bottom";switch(m){case"bestFit":{var B;const te=(B=M.map(G=>[G,G.overflows.filter(z=>z>0).reduce((z,W)=>z+W,0)]).sort((G,z)=>G[1]-z[1])[0])==null?void 0:B[0].placement;te&&(Y=te);break}case"initialPlacement":Y=a;break}if(r!==Y)return{reset:{placement:Y}}}return{}}}};function nI(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rI(e){return dke.some(t=>e[t]>=0)}const pke=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await ab(r,{...n,elementContext:"reference"}),a=nI(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:rI(a)}}}case"escaped":{const o=await ab(r,{...n,altBoundary:!0}),a=nI(o,i.floating);return{data:{escapedOffsets:a,escaped:rI(a)}}}default:return{}}}}};async function gke(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=X1(n),s=rx(n),l=Z1(n)==="x",u=["left","top"].includes(a)?-1:1,f=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),l?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const mke=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await gke(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function Rj(e){return e==="x"?"y":"x"}const vke=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:_,y:C}=E;return{x:_,y:C}}},...l}=e,u={x:n,y:r},f=await ab(t,l),p=Z1(X1(i)),m=Rj(p);let v=u[p],y=u[m];if(o){const E=p==="y"?"top":"left",_=p==="y"?"bottom":"right",C=v+f[E],T=v-f[_];v=A9(C,v,T)}if(a){const E=m==="y"?"top":"left",_=m==="y"?"bottom":"right",C=y+f[E],T=y-f[_];y=A9(C,y,T)}const x=s.fn({...t,[p]:v,[m]:y});return{...x,data:{x:x.x-n,y:x.y-r}}}}},yke=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:n,y:r},p=Z1(i),m=Rj(p);let v=f[p],y=f[m];const x=typeof s=="function"?s({...o,placement:i}):s,E=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){const M=p==="y"?"height":"width",I=o.reference[p]-o.floating[M]+E.mainAxis,D=o.reference[p]+o.reference[M]-E.mainAxis;v<I?v=I:v>D&&(v=D)}if(u){var _,C,T,A;const M=p==="y"?"width":"height",I=["top","left"].includes(X1(i)),D=o.reference[m]-o.floating[M]+(I&&(_=(C=a.offset)==null?void 0:C[m])!=null?_:0)+(I?0:E.crossAxis),B=o.reference[m]+o.reference[M]+(I?0:(T=(A=a.offset)==null?void 0:A[m])!=null?T:0)-(I?E.crossAxis:0);y<D?y=D:y>B&&(y=B)}return{[p]:v,[m]:y}}}};function Mj(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function ic(e){if(e==null)return window;if(!Mj(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q2(e){return ic(e).getComputedStyle(e)}function qu(e){return Mj(e)?"":e?(e.nodeName||"").toLowerCase():""}function Ij(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Xl(e){return e instanceof ic(e).HTMLElement}function Bd(e){return e instanceof ic(e).Element}function bke(e){return e instanceof ic(e).Node}function PE(e){if(typeof ShadowRoot>"u")return!1;const t=ic(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ix(e){const{overflow:t,overflowX:n,overflowY:r}=Q2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Ske(e){return["table","td","th"].includes(qu(e))}function Dj(e){const t=/firefox/i.test(Ij()),n=Q2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function Nj(){return!/^((?!chrome|android).)*safari/i.test(Ij())}const iI=Math.min,Pv=Math.max,lb=Math.round;function Yu(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Xl(e)&&(l=e.offsetWidth>0&&lb(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&lb(s.height)/e.offsetHeight||1);const f=Bd(e)?ic(e):window,p=!Nj()&&n,m=(s.left+(p&&(r=(i=f.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,y=s.width/l,x=s.height/u;return{width:y,height:x,top:v,right:m+y,bottom:v+x,left:m,x:m,y:v}}function Qd(e){return((bke(e)?e.ownerDocument:e.document)||window.document).documentElement}function ox(e){return Bd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Bj(e){return Yu(Qd(e)).left+ox(e).scrollLeft}function xke(e){const t=Yu(e);return lb(t.width)!==e.offsetWidth||lb(t.height)!==e.offsetHeight}function wke(e,t,n){const r=Xl(t),i=Qd(t),o=Yu(e,r&&xke(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((qu(t)!=="body"||ix(i))&&(a=ox(t)),Xl(t)){const l=Yu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=Bj(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function zj(e){return qu(e)==="html"?e:e.assignedSlot||e.parentNode||(PE(e)?e.host:null)||Qd(e)}function oI(e){return!Xl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Cke(e){let t=zj(e);for(PE(t)&&(t=t.host);Xl(t)&&!["html","body"].includes(qu(t));){if(Dj(t))return t;t=t.parentNode}return null}function O9(e){const t=ic(e);let n=oI(e);for(;n&&Ske(n)&&getComputedStyle(n).position==="static";)n=oI(n);return n&&(qu(n)==="html"||qu(n)==="body"&&getComputedStyle(n).position==="static"&&!Dj(n))?t:n||Cke(e)||t}function aI(e){if(Xl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Yu(e);return{width:t.width,height:t.height}}function _ke(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Xl(n),o=Qd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((qu(n)!=="body"||ix(o))&&(a=ox(n)),Xl(n))){const l=Yu(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function kke(e,t){const n=ic(e),r=Qd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=Nj();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Eke(e){var t;const n=Qd(e),r=ox(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Pv(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Pv(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+Bj(e);const l=-r.scrollTop;return Q2(i||n).direction==="rtl"&&(s+=Pv(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function $j(e){const t=zj(e);return["html","body","#document"].includes(qu(t))?e.ownerDocument.body:Xl(t)&&ix(t)?t:$j(t)}function ub(e,t){var n;t===void 0&&(t=[]);const r=$j(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ic(r),a=i?[o].concat(o.visualViewport||[],ix(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(ub(a))}function Pke(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&PE(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Tke(e,t){const n=Yu(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function sI(e,t,n){return t==="viewport"?ob(kke(e,n)):Bd(t)?Tke(t,n):ob(Eke(Qd(e)))}function Lke(e){const t=ub(e),r=["absolute","fixed"].includes(Q2(e).position)&&Xl(e)?O9(e):e;return Bd(r)?t.filter(i=>Bd(i)&&Pke(i,r)&&qu(i)!=="body"):[]}function Ake(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Lke(t):[].concat(n),r],s=a[0],l=a.reduce((u,f)=>{const p=sI(t,f,i);return u.top=Pv(p.top,u.top),u.right=iI(p.right,u.right),u.bottom=iI(p.bottom,u.bottom),u.left=Pv(p.left,u.left),u},sI(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Oke={getClippingRect:Ake,convertOffsetParentRelativeRectToViewportRelativeRect:_ke,isElement:Bd,getDimensions:aI,getOffsetParent:O9,getDocumentElement:Qd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:wke(t,O9(n),r),floating:{...aI(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Q2(e).direction==="rtl"};function Rke(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,f=l||u?[...Bd(e)?ub(e):[],...ub(t)]:[];f.forEach(x=>{l&&x.addEventListener("scroll",n,{passive:!0}),u&&x.addEventListener("resize",n)});let p=null;if(a){let x=!0;p=new ResizeObserver(()=>{x||n(),x=!1}),Bd(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?Yu(e):null;s&&y();function y(){const x=Yu(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,m=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(x=p)==null||x.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Mke=(e,t,n)=>ike(e,t,{platform:Oke,...n});var R9=typeof document<"u"?k.exports.useLayoutEffect:k.exports.useEffect;function M9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!M9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!M9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ike(e){const t=k.exports.useRef(e);return R9(()=>{t.current=e}),t}function Dke(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=k.exports.useRef(null),a=k.exports.useRef(null),s=Ike(i),l=k.exports.useRef(null),[u,f]=k.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=k.exports.useState(t);M9(p==null?void 0:p.map(T=>{let{options:A}=T;return A}),t==null?void 0:t.map(T=>{let{options:A}=T;return A}))||m(t);const v=k.exports.useCallback(()=>{!o.current||!a.current||Mke(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{y.current&&Zl.exports.flushSync(()=>{f(T)})})},[p,n,r]);R9(()=>{y.current&&v()},[v]);const y=k.exports.useRef(!1);R9(()=>(y.current=!0,()=>{y.current=!1}),[]);const x=k.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=k.exports.useCallback(T=>{o.current=T,x()},[x]),_=k.exports.useCallback(T=>{a.current=T,x()},[x]),C=k.exports.useMemo(()=>({reference:o,floating:a}),[]);return k.exports.useMemo(()=>({...u,update:v,refs:C,reference:E,floating:_}),[u,v,C,E,_])}const Nke=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?eI({element:t.current,padding:n}).fn(i):{}:t?eI({element:t,padding:n}).fn(i):{}}}};function Bke(e){const[t,n]=k.exports.useState(void 0);return L1(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Fj="Popper",[TE,Hj]=Z2(Fj),[zke,Vj]=TE(Fj),$ke=e=>{const{__scopePopper:t,children:n}=e,[r,i]=k.exports.useState(null);return k.exports.createElement(zke,{scope:t,anchor:r,onAnchorChange:i},n)},Fke="PopperAnchor",Hke=k.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Vj(Fke,n),a=k.exports.useRef(null),s=ts(t,a);return k.exports.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:k.exports.createElement(Gu.div,Dn({},i,{ref:s}))}),cb="PopperContent",[Vke,dMe]=TE(cb),[Wke,Uke]=TE(cb,{hasParent:!1,positionUpdateFns:new Set}),jke=k.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:f,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:y=0,arrowPadding:x=0,collisionBoundary:E=[],collisionPadding:_=0,sticky:C="partial",hideWhenDetached:T=!1,avoidCollisions:A=!0,...M}=e,I=Vj(cb,f),[D,B]=k.exports.useState(null),F=ts(t,Pt=>B(Pt)),[H,Y]=k.exports.useState(null),te=Bke(H),G=(n=te==null?void 0:te.width)!==null&&n!==void 0?n:0,z=(r=te==null?void 0:te.height)!==null&&r!==void 0?r:0,W=p+(v!=="center"?"-"+v:""),K=typeof _=="number"?_:{top:0,right:0,bottom:0,left:0,..._},Z=Array.isArray(E)?E:[E],U=Z.length>0,Q={padding:K,boundary:Z.filter(qke),altBoundary:U},{reference:ue,floating:fe,strategy:Te,x:Oe,y:ve,placement:Ce,middlewareData:Re,update:Ye}=Dke({strategy:"fixed",placement:W,whileElementsMounted:Rke,middleware:[mke({mainAxis:m+z,alignmentAxis:y}),A?vke({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?yke():void 0,...Q}):void 0,H?Nke({element:H,padding:x}):void 0,A?hke({...Q}):void 0,Yke({arrowWidth:G,arrowHeight:z}),T?pke({strategy:"referenceHidden"}):void 0].filter(Gke)});L1(()=>{ue(I.anchor)},[ue,I.anchor]);const Ue=Oe!==null&&ve!==null,[pt,wt]=Wj(Ce),ut=(i=Re.arrow)===null||i===void 0?void 0:i.x,ft=(o=Re.arrow)===null||o===void 0?void 0:o.y,vt=((a=Re.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ke,at]=k.exports.useState();L1(()=>{D&&at(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:Rt,positionUpdateFns:tt}=Uke(cb,f),yt=!Rt;k.exports.useLayoutEffect(()=>{if(!yt)return tt.add(Ye),()=>{tt.delete(Ye)}},[yt,tt,Ye]),k.exports.useLayoutEffect(()=>{yt&&Ue&&Array.from(tt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[yt,Ue,tt]);const dn={"data-side":pt,"data-align":wt,...M,ref:F,style:{...M.style,animation:Ue?void 0:"none",opacity:(s=Re.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return k.exports.createElement("div",{ref:fe,"data-radix-popper-content-wrapper":"",style:{position:Te,left:0,top:0,transform:Ue?`translate3d(${Math.round(Oe)}px, ${Math.round(ve)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ke,["--radix-popper-transform-origin"]:[(l=Re.transformOrigin)===null||l===void 0?void 0:l.x,(u=Re.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},k.exports.createElement(Vke,{scope:f,placedSide:pt,onArrowChange:Y,arrowX:ut,arrowY:ft,shouldHideArrow:vt},yt?k.exports.createElement(Wke,{scope:f,hasParent:!0,positionUpdateFns:tt},k.exports.createElement(Gu.div,dn)):k.exports.createElement(Gu.div,dn)))});function Gke(e){return e!==void 0}function qke(e){return e!==null}const Yke=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[y,x]=Wj(s),E={start:"0%",center:"50%",end:"100%"}[x],_=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,C=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",A="";return y==="bottom"?(T=p?E:`${_}px`,A=`${-v}px`):y==="top"?(T=p?E:`${_}px`,A=`${l.floating.height+v}px`):y==="right"?(T=`${-v}px`,A=p?E:`${C}px`):y==="left"&&(T=`${l.floating.width+v}px`,A=p?E:`${C}px`),{data:{x:T,y:A}}}});function Wj(e){const[t,n="center"]=e.split("-");return[t,n]}const Kke=$ke,Xke=Hke,Zke=jke;function Qke(e,t){return k.exports.useReducer((n,r)=>{const i=t[n][r];return i!=null?i:n},e)}const Uj=e=>{const{present:t,children:n}=e,r=Jke(t),i=typeof n=="function"?n({present:r.isPresent}):k.exports.Children.only(n),o=ts(r.ref,i.ref);return typeof n=="function"||r.isPresent?k.exports.cloneElement(i,{ref:o}):null};Uj.displayName="Presence";function Jke(e){const[t,n]=k.exports.useState(),r=k.exports.useRef({}),i=k.exports.useRef(e),o=k.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Qke(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.exports.useEffect(()=>{const u=J3(r.current);o.current=s==="mounted"?u:"none"},[s]),L1(()=>{const u=r.current,f=i.current;if(f!==e){const m=o.current,v=J3(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),L1(()=>{if(t){const u=p=>{const v=J3(r.current).includes(p.animationName);p.target===t&&v&&Zl.exports.flushSync(()=>l("ANIMATION_END"))},f=p=>{p.target===t&&(o.current=J3(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function J3(e){return(e==null?void 0:e.animationName)||"none"}function eEe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=tEe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Kl(n),l=k.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function tEe({defaultProp:e,onChange:t}){const n=k.exports.useState(e),[r]=n,i=k.exports.useRef(r),o=Kl(t);return k.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const $6="rovingFocusGroup.onEntryFocus",nEe={bubbles:!1,cancelable:!0},LE="RovingFocusGroup",[I9,jj,rEe]=Pj(LE),[iEe,Gj]=Z2(LE,[rEe]),[oEe,aEe]=iEe(LE),sEe=k.exports.forwardRef((e,t)=>k.exports.createElement(I9.Provider,{scope:e.__scopeRovingFocusGroup},k.exports.createElement(I9.Slot,{scope:e.__scopeRovingFocusGroup},k.exports.createElement(lEe,Dn({},e,{ref:t}))))),lEe=k.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,p=k.exports.useRef(null),m=ts(t,p),v=Tj(o),[y=null,x]=eEe({prop:a,defaultProp:s,onChange:l}),[E,_]=k.exports.useState(!1),C=Kl(u),T=jj(n),A=k.exports.useRef(!1),[M,I]=k.exports.useState(0);return k.exports.useEffect(()=>{const D=p.current;if(D)return D.addEventListener($6,C),()=>D.removeEventListener($6,C)},[C]),k.exports.createElement(oEe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:y,onItemFocus:k.exports.useCallback(D=>x(D),[x]),onItemShiftTab:k.exports.useCallback(()=>_(!0),[]),onFocusableItemAdd:k.exports.useCallback(()=>I(D=>D+1),[]),onFocusableItemRemove:k.exports.useCallback(()=>I(D=>D-1),[])},k.exports.createElement(Gu.div,Dn({tabIndex:E||M===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...e.style},onMouseDown:Qn(e.onMouseDown,()=>{A.current=!0}),onFocus:Qn(e.onFocus,D=>{const B=!A.current;if(D.target===D.currentTarget&&B&&!E){const F=new CustomEvent($6,nEe);if(D.currentTarget.dispatchEvent(F),!F.defaultPrevented){const H=T().filter(W=>W.focusable),Y=H.find(W=>W.active),te=H.find(W=>W.id===y),z=[Y,te,...H].filter(Boolean).map(W=>W.ref.current);qj(z)}}A.current=!1}),onBlur:Qn(e.onBlur,()=>_(!1))})))}),uEe="RovingFocusGroupItem",cEe=k.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=rke(),s=aEe(uEe,n),l=s.currentTabStopId===a,u=jj(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return k.exports.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),k.exports.createElement(I9.ItemSlot,{scope:n,id:a,focusable:r,active:i},k.exports.createElement(Gu.span,Dn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=hEe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let x=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const E=x.indexOf(m.currentTarget);x=s.loop?pEe(x,E+1):x.slice(E+1)}setTimeout(()=>qj(x))}})})))}),dEe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fEe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function hEe(e,t,n){const r=fEe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return dEe[r]}function qj(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function pEe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const gEe=sEe,mEe=cEe,vEe=["Enter"," "],yEe=["ArrowDown","PageUp","Home"],Yj=["ArrowUp","PageDown","End"],bEe=[...yEe,...Yj],ax="Menu",[D9,SEe,xEe]=Pj(ax),[Zh,Kj]=Z2(ax,[xEe,Hj,Gj]),AE=Hj(),Xj=Gj(),[wEe,sx]=Zh(ax),[CEe,OE]=Zh(ax),_Ee=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=AE(t),[l,u]=k.exports.useState(null),f=k.exports.useRef(!1),p=Kl(o),m=Tj(i);return k.exports.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),k.exports.createElement(Kke,s,k.exports.createElement(wEe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},k.exports.createElement(CEe,{scope:t,onClose:k.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:a},r)))},kEe=k.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=AE(n);return k.exports.createElement(Xke,Dn({},i,r,{ref:t}))}),EEe="MenuPortal",[fMe,PEe]=Zh(EEe,{forceMount:void 0}),Td="MenuContent",[TEe,Zj]=Zh(Td),LEe=k.exports.forwardRef((e,t)=>{const n=PEe(Td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=sx(Td,e.__scopeMenu),a=OE(Td,e.__scopeMenu);return k.exports.createElement(D9.Provider,{scope:e.__scopeMenu},k.exports.createElement(Uj,{present:r||o.open},k.exports.createElement(D9.Slot,{scope:e.__scopeMenu},a.modal?k.exports.createElement(AEe,Dn({},i,{ref:t})):k.exports.createElement(OEe,Dn({},i,{ref:t})))))}),AEe=k.exports.forwardRef((e,t)=>{const n=sx(Td,e.__scopeMenu),r=k.exports.useRef(null),i=ts(t,r);return k.exports.useEffect(()=>{const o=r.current;if(o)return DF(o)},[]),k.exports.createElement(Qj,Dn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),OEe=k.exports.forwardRef((e,t)=>{const n=sx(Td,e.__scopeMenu);return k.exports.createElement(Qj,Dn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),Qj=k.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...y}=e,x=sx(Td,n),E=OE(Td,n),_=AE(n),C=Xj(n),T=SEe(n),[A,M]=k.exports.useState(null),I=k.exports.useRef(null),D=ts(t,I,x.onContentChange),B=k.exports.useRef(0),F=k.exports.useRef(""),H=k.exports.useRef(0),Y=k.exports.useRef(null),te=k.exports.useRef("right"),G=k.exports.useRef(0),z=v?xH:k.exports.Fragment,W=v?{as:x2,allowPinchZoom:!0}:void 0,K=U=>{var Q,ue;const fe=F.current+U,Te=T().filter(Ue=>!Ue.disabled),Oe=document.activeElement,ve=(Q=Te.find(Ue=>Ue.ref.current===Oe))===null||Q===void 0?void 0:Q.textValue,Ce=Te.map(Ue=>Ue.textValue),Re=FEe(Ce,fe,ve),Ye=(ue=Te.find(Ue=>Ue.textValue===Re))===null||ue===void 0?void 0:ue.ref.current;(function Ue(pt){F.current=pt,window.clearTimeout(B.current),pt!==""&&(B.current=window.setTimeout(()=>Ue(""),1e3))})(fe),Ye&&setTimeout(()=>Ye.focus())};k.exports.useEffect(()=>()=>window.clearTimeout(B.current),[]),q_e();const Z=k.exports.useCallback(U=>{var Q,ue;return te.current===((Q=Y.current)===null||Q===void 0?void 0:Q.side)&&VEe(U,(ue=Y.current)===null||ue===void 0?void 0:ue.area)},[]);return k.exports.createElement(TEe,{scope:n,searchRef:F,onItemEnter:k.exports.useCallback(U=>{Z(U)&&U.preventDefault()},[Z]),onItemLeave:k.exports.useCallback(U=>{var Q;Z(U)||((Q=I.current)===null||Q===void 0||Q.focus(),M(null))},[Z]),onTriggerLeave:k.exports.useCallback(U=>{Z(U)&&U.preventDefault()},[Z]),pointerGraceTimerRef:H,onPointerGraceIntentChange:k.exports.useCallback(U=>{Y.current=U},[])},k.exports.createElement(z,W,k.exports.createElement(Y_e,{asChild:!0,trapped:i,onMountAutoFocus:Qn(o,U=>{var Q;U.preventDefault(),(Q=I.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},k.exports.createElement(U_e,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:m},k.exports.createElement(gEe,Dn({asChild:!0},C,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:M,onEntryFocus:U=>{E.isUsingKeyboardRef.current||U.preventDefault()}}),k.exports.createElement(Zke,Dn({role:"menu","aria-orientation":"vertical","data-state":BEe(x.open),"data-radix-menu-content":"",dir:E.dir},_,y,{ref:D,style:{outline:"none",...y.style},onKeyDown:Qn(y.onKeyDown,U=>{const ue=U.target.closest("[data-radix-menu-content]")===U.currentTarget,fe=U.ctrlKey||U.altKey||U.metaKey,Te=U.key.length===1;ue&&(U.key==="Tab"&&U.preventDefault(),!fe&&Te&&K(U.key));const Oe=I.current;if(U.target!==Oe||!bEe.includes(U.key))return;U.preventDefault();const Ce=T().filter(Re=>!Re.disabled).map(Re=>Re.ref.current);Yj.includes(U.key)&&Ce.reverse(),zEe(Ce)}),onBlur:Qn(e.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(B.current),F.current="")}),onPointerMove:Qn(e.onPointerMove,B9(U=>{const Q=U.target,ue=G.current!==U.clientX;if(U.currentTarget.contains(Q)&&ue){const fe=U.clientX>G.current?"right":"left";te.current=fe,G.current=U.clientX}}))})))))))}),N9="MenuItem",lI="menu.itemSelect",REe=k.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=k.exports.useRef(null),a=OE(N9,e.__scopeMenu),s=Zj(N9,e.__scopeMenu),l=ts(t,o),u=k.exports.useRef(!1),f=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(lI,{bubbles:!0,cancelable:!0});p.addEventListener(lI,v=>r==null?void 0:r(v),{once:!0}),Ej(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return k.exports.createElement(MEe,Dn({},i,{ref:l,disabled:n,onClick:Qn(e.onClick,f),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||vEe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),MEe=k.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=Zj(N9,n),s=Xj(n),l=k.exports.useRef(null),u=ts(t,l),[f,p]=k.exports.useState(!1),[m,v]=k.exports.useState("");return k.exports.useEffect(()=>{const y=l.current;if(y){var x;v(((x=y.textContent)!==null&&x!==void 0?x:"").trim())}},[o.children]),k.exports.createElement(D9.ItemSlot,{scope:n,disabled:r,textValue:i!=null?i:m},k.exports.createElement(mEe,Dn({asChild:!0},s,{focusable:!r}),k.exports.createElement(Gu.div,Dn({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Qn(e.onPointerMove,B9(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus())})),onPointerLeave:Qn(e.onPointerLeave,B9(y=>a.onItemLeave(y))),onFocus:Qn(e.onFocus,()=>p(!0)),onBlur:Qn(e.onBlur,()=>p(!1))}))))}),IEe="MenuRadioGroup";Zh(IEe,{value:void 0,onValueChange:()=>{}});const DEe="MenuItemIndicator";Zh(DEe,{checked:!1});const NEe="MenuSub";Zh(NEe);function BEe(e){return e?"open":"closed"}function zEe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $Ee(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function FEe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=$Ee(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function HEe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,f=t[a].y;l>r!=f>r&&n<(u-s)*(r-l)/(f-l)+s&&(i=!i)}return i}function VEe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HEe(n,t)}function B9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const WEe=_Ee,UEe=kEe,jEe=LEe,GEe=REe,Jj="ContextMenu",[qEe,hMe]=Z2(Jj,[Kj]),lx=Kj(),[YEe,eG]=qEe(Jj),KEe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=k.exports.useState(!1),l=lx(t),u=Kl(r),f=k.exports.useCallback(p=>{s(p),u(p)},[u]);return k.exports.createElement(YEe,{scope:t,open:a,onOpenChange:f,modal:o},k.exports.createElement(WEe,Dn({},l,{dir:i,open:a,onOpenChange:f,modal:o}),n))},XEe="ContextMenuTrigger",ZEe=k.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eG(XEe,n),o=lx(n),a=k.exports.useRef({x:0,y:0}),s=k.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=k.exports.useRef(0),u=k.exports.useCallback(()=>window.clearTimeout(l.current),[]),f=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return k.exports.useEffect(()=>u,[u]),k.exports.createElement(k.exports.Fragment,null,k.exports.createElement(UEe,Dn({},o,{virtualRef:s})),k.exports.createElement(Gu.span,Dn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Qn(e.onContextMenu,p=>{u(),f(p),p.preventDefault()}),onPointerDown:Qn(e.onPointerDown,e4(p=>{u(),l.current=window.setTimeout(()=>f(p),700)})),onPointerMove:Qn(e.onPointerMove,e4(u)),onPointerCancel:Qn(e.onPointerCancel,e4(u)),onPointerUp:Qn(e.onPointerUp,e4(u))})))}),QEe="ContextMenuContent",JEe=k.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eG(QEe,n),o=lx(n),a=k.exports.useRef(!1);return k.exports.createElement(jEe,Dn({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),ePe=k.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=lx(n);return k.exports.createElement(GEe,Dn({},i,r,{ref:t}))});function e4(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const tPe=KEe,nPe=ZEe,rPe=JEe,Xc=ePe,iPe=ot([e=>e.gallery,e=>e.options,xr,Sr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:f,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:y,shouldUseSingleGalleryColumn:x}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:f,galleryImageObjectFit:p,galleryGridTemplateColumns:x?"auto":`repeat(auto-fill, minmax(${f}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:y,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:x}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),oPe=ot([e=>e.options,e=>e.gallery,e=>e.system,Sr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,shouldUseSingleGalleryColumn:t.shouldUseSingleGalleryColumn,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),aPe=e=>e.gallery,sPe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,lPe=k.exports.memo(e=>{var G,z,W,K,Z,U,Q,ue;const t=Ie(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=ye(oPe),{image:l,isSelected:u}=e,{url:f,thumbnail:p,uuid:m,metadata:v}=l,[y,x]=k.exports.useState(!1),E=j2(),{t:_}=Ge(),C=()=>x(!0),T=()=>x(!1),A=()=>{l.metadata&&t(LS(l.metadata.image.prompt)),E({title:_("toast:promptSet"),status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(G2(l.metadata.image.seed)),E({title:_("toast:seedSet"),status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(Iu(!1)),t(j1(l)),n!=="img2img"&&t(Do("img2img")),E({title:_("toast:sentToImageToImage"),status:"success",duration:2500,isClosable:!0})},D=()=>{a&&t(Iu(!1)),t(MS(l)),t(RS()),n!=="unifiedCanvas"&&t(Do("unifiedCanvas")),E({title:_("toast:sentToUnifiedCanvas"),status:"success",duration:2500,isClosable:!0})},B=()=>{v&&t(_4e(v)),E({title:_("toast:parametersSet"),status:"success",duration:2500,isClosable:!0})},F=async()=>{var fe;if((fe=v==null?void 0:v.image)!=null&&fe.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(Do("img2img")),t(w4e(v)),E({title:_("toast:initialImageSet"),status:"success",duration:2500,isClosable:!0});return}E({title:_("toast:initialImageNotSet"),description:_("toast:initialImageNotSetDesc"),status:"error",duration:2500,isClosable:!0})},H=()=>t(sR(l)),Y=fe=>{fe.dataTransfer.setData("invokeai/imageUuid",m),fe.dataTransfer.effectAllowed="move"},te=()=>{t(Iu(!0)),t(sR(l))};return ee(tPe,{onOpenChange:fe=>{t(HV(fe))},children:[b(nPe,{children:ee(Ud,{position:"relative",className:"hoverable-image",onMouseOver:C,onMouseOut:T,userSelect:"none",draggable:!0,onDragStart:Y,children:[b(pS,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:p||f,loading:"lazy"}),b("div",{className:"hoverable-image-content",onClick:H,children:u&&b(Ea,{width:"50%",height:"50%",as:nE,className:"hoverable-image-check"})}),y&&i>=64&&b("div",{className:"hoverable-image-delete-button",children:b(P9,{image:l,children:b(Qa,{"aria-label":_("options:deleteImage"),icon:b(p7e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})]},m)}),ee(rPe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:fe=>{fe.detail.originalEvent.preventDefault()},children:[b(Xc,{onClickCapture:te,children:_("options:openInViewer")}),b(Xc,{onClickCapture:A,disabled:((z=(G=l==null?void 0:l.metadata)==null?void 0:G.image)==null?void 0:z.prompt)===void 0,children:_("options:usePrompt")}),b(Xc,{onClickCapture:M,disabled:((K=(W=l==null?void 0:l.metadata)==null?void 0:W.image)==null?void 0:K.seed)===void 0,children:_("options:useSeed")}),b(Xc,{onClickCapture:B,disabled:!["txt2img","img2img"].includes((U=(Z=l==null?void 0:l.metadata)==null?void 0:Z.image)==null?void 0:U.type),children:_("options:useAll")}),b(Xc,{onClickCapture:F,disabled:((ue=(Q=l==null?void 0:l.metadata)==null?void 0:Q.image)==null?void 0:ue.type)!=="img2img",children:_("options:useInitImg")}),b(Xc,{onClickCapture:I,children:_("options:sendToImg2Img")}),b(Xc,{onClickCapture:D,children:_("options:sendToUnifiedCanvas")}),b(Xc,{"data-warning":!0,children:b(P9,{image:l,children:b("p",{children:_("options:deleteImage")})})})]})]})},sPe),pr=e=>{const{label:t,styleClass:n,...r}=e;return b(j$,{className:`invokeai__checkbox ${n}`,...r,children:t})},t4=320,uI=40,uPe={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}},cI=400;function tG(){const e=Ie(),{t}=Ge(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:f,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:y,galleryWidth:x,isLightBoxOpen:E,isStaging:_,shouldEnableResize:C,shouldUseSingleGalleryColumn:T}=ye(iPe),{galleryMinWidth:A,galleryMaxWidth:M}=E?{galleryMinWidth:cI,galleryMaxWidth:cI}:uPe[f],[I,D]=k.exports.useState(x>=t4),[B,F]=k.exports.useState(!1),[H,Y]=k.exports.useState(0),te=k.exports.useRef(null),G=k.exports.useRef(null),z=k.exports.useRef(null);k.exports.useEffect(()=>{x>=t4&&D(!1)},[x]);const W=()=>{e(V4e(!o)),e(li(!0))},K=()=>{a?U():Z()},Z=()=>{e(kd(!0)),o&&e(li(!0))},U=k.exports.useCallback(()=>{e(kd(!1)),e(HV(!1)),e(W4e(G.current?G.current.scrollTop:0)),setTimeout(()=>o&&e(li(!0)),400)},[e,o]),Q=()=>{e(h9(r))},ue=ve=>{e(xm(ve))},fe=()=>{m||(z.current=window.setTimeout(()=>U(),500))},Te=()=>{z.current&&window.clearTimeout(z.current)};je("g",()=>{K()},[a,o]),je("left",()=>{e(Fk())},{enabled:!_||f!=="unifiedCanvas"},[_]),je("right",()=>{e($k())},{enabled:!_||f!=="unifiedCanvas"},[_]),je("shift+g",()=>{W()},[o]),je("esc",()=>{e(kd(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Oe=32;return je("shift+up",()=>{if(l<256){const ve=We.clamp(l+Oe,32,256);e(xm(ve))}},[l]),je("shift+down",()=>{if(l>32){const ve=We.clamp(l-Oe,32,256);e(xm(ve))}},[l]),k.exports.useEffect(()=>{!G.current||(G.current.scrollTop=s)},[s,a]),k.exports.useEffect(()=>{function ve(Ce){!o&&te.current&&!te.current.contains(Ce.target)&&U()}return document.addEventListener("mousedown",ve),()=>{document.removeEventListener("mousedown",ve)}},[U,o]),b(bj,{nodeRef:te,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:te,onMouseLeave:o?void 0:fe,onMouseEnter:o?void 0:Te,onMouseOver:o?void 0:Te,children:[ee(qU,{minWidth:A,maxWidth:o?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:C},size:{width:x,height:o?"100%":"100vh"},onResizeStart:(ve,Ce,Re)=>{Y(Re.clientHeight),Re.style.height=`${Re.clientHeight}px`,o&&(Re.style.position="fixed",Re.style.right="1rem",F(!0))},onResizeStop:(ve,Ce,Re,Ye)=>{const Ue=o?We.clamp(Number(x)+Ye.width,A,Number(M)):Number(x)+Ye.width;e(G4e(Ue)),Re.removeAttribute("data-resize-alert"),o&&(Re.style.position="relative",Re.style.removeProperty("right"),Re.style.setProperty("height",o?"100%":"100vh"),F(!1),e(li(!0)))},onResize:(ve,Ce,Re,Ye)=>{const Ue=We.clamp(Number(x)+Ye.width,A,Number(o?M:.95*window.innerWidth));Ue>=t4&&!I?D(!0):Ue<t4&&I&&D(!1),l>Ue-uI&&e(xm(Ue-uI)),o&&(Ue>=M?Re.setAttribute("data-resize-alert","true"):Re.removeAttribute("data-resize-alert")),Re.style.height=`${H}px`},children:[ee("div",{className:"image-gallery-header",children:[b(Yi,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?ee(In,{children:[b(co,{size:"sm","data-selected":r==="result",onClick:()=>e(L3("result")),children:t("gallery:generations")}),b(co,{size:"sm","data-selected":r==="user",onClick:()=>e(L3("user")),children:t("gallery:uploads")})]}):ee(In,{children:[b(Qe,{"aria-label":t("gallery:showGenerations"),tooltip:t("gallery:showGenerations"),"data-selected":r==="result",icon:b(n7e,{}),onClick:()=>e(L3("result"))}),b(Qe,{"aria-label":t("gallery:showUploads"),tooltip:t("gallery:showUploads"),"data-selected":r==="user",icon:b(m7e,{}),onClick:()=>e(L3("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[b(zs,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:b(Qe,{size:"sm","aria-label":t("gallery:gallerySettings"),icon:b(XS,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[b($o,{value:l,onChange:ue,min:32,max:256,hideTooltip:!0,label:t("gallery:galleryImageSize")}),b(Qe,{size:"sm","aria-label":t("gallery:galleryImageResetSize"),tooltip:t("gallery:galleryImageResetSize"),onClick:()=>e(xm(64)),icon:b(fE,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),b("div",{children:b(pr,{label:t("gallery:maintainAspectRatio"),isChecked:p==="contain",onChange:()=>e(U4e(p==="contain"?"cover":"contain"))})}),b("div",{children:b(pr,{label:t("gallery:autoSwitchNewImages"),isChecked:v,onChange:ve=>e(j4e(ve.target.checked))})}),b("div",{children:b(pr,{label:t("gallery:singleColumnLayout"),isChecked:T,onChange:ve=>e(q4e(ve.target.checked))})})]})}),b(Qe,{size:"sm",className:"image-gallery-icon-btn","aria-label":t("gallery:pinGallery"),tooltip:`${t("gallery:pinGallery")} (Shift+G)`,onClick:W,icon:o?b(gj,{}):b(mj,{})})]})]}),b("div",{className:"image-gallery-container",ref:G,children:n.length||y?ee(In,{children:[b("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(ve=>{const{uuid:Ce}=ve;return b(lPe,{image:ve,isSelected:i===Ce},Ce)})}),b(Za,{onClick:Q,isDisabled:!y,className:"image-gallery-load-more-btn",children:t(y?"gallery:loadMore":"gallery:allImagesLoaded")})]}):ee("div",{className:"image-gallery-container-placeholder",children:[b(fj,{}),b("p",{children:t("gallery:noImagesInGallery")})]})})]}),B&&b("div",{style:{width:x+"px",height:"100%"}})]})})}const cPe=ot(aPe,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),dPe=()=>{const{resultImages:e,userImages:t}=ye(cPe);return n=>{const r=e.find(o=>o.uuid===n);if(r)return r;const i=t.find(o=>o.uuid===n);if(i)return i}},fPe=ot([e=>e.options,Sr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t),activeTabName:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),RE=e=>{const t=Ie(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=ye(fPe),u=dPe(),f=()=>{t(D4e(!a)),t(li(!0))},p=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),y=u(v);!y||(o==="img2img"?t(j1(y)):o==="unifiedCanvas"&&t(MS(y)))};return b("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ee("div",{className:"workarea-main",children:[n,ee("div",{className:"workarea-children-wrapper",onDrop:p,children:[r,l&&b(Zi,{label:"Toggle Split View",children:b("div",{className:"workarea-split-button","data-selected":a,onClick:f,children:b(R_e,{})})})]}),!s&&b(tG,{})]})})};function hPe(){return b(RE,{optionsPanel:b(x_e,{}),children:b(O_e,{})})}const pPe=()=>{const e=Ie(),t=ye(i=>i.options.hiresFix),{t:n}=Ge(),r=i=>e(zk(i.target.checked));return b(bt,{gap:2,direction:"column",children:b(ja,{label:n("options:hiresOptim"),fontSize:"md",isChecked:t,onChange:r})})},gPe=()=>ee(bt,{gap:2,direction:"column",children:[b(cj,{}),b(pPe,{})]});function mPe(){const{t:e}=Ge(),t={seed:{header:`${e("options:seed")}`,feature:Ki.SEED,content:b(hE,{})},variations:{header:`${e("options:variations")}`,feature:Ki.VARIATIONS,content:b(mE,{}),additionalHeaderComponents:b(gE,{})},face_restore:{header:`${e("options:faceRestoration")}`,feature:Ki.FACE_CORRECTION,content:b(dE,{}),additionalHeaderComponents:b(lj,{})},upscale:{header:`${e("options:upscaling")}`,feature:Ki.UPSCALE,content:b(pE,{}),additionalHeaderComponents:b(dj,{})},other:{header:`${e("options:otherOptions")}`,feature:Ki.OTHER,content:b(gPe,{})}};return ee(_E,{children:[b(wE,{}),b(xE,{}),b(vE,{}),b(yE,{accordionInfo:t})]})}const vPe=()=>b("div",{className:"workarea-single-view",children:b("div",{className:"text-to-image-area",children:b(_j,{})})});function yPe(){return b(RE,{optionsPanel:b(mPe,{}),children:b(vPe,{})})}var z9=function(e,t){return z9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},z9(e,t)};function bPe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");z9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ul=function(){return Ul=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ul.apply(this,arguments)};function dI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}var Ga=function(e,t){return Number(e.toFixed(t))},SPe=function(e,t){return typeof e=="number"?e:t},bi=function(e,t,n){n&&typeof n=="function"&&n(e,t)},xPe=function(e){return-Math.cos(e*Math.PI)/2+.5},wPe=function(e){return e},CPe=function(e){return e*e},_Pe=function(e){return e*(2-e)},kPe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},EPe=function(e){return e*e*e},PPe=function(e){return--e*e*e+1},TPe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},LPe=function(e){return e*e*e*e},APe=function(e){return 1- --e*e*e*e},OPe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},RPe=function(e){return e*e*e*e*e},MPe=function(e){return 1+--e*e*e*e*e},IPe=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},nG={easeOut:xPe,linear:wPe,easeInQuad:CPe,easeOutQuad:_Pe,easeInOutQuad:kPe,easeInCubic:EPe,easeOutCubic:PPe,easeInOutCubic:TPe,easeInQuart:LPe,easeOutQuart:APe,easeInOutQuart:OPe,easeInQuint:RPe,easeOutQuint:MPe,easeInOutQuint:IPe},rG=function(e){typeof e=="number"&&cancelAnimationFrame(e)},Al=function(e){!e.mounted||(rG(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function iG(e,t,n,r){if(!!e.mounted){var i=new Date().getTime(),o=1;Al(e),e.animation=function(){if(!e.mounted)return rG(e.animation);var a=new Date().getTime()-i,s=a/n,l=nG[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Jd(e,t,n,r){var i=DPe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,f=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):iG(e,r,n,function(v){var y=s+f*v,x=l+p*v,E=u+m*v;o(y,x,E)})}}function DPe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function NPe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,f=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:f}}var BPe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,f=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:f,minPositionY:p,maxPositionY:m}},ME=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=NPe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,f=o.newContentHeight,p=o.newDiffHeight,m=BPe(a,l,u,s,f,p,Boolean(i));return m},A1=function(e,t){var n=ME(e,t);return e.bounds=n,n};function ux(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,f=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=$9(e,s-p,u+p,r),y=$9(t,l-m,f+m,r);return{x:v,y}}var $9=function(e,t,n,r){return r?e<t?Ga(t,2):e>n?Ga(n,2):Ga(e,2):Ga(e,2)};function cx(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,f=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*f,m=u-n*f,v=ux(p,m,i,o,0,0,null);return v}function J2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var fI=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i==null?void 0:i.contains(o),s=r&&o&&a;if(!s)return!1;var l=dx(o,n);return!l},hI=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},zPe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},$Pe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function FPe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var f=e.bounds,p=f.maxPositionX,m=f.minPositionX,v=f.maxPositionY,y=f.minPositionY,x=n>p||n<m,E=r>v||r<y,_=n>p?u.offsetWidth:e.setup.minPositionX||0,C=r>v?u.offsetHeight:e.setup.minPositionY||0,T=cx(e,_,C,i,e.bounds,s||l),A=T.x,M=T.y;return{scale:i,positionX:x?A:n,positionY:E?M:r}}}function HPe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,f=l.positionX,p=l.positionY,m=t!==f,v=n!==p,y=!m||!v;if(!(!a||y||!s)){var x=ux(t,n,s,o,r,i,a),E=x.x,_=x.y;e.setTransformState(u,E,_)}}var VPe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var f=t-r.x,p=n-r.y,m=a?l:f,v=s?u:p;return{x:m,y:v}},db=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},WPe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},UPe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function jPe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function pI(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var f=a+(e-a)*u;return f>l?l:f<a?a:f}if(t<o&&n<o){var f=o+(e-o)*u;return f<s?s:f>o?o:f}}return r?t:$9(e,o,a,i)}function GPe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function qPe(e,t){var n=WPe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=GPe(a,s),f=t.x-r.x,p=t.y-r.y,m=f/u,v=p/u,y=l-i,x=f*f+p*p,E=Math.sqrt(x)/y;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function YPe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=UPe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,f=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,y=r.alignmentAnimation,x=r.zoomAnimation,E=r.panning,_=E.lockAxisY,C=E.lockAxisX,T=x.animationType,A=y.sizeX,M=y.sizeY,I=y.velocityAlignmentTime,D=I,B=jPe(e,l),F=Math.max(B,D),H=db(e,A),Y=db(e,M),te=H*i.offsetWidth/100,G=Y*i.offsetHeight/100,z=u+te,W=f-te,K=p+G,Z=m-G,U=e.transformState,Q=new Date().getTime();iG(e,T,F,function(ue){var fe=e.transformState,Te=fe.scale,Oe=fe.positionX,ve=fe.positionY,Ce=new Date().getTime()-Q,Re=Ce/D,Ye=nG[y.animationType],Ue=1-Ye(Math.min(1,Re)),pt=1-ue,wt=Oe+a*pt,ut=ve+s*pt,ft=pI(wt,U.positionX,Oe,C,v,f,u,W,z,Ue),vt=pI(ut,U.positionY,ve,_,v,m,p,Z,K,Ue);(Oe!==wt||ve!==ut)&&e.setTransformState(Te,ft,vt)})}}function gI(e,t){var n=e.transformState.scale;Al(e),A1(e,n),t.touches?$Pe(e,t):zPe(e,t)}function mI(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=VPe(e,t,n),u=l.x,f=l.y,p=db(e,a),m=db(e,s);qPe(e,{x:u,y:f}),HPe(e,u,f,p,m)}}function KPe(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r==null?void 0:r.getBoundingClientRect(),a=i==null?void 0:i.getBoundingClientRect(),s=(o==null?void 0:o.width)||0,l=(o==null?void 0:o.height)||0,u=(a==null?void 0:a.width)||0,f=(a==null?void 0:a.height)||0,p=s<u||l<f,m=!t&&n&&(n==null?void 0:n.total)>.1&&p;m?YPe(e):oG(e)}}function oG(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,f=o||t<r||!a&&!s;if(!f){var p=FPe(e);p&&Jd(e,p,l,u)}}function aG(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,f=l.animationTime,p=l.animationType,m=u||r>=a;if((r>=1||s)&&oG(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,y=n||i.offsetHeight/2,x=IE(e,a,v,y);x&&Jd(e,x,f,p)}}function IE(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=J2(Ga(t,2),o,a,0,!1),u=A1(e,l),f=cx(e,n,r,l,u,s),p=f.x,m=f.y;return{scale:l,positionX:p,positionY:m}}var I0={previousScale:1,scale:1,positionX:0,positionY:0},XPe=Ul(Ul({},I0),{setComponents:function(){},contextInstance:null}),Om={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}},sG=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:I0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:I0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:I0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:I0.positionY}},vI=function(e){var t=Ul({},Om);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Om[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Om[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ul(Ul({},Om[n]),e[n]):s?t[n]=dI(dI([],Om[n]),e[n]):t[n]=e[n]}}),t},lG=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var f=r*Math.exp(t*n),p=J2(Ga(f,3),s,a,u,!1);return p};function uG(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var f=o.offsetWidth,p=o.offsetHeight,m=(f/2-l)/s,v=(p/2-u)/s,y=lG(e,t,n),x=IE(e,y,m,v);if(!x)return console.error("Error during zoom event. New transformation state was not calculated.");Jd(e,x,r,i)}function cG(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=sG(e.props),s=e.transformState,l=s.scale,u=s.positionX,f=s.positionY;if(!!i){var p=ME(e,a.scale),m=ux(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&f===a.positionY||Jd(e,v,t,n)}}function ZPe(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return I0;var l=r.getBoundingClientRect(),u=QPe(t),f=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,y=r.offsetWidth/m,x=r.offsetHeight/v,E=J2(n||Math.min(y,x),a,s,0,!1),_=(l.width-m*E)/2,C=(l.height-v*E)/2,T=(l.left-f)*E+_,A=(l.top-p)*E+C,M=ME(e,E),I=ux(T,A,M,o,0,0,r),D=I.x,B=I.y;return{positionX:D,positionY:B,scale:E}}function QPe(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function JPe(e){if(e){if((e==null?void 0:e.offsetWidth)===void 0||(e==null?void 0:e.offsetHeight)===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var eTe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uG(e,1,t,n,r)}},tTe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),uG(e,-1,t,n,r)}},nTe=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,f=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!f||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Jd(e,v,i,o)}}},rTe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),cG(e,t,n)}},iTe=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=dG(t||i.scale,o,a);Jd(e,s,n,r)}}},oTe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),Al(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&JPe(a)&&a&&o.contains(a)){var s=ZPe(e,a,n);Jd(e,s,r,i)}}},qr=function(e){return{instance:e,state:e.transformState,zoomIn:eTe(e),zoomOut:tTe(e),setTransform:nTe(e),resetTransform:rTe(e),centerView:iTe(e),zoomToElement:oTe(e)}},F6=!1;function H6(){try{var e={get passive(){return F6=!0,!1}};return e}catch(t){return F6=!1,F6}}var dx=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},yI=function(e){e&&clearTimeout(e)},aTe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},dG=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},sTe=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,f=s&&!l&&!r&&u;if(!f||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=dx(u,a);return!p};function lTe(e,t){var n=e?e.deltaY<0?1:-1:0,r=SPe(t,n);return r}function fG(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var uTe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,f=s.zoomAnimation,p=f.size,m=f.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var y=r?!1:!m,x=J2(Ga(v,3),u,l,p,y);return x},cTe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?r<o||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):!1},dTe=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=dx(a,i);return!l},fTe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},hTe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ga(i[0].clientX-r.left,5),a=Ga(i[0].clientY-r.top,5),s=Ga(i[1].clientX-r.left,5),l=Ga(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},hG=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))},pTe=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var f=t/r,p=f*n;return J2(Ga(p,2),a,o,l,!u)},gTe=160,mTe=100,vTe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(Al(e),bi(qr(e),t,r),bi(qr(e),t,i))},yTe=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,f=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,y=p.disabled,x=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=lTe(t,null),_=uTe(e,E,x,!t.ctrlKey);if(l!==_){var C=A1(e,_),T=fG(t,o,l),A=y||v===0||f,M=u&&A,I=cx(e,T.x,T.y,_,C,M),D=I.x,B=I.y;e.previousWheelEvent=t,e.setTransformState(_,D,B),bi(qr(e),t,r),bi(qr(e),t,i)}},bTe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;yI(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(aG(e,t.x,t.y),e.wheelAnimationTimer=null)},mTe);var o=cTe(e,t);o&&(yI(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,bi(qr(e),t,r),bi(qr(e),t,i))},gTe))},STe=function(e,t){var n=hG(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,Al(e)},xTe=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,f=l.size;if(!(r===null||!n)){var p=hTe(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=hG(t),v=pTe(e,m);if(v!==i){var y=A1(e,v),x=u||f===0||s,E=a&&x,_=cx(e,p.x,p.y,v,y,E),C=_.x,T=_.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,C,T)}}}},wTe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,aG(e,t==null?void 0:t.x,t==null?void 0:t.y)};function CTe(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return cG(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var f=i==="zoomOut"?-1:1,p=lG(e,f,o),m=fG(t,u,l),v=IE(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Jd(e,v,a,s)}}var _Te=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i==null?void 0:i.contains(l),f=n&&l&&u&&!a;if(!f)return!1;var p=dx(l,s);return!(p||!f)},pG=oe.createContext(XPe),kTe=function(e){bPe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=sG(n.props),n.setup=vI(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=H6();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=sTe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(vTe(n,r),yTe(n,r),bTe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=fI(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),Al(n),gI(n,r),bi(qr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=hI(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),mI(n,r.clientX,r.clientY),bi(qr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(KPe(n),bi(qr(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=dTe(n,r);!l||(STe(n,r),Al(n),bi(qr(n),r,a),bi(qr(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=fTe(n);!l||(r.preventDefault(),r.stopPropagation(),xTe(n,r),bi(qr(n),r,a),bi(qr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(wTe(n),bi(qr(n),r,o),bi(qr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=fI(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,Al(n);var l=r.touches,u=l.length===1,f=l.length===2;u&&(Al(n),gI(n,r),bi(qr(n),r,o)),f&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=hI(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];mI(n,s.clientX,s.clientY),bi(qr(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=_Te(n,r);!o||CTe(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,A1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,bi(qr(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=dG(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=aTe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(qr(n))},n}return t.prototype.componentDidMount=function(){var n=H6();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=H6();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),Al(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(A1(this,this.transformState.scale),this.setup=vI(this.props))},t.prototype.render=function(){var n=qr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return b(pG.Provider,{value:Ul(Ul({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(k.exports.Component),ETe=oe.forwardRef(function(e,t){var n=k.exports.useState(null),r=n[0],i=n[1];return k.exports.useImperativeHandle(t,function(){return r},[r]),b(kTe,{...Ul({},e,{setRef:i})})});function PTe(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var TTe=`.transform-component-module_wrapper__1_Fgj {
position: relative;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
overflow: hidden;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
margin: 0;
padding: 0;
}
.transform-component-module_content__2jYgh {
display: flex;
flex-wrap: wrap;
width: -moz-fit-content;
width: fit-content;
height: -moz-fit-content;
height: fit-content;
margin: 0;
padding: 0;
transform-origin: 0% 0%;
}
.transform-component-module_content__2jYgh img {
pointer-events: none;
}
`,bI={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};PTe(TTe);var LTe=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=k.exports.useContext(pG).setComponents,u=k.exports.useRef(null),f=k.exports.useRef(null);return k.exports.useEffect(function(){var p=u.current,m=f.current;p!==null&&m!==null&&l&&l(p,m)},[]),b("div",{ref:u,className:"react-transform-wrapper "+bI.wrapper+" "+r,style:a,children:b("div",{ref:f,className:"react-transform-component "+bI.content+" "+o,style:s,children:t})})};function ATe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=k.exports.useState(0),[a,s]=k.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},f=()=>{s(!a)};return b(ETe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:y})=>ee(In,{children:[ee("div",{className:"lightbox-image-options",children:[b(Qe,{icon:b(B8e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),b(Qe,{icon:b(z8e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),b(Qe,{icon:b(D8e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),b(Qe,{icon:b(N8e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),b(Qe,{icon:b(i_e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:f,fontSize:20}),b(Qe,{icon:b(fE,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),b(LTe,{wrapperStyle:{width:"100%",height:"100%"},children:b("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>y(1,0,"easeOut")})})]})})}function OTe(){const e=Ie(),t=ye(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ye(Cj),[a,s]=k.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},f=()=>{e(Fk())},p=()=>{e($k())};return je("Esc",()=>{t&&e(Iu(!1))},[t]),ee("div",{className:"lightbox-container",children:[b(Qe,{icon:b(I8e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(Iu(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[b(Sj,{}),!r&&ee("div",{className:"current-image-next-prev-buttons",children:[b("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&b(Qa,{"aria-label":"Previous image",icon:b(NU,{className:"next-prev-button"}),variant:"unstyled",onClick:f})}),b("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&b(Qa,{"aria-label":"Next image",icon:b(BU,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ee(In,{children:[b(ATe,{image:n.url,styleClass:"lightbox-image"}),r&&b(wj,{image:n})]})]}),b(tG,{})]})]})}const RTe=ot([sE],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),MTe=()=>{const e=Ie(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=ye(RTe),{t:o}=Ge();return ee(bt,{direction:"column",gap:"1rem",children:[b($o,{sliderMarkRightOffset:-6,label:o("options:seamSize"),min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:a=>{e(rR(a))},handleReset:()=>e(rR(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),b($o,{sliderMarkRightOffset:-4,label:o("options:seamBlur"),min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:a=>{e(nR(a))},handleReset:()=>{e(nR(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),b($o,{sliderMarkRightOffset:-7,label:o("options:seamStrength"),min:.01,max:.99,step:.01,value:r,onChange:a=>{e(oR(a))},handleReset:()=>{e(oR(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),b($o,{sliderMarkRightOffset:-4,label:o("options:seamSteps"),min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:a=>{e(iR(a))},handleReset:()=>{e(iR(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},ITe=ot(en,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),DTe=()=>{const e=Ie(),{boundingBoxDimensions:t}=ye(ITe),{t:n}=Ge(),r=s=>{e(jm({...t,width:Math.floor(s)}))},i=s=>{e(jm({...t,height:Math.floor(s)}))},o=()=>{e(jm({...t,width:Math.floor(512)}))},a=()=>{e(jm({...t,height:Math.floor(512)}))};return ee(bt,{direction:"column",gap:"1rem",children:[b($o,{label:n("options:width"),min:64,max:1024,step:64,value:t.width,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),b($o,{label:n("options:height"),min:64,max:1024,step:64,value:t.height,onChange:i,handleReset:a,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},NTe=ot(en,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function BTe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=ye(NTe),n=Ie(),{t:r}=Ge();return ee(bt,{alignItems:"center",columnGap:"1rem",children:[b($o,{label:r("options:inpaintReplace"),value:e,onChange:i=>{n(XR(i))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(XR(1)),isResetDisabled:!t}),b(ja,{isChecked:t,onChange:i=>n(vSe(i.target.checked)),marginTop:"1.25rem"})]})}const zTe=ot([sE,tc,en],(e,t,n)=>{const{tileSize:r,infillMethod:i}=e,{infill_methods:o}=t,{boundingBoxScaleMethod:a,scaledBoundingBoxDimensions:s}=n;return{boundingBoxScale:a,scaledBoundingBoxDimensions:s,tileSize:r,infillMethod:i,availableInfillMethods:o,isManual:a==="manual"}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),$Te=()=>{const e=Ie(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:o,scaledBoundingBoxDimensions:a}=ye(zTe),{t:s}=Ge(),l=v=>{e(I3({...a,width:Math.floor(v)}))},u=v=>{e(I3({...a,height:Math.floor(v)}))},f=()=>{e(I3({...a,width:Math.floor(512)}))},p=()=>{e(I3({...a,height:Math.floor(512)}))},m=v=>{e(cSe(v.target.value))};return ee(bt,{direction:"column",gap:"1rem",children:[b(Hs,{label:s("options:scaleBeforeProcessing"),validValues:qbe,value:i,onChange:m}),b($o,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("options:scaledWidth"),min:64,max:1024,step:64,value:a.width,onChange:l,handleReset:f,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),b($o,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:s("options:scaledHeight"),min:64,max:1024,step:64,value:a.height,onChange:u,handleReset:p,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),b(BTe,{}),b(Hs,{label:s("options:infillMethod"),value:n,validValues:r,onChange:v=>e(TV(v.target.value))}),b($o,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:s("options:tileSize"),min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:v=>{e(aR(v))},handleReset:()=>{e(aR(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function FTe(){const{t:e}=Ge(),t={boundingBox:{header:`${e("options:boundingBoxHeader")}`,feature:Ki.BOUNDING_BOX,content:b(DTe,{})},seamCorrection:{header:`${e("options:seamCorrectionHeader")}`,feature:Ki.SEAM_CORRECTION,content:b(MTe,{})},infillAndScaling:{header:`${e("options:infillScalingHeader")}`,feature:Ki.INFILL_AND_SCALING,content:b($Te,{})},seed:{header:`${e("options:seed")}`,feature:Ki.SEED,content:b(hE,{})},variations:{header:`${e("options:variations")}`,feature:Ki.VARIATIONS,content:b(mE,{}),additionalHeaderComponents:b(gE,{})}};return ee(_E,{children:[b(wE,{}),b(xE,{}),b(vE,{}),b(uj,{label:e("options:img2imgStrength"),styleClass:"main-option-block image-to-image-strength-main-option"}),b(yE,{accordionInfo:t})]})}const HTe=ot(en,hj,Sr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),gG=()=>{const e=Ie(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ye(HTe),o=k.exports.useRef(null);return k.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(dSe({width:a,height:s})),e(i?uSe():RS()),e(li(!1))},0)},[e,r,t,n,i]),b("div",{ref:o,className:"inpainting-canvas-area",children:b(z2,{thickness:"2px",speed:"1s",size:"xl"})})};var mG={exports:{}};/**
* @license React
* react-reconciler.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 VTe=function(t){var n={},r=k.exports,i=N0.exports,o=Object.assign;function a(d){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+d,S=1;S<arguments.length;S++)h+="&args[]="+encodeURIComponent(arguments[S]);return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),y=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),M=Symbol.iterator;function I(d){return d===null||typeof d!="object"?null:(d=M&&d[M]||d["@@iterator"],typeof d=="function"?d:null)}function D(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case f:return"Fragment";case u:return"Portal";case m:return"Profiler";case p:return"StrictMode";case E:return"Suspense";case _:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case y:return(d.displayName||"Context")+".Consumer";case v:return(d._context.displayName||"Context")+".Provider";case x:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case C:return h=d.displayName||null,h!==null?h:D(d.type)||"Memo";case T:h=d._payload,d=d._init;try{return D(d(h))}catch(S){}}return null}function B(d){var h=d.type;switch(d.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=h.render,d=d.displayName||d.name||"",h.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return D(h);case 8:return h===p?"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(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function F(d){var h=d,S=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,(h.flags&4098)!==0&&(S=h.return),d=h.return;while(d)}return h.tag===3?S:null}function H(d){if(F(d)!==d)throw Error(a(188))}function Y(d){var h=d.alternate;if(!h){if(h=F(d),h===null)throw Error(a(188));return h!==d?null:d}for(var S=d,P=h;;){var L=S.return;if(L===null)break;var R=L.alternate;if(R===null){if(P=L.return,P!==null){S=P;continue}break}if(L.child===R.child){for(R=L.child;R;){if(R===S)return H(L),d;if(R===P)return H(L),h;R=R.sibling}throw Error(a(188))}if(S.return!==P.return)S=L,P=R;else{for(var j=!1,se=L.child;se;){if(se===S){j=!0,S=L,P=R;break}if(se===P){j=!0,P=L,S=R;break}se=se.sibling}if(!j){for(se=R.child;se;){if(se===S){j=!0,S=R,P=L;break}if(se===P){j=!0,P=R,S=L;break}se=se.sibling}if(!j)throw Error(a(189))}}if(S.alternate!==P)throw Error(a(190))}if(S.tag!==3)throw Error(a(188));return S.stateNode.current===S?d:h}function te(d){return d=Y(d),d!==null?G(d):null}function G(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var h=G(d);if(h!==null)return h;d=d.sibling}return null}function z(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){if(d.tag!==4){var h=z(d);if(h!==null)return h}d=d.sibling}return null}var W=Array.isArray,K=t.getPublicInstance,Z=t.getRootHostContext,U=t.getChildHostContext,Q=t.prepareForCommit,ue=t.resetAfterCommit,fe=t.createInstance,Te=t.appendInitialChild,Oe=t.finalizeInitialChildren,ve=t.prepareUpdate,Ce=t.shouldSetTextContent,Re=t.createTextInstance,Ye=t.scheduleTimeout,Ue=t.cancelTimeout,pt=t.noTimeout,wt=t.isPrimaryRenderer,ut=t.supportsMutation,ft=t.supportsPersistence,vt=t.supportsHydration,ke=t.getInstanceFromNode,at=t.preparePortalMount,Rt=t.getCurrentEventPriority,tt=t.detachDeletedInstance,yt=t.supportsMicrotasks,dn=t.scheduleMicrotask,Pt=t.supportsTestSelectors,Yt=t.findFiberRoot,fn=t.getBoundingRect,Cn=t.getTextContent,De=t.isHiddenSubtree,nt=t.matchAccessibilityRole,tn=t.setFocusIfFocusable,Zt=t.setupIntersectionObserver,Ee=t.appendChild,Ct=t.appendChildToContainer,Wt=t.commitTextUpdate,$e=t.commitMount,ct=t.commitUpdate,hn=t.insertBefore,Be=t.insertInContainerBefore,gt=t.removeChild,rt=t.removeChildFromContainer,Bt=t.resetTextContent,ln=t.hideInstance,wr=t.hideTextInstance,sr=t.unhideInstance,Vr=t.unhideTextInstance,Go=t.clearContainer,Q1=t.cloneInstance,Pa=t.createContainerChildSet,Jh=t.appendChildToContainerChildSet,J1=t.finalizeContainerChildren,oc=t.replaceContainerChildren,ep=t.cloneHiddenInstance,tp=t.cloneHiddenTextInstance,qo=t.canHydrateInstance,tf=t.canHydrateTextInstance,eg=t.canHydrateSuspenseInstance,ac=t.isSuspenseInstancePending,nf=t.isSuspenseInstanceFallback,tg=t.getSuspenseInstanceFallbackErrorDetails,js=t.registerSuspenseInstanceRetry,sc=t.getNextHydratableSibling,ng=t.getFirstHydratableChild,rg=t.getFirstHydratableChildWithinContainer,ig=t.getFirstHydratableChildWithinSuspenseInstance,og=t.hydrateInstance,is=t.hydrateTextInstance,ag=t.hydrateSuspenseInstance,sg=t.getNextHydratableInstanceAfterSuspenseInstance,lg=t.commitHydratedContainer,ug=t.commitHydratedSuspenseInstance,cg=t.clearSuspenseBoundary,dg=t.clearSuspenseBoundaryFromContainer,Gs=t.shouldDeleteUnhydratedTailInstances,fg=t.didNotMatchHydratedContainerTextInstance,os=t.didNotMatchHydratedTextInstance,ru;function iu(d){if(ru===void 0)try{throw Error()}catch(S){var h=S.stack.trim().match(/\n( *(at )?)/);ru=h&&h[1]||""}return`
`+ru+d}var qs=!1;function ou(d,h){if(!d||qs)return"";qs=!0;var S=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(ze){var P=ze}Reflect.construct(d,[],h)}else{try{h.call()}catch(ze){P=ze}d.call(h.prototype)}else{try{throw Error()}catch(ze){P=ze}d()}}catch(ze){if(ze&&P&&typeof ze.stack=="string"){for(var L=ze.stack.split(`
`),R=P.stack.split(`
`),j=L.length-1,se=R.length-1;1<=j&&0<=se&&L[j]!==R[se];)se--;for(;1<=j&&0<=se;j--,se--)if(L[j]!==R[se]){if(j!==1||se!==1)do if(j--,se--,0>se||L[j]!==R[se]){var he=`
`+L[j].replace(" at new "," at ");return d.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",d.displayName)),he}while(1<=j&&0<=se);break}}}finally{qs=!1,Error.prepareStackTrace=S}return(d=d?d.displayName||d.name:"")?iu(d):""}var np=Object.prototype.hasOwnProperty,lc=[],Ys=-1;function Yo(d){return{current:d}}function On(d){0>Ys||(d.current=lc[Ys],lc[Ys]=null,Ys--)}function _n(d,h){Ys++,lc[Ys]=d.current,d.current=h}var Ko={},Or=Yo(Ko),Qr=Yo(!1),Xo=Ko;function Ks(d,h){var S=d.type.contextTypes;if(!S)return Ko;var P=d.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===h)return P.__reactInternalMemoizedMaskedChildContext;var L={},R;for(R in S)L[R]=h[R];return P&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=h,d.__reactInternalMemoizedMaskedChildContext=L),L}function Jr(d){return d=d.childContextTypes,d!=null}function as(){On(Qr),On(Or)}function rf(d,h,S){if(Or.current!==Ko)throw Error(a(168));_n(Or,h),_n(Qr,S)}function au(d,h,S){var P=d.stateNode;if(h=h.childContextTypes,typeof P.getChildContext!="function")return S;P=P.getChildContext();for(var L in P)if(!(L in h))throw Error(a(108,B(d)||"Unknown",L));return o({},S,P)}function ss(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ko,Xo=Or.current,_n(Or,d),_n(Qr,Qr.current),!0}function of(d,h,S){var P=d.stateNode;if(!P)throw Error(a(169));S?(d=au(d,h,Xo),P.__reactInternalMemoizedMergedChildContext=d,On(Qr),On(Or),_n(Or,d)):On(Qr),_n(Qr,S)}var Ci=Math.clz32?Math.clz32:af,rp=Math.log,ip=Math.LN2;function af(d){return d>>>=0,d===0?32:31-(rp(d)/ip|0)|0}var Xs=64,So=4194304;function Zs(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function su(d,h){var S=d.pendingLanes;if(S===0)return 0;var P=0,L=d.suspendedLanes,R=d.pingedLanes,j=S&268435455;if(j!==0){var se=j&~L;se!==0?P=Zs(se):(R&=j,R!==0&&(P=Zs(R)))}else j=S&~L,j!==0?P=Zs(j):R!==0&&(P=Zs(R));if(P===0)return 0;if(h!==0&&h!==P&&(h&L)===0&&(L=P&-P,R=h&-h,L>=R||L===16&&(R&4194240)!==0))return h;if((P&4)!==0&&(P|=S&16),h=d.entangledLanes,h!==0)for(d=d.entanglements,h&=P;0<h;)S=31-Ci(h),L=1<<S,P|=d[S],h&=~L;return P}function hg(d,h){switch(d){case 1:case 2:case 4:return h+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 h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uc(d,h){for(var S=d.suspendedLanes,P=d.pingedLanes,L=d.expirationTimes,R=d.pendingLanes;0<R;){var j=31-Ci(R),se=1<<j,he=L[j];he===-1?((se&S)===0||(se&P)!==0)&&(L[j]=hg(se,h)):he<=h&&(d.expiredLanes|=se),R&=~se}}function cc(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function sf(){var d=Xs;return Xs<<=1,(Xs&4194240)===0&&(Xs=64),d}function dc(d){for(var h=[],S=0;31>S;S++)h.push(d);return h}function Ta(d,h,S){d.pendingLanes|=h,h!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,h=31-Ci(h),d[h]=S}function lf(d,h){var S=d.pendingLanes&~h;d.pendingLanes=h,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=h,d.mutableReadLanes&=h,d.entangledLanes&=h,h=d.entanglements;var P=d.eventTimes;for(d=d.expirationTimes;0<S;){var L=31-Ci(S),R=1<<L;h[L]=0,P[L]=-1,d[L]=-1,S&=~R}}function lu(d,h){var S=d.entangledLanes|=h;for(d=d.entanglements;S;){var P=31-Ci(S),L=1<<P;L&h|d[P]&h&&(d[P]|=h),S&=~L}}var Ut=0;function op(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var fc=i.unstable_scheduleCallback,hc=i.unstable_cancelCallback,ap=i.unstable_shouldYield,Zo=i.unstable_requestPaint,qn=i.unstable_now,uf=i.unstable_ImmediatePriority,sp=i.unstable_UserBlockingPriority,cf=i.unstable_NormalPriority,lp=i.unstable_IdlePriority,pn=null,jt=null;function up(d){if(jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(pn,d,void 0,(d.current.flags&128)===128)}catch(h){}}function pg(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var q=typeof Object.is=="function"?Object.is:pg,re=null,pe=!1,Je=!1;function $t(d){re===null?re=[d]:re.push(d)}function vn(d){pe=!0,$t(d)}function St(){if(!Je&&re!==null){Je=!0;var d=0,h=Ut;try{var S=re;for(Ut=1;d<S.length;d++){var P=S[d];do P=P(!0);while(P!==null)}re=null,pe=!1}catch(L){throw re!==null&&(re=re.slice(d+1)),fc(uf,St),L}finally{Ut=h,Je=!1}}return null}var Ot=[],Gt=0,Wr=null,Cr=0,yn=[],ei=0,xo=null,Qi=1,La="";function Qs(d,h){Ot[Gt++]=Cr,Ot[Gt++]=Wr,Wr=d,Cr=h}function gg(d,h,S){yn[ei++]=Qi,yn[ei++]=La,yn[ei++]=xo,xo=d;var P=Qi;d=La;var L=32-Ci(P)-1;P&=~(1<<L),S+=1;var R=32-Ci(h)+L;if(30<R){var j=L-L%5;R=(P&(1<<j)-1).toString(32),P>>=j,L-=j,Qi=1<<32-Ci(h)+L|S<<L|P,La=R+d}else Qi=1<<R|S<<L|P,La=d}function _i(d){d.return!==null&&(Qs(d,1),gg(d,1,0))}function mg(d){for(;d===Wr;)Wr=Ot[--Gt],Ot[Gt]=null,Cr=Ot[--Gt],Ot[Gt]=null;for(;d===xo;)xo=yn[--ei],yn[ei]=null,La=yn[--ei],yn[ei]=null,Qi=yn[--ei],yn[ei]=null}var Yn=null,wo=null,Vn=!1,Co=!1,$i=null;function cp(d,h){var S=To(5,null,null,0);S.elementType="DELETED",S.stateNode=h,S.return=d,h=d.deletions,h===null?(d.deletions=[S],d.flags|=16):h.push(S)}function Wn(d,h){switch(d.tag){case 5:return h=qo(h,d.type,d.pendingProps),h!==null?(d.stateNode=h,Yn=d,wo=ng(h),!0):!1;case 6:return h=tf(h,d.pendingProps),h!==null?(d.stateNode=h,Yn=d,wo=null,!0):!1;case 13:if(h=eg(h),h!==null){var S=xo!==null?{id:Qi,overflow:La}:null;return d.memoizedState={dehydrated:h,treeContext:S,retryLane:1073741824},S=To(18,null,null,0),S.stateNode=h,S.return=d,d.child=S,Yn=d,wo=null,!0}return!1;default:return!1}}function Aa(d){return(d.mode&1)!==0&&(d.flags&128)===0}function df(d){if(Vn){var h=wo;if(h){var S=h;if(!Wn(d,h)){if(Aa(d))throw Error(a(418));h=sc(S);var P=Yn;h&&Wn(d,h)?cp(P,S):(d.flags=d.flags&-4097|2,Vn=!1,Yn=d)}}else{if(Aa(d))throw Error(a(418));d.flags=d.flags&-4097|2,Vn=!1,Yn=d}}}function ty(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Yn=d}function pc(d){if(!vt||d!==Yn)return!1;if(!Vn)return ty(d),Vn=!0,!1;if(d.tag!==3&&(d.tag!==5||Gs(d.type)&&!Ce(d.type,d.memoizedProps))){var h=wo;if(h){if(Aa(d))throw ny(),Error(a(418));for(;h;)cp(d,h),h=sc(h)}}if(ty(d),d.tag===13){if(!vt)throw Error(a(316));if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));wo=sg(d)}else wo=Yn?sc(d.stateNode):null;return!0}function ny(){for(var d=wo;d;)d=sc(d)}function gc(){vt&&(wo=Yn=null,Co=Vn=!1)}function vg(d){$i===null?$i=[d]:$i.push(d)}var ry=s.ReactCurrentBatchConfig;function uu(d,h){if(q(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var S=Object.keys(d),P=Object.keys(h);if(S.length!==P.length)return!1;for(P=0;P<S.length;P++){var L=S[P];if(!np.call(h,L)||!q(d[L],h[L]))return!1}return!0}function mc(d){switch(d.tag){case 5:return iu(d.type);case 16:return iu("Lazy");case 13:return iu("Suspense");case 19:return iu("SuspenseList");case 0:case 2:case 15:return d=ou(d.type,!1),d;case 11:return d=ou(d.type.render,!1),d;case 1:return d=ou(d.type,!0),d;default:return""}}function Qo(d,h){if(d&&d.defaultProps){h=o({},h),d=d.defaultProps;for(var S in d)h[S]===void 0&&(h[S]=d[S]);return h}return h}var ff=Yo(null),hf=null,Js=null,pf=null;function dp(){pf=Js=hf=null}function iy(d,h,S){wt?(_n(ff,h._currentValue),h._currentValue=S):(_n(ff,h._currentValue2),h._currentValue2=S)}function gf(d){var h=ff.current;On(ff),wt?d._currentValue=h:d._currentValue2=h}function mf(d,h,S){for(;d!==null;){var P=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,P!==null&&(P.childLanes|=h)):P!==null&&(P.childLanes&h)!==h&&(P.childLanes|=h),d===S)break;d=d.return}}function vc(d,h){hf=d,pf=Js=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&h)!==0&&(Hi=!0),d.firstContext=null)}function Ji(d){var h=wt?d._currentValue:d._currentValue2;if(pf!==d)if(d={context:d,memoizedValue:h,next:null},Js===null){if(hf===null)throw Error(a(308));Js=d,hf.dependencies={lanes:0,firstContext:d}}else Js=Js.next=d;return h}var Rr=null;function vf(d){Rr===null?Rr=[d]:Rr.push(d)}function yc(d,h,S,P){var L=h.interleaved;return L===null?(S.next=S,vf(h)):(S.next=L.next,L.next=S),h.interleaved=S,Jo(d,P)}function Jo(d,h){d.lanes|=h;var S=d.alternate;for(S!==null&&(S.lanes|=h),S=d,d=d.return;d!==null;)d.childLanes|=h,S=d.alternate,S!==null&&(S.childLanes|=h),S=d,d=d.return;return S.tag===3?S.stateNode:null}var ls=!1;function yg(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oy(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function us(d,h){return{eventTime:d,lane:h,tag:0,payload:null,callback:null,next:null}}function el(d,h,S){var P=d.updateQueue;if(P===null)return null;if(P=P.shared,(Ft&2)!==0){var L=P.pending;return L===null?h.next=h:(h.next=L.next,L.next=h),P.pending=h,Jo(d,S)}return L=P.interleaved,L===null?(h.next=h,vf(P)):(h.next=L.next,L.next=h),P.interleaved=h,Jo(d,S)}function fp(d,h,S){if(h=h.updateQueue,h!==null&&(h=h.shared,(S&4194240)!==0)){var P=h.lanes;P&=d.pendingLanes,S|=P,h.lanes=S,lu(d,S)}}function cu(d,h){var S=d.updateQueue,P=d.alternate;if(P!==null&&(P=P.updateQueue,S===P)){var L=null,R=null;if(S=S.firstBaseUpdate,S!==null){do{var j={eventTime:S.eventTime,lane:S.lane,tag:S.tag,payload:S.payload,callback:S.callback,next:null};R===null?L=R=j:R=R.next=j,S=S.next}while(S!==null);R===null?L=R=h:R=R.next=h}else L=R=h;S={baseState:P.baseState,firstBaseUpdate:L,lastBaseUpdate:R,shared:P.shared,effects:P.effects},d.updateQueue=S;return}d=S.lastBaseUpdate,d===null?S.firstBaseUpdate=h:d.next=h,S.lastBaseUpdate=h}function hp(d,h,S,P){var L=d.updateQueue;ls=!1;var R=L.firstBaseUpdate,j=L.lastBaseUpdate,se=L.shared.pending;if(se!==null){L.shared.pending=null;var he=se,ze=he.next;he.next=null,j===null?R=ze:j.next=ze,j=he;var it=d.alternate;it!==null&&(it=it.updateQueue,se=it.lastBaseUpdate,se!==j&&(se===null?it.firstBaseUpdate=ze:se.next=ze,it.lastBaseUpdate=he))}if(R!==null){var Mt=L.baseState;j=0,it=ze=he=null,se=R;do{var Ze=se.lane,Un=se.eventTime;if((P&Ze)===Ze){it!==null&&(it=it.next={eventTime:Un,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var Rn=d,ir=se;switch(Ze=h,Un=S,ir.tag){case 1:if(Rn=ir.payload,typeof Rn=="function"){Mt=Rn.call(Un,Mt,Ze);break e}Mt=Rn;break e;case 3:Rn.flags=Rn.flags&-65537|128;case 0:if(Rn=ir.payload,Ze=typeof Rn=="function"?Rn.call(Un,Mt,Ze):Rn,Ze==null)break e;Mt=o({},Mt,Ze);break e;case 2:ls=!0}}se.callback!==null&&se.lane!==0&&(d.flags|=64,Ze=L.effects,Ze===null?L.effects=[se]:Ze.push(se))}else Un={eventTime:Un,lane:Ze,tag:se.tag,payload:se.payload,callback:se.callback,next:null},it===null?(ze=it=Un,he=Mt):it=it.next=Un,j|=Ze;if(se=se.next,se===null){if(se=L.shared.pending,se===null)break;Ze=se,se=Ze.next,Ze.next=null,L.lastBaseUpdate=Ze,L.shared.pending=null}}while(1);if(it===null&&(he=Mt),L.baseState=he,L.firstBaseUpdate=ze,L.lastBaseUpdate=it,h=L.shared.interleaved,h!==null){L=h;do j|=L.lane,L=L.next;while(L!==h)}else R===null&&(L.shared.lanes=0);al|=j,d.lanes=j,d.memoizedState=Mt}}function ay(d,h,S){if(d=h.effects,h.effects=null,d!==null)for(h=0;h<d.length;h++){var P=d[h],L=P.callback;if(L!==null){if(P.callback=null,P=S,typeof L!="function")throw Error(a(191,L));L.call(P)}}}var pp=new r.Component().refs;function gp(d,h,S,P){h=d.memoizedState,S=S(P,h),S=S==null?h:o({},h,S),d.memoizedState=S,d.lanes===0&&(d.updateQueue.baseState=S)}var ea={isMounted:function(d){return(d=d._reactInternals)?F(d)===d:!1},enqueueSetState:function(d,h,S){d=d._reactInternals;var P=mi(),L=Nr(d),R=us(P,L);R.payload=h,S!=null&&(R.callback=S),h=el(d,R,L),h!==null&&(Po(h,d,L,P),fp(h,d,L))},enqueueReplaceState:function(d,h,S){d=d._reactInternals;var P=mi(),L=Nr(d),R=us(P,L);R.tag=1,R.payload=h,S!=null&&(R.callback=S),h=el(d,R,L),h!==null&&(Po(h,d,L,P),fp(h,d,L))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var S=mi(),P=Nr(d),L=us(S,P);L.tag=2,h!=null&&(L.callback=h),h=el(d,L,P),h!==null&&(Po(h,d,P,S),fp(h,d,P))}};function yf(d,h,S,P,L,R,j){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(P,R,j):h.prototype&&h.prototype.isPureReactComponent?!uu(S,P)||!uu(L,R):!0}function sy(d,h,S){var P=!1,L=Ko,R=h.contextType;return typeof R=="object"&&R!==null?R=Ji(R):(L=Jr(h)?Xo:Or.current,P=h.contextTypes,R=(P=P!=null)?Ks(d,L):Ko),h=new h(S,R),d.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=ea,d.stateNode=h,h._reactInternals=d,P&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=L,d.__reactInternalMemoizedMaskedChildContext=R),h}function ly(d,h,S,P){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(S,P),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(S,P),h.state!==d&&ea.enqueueReplaceState(h,h.state,null)}function bg(d,h,S,P){var L=d.stateNode;L.props=S,L.state=d.memoizedState,L.refs=pp,yg(d);var R=h.contextType;typeof R=="object"&&R!==null?L.context=Ji(R):(R=Jr(h)?Xo:Or.current,L.context=Ks(d,R)),L.state=d.memoizedState,R=h.getDerivedStateFromProps,typeof R=="function"&&(gp(d,h,R,S),L.state=d.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(h=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),h!==L.state&&ea.enqueueReplaceState(L,L.state,null),hp(d,S,L,P),L.state=d.memoizedState),typeof L.componentDidMount=="function"&&(d.flags|=4194308)}function Oa(d,h,S){if(d=S.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(S._owner){if(S=S._owner,S){if(S.tag!==1)throw Error(a(309));var P=S.stateNode}if(!P)throw Error(a(147,d));var L=P,R=""+d;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===R?h.ref:(h=function(j){var se=L.refs;se===pp&&(se=L.refs={}),j===null?delete se[R]:se[R]=j},h._stringRef=R,h)}if(typeof d!="string")throw Error(a(284));if(!S._owner)throw Error(a(290,d))}return d}function Fi(d,h){throw d=Object.prototype.toString.call(h),Error(a(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d))}function Sg(d){var h=d._init;return h(d._payload)}function uy(d){function h(ge,le){if(d){var be=ge.deletions;be===null?(ge.deletions=[le],ge.flags|=16):be.push(le)}}function S(ge,le){if(!d)return null;for(;le!==null;)h(ge,le),le=le.sibling;return null}function P(ge,le){for(ge=new Map;le!==null;)le.key!==null?ge.set(le.key,le):ge.set(le.index,le),le=le.sibling;return ge}function L(ge,le){return ge=ro(ge,le),ge.index=0,ge.sibling=null,ge}function R(ge,le,be){return ge.index=be,d?(be=ge.alternate,be!==null?(be=be.index,be<le?(ge.flags|=2,le):be):(ge.flags|=2,le)):(ge.flags|=1048576,le)}function j(ge){return d&&ge.alternate===null&&(ge.flags|=2),ge}function se(ge,le,be,qe){return le===null||le.tag!==6?(le=jp(be,ge.mode,qe),le.return=ge,le):(le=L(le,be),le.return=ge,le)}function he(ge,le,be,qe){var Le=be.type;return Le===f?it(ge,le,be.props.children,qe,be.key):le!==null&&(le.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===T&&Sg(Le)===le.type)?(qe=L(le,be.props),qe.ref=Oa(ge,le,be),qe.return=ge,qe):(qe=Nf(be.type,be.key,be.props,null,ge.mode,qe),qe.ref=Oa(ge,le,be),qe.return=ge,qe)}function ze(ge,le,be,qe){return le===null||le.tag!==4||le.stateNode.containerInfo!==be.containerInfo||le.stateNode.implementation!==be.implementation?(le=hl(be,ge.mode,qe),le.return=ge,le):(le=L(le,be.children||[]),le.return=ge,le)}function it(ge,le,be,qe,Le){return le===null||le.tag!==7?(le=fl(be,ge.mode,qe,Le),le.return=ge,le):(le=L(le,be),le.return=ge,le)}function Mt(ge,le,be){if(typeof le=="string"&&le!==""||typeof le=="number")return le=jp(""+le,ge.mode,be),le.return=ge,le;if(typeof le=="object"&&le!==null){switch(le.$$typeof){case l:return be=Nf(le.type,le.key,le.props,null,ge.mode,be),be.ref=Oa(ge,null,le),be.return=ge,be;case u:return le=hl(le,ge.mode,be),le.return=ge,le;case T:var qe=le._init;return Mt(ge,qe(le._payload),be)}if(W(le)||I(le))return le=fl(le,ge.mode,be,null),le.return=ge,le;Fi(ge,le)}return null}function Ze(ge,le,be,qe){var Le=le!==null?le.key:null;if(typeof be=="string"&&be!==""||typeof be=="number")return Le!==null?null:se(ge,le,""+be,qe);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case l:return be.key===Le?he(ge,le,be,qe):null;case u:return be.key===Le?ze(ge,le,be,qe):null;case T:return Le=be._init,Ze(ge,le,Le(be._payload),qe)}if(W(be)||I(be))return Le!==null?null:it(ge,le,be,qe,null);Fi(ge,be)}return null}function Un(ge,le,be,qe,Le){if(typeof qe=="string"&&qe!==""||typeof qe=="number")return ge=ge.get(be)||null,se(le,ge,""+qe,Le);if(typeof qe=="object"&&qe!==null){switch(qe.$$typeof){case l:return ge=ge.get(qe.key===null?be:qe.key)||null,he(le,ge,qe,Le);case u:return ge=ge.get(qe.key===null?be:qe.key)||null,ze(le,ge,qe,Le);case T:var It=qe._init;return Un(ge,le,be,It(qe._payload),Le)}if(W(qe)||I(qe))return ge=ge.get(be)||null,it(le,ge,qe,Le,null);Fi(le,qe)}return null}function Rn(ge,le,be,qe){for(var Le=null,It=null,At=le,Ht=le=0,jr=null;At!==null&&Ht<be.length;Ht++){At.index>Ht?(jr=At,At=null):jr=At.sibling;var Qt=Ze(ge,At,be[Ht],qe);if(Qt===null){At===null&&(At=jr);break}d&&At&&Qt.alternate===null&&h(ge,At),le=R(Qt,le,Ht),It===null?Le=Qt:It.sibling=Qt,It=Qt,At=jr}if(Ht===be.length)return S(ge,At),Vn&&Qs(ge,Ht),Le;if(At===null){for(;Ht<be.length;Ht++)At=Mt(ge,be[Ht],qe),At!==null&&(le=R(At,le,Ht),It===null?Le=At:It.sibling=At,It=At);return Vn&&Qs(ge,Ht),Le}for(At=P(ge,At);Ht<be.length;Ht++)jr=Un(At,ge,Ht,be[Ht],qe),jr!==null&&(d&&jr.alternate!==null&&At.delete(jr.key===null?Ht:jr.key),le=R(jr,le,Ht),It===null?Le=jr:It.sibling=jr,It=jr);return d&&At.forEach(function(ms){return h(ge,ms)}),Vn&&Qs(ge,Ht),Le}function ir(ge,le,be,qe){var Le=I(be);if(typeof Le!="function")throw Error(a(150));if(be=Le.call(be),be==null)throw Error(a(151));for(var It=Le=null,At=le,Ht=le=0,jr=null,Qt=be.next();At!==null&&!Qt.done;Ht++,Qt=be.next()){At.index>Ht?(jr=At,At=null):jr=At.sibling;var ms=Ze(ge,At,Qt.value,qe);if(ms===null){At===null&&(At=jr);break}d&&At&&ms.alternate===null&&h(ge,At),le=R(ms,le,Ht),It===null?Le=ms:It.sibling=ms,It=ms,At=jr}if(Qt.done)return S(ge,At),Vn&&Qs(ge,Ht),Le;if(At===null){for(;!Qt.done;Ht++,Qt=be.next())Qt=Mt(ge,Qt.value,qe),Qt!==null&&(le=R(Qt,le,Ht),It===null?Le=Qt:It.sibling=Qt,It=Qt);return Vn&&Qs(ge,Ht),Le}for(At=P(ge,At);!Qt.done;Ht++,Qt=be.next())Qt=Un(At,ge,Ht,Qt.value,qe),Qt!==null&&(d&&Qt.alternate!==null&&At.delete(Qt.key===null?Ht:Qt.key),le=R(Qt,le,Ht),It===null?Le=Qt:It.sibling=Qt,It=Qt);return d&&At.forEach(function(vi){return h(ge,vi)}),Vn&&Qs(ge,Ht),Le}function sa(ge,le,be,qe){if(typeof be=="object"&&be!==null&&be.type===f&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Le=be.key,It=le;It!==null;){if(It.key===Le){if(Le=be.type,Le===f){if(It.tag===7){S(ge,It.sibling),le=L(It,be.props.children),le.return=ge,ge=le;break e}}else if(It.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===T&&Sg(Le)===It.type){S(ge,It.sibling),le=L(It,be.props),le.ref=Oa(ge,It,be),le.return=ge,ge=le;break e}S(ge,It);break}else h(ge,It);It=It.sibling}be.type===f?(le=fl(be.props.children,ge.mode,qe,be.key),le.return=ge,ge=le):(qe=Nf(be.type,be.key,be.props,null,ge.mode,qe),qe.ref=Oa(ge,le,be),qe.return=ge,ge=qe)}return j(ge);case u:e:{for(It=be.key;le!==null;){if(le.key===It)if(le.tag===4&&le.stateNode.containerInfo===be.containerInfo&&le.stateNode.implementation===be.implementation){S(ge,le.sibling),le=L(le,be.children||[]),le.return=ge,ge=le;break e}else{S(ge,le);break}else h(ge,le);le=le.sibling}le=hl(be,ge.mode,qe),le.return=ge,ge=le}return j(ge);case T:return It=be._init,sa(ge,le,It(be._payload),qe)}if(W(be))return Rn(ge,le,be,qe);if(I(be))return ir(ge,le,be,qe);Fi(ge,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,le!==null&&le.tag===6?(S(ge,le.sibling),le=L(le,be),le.return=ge,ge=le):(S(ge,le),le=jp(be,ge.mode,qe),le.return=ge,ge=le),j(ge)):S(ge,le)}return sa}var bc=uy(!0),cy=uy(!1),bf={},_o=Yo(bf),Ra=Yo(bf),ie=Yo(bf);function Se(d){if(d===bf)throw Error(a(174));return d}function me(d,h){_n(ie,h),_n(Ra,d),_n(_o,bf),d=Z(h),On(_o),_n(_o,d)}function Xe(){On(_o),On(Ra),On(ie)}function Lt(d){var h=Se(ie.current),S=Se(_o.current);h=U(S,d.type,h),S!==h&&(_n(Ra,d),_n(_o,h))}function nn(d){Ra.current===d&&(On(_o),On(Ra))}var Dt=Yo(0);function gn(d){for(var h=d;h!==null;){if(h.tag===13){var S=h.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||ac(S)||nf(S)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Sf=[];function xg(){for(var d=0;d<Sf.length;d++){var h=Sf[d];wt?h._workInProgressVersionPrimary=null:h._workInProgressVersionSecondary=null}Sf.length=0}var ki=s.ReactCurrentDispatcher,Sc=s.ReactCurrentBatchConfig,du=0,kn=null,rr=null,lr=null,an=!1,xf=!1,xc=0,mp=0;function fi(){throw Error(a(321))}function wg(d,h){if(h===null)return!1;for(var S=0;S<h.length&&S<d.length;S++)if(!q(d[S],h[S]))return!1;return!0}function Cg(d,h,S,P,L,R){if(du=R,kn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,ki.current=d===null||d.memoizedState===null?gx:mx,d=S(P,L),xf){R=0;do{if(xf=!1,xc=0,25<=R)throw Error(a(301));R+=1,lr=rr=null,h.updateQueue=null,ki.current=vx,d=S(P,L)}while(xf)}if(ki.current=cs,h=rr!==null&&rr.next!==null,du=0,lr=rr=kn=null,an=!1,h)throw Error(a(300));return d}function wc(){var d=xc!==0;return xc=0,d}function ti(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lr===null?kn.memoizedState=lr=d:lr=lr.next=d,lr}function Ei(){if(rr===null){var d=kn.alternate;d=d!==null?d.memoizedState:null}else d=rr.next;var h=lr===null?kn.memoizedState:lr.next;if(h!==null)lr=h,rr=d;else{if(d===null)throw Error(a(310));rr=d,d={memoizedState:rr.memoizedState,baseState:rr.baseState,baseQueue:rr.baseQueue,queue:rr.queue,next:null},lr===null?kn.memoizedState=lr=d:lr=lr.next=d}return lr}function Cc(d,h){return typeof h=="function"?h(d):h}function _c(d){var h=Ei(),S=h.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=d;var P=rr,L=P.baseQueue,R=S.pending;if(R!==null){if(L!==null){var j=L.next;L.next=R.next,R.next=j}P.baseQueue=L=R,S.pending=null}if(L!==null){R=L.next,P=P.baseState;var se=j=null,he=null,ze=R;do{var it=ze.lane;if((du&it)===it)he!==null&&(he=he.next={lane:0,action:ze.action,hasEagerState:ze.hasEagerState,eagerState:ze.eagerState,next:null}),P=ze.hasEagerState?ze.eagerState:d(P,ze.action);else{var Mt={lane:it,action:ze.action,hasEagerState:ze.hasEagerState,eagerState:ze.eagerState,next:null};he===null?(se=he=Mt,j=P):he=he.next=Mt,kn.lanes|=it,al|=it}ze=ze.next}while(ze!==null&&ze!==R);he===null?j=P:he.next=se,q(P,h.memoizedState)||(Hi=!0),h.memoizedState=P,h.baseState=j,h.baseQueue=he,S.lastRenderedState=P}if(d=S.interleaved,d!==null){L=d;do R=L.lane,kn.lanes|=R,al|=R,L=L.next;while(L!==d)}else L===null&&(S.lanes=0);return[h.memoizedState,S.dispatch]}function vp(d){var h=Ei(),S=h.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=d;var P=S.dispatch,L=S.pending,R=h.memoizedState;if(L!==null){S.pending=null;var j=L=L.next;do R=d(R,j.action),j=j.next;while(j!==L);q(R,h.memoizedState)||(Hi=!0),h.memoizedState=R,h.baseQueue===null&&(h.baseState=R),S.lastRenderedState=R}return[R,P]}function _g(){}function wf(d,h){var S=kn,P=Ei(),L=h(),R=!q(P.memoizedState,L);if(R&&(P.memoizedState=L,Hi=!0),P=P.queue,yp(tl.bind(null,S,P,d),[d]),P.getSnapshot!==h||R||lr!==null&&lr.memoizedState.tag&1){if(S.flags|=2048,_f(9,kc.bind(null,S,P,L,h),void 0,null),Ur===null)throw Error(a(349));(du&30)!==0||kg(S,h,L)}return L}function kg(d,h,S){d.flags|=16384,d={getSnapshot:h,value:S},h=kn.updateQueue,h===null?(h={lastEffect:null,stores:null},kn.updateQueue=h,h.stores=[d]):(S=h.stores,S===null?h.stores=[d]:S.push(d))}function kc(d,h,S,P){h.value=S,h.getSnapshot=P,Cf(h)&&dy(d)}function tl(d,h,S){return S(function(){Cf(h)&&dy(d)})}function Cf(d){var h=d.getSnapshot;d=d.value;try{var S=h();return!q(d,S)}catch(P){return!0}}function dy(d){var h=Jo(d,1);h!==null&&Po(h,d,1,-1)}function fy(d){var h=ti();return typeof d=="function"&&(d=d()),h.memoizedState=h.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cc,lastRenderedState:d},h.queue=d,d=d.dispatch=Tc.bind(null,kn,d),[h.memoizedState,d]}function _f(d,h,S,P){return d={tag:d,create:h,destroy:S,deps:P,next:null},h=kn.updateQueue,h===null?(h={lastEffect:null,stores:null},kn.updateQueue=h,h.lastEffect=d.next=d):(S=h.lastEffect,S===null?h.lastEffect=d.next=d:(P=S.next,S.next=d,d.next=P,h.lastEffect=d)),d}function kf(){return Ei().memoizedState}function fu(d,h,S,P){var L=ti();kn.flags|=d,L.memoizedState=_f(1|h,S,void 0,P===void 0?null:P)}function Ec(d,h,S,P){var L=Ei();P=P===void 0?null:P;var R=void 0;if(rr!==null){var j=rr.memoizedState;if(R=j.destroy,P!==null&&wg(P,j.deps)){L.memoizedState=_f(h,S,R,P);return}}kn.flags|=d,L.memoizedState=_f(1|h,S,R,P)}function hy(d,h){return fu(8390656,8,d,h)}function yp(d,h){return Ec(2048,8,d,h)}function py(d,h){return Ec(4,2,d,h)}function gy(d,h){return Ec(4,4,d,h)}function _r(d,h){if(typeof h=="function")return d=d(),h(d),function(){h(null)};if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function ni(d,h,S){return S=S!=null?S.concat([d]):null,Ec(4,4,_r.bind(null,h,d),S)}function Eg(){}function my(d,h){var S=Ei();h=h===void 0?null:h;var P=S.memoizedState;return P!==null&&h!==null&&wg(h,P[1])?P[0]:(S.memoizedState=[d,h],d)}function Pg(d,h){var S=Ei();h=h===void 0?null:h;var P=S.memoizedState;return P!==null&&h!==null&&wg(h,P[1])?P[0]:(d=d(),S.memoizedState=[d,h],d)}function vy(d,h,S){return(du&21)===0?(d.baseState&&(d.baseState=!1,Hi=!0),d.memoizedState=S):(q(S,h)||(S=sf(),kn.lanes|=S,al|=S,d.baseState=!0),h)}function Tg(d,h){var S=Ut;Ut=S!==0&&4>S?S:4,d(!0);var P=Sc.transition;Sc.transition={};try{d(!1),h()}finally{Ut=S,Sc.transition=P}}function Pc(){return Ei().memoizedState}function Lg(d,h,S){var P=Nr(d);if(S={lane:P,action:S,hasEagerState:!1,eagerState:null,next:null},Lc(d))Ac(h,S);else if(S=yc(d,h,S,P),S!==null){var L=mi();Po(S,d,P,L),Ef(S,h,P)}}function Tc(d,h,S){var P=Nr(d),L={lane:P,action:S,hasEagerState:!1,eagerState:null,next:null};if(Lc(d))Ac(h,L);else{var R=d.alternate;if(d.lanes===0&&(R===null||R.lanes===0)&&(R=h.lastRenderedReducer,R!==null))try{var j=h.lastRenderedState,se=R(j,S);if(L.hasEagerState=!0,L.eagerState=se,q(se,j)){var he=h.interleaved;he===null?(L.next=L,vf(h)):(L.next=he.next,he.next=L),h.interleaved=L;return}}catch(ze){}finally{}S=yc(d,h,L,P),S!==null&&(L=mi(),Po(S,d,P,L),Ef(S,h,P))}}function Lc(d){var h=d.alternate;return d===kn||h!==null&&h===kn}function Ac(d,h){xf=an=!0;var S=d.pending;S===null?h.next=h:(h.next=S.next,S.next=h),d.pending=h}function Ef(d,h,S){if((S&4194240)!==0){var P=h.lanes;P&=d.pendingLanes,S|=P,h.lanes=S,lu(d,S)}}var cs={readContext:Ji,useCallback:fi,useContext:fi,useEffect:fi,useImperativeHandle:fi,useInsertionEffect:fi,useLayoutEffect:fi,useMemo:fi,useReducer:fi,useRef:fi,useState:fi,useDebugValue:fi,useDeferredValue:fi,useTransition:fi,useMutableSource:fi,useSyncExternalStore:fi,useId:fi,unstable_isNewReconciler:!1},gx={readContext:Ji,useCallback:function(d,h){return ti().memoizedState=[d,h===void 0?null:h],d},useContext:Ji,useEffect:hy,useImperativeHandle:function(d,h,S){return S=S!=null?S.concat([d]):null,fu(4194308,4,_r.bind(null,h,d),S)},useLayoutEffect:function(d,h){return fu(4194308,4,d,h)},useInsertionEffect:function(d,h){return fu(4,2,d,h)},useMemo:function(d,h){var S=ti();return h=h===void 0?null:h,d=d(),S.memoizedState=[d,h],d},useReducer:function(d,h,S){var P=ti();return h=S!==void 0?S(h):h,P.memoizedState=P.baseState=h,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:h},P.queue=d,d=d.dispatch=Lg.bind(null,kn,d),[P.memoizedState,d]},useRef:function(d){var h=ti();return d={current:d},h.memoizedState=d},useState:fy,useDebugValue:Eg,useDeferredValue:function(d){return ti().memoizedState=d},useTransition:function(){var d=fy(!1),h=d[0];return d=Tg.bind(null,d[1]),ti().memoizedState=d,[h,d]},useMutableSource:function(){},useSyncExternalStore:function(d,h,S){var P=kn,L=ti();if(Vn){if(S===void 0)throw Error(a(407));S=S()}else{if(S=h(),Ur===null)throw Error(a(349));(du&30)!==0||kg(P,h,S)}L.memoizedState=S;var R={value:S,getSnapshot:h};return L.queue=R,hy(tl.bind(null,P,R,d),[d]),P.flags|=2048,_f(9,kc.bind(null,P,R,S,h),void 0,null),S},useId:function(){var d=ti(),h=Ur.identifierPrefix;if(Vn){var S=La,P=Qi;S=(P&~(1<<32-Ci(P)-1)).toString(32)+S,h=":"+h+"R"+S,S=xc++,0<S&&(h+="H"+S.toString(32)),h+=":"}else S=mp++,h=":"+h+"r"+S.toString(32)+":";return d.memoizedState=h},unstable_isNewReconciler:!1},mx={readContext:Ji,useCallback:my,useContext:Ji,useEffect:yp,useImperativeHandle:ni,useInsertionEffect:py,useLayoutEffect:gy,useMemo:Pg,useReducer:_c,useRef:kf,useState:function(){return _c(Cc)},useDebugValue:Eg,useDeferredValue:function(d){var h=Ei();return vy(h,rr.memoizedState,d)},useTransition:function(){var d=_c(Cc)[0],h=Ei().memoizedState;return[d,h]},useMutableSource:_g,useSyncExternalStore:wf,useId:Pc,unstable_isNewReconciler:!1},vx={readContext:Ji,useCallback:my,useContext:Ji,useEffect:yp,useImperativeHandle:ni,useInsertionEffect:py,useLayoutEffect:gy,useMemo:Pg,useReducer:vp,useRef:kf,useState:function(){return vp(Cc)},useDebugValue:Eg,useDeferredValue:function(d){var h=Ei();return rr===null?h.memoizedState=d:vy(h,rr.memoizedState,d)},useTransition:function(){var d=vp(Cc)[0],h=Ei().memoizedState;return[d,h]},useMutableSource:_g,useSyncExternalStore:wf,useId:Pc,unstable_isNewReconciler:!1};function Oc(d,h){try{var S="",P=h;do S+=mc(P),P=P.return;while(P);var L=S}catch(R){L=`
Error generating stack: `+R.message+`
`+R.stack}return{value:d,source:h,stack:L,digest:null}}function Ag(d,h,S){return{value:d,source:null,stack:S!=null?S:null,digest:h!=null?h:null}}function Rc(d,h){try{console.error(h.value)}catch(S){setTimeout(function(){throw S})}}var Pf=typeof WeakMap=="function"?WeakMap:Map;function Og(d,h,S){S=us(-1,S),S.tag=3,S.payload={element:null};var P=h.value;return S.callback=function(){Of||(Of=!0,Rf=P),Rc(d,h)},S}function $(d,h,S){S=us(-1,S),S.tag=3;var P=d.type.getDerivedStateFromError;if(typeof P=="function"){var L=h.value;S.payload=function(){return P(L)},S.callback=function(){Rc(d,h)}}var R=d.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(S.callback=function(){Rc(d,h),typeof P!="function"&&(ll===null?ll=new Set([this]):ll.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})}),S}function hu(d,h,S){var P=d.pingCache;if(P===null){P=d.pingCache=new Pf;var L=new Set;P.set(h,L)}else L=P.get(h),L===void 0&&(L=new Set,P.set(h,L));L.has(S)||(L.add(S),d=Ay.bind(null,d,h,S),h.then(d,d))}function Tf(d){do{var h;if((h=d.tag===13)&&(h=d.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return d;d=d.return}while(d!==null);return null}function eo(d,h,S,P,L){return(d.mode&1)===0?(d===h?d.flags|=65536:(d.flags|=128,S.flags|=131072,S.flags&=-52805,S.tag===1&&(S.alternate===null?S.tag=17:(h=us(-1,1),h.tag=2,el(S,h,1))),S.lanes|=1),d):(d.flags|=65536,d.lanes=L,d)}var Kt=s.ReactCurrentOwner,Hi=!1;function Pi(d,h,S,P){h.child=d===null?cy(h,null,S,P):bc(h,d.child,S,P)}function yy(d,h,S,P,L){S=S.render;var R=h.ref;return vc(h,L),P=Cg(d,h,S,P,R,L),S=wc(),d!==null&&!Hi?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~L,ds(d,h,L)):(Vn&&S&&_i(h),h.flags|=1,Pi(d,h,P,L),h.child)}function nl(d,h,S,P,L){if(d===null){var R=S.type;return typeof R=="function"&&!Qg(R)&&R.defaultProps===void 0&&S.compare===null&&S.defaultProps===void 0?(h.tag=15,h.type=R,by(d,h,R,P,L)):(d=Nf(S.type,null,P,h,h.mode,L),d.ref=h.ref,d.return=h,h.child=d)}if(R=d.child,(d.lanes&L)===0){var j=R.memoizedProps;if(S=S.compare,S=S!==null?S:uu,S(j,P)&&d.ref===h.ref)return ds(d,h,L)}return h.flags|=1,d=ro(R,P),d.ref=h.ref,d.return=h,h.child=d}function by(d,h,S,P,L){if(d!==null){var R=d.memoizedProps;if(uu(R,P)&&d.ref===h.ref)if(Hi=!1,h.pendingProps=P=R,(d.lanes&L)!==0)(d.flags&131072)!==0&&(Hi=!0);else return h.lanes=d.lanes,ds(d,h,L)}return Rg(d,h,S,P,L)}function Sy(d,h,S){var P=h.pendingProps,L=P.children,R=d!==null?d.memoizedState:null;if(P.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},_n(ol,to),to|=S;else{if((S&1073741824)===0)return d=R!==null?R.baseLanes|S:S,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:d,cachePool:null,transitions:null},h.updateQueue=null,_n(ol,to),to|=d,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},P=R!==null?R.baseLanes:S,_n(ol,to),to|=P}else R!==null?(P=R.baseLanes|S,h.memoizedState=null):P=S,_n(ol,to),to|=P;return Pi(d,h,L,S),h.child}function xy(d,h){var S=h.ref;(d===null&&S!==null||d!==null&&d.ref!==S)&&(h.flags|=512,h.flags|=2097152)}function Rg(d,h,S,P,L){var R=Jr(S)?Xo:Or.current;return R=Ks(h,R),vc(h,L),S=Cg(d,h,S,P,R,L),P=wc(),d!==null&&!Hi?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~L,ds(d,h,L)):(Vn&&P&&_i(h),h.flags|=1,Pi(d,h,S,L),h.child)}function wy(d,h,S,P,L){if(Jr(S)){var R=!0;ss(h)}else R=!1;if(vc(h,L),h.stateNode===null)Ma(d,h),sy(h,S,P),bg(h,S,P,L),P=!0;else if(d===null){var j=h.stateNode,se=h.memoizedProps;j.props=se;var he=j.context,ze=S.contextType;typeof ze=="object"&&ze!==null?ze=Ji(ze):(ze=Jr(S)?Xo:Or.current,ze=Ks(h,ze));var it=S.getDerivedStateFromProps,Mt=typeof it=="function"||typeof j.getSnapshotBeforeUpdate=="function";Mt||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(se!==P||he!==ze)&&ly(h,j,P,ze),ls=!1;var Ze=h.memoizedState;j.state=Ze,hp(h,P,j,L),he=h.memoizedState,se!==P||Ze!==he||Qr.current||ls?(typeof it=="function"&&(gp(h,S,it,P),he=h.memoizedState),(se=ls||yf(h,S,se,P,Ze,he,ze))?(Mt||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(h.flags|=4194308)):(typeof j.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=P,h.memoizedState=he),j.props=P,j.state=he,j.context=ze,P=se):(typeof j.componentDidMount=="function"&&(h.flags|=4194308),P=!1)}else{j=h.stateNode,oy(d,h),se=h.memoizedProps,ze=h.type===h.elementType?se:Qo(h.type,se),j.props=ze,Mt=h.pendingProps,Ze=j.context,he=S.contextType,typeof he=="object"&&he!==null?he=Ji(he):(he=Jr(S)?Xo:Or.current,he=Ks(h,he));var Un=S.getDerivedStateFromProps;(it=typeof Un=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(se!==Mt||Ze!==he)&&ly(h,j,P,he),ls=!1,Ze=h.memoizedState,j.state=Ze,hp(h,P,j,L);var Rn=h.memoizedState;se!==Mt||Ze!==Rn||Qr.current||ls?(typeof Un=="function"&&(gp(h,S,Un,P),Rn=h.memoizedState),(ze=ls||yf(h,S,ze,P,Ze,Rn,he)||!1)?(it||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(P,Rn,he),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(P,Rn,he)),typeof j.componentDidUpdate=="function"&&(h.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof j.componentDidUpdate!="function"||se===d.memoizedProps&&Ze===d.memoizedState||(h.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Ze===d.memoizedState||(h.flags|=1024),h.memoizedProps=P,h.memoizedState=Rn),j.props=P,j.state=Rn,j.context=he,P=ze):(typeof j.componentDidUpdate!="function"||se===d.memoizedProps&&Ze===d.memoizedState||(h.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Ze===d.memoizedState||(h.flags|=1024),P=!1)}return ta(d,h,S,P,R,L)}function ta(d,h,S,P,L,R){xy(d,h);var j=(h.flags&128)!==0;if(!P&&!j)return L&&of(h,S,!1),ds(d,h,R);P=h.stateNode,Kt.current=h;var se=j&&typeof S.getDerivedStateFromError!="function"?null:P.render();return h.flags|=1,d!==null&&j?(h.child=bc(h,d.child,null,R),h.child=bc(h,null,se,R)):Pi(d,h,se,R),h.memoizedState=P.state,L&&of(h,S,!0),h.child}function Cy(d){var h=d.stateNode;h.pendingContext?rf(d,h.pendingContext,h.pendingContext!==h.context):h.context&&rf(d,h.context,!1),me(d,h.containerInfo)}function _y(d,h,S,P,L){return gc(),vg(L),h.flags|=256,Pi(d,h,S,P),h.child}var Mg={dehydrated:null,treeContext:null,retryLane:0};function Ig(d){return{baseLanes:d,cachePool:null,transitions:null}}function ky(d,h,S){var P=h.pendingProps,L=Dt.current,R=!1,j=(h.flags&128)!==0,se;if((se=j)||(se=d!==null&&d.memoizedState===null?!1:(L&2)!==0),se?(R=!0,h.flags&=-129):(d===null||d.memoizedState!==null)&&(L|=1),_n(Dt,L&1),d===null)return df(h),d=h.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((h.mode&1)===0?h.lanes=1:nf(d)?h.lanes=8:h.lanes=1073741824,null):(j=P.children,d=P.fallback,R?(P=h.mode,R=h.child,j={mode:"hidden",children:j},(P&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=j):R=Up(j,P,0,null),d=fl(d,P,S,null),R.return=h,d.return=h,R.sibling=d,h.child=R,h.child.memoizedState=Ig(S),h.memoizedState=Mg,d):na(h,j));if(L=d.memoizedState,L!==null&&(se=L.dehydrated,se!==null))return yx(d,h,j,P,se,L,S);if(R){R=P.fallback,j=h.mode,L=d.child,se=L.sibling;var he={mode:"hidden",children:P.children};return(j&1)===0&&h.child!==L?(P=h.child,P.childLanes=0,P.pendingProps=he,h.deletions=null):(P=ro(L,he),P.subtreeFlags=L.subtreeFlags&14680064),se!==null?R=ro(se,R):(R=fl(R,j,S,null),R.flags|=2),R.return=h,P.return=h,P.sibling=R,h.child=P,P=R,R=h.child,j=d.child.memoizedState,j=j===null?Ig(S):{baseLanes:j.baseLanes|S,cachePool:null,transitions:j.transitions},R.memoizedState=j,R.childLanes=d.childLanes&~S,h.memoizedState=Mg,P}return R=d.child,d=R.sibling,P=ro(R,{mode:"visible",children:P.children}),(h.mode&1)===0&&(P.lanes=S),P.return=h,P.sibling=null,d!==null&&(S=h.deletions,S===null?(h.deletions=[d],h.flags|=16):S.push(d)),h.child=P,h.memoizedState=null,P}function na(d,h){return h=Up({mode:"visible",children:h},d.mode,0,null),h.return=d,d.child=h}function bp(d,h,S,P){return P!==null&&vg(P),bc(h,d.child,null,S),d=na(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function yx(d,h,S,P,L,R,j){if(S)return h.flags&256?(h.flags&=-257,P=Ag(Error(a(422))),bp(d,h,j,P)):h.memoizedState!==null?(h.child=d.child,h.flags|=128,null):(R=P.fallback,L=h.mode,P=Up({mode:"visible",children:P.children},L,0,null),R=fl(R,L,j,null),R.flags|=2,P.return=h,R.return=h,P.sibling=R,h.child=P,(h.mode&1)!==0&&bc(h,d.child,null,j),h.child.memoizedState=Ig(j),h.memoizedState=Mg,R);if((h.mode&1)===0)return bp(d,h,j,null);if(nf(L))return P=tg(L).digest,R=Error(a(419)),P=Ag(R,P,void 0),bp(d,h,j,P);if(S=(j&d.childLanes)!==0,Hi||S){if(P=Ur,P!==null){switch(j&-j){case 4:L=2;break;case 16:L=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:L=32;break;case 536870912:L=268435456;break;default:L=0}L=(L&(P.suspendedLanes|j))!==0?0:L,L!==0&&L!==R.retryLane&&(R.retryLane=L,Jo(d,L),Po(P,d,L,-1))}return Df(),P=Ag(Error(a(421))),bp(d,h,j,P)}return ac(L)?(h.flags|=128,h.child=d.child,h=_x.bind(null,d),js(L,h),null):(d=R.treeContext,vt&&(wo=ig(L),Yn=h,Vn=!0,$i=null,Co=!1,d!==null&&(yn[ei++]=Qi,yn[ei++]=La,yn[ei++]=xo,Qi=d.id,La=d.overflow,xo=h)),h=na(h,P.children),h.flags|=4096,h)}function Ey(d,h,S){d.lanes|=h;var P=d.alternate;P!==null&&(P.lanes|=h),mf(d.return,h,S)}function Dg(d,h,S,P,L){var R=d.memoizedState;R===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:P,tail:S,tailMode:L}:(R.isBackwards=h,R.rendering=null,R.renderingStartTime=0,R.last=P,R.tail=S,R.tailMode=L)}function Py(d,h,S){var P=h.pendingProps,L=P.revealOrder,R=P.tail;if(Pi(d,h,P.children,S),P=Dt.current,(P&2)!==0)P=P&1|2,h.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&Ey(d,S,h);else if(d.tag===19)Ey(d,S,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}P&=1}if(_n(Dt,P),(h.mode&1)===0)h.memoizedState=null;else switch(L){case"forwards":for(S=h.child,L=null;S!==null;)d=S.alternate,d!==null&&gn(d)===null&&(L=S),S=S.sibling;S=L,S===null?(L=h.child,h.child=null):(L=S.sibling,S.sibling=null),Dg(h,!1,L,S,R);break;case"backwards":for(S=null,L=h.child,h.child=null;L!==null;){if(d=L.alternate,d!==null&&gn(d)===null){h.child=L;break}d=L.sibling,L.sibling=S,S=L,L=d}Dg(h,!0,S,null,R);break;case"together":Dg(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Ma(d,h){(h.mode&1)===0&&d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2)}function ds(d,h,S){if(d!==null&&(h.dependencies=d.dependencies),al|=h.lanes,(S&h.childLanes)===0)return null;if(d!==null&&h.child!==d.child)throw Error(a(153));if(h.child!==null){for(d=h.child,S=ro(d,d.pendingProps),h.child=S,S.return=h;d.sibling!==null;)d=d.sibling,S=S.sibling=ro(d,d.pendingProps),S.return=h;S.sibling=null}return h.child}function bx(d,h,S){switch(h.tag){case 3:Cy(h),gc();break;case 5:Lt(h);break;case 1:Jr(h.type)&&ss(h);break;case 4:me(h,h.stateNode.containerInfo);break;case 10:iy(h,h.type._context,h.memoizedProps.value);break;case 13:var P=h.memoizedState;if(P!==null)return P.dehydrated!==null?(_n(Dt,Dt.current&1),h.flags|=128,null):(S&h.child.childLanes)!==0?ky(d,h,S):(_n(Dt,Dt.current&1),d=ds(d,h,S),d!==null?d.sibling:null);_n(Dt,Dt.current&1);break;case 19:if(P=(S&h.childLanes)!==0,(d.flags&128)!==0){if(P)return Py(d,h,S);h.flags|=128}var L=h.memoizedState;if(L!==null&&(L.rendering=null,L.tail=null,L.lastEffect=null),_n(Dt,Dt.current),P)break;return null;case 22:case 23:return h.lanes=0,Sy(d,h,S)}return ds(d,h,S)}function kr(d){d.flags|=4}function Ty(d,h){if(d!==null&&d.child===h.child)return!0;if((h.flags&16)!==0)return!1;for(d=h.child;d!==null;){if((d.flags&12854)!==0||(d.subtreeFlags&12854)!==0)return!1;d=d.sibling}return!0}var Lf,Af,Sp,xp;if(ut)Lf=function(d,h){for(var S=h.child;S!==null;){if(S.tag===5||S.tag===6)Te(d,S.stateNode);else if(S.tag!==4&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===h)break;for(;S.sibling===null;){if(S.return===null||S.return===h)return;S=S.return}S.sibling.return=S.return,S=S.sibling}},Af=function(){},Sp=function(d,h,S,P,L){if(d=d.memoizedProps,d!==P){var R=h.stateNode,j=Se(_o.current);S=ve(R,S,d,P,L,j),(h.updateQueue=S)&&kr(h)}},xp=function(d,h,S,P){S!==P&&kr(h)};else if(ft){Lf=function(d,h,S,P){for(var L=h.child;L!==null;){if(L.tag===5){var R=L.stateNode;S&&P&&(R=ep(R,L.type,L.memoizedProps,L)),Te(d,R)}else if(L.tag===6)R=L.stateNode,S&&P&&(R=tp(R,L.memoizedProps,L)),Te(d,R);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)R=L.child,R!==null&&(R.return=L),Lf(d,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===h)break;for(;L.sibling===null;){if(L.return===null||L.return===h)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};var Ng=function(d,h,S,P){for(var L=h.child;L!==null;){if(L.tag===5){var R=L.stateNode;S&&P&&(R=ep(R,L.type,L.memoizedProps,L)),Jh(d,R)}else if(L.tag===6)R=L.stateNode,S&&P&&(R=tp(R,L.memoizedProps,L)),Jh(d,R);else if(L.tag!==4){if(L.tag===22&&L.memoizedState!==null)R=L.child,R!==null&&(R.return=L),Ng(d,L,!0,!0);else if(L.child!==null){L.child.return=L,L=L.child;continue}}if(L===h)break;for(;L.sibling===null;){if(L.return===null||L.return===h)return;L=L.return}L.sibling.return=L.return,L=L.sibling}};Af=function(d,h){var S=h.stateNode;if(!Ty(d,h)){d=S.containerInfo;var P=Pa(d);Ng(P,h,!1,!1),S.pendingChildren=P,kr(h),J1(d,P)}},Sp=function(d,h,S,P,L){var R=d.stateNode,j=d.memoizedProps;if((d=Ty(d,h))&&j===P)h.stateNode=R;else{var se=h.stateNode,he=Se(_o.current),ze=null;j!==P&&(ze=ve(se,S,j,P,L,he)),d&&ze===null?h.stateNode=R:(R=Q1(R,ze,S,j,P,h,d,se),Oe(R,S,P,L,he)&&kr(h),h.stateNode=R,d?kr(h):Lf(R,h,!1,!1))}},xp=function(d,h,S,P){S!==P?(d=Se(ie.current),S=Se(_o.current),h.stateNode=Re(P,d,S,h),kr(h)):h.stateNode=d.stateNode}}else Af=function(){},Sp=function(){},xp=function(){};function Mc(d,h){if(!Vn)switch(d.tailMode){case"hidden":h=d.tail;for(var S=null;h!==null;)h.alternate!==null&&(S=h),h=h.sibling;S===null?d.tail=null:S.sibling=null;break;case"collapsed":S=d.tail;for(var P=null;S!==null;)S.alternate!==null&&(P=S),S=S.sibling;P===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:P.sibling=null}}function hi(d){var h=d.alternate!==null&&d.alternate.child===d.child,S=0,P=0;if(h)for(var L=d.child;L!==null;)S|=L.lanes|L.childLanes,P|=L.subtreeFlags&14680064,P|=L.flags&14680064,L.return=d,L=L.sibling;else for(L=d.child;L!==null;)S|=L.lanes|L.childLanes,P|=L.subtreeFlags,P|=L.flags,L.return=d,L=L.sibling;return d.subtreeFlags|=P,d.childLanes=S,h}function Sx(d,h,S){var P=h.pendingProps;switch(mg(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hi(h),null;case 1:return Jr(h.type)&&as(),hi(h),null;case 3:return S=h.stateNode,Xe(),On(Qr),On(Or),xg(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(d===null||d.child===null)&&(pc(h)?kr(h):d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,$i!==null&&(Fp($i),$i=null))),Af(d,h),hi(h),null;case 5:nn(h),S=Se(ie.current);var L=h.type;if(d!==null&&h.stateNode!=null)Sp(d,h,L,P,S),d.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!P){if(h.stateNode===null)throw Error(a(166));return hi(h),null}if(d=Se(_o.current),pc(h)){if(!vt)throw Error(a(175));d=og(h.stateNode,h.type,h.memoizedProps,S,d,h,!Co),h.updateQueue=d,d!==null&&kr(h)}else{var R=fe(L,P,S,d,h);Lf(R,h,!1,!1),h.stateNode=R,Oe(R,L,P,S,d)&&kr(h)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return hi(h),null;case 6:if(d&&h.stateNode!=null)xp(d,h,d.memoizedProps,P);else{if(typeof P!="string"&&h.stateNode===null)throw Error(a(166));if(d=Se(ie.current),S=Se(_o.current),pc(h)){if(!vt)throw Error(a(176));if(d=h.stateNode,S=h.memoizedProps,(P=is(d,S,h,!Co))&&(L=Yn,L!==null))switch(L.tag){case 3:fg(L.stateNode.containerInfo,d,S,(L.mode&1)!==0);break;case 5:os(L.type,L.memoizedProps,L.stateNode,d,S,(L.mode&1)!==0)}P&&kr(h)}else h.stateNode=Re(P,d,S,h)}return hi(h),null;case 13:if(On(Dt),P=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(Vn&&wo!==null&&(h.mode&1)!==0&&(h.flags&128)===0)ny(),gc(),h.flags|=98560,L=!1;else if(L=pc(h),P!==null&&P.dehydrated!==null){if(d===null){if(!L)throw Error(a(318));if(!vt)throw Error(a(344));if(L=h.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error(a(317));ag(L,h)}else gc(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;hi(h),L=!1}else $i!==null&&(Fp($i),$i=null),L=!0;if(!L)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=S,h):(S=P!==null,S!==(d!==null&&d.memoizedState!==null)&&S&&(h.child.flags|=8192,(h.mode&1)!==0&&(d===null||(Dt.current&1)!==0?Pr===0&&(Pr=3):Df())),h.updateQueue!==null&&(h.flags|=4),hi(h),null);case 4:return Xe(),Af(d,h),d===null&&at(h.stateNode.containerInfo),hi(h),null;case 10:return gf(h.type._context),hi(h),null;case 17:return Jr(h.type)&&as(),hi(h),null;case 19:if(On(Dt),L=h.memoizedState,L===null)return hi(h),null;if(P=(h.flags&128)!==0,R=L.rendering,R===null)if(P)Mc(L,!1);else{if(Pr!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(R=gn(d),R!==null){for(h.flags|=128,Mc(L,!1),d=R.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),h.subtreeFlags=0,d=S,S=h.child;S!==null;)P=S,L=d,P.flags&=14680066,R=P.alternate,R===null?(P.childLanes=0,P.lanes=L,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null):(P.childLanes=R.childLanes,P.lanes=R.lanes,P.child=R.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=R.memoizedProps,P.memoizedState=R.memoizedState,P.updateQueue=R.updateQueue,P.type=R.type,L=R.dependencies,P.dependencies=L===null?null:{lanes:L.lanes,firstContext:L.firstContext}),S=S.sibling;return _n(Dt,Dt.current&1|2),h.child}d=d.sibling}L.tail!==null&&qn()>Dp&&(h.flags|=128,P=!0,Mc(L,!1),h.lanes=4194304)}else{if(!P)if(d=gn(R),d!==null){if(h.flags|=128,P=!0,d=d.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),Mc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!R.alternate&&!Vn)return hi(h),null}else 2*qn()-L.renderingStartTime>Dp&&S!==1073741824&&(h.flags|=128,P=!0,Mc(L,!1),h.lanes=4194304);L.isBackwards?(R.sibling=h.child,h.child=R):(d=L.last,d!==null?d.sibling=R:h.child=R,L.last=R)}return L.tail!==null?(h=L.tail,L.rendering=h,L.tail=h.sibling,L.renderingStartTime=qn(),h.sibling=null,d=Dt.current,_n(Dt,P?d&1|2:d&1),h):(hi(h),null);case 22:case 23:return Vc(),S=h.memoizedState!==null,d!==null&&d.memoizedState!==null!==S&&(h.flags|=8192),S&&(h.mode&1)!==0?(to&1073741824)!==0&&(hi(h),ut&&h.subtreeFlags&6&&(h.flags|=8192)):hi(h),null;case 24:return null;case 25:return null}throw Error(a(156,h.tag))}function Bg(d,h){switch(mg(h),h.tag){case 1:return Jr(h.type)&&as(),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return Xe(),On(Qr),On(Or),xg(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 5:return nn(h),null;case 13:if(On(Dt),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(a(340));gc()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return On(Dt),null;case 4:return Xe(),null;case 10:return gf(h.type._context),null;case 22:case 23:return Vc(),null;case 24:return null;default:return null}}var rl=!1,Mr=!1,xx=typeof WeakSet=="function"?WeakSet:Set,et=null;function Ic(d,h){var S=d.ref;if(S!==null)if(typeof S=="function")try{S(null)}catch(P){Kn(d,h,P)}else S.current=null}function ra(d,h,S){try{S()}catch(P){Kn(d,h,P)}}var wp=!1;function pu(d,h){for(Q(d.containerInfo),et=h;et!==null;)if(d=et,h=d.child,(d.subtreeFlags&1028)!==0&&h!==null)h.return=d,et=h;else for(;et!==null;){d=et;try{var S=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var P=S.memoizedProps,L=S.memoizedState,R=d.stateNode,j=R.getSnapshotBeforeUpdate(d.elementType===d.type?P:Qo(d.type,P),L);R.__reactInternalSnapshotBeforeUpdate=j}break;case 3:ut&&Go(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Kn(d,d.return,se)}if(h=d.sibling,h!==null){h.return=d.return,et=h;break}et=d.return}return S=wp,wp=!1,S}function pi(d,h,S){var P=h.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var L=P=P.next;do{if((L.tag&d)===d){var R=L.destroy;L.destroy=void 0,R!==void 0&&ra(h,S,R)}L=L.next}while(L!==P)}}function Cp(d,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var S=h=h.next;do{if((S.tag&d)===d){var P=S.create;S.destroy=P()}S=S.next}while(S!==h)}}function _p(d){var h=d.ref;if(h!==null){var S=d.stateNode;switch(d.tag){case 5:d=K(S);break;default:d=S}typeof h=="function"?h(d):h.current=d}}function zg(d){var h=d.alternate;h!==null&&(d.alternate=null,zg(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&tt(h)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function Dc(d){return d.tag===5||d.tag===3||d.tag===4}function fs(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||Dc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function kp(d,h,S){var P=d.tag;if(P===5||P===6)d=d.stateNode,h?Be(S,d,h):Ct(S,d);else if(P!==4&&(d=d.child,d!==null))for(kp(d,h,S),d=d.sibling;d!==null;)kp(d,h,S),d=d.sibling}function $g(d,h,S){var P=d.tag;if(P===5||P===6)d=d.stateNode,h?hn(S,d,h):Ee(S,d);else if(P!==4&&(d=d.child,d!==null))for($g(d,h,S),d=d.sibling;d!==null;)$g(d,h,S),d=d.sibling}var Er=null,ia=!1;function oa(d,h,S){for(S=S.child;S!==null;)Ir(d,h,S),S=S.sibling}function Ir(d,h,S){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(pn,S)}catch(se){}switch(S.tag){case 5:Mr||Ic(S,h);case 6:if(ut){var P=Er,L=ia;Er=null,oa(d,h,S),Er=P,ia=L,Er!==null&&(ia?rt(Er,S.stateNode):gt(Er,S.stateNode))}else oa(d,h,S);break;case 18:ut&&Er!==null&&(ia?dg(Er,S.stateNode):cg(Er,S.stateNode));break;case 4:ut?(P=Er,L=ia,Er=S.stateNode.containerInfo,ia=!0,oa(d,h,S),Er=P,ia=L):(ft&&(P=S.stateNode.containerInfo,L=Pa(P),oc(P,L)),oa(d,h,S));break;case 0:case 11:case 14:case 15:if(!Mr&&(P=S.updateQueue,P!==null&&(P=P.lastEffect,P!==null))){L=P=P.next;do{var R=L,j=R.destroy;R=R.tag,j!==void 0&&((R&2)!==0||(R&4)!==0)&&ra(S,h,j),L=L.next}while(L!==P)}oa(d,h,S);break;case 1:if(!Mr&&(Ic(S,h),P=S.stateNode,typeof P.componentWillUnmount=="function"))try{P.props=S.memoizedProps,P.state=S.memoizedState,P.componentWillUnmount()}catch(se){Kn(S,h,se)}oa(d,h,S);break;case 21:oa(d,h,S);break;case 22:S.mode&1?(Mr=(P=Mr)||S.memoizedState!==null,oa(d,h,S),Mr=P):oa(d,h,S);break;default:oa(d,h,S)}}function Ep(d){var h=d.updateQueue;if(h!==null){d.updateQueue=null;var S=d.stateNode;S===null&&(S=d.stateNode=new xx),h.forEach(function(P){var L=Oy.bind(null,d,P);S.has(P)||(S.add(P),P.then(L,L))})}}function ko(d,h){var S=h.deletions;if(S!==null)for(var P=0;P<S.length;P++){var L=S[P];try{var R=d,j=h;if(ut){var se=j;e:for(;se!==null;){switch(se.tag){case 5:Er=se.stateNode,ia=!1;break e;case 3:Er=se.stateNode.containerInfo,ia=!0;break e;case 4:Er=se.stateNode.containerInfo,ia=!0;break e}se=se.return}if(Er===null)throw Error(a(160));Ir(R,j,L),Er=null,ia=!1}else Ir(R,j,L);var he=L.alternate;he!==null&&(he.return=null),L.return=null}catch(ze){Kn(L,h,ze)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)aa(h,d),h=h.sibling}function aa(d,h){var S=d.alternate,P=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(ko(h,d),Eo(d),P&4){try{pi(3,d,d.return),Cp(3,d)}catch(Ze){Kn(d,d.return,Ze)}try{pi(5,d,d.return)}catch(Ze){Kn(d,d.return,Ze)}}break;case 1:ko(h,d),Eo(d),P&512&&S!==null&&Ic(S,S.return);break;case 5:if(ko(h,d),Eo(d),P&512&&S!==null&&Ic(S,S.return),ut){if(d.flags&32){var L=d.stateNode;try{Bt(L)}catch(Ze){Kn(d,d.return,Ze)}}if(P&4&&(L=d.stateNode,L!=null)){var R=d.memoizedProps;if(S=S!==null?S.memoizedProps:R,P=d.type,h=d.updateQueue,d.updateQueue=null,h!==null)try{ct(L,h,P,S,R,d)}catch(Ze){Kn(d,d.return,Ze)}}}break;case 6:if(ko(h,d),Eo(d),P&4&&ut){if(d.stateNode===null)throw Error(a(162));L=d.stateNode,R=d.memoizedProps,S=S!==null?S.memoizedProps:R;try{Wt(L,S,R)}catch(Ze){Kn(d,d.return,Ze)}}break;case 3:if(ko(h,d),Eo(d),P&4){if(ut&&vt&&S!==null&&S.memoizedState.isDehydrated)try{lg(h.containerInfo)}catch(Ze){Kn(d,d.return,Ze)}if(ft){L=h.containerInfo,R=h.pendingChildren;try{oc(L,R)}catch(Ze){Kn(d,d.return,Ze)}}}break;case 4:if(ko(h,d),Eo(d),P&4&&ft){R=d.stateNode,L=R.containerInfo,R=R.pendingChildren;try{oc(L,R)}catch(Ze){Kn(d,d.return,Ze)}}break;case 13:ko(h,d),Eo(d),L=d.child,L.flags&8192&&(R=L.memoizedState!==null,L.stateNode.isHidden=R,!R||L.alternate!==null&&L.alternate.memoizedState!==null||(jg=qn())),P&4&&Ep(d);break;case 22:var j=S!==null&&S.memoizedState!==null;if(d.mode&1?(Mr=(S=Mr)||j,ko(h,d),Mr=S):ko(h,d),Eo(d),P&8192){if(S=d.memoizedState!==null,(d.stateNode.isHidden=S)&&!j&&(d.mode&1)!==0)for(et=d,P=d.child;P!==null;){for(h=et=P;et!==null;){j=et;var se=j.child;switch(j.tag){case 0:case 11:case 14:case 15:pi(4,j,j.return);break;case 1:Ic(j,j.return);var he=j.stateNode;if(typeof he.componentWillUnmount=="function"){var ze=j,it=j.return;try{var Mt=ze;he.props=Mt.memoizedProps,he.state=Mt.memoizedState,he.componentWillUnmount()}catch(Ze){Kn(ze,it,Ze)}}break;case 5:Ic(j,j.return);break;case 22:if(j.memoizedState!==null){gi(h);continue}}se!==null?(se.return=j,et=se):gi(h)}P=P.sibling}if(ut){e:if(P=null,ut)for(h=d;;){if(h.tag===5){if(P===null){P=h;try{L=h.stateNode,S?ln(L):sr(h.stateNode,h.memoizedProps)}catch(Ze){Kn(d,d.return,Ze)}}}else if(h.tag===6){if(P===null)try{R=h.stateNode,S?wr(R):Vr(R,h.memoizedProps)}catch(Ze){Kn(d,d.return,Ze)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;P===h&&(P=null),h=h.return}P===h&&(P=null),h.sibling.return=h.return,h=h.sibling}}}break;case 19:ko(h,d),Eo(d),P&4&&Ep(d);break;case 21:break;default:ko(h,d),Eo(d)}}function Eo(d){var h=d.flags;if(h&2){try{if(ut){e:{for(var S=d.return;S!==null;){if(Dc(S)){var P=S;break e}S=S.return}throw Error(a(160))}switch(P.tag){case 5:var L=P.stateNode;P.flags&32&&(Bt(L),P.flags&=-33);var R=fs(d);$g(d,R,L);break;case 3:case 4:var j=P.stateNode.containerInfo,se=fs(d);kp(d,se,j);break;default:throw Error(a(161))}}}catch(he){Kn(d,d.return,he)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function Pp(d,h,S){et=d,il(d)}function il(d,h,S){for(var P=(d.mode&1)!==0;et!==null;){var L=et,R=L.child;if(L.tag===22&&P){var j=L.memoizedState!==null||rl;if(!j){var se=L.alternate,he=se!==null&&se.memoizedState!==null||Mr;se=rl;var ze=Mr;if(rl=j,(Mr=he)&&!ze)for(et=L;et!==null;)j=et,he=j.child,j.tag===22&&j.memoizedState!==null?Tp(L):he!==null?(he.return=j,et=he):Tp(L);for(;R!==null;)et=R,il(R),R=R.sibling;et=L,rl=se,Mr=ze}Fg(d)}else(L.subtreeFlags&8772)!==0&&R!==null?(R.return=L,et=R):Fg(d)}}function Fg(d){for(;et!==null;){var h=et;if((h.flags&8772)!==0){var S=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:Mr||Cp(5,h);break;case 1:var P=h.stateNode;if(h.flags&4&&!Mr)if(S===null)P.componentDidMount();else{var L=h.elementType===h.type?S.memoizedProps:Qo(h.type,S.memoizedProps);P.componentDidUpdate(L,S.memoizedState,P.__reactInternalSnapshotBeforeUpdate)}var R=h.updateQueue;R!==null&&ay(h,R,P);break;case 3:var j=h.updateQueue;if(j!==null){if(S=null,h.child!==null)switch(h.child.tag){case 5:S=K(h.child.stateNode);break;case 1:S=h.child.stateNode}ay(h,j,S)}break;case 5:var se=h.stateNode;S===null&&h.flags&4&&$e(se,h.type,h.memoizedProps,h);break;case 6:break;case 4:break;case 12:break;case 13:if(vt&&h.memoizedState===null){var he=h.alternate;if(he!==null){var ze=he.memoizedState;if(ze!==null){var it=ze.dehydrated;it!==null&&ug(it)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Mr||h.flags&512&&_p(h)}catch(Mt){Kn(h,h.return,Mt)}}if(h===d){et=null;break}if(S=h.sibling,S!==null){S.return=h.return,et=S;break}et=h.return}}function gi(d){for(;et!==null;){var h=et;if(h===d){et=null;break}var S=h.sibling;if(S!==null){S.return=h.return,et=S;break}et=h.return}}function Tp(d){for(;et!==null;){var h=et;try{switch(h.tag){case 0:case 11:case 15:var S=h.return;try{Cp(4,h)}catch(he){Kn(h,S,he)}break;case 1:var P=h.stateNode;if(typeof P.componentDidMount=="function"){var L=h.return;try{P.componentDidMount()}catch(he){Kn(h,L,he)}}var R=h.return;try{_p(h)}catch(he){Kn(h,R,he)}break;case 5:var j=h.return;try{_p(h)}catch(he){Kn(h,j,he)}}}catch(he){Kn(h,h.return,he)}if(h===d){et=null;break}var se=h.sibling;if(se!==null){se.return=h.return,et=se;break}et=h.return}}var Lp=0,Ap=1,Op=2,Nc=3,Rp=4;if(typeof Symbol=="function"&&Symbol.for){var hs=Symbol.for;Lp=hs("selector.component"),Ap=hs("selector.has_pseudo_class"),Op=hs("selector.role"),Nc=hs("selector.test_id"),Rp=hs("selector.text")}function Mp(d){var h=ke(d);if(h!=null){if(typeof h.memoizedProps["data-testname"]!="string")throw Error(a(364));return h}if(d=Yt(d),d===null)throw Error(a(362));return d.stateNode.current}function Hg(d,h){switch(h.$$typeof){case Lp:if(d.type===h.value)return!0;break;case Ap:e:{h=h.value,d=[d,0];for(var S=0;S<d.length;){var P=d[S++],L=d[S++],R=h[L];if(P.tag!==5||!De(P)){for(;R!=null&&Hg(P,R);)L++,R=h[L];if(L===h.length){h=!0;break e}else for(P=P.child;P!==null;)d.push(P,L),P=P.sibling}}h=!1}return h;case Op:if(d.tag===5&&nt(d.stateNode,h.value))return!0;break;case Rp:if((d.tag===5||d.tag===6)&&(d=Cn(d),d!==null&&0<=d.indexOf(h.value)))return!0;break;case Nc:if(d.tag===5&&(d=d.memoizedProps["data-testname"],typeof d=="string"&&d.toLowerCase()===h.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function Vg(d){switch(d.$$typeof){case Lp:return"<"+(D(d.value)||"Unknown")+">";case Ap:return":has("+(Vg(d)||"")+")";case Op:return'[role="'+d.value+'"]';case Rp:return'"'+d.value+'"';case Nc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function Bc(d,h){var S=[];d=[d,0];for(var P=0;P<d.length;){var L=d[P++],R=d[P++],j=h[R];if(L.tag!==5||!De(L)){for(;j!=null&&Hg(L,j);)R++,j=h[R];if(R===h.length)S.push(L);else for(L=L.child;L!==null;)d.push(L,R),L=L.sibling}}return S}function Wg(d,h){if(!Pt)throw Error(a(363));d=Mp(d),d=Bc(d,h),h=[],d=Array.from(d);for(var S=0;S<d.length;){var P=d[S++];if(P.tag===5)De(P)||h.push(P.stateNode);else for(P=P.child;P!==null;)d.push(P),P=P.sibling}return h}var wx=Math.ceil,zc=s.ReactCurrentDispatcher,Ip=s.ReactCurrentOwner,ur=s.ReactCurrentBatchConfig,Ft=0,Ur=null,cr=null,Dr=0,to=0,ol=Yo(0),Pr=0,$c=null,al=0,gu=0,Ug=0,Fc=null,Ti=null,jg=0,Dp=1/0,ps=null;function sl(){Dp=qn()+500}var Of=!1,Rf=null,ll=null,Hc=!1,Tt=null,Np=0,Mf=0,mu=null,If=-1,Bp=0;function mi(){return(Ft&6)!==0?qn():If!==-1?If:If=qn()}function Nr(d){return(d.mode&1)===0?1:(Ft&2)!==0&&Dr!==0?Dr&-Dr:ry.transition!==null?(Bp===0&&(Bp=sf()),Bp):(d=Ut,d!==0?d:Rt())}function Po(d,h,S,P){if(50<Mf)throw Mf=0,mu=null,Error(a(185));Ta(d,S,P),((Ft&2)===0||d!==Ur)&&(d===Ur&&((Ft&2)===0&&(gu|=S),Pr===4&&Li(d,Dr)),ri(d,P),S===1&&Ft===0&&(h.mode&1)===0&&(sl(),pe&&St()))}function ri(d,h){var S=d.callbackNode;uc(d,h);var P=su(d,d===Ur?Dr:0);if(P===0)S!==null&&hc(S),d.callbackNode=null,d.callbackPriority=0;else if(h=P&-P,d.callbackPriority!==h){if(S!=null&&hc(S),h===1)d.tag===0?vn(Hp.bind(null,d)):$t(Hp.bind(null,d)),yt?dn(function(){(Ft&6)===0&&St()}):fc(uf,St),S=null;else{switch(op(P)){case 1:S=uf;break;case 4:S=sp;break;case 16:S=cf;break;case 536870912:S=lp;break;default:S=cf}S=Ai(S,zp.bind(null,d))}d.callbackPriority=h,d.callbackNode=S}}function zp(d,h){if(If=-1,Bp=0,(Ft&6)!==0)throw Error(a(327));var S=d.callbackNode;if(vu()&&d.callbackNode!==S)return null;var P=su(d,d===Ur?Dr:0);if(P===0)return null;if((P&30)!==0||(P&d.expiredLanes)!==0||h)h=Wc(d,P);else{h=P;var L=Ft;Ft|=2;var R=qg();(Ur!==d||Dr!==h)&&(ps=null,sl(),ul(d,h));do try{Cx();break}catch(se){Vp(d,se)}while(1);dp(),zc.current=R,Ft=L,cr!==null?h=0:(Ur=null,Dr=0,h=Pr)}if(h!==0){if(h===2&&(L=cc(d),L!==0&&(P=L,h=$p(d,L))),h===1)throw S=$c,ul(d,0),Li(d,P),ri(d,qn()),S;if(h===6)Li(d,P);else{if(L=d.current.alternate,(P&30)===0&&!no(L)&&(h=Wc(d,P),h===2&&(R=cc(d),R!==0&&(P=R,h=$p(d,R))),h===1))throw S=$c,ul(d,0),Li(d,P),ri(d,qn()),S;switch(d.finishedWork=L,d.finishedLanes=P,h){case 0:case 1:throw Error(a(345));case 2:dl(d,Ti,ps);break;case 3:if(Li(d,P),(P&130023424)===P&&(h=jg+500-qn(),10<h)){if(su(d,0)!==0)break;if(L=d.suspendedLanes,(L&P)!==P){mi(),d.pingedLanes|=d.suspendedLanes&L;break}d.timeoutHandle=Ye(dl.bind(null,d,Ti,ps),h);break}dl(d,Ti,ps);break;case 4:if(Li(d,P),(P&4194240)===P)break;for(h=d.eventTimes,L=-1;0<P;){var j=31-Ci(P);R=1<<j,j=h[j],j>L&&(L=j),P&=~R}if(P=L,P=qn()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*wx(P/1960))-P,10<P){d.timeoutHandle=Ye(dl.bind(null,d,Ti,ps),P);break}dl(d,Ti,ps);break;case 5:dl(d,Ti,ps);break;default:throw Error(a(329))}}}return ri(d,qn()),d.callbackNode===S?zp.bind(null,d):null}function $p(d,h){var S=Fc;return d.current.memoizedState.isDehydrated&&(ul(d,h).flags|=256),d=Wc(d,h),d!==2&&(h=Ti,Ti=S,h!==null&&Fp(h)),d}function Fp(d){Ti===null?Ti=d:Ti.push.apply(Ti,d)}function no(d){for(var h=d;;){if(h.flags&16384){var S=h.updateQueue;if(S!==null&&(S=S.stores,S!==null))for(var P=0;P<S.length;P++){var L=S[P],R=L.getSnapshot;L=L.value;try{if(!q(R(),L))return!1}catch(j){return!1}}}if(S=h.child,h.subtreeFlags&16384&&S!==null)S.return=h,h=S;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Li(d,h){for(h&=~Ug,h&=~gu,d.suspendedLanes|=h,d.pingedLanes&=~h,d=d.expirationTimes;0<h;){var S=31-Ci(h),P=1<<S;d[S]=-1,h&=~P}}function Hp(d){if((Ft&6)!==0)throw Error(a(327));vu();var h=su(d,0);if((h&1)===0)return ri(d,qn()),null;var S=Wc(d,h);if(d.tag!==0&&S===2){var P=cc(d);P!==0&&(h=P,S=$p(d,P))}if(S===1)throw S=$c,ul(d,0),Li(d,h),ri(d,qn()),S;if(S===6)throw Error(a(345));return d.finishedWork=d.current.alternate,d.finishedLanes=h,dl(d,Ti,ps),ri(d,qn()),null}function Gg(d){Tt!==null&&Tt.tag===0&&(Ft&6)===0&&vu();var h=Ft;Ft|=1;var S=ur.transition,P=Ut;try{if(ur.transition=null,Ut=1,d)return d()}finally{Ut=P,ur.transition=S,Ft=h,(Ft&6)===0&&St()}}function Vc(){to=ol.current,On(ol)}function ul(d,h){d.finishedWork=null,d.finishedLanes=0;var S=d.timeoutHandle;if(S!==pt&&(d.timeoutHandle=pt,Ue(S)),cr!==null)for(S=cr.return;S!==null;){var P=S;switch(mg(P),P.tag){case 1:P=P.type.childContextTypes,P!=null&&as();break;case 3:Xe(),On(Qr),On(Or),xg();break;case 5:nn(P);break;case 4:Xe();break;case 13:On(Dt);break;case 19:On(Dt);break;case 10:gf(P.type._context);break;case 22:case 23:Vc()}S=S.return}if(Ur=d,cr=d=ro(d.current,null),Dr=to=h,Pr=0,$c=null,Ug=gu=al=0,Ti=Fc=null,Rr!==null){for(h=0;h<Rr.length;h++)if(S=Rr[h],P=S.interleaved,P!==null){S.interleaved=null;var L=P.next,R=S.pending;if(R!==null){var j=R.next;R.next=L,P.next=j}S.pending=P}Rr=null}return d}function Vp(d,h){do{var S=cr;try{if(dp(),ki.current=cs,an){for(var P=kn.memoizedState;P!==null;){var L=P.queue;L!==null&&(L.pending=null),P=P.next}an=!1}if(du=0,lr=rr=kn=null,xf=!1,xc=0,Ip.current=null,S===null||S.return===null){Pr=1,$c=h,cr=null;break}e:{var R=d,j=S.return,se=S,he=h;if(h=Dr,se.flags|=32768,he!==null&&typeof he=="object"&&typeof he.then=="function"){var ze=he,it=se,Mt=it.tag;if((it.mode&1)===0&&(Mt===0||Mt===11||Mt===15)){var Ze=it.alternate;Ze?(it.updateQueue=Ze.updateQueue,it.memoizedState=Ze.memoizedState,it.lanes=Ze.lanes):(it.updateQueue=null,it.memoizedState=null)}var Un=Tf(j);if(Un!==null){Un.flags&=-257,eo(Un,j,se,R,h),Un.mode&1&&hu(R,ze,h),h=Un,he=ze;var Rn=h.updateQueue;if(Rn===null){var ir=new Set;ir.add(he),h.updateQueue=ir}else Rn.add(he);break e}else{if((h&1)===0){hu(R,ze,h),Df();break e}he=Error(a(426))}}else if(Vn&&se.mode&1){var sa=Tf(j);if(sa!==null){(sa.flags&65536)===0&&(sa.flags|=256),eo(sa,j,se,R,h),vg(Oc(he,se));break e}}R=he=Oc(he,se),Pr!==4&&(Pr=2),Fc===null?Fc=[R]:Fc.push(R),R=j;do{switch(R.tag){case 3:R.flags|=65536,h&=-h,R.lanes|=h;var ge=Og(R,he,h);cu(R,ge);break e;case 1:se=he;var le=R.type,be=R.stateNode;if((R.flags&128)===0&&(typeof le.getDerivedStateFromError=="function"||be!==null&&typeof be.componentDidCatch=="function"&&(ll===null||!ll.has(be)))){R.flags|=65536,h&=-h,R.lanes|=h;var qe=$(R,se,h);cu(R,qe);break e}}R=R.return}while(R!==null)}Yg(S)}catch(Le){h=Le,cr===S&&S!==null&&(cr=S=S.return);continue}break}while(1)}function qg(){var d=zc.current;return zc.current=cs,d===null?cs:d}function Df(){(Pr===0||Pr===3||Pr===2)&&(Pr=4),Ur===null||(al&268435455)===0&&(gu&268435455)===0||Li(Ur,Dr)}function Wc(d,h){var S=Ft;Ft|=2;var P=qg();(Ur!==d||Dr!==h)&&(ps=null,ul(d,h));do try{cl();break}catch(L){Vp(d,L)}while(1);if(dp(),Ft=S,zc.current=P,cr!==null)throw Error(a(261));return Ur=null,Dr=0,Pr}function cl(){for(;cr!==null;)gs(cr)}function Cx(){for(;cr!==null&&!ap();)gs(cr)}function gs(d){var h=Zg(d.alternate,d,to);d.memoizedProps=d.pendingProps,h===null?Yg(d):cr=h,Ip.current=null}function Yg(d){var h=d;do{var S=h.alternate;if(d=h.return,(h.flags&32768)===0){if(S=Sx(S,h,to),S!==null){cr=S;return}}else{if(S=Bg(S,h),S!==null){S.flags&=32767,cr=S;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{Pr=6,cr=null;return}}if(h=h.sibling,h!==null){cr=h;return}cr=h=d}while(h!==null);Pr===0&&(Pr=5)}function dl(d,h,S){var P=Ut,L=ur.transition;try{ur.transition=null,Ut=1,Kg(d,h,S,P)}finally{ur.transition=L,Ut=P}return null}function Kg(d,h,S,P){do vu();while(Tt!==null);if((Ft&6)!==0)throw Error(a(327));S=d.finishedWork;var L=d.finishedLanes;if(S===null)return null;if(d.finishedWork=null,d.finishedLanes=0,S===d.current)throw Error(a(177));d.callbackNode=null,d.callbackPriority=0;var R=S.lanes|S.childLanes;if(lf(d,R),d===Ur&&(cr=Ur=null,Dr=0),(S.subtreeFlags&2064)===0&&(S.flags&2064)===0||Hc||(Hc=!0,Ai(cf,function(){return vu(),null})),R=(S.flags&15990)!==0,(S.subtreeFlags&15990)!==0||R){R=ur.transition,ur.transition=null;var j=Ut;Ut=1;var se=Ft;Ft|=4,Ip.current=null,pu(d,S),aa(S,d),ue(d.containerInfo),d.current=S,Pp(S),Zo(),Ft=se,Ut=j,ur.transition=R}else d.current=S;if(Hc&&(Hc=!1,Tt=d,Np=L),R=d.pendingLanes,R===0&&(ll=null),up(S.stateNode),ri(d,qn()),h!==null)for(P=d.onRecoverableError,S=0;S<h.length;S++)L=h[S],P(L.value,{componentStack:L.stack,digest:L.digest});if(Of)throw Of=!1,d=Rf,Rf=null,d;return(Np&1)!==0&&d.tag!==0&&vu(),R=d.pendingLanes,(R&1)!==0?d===mu?Mf++:(Mf=0,mu=d):Mf=0,St(),null}function vu(){if(Tt!==null){var d=op(Np),h=ur.transition,S=Ut;try{if(ur.transition=null,Ut=16>d?16:d,Tt===null)var P=!1;else{if(d=Tt,Tt=null,Np=0,(Ft&6)!==0)throw Error(a(331));var L=Ft;for(Ft|=4,et=d.current;et!==null;){var R=et,j=R.child;if((et.flags&16)!==0){var se=R.deletions;if(se!==null){for(var he=0;he<se.length;he++){var ze=se[he];for(et=ze;et!==null;){var it=et;switch(it.tag){case 0:case 11:case 15:pi(8,it,R)}var Mt=it.child;if(Mt!==null)Mt.return=it,et=Mt;else for(;et!==null;){it=et;var Ze=it.sibling,Un=it.return;if(zg(it),it===ze){et=null;break}if(Ze!==null){Ze.return=Un,et=Ze;break}et=Un}}}var Rn=R.alternate;if(Rn!==null){var ir=Rn.child;if(ir!==null){Rn.child=null;do{var sa=ir.sibling;ir.sibling=null,ir=sa}while(ir!==null)}}et=R}}if((R.subtreeFlags&2064)!==0&&j!==null)j.return=R,et=j;else e:for(;et!==null;){if(R=et,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:pi(9,R,R.return)}var ge=R.sibling;if(ge!==null){ge.return=R.return,et=ge;break e}et=R.return}}var le=d.current;for(et=le;et!==null;){j=et;var be=j.child;if((j.subtreeFlags&2064)!==0&&be!==null)be.return=j,et=be;else e:for(j=le;et!==null;){if(se=et,(se.flags&2048)!==0)try{switch(se.tag){case 0:case 11:case 15:Cp(9,se)}}catch(Le){Kn(se,se.return,Le)}if(se===j){et=null;break e}var qe=se.sibling;if(qe!==null){qe.return=se.return,et=qe;break e}et=se.return}}if(Ft=L,St(),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(pn,d)}catch(Le){}P=!0}return P}finally{Ut=S,ur.transition=h}}return!1}function Ly(d,h,S){h=Oc(S,h),h=Og(d,h,1),d=el(d,h,1),h=mi(),d!==null&&(Ta(d,1,h),ri(d,h))}function Kn(d,h,S){if(d.tag===3)Ly(d,d,S);else for(;h!==null;){if(h.tag===3){Ly(h,d,S);break}else if(h.tag===1){var P=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof P.componentDidCatch=="function"&&(ll===null||!ll.has(P))){d=Oc(S,d),d=$(h,d,1),h=el(h,d,1),d=mi(),h!==null&&(Ta(h,1,d),ri(h,d));break}}h=h.return}}function Ay(d,h,S){var P=d.pingCache;P!==null&&P.delete(h),h=mi(),d.pingedLanes|=d.suspendedLanes&S,Ur===d&&(Dr&S)===S&&(Pr===4||Pr===3&&(Dr&130023424)===Dr&&500>qn()-jg?ul(d,0):Ug|=S),ri(d,h)}function Xg(d,h){h===0&&((d.mode&1)===0?h=1:(h=So,So<<=1,(So&130023424)===0&&(So=4194304)));var S=mi();d=Jo(d,h),d!==null&&(Ta(d,h,S),ri(d,S))}function _x(d){var h=d.memoizedState,S=0;h!==null&&(S=h.retryLane),Xg(d,S)}function Oy(d,h){var S=0;switch(d.tag){case 13:var P=d.stateNode,L=d.memoizedState;L!==null&&(S=L.retryLane);break;case 19:P=d.stateNode;break;default:throw Error(a(314))}P!==null&&P.delete(h),Xg(d,S)}var Zg;Zg=function(d,h,S){if(d!==null)if(d.memoizedProps!==h.pendingProps||Qr.current)Hi=!0;else{if((d.lanes&S)===0&&(h.flags&128)===0)return Hi=!1,bx(d,h,S);Hi=(d.flags&131072)!==0}else Hi=!1,Vn&&(h.flags&1048576)!==0&&gg(h,Cr,h.index);switch(h.lanes=0,h.tag){case 2:var P=h.type;Ma(d,h),d=h.pendingProps;var L=Ks(h,Or.current);vc(h,S),L=Cg(null,h,P,d,L,S);var R=wc();return h.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,Jr(P)?(R=!0,ss(h)):R=!1,h.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,yg(h),L.updater=ea,h.stateNode=L,L._reactInternals=h,bg(h,P,d,S),h=ta(null,h,P,!0,R,S)):(h.tag=0,Vn&&R&&_i(h),Pi(null,h,L,S),h=h.child),h;case 16:P=h.elementType;e:{switch(Ma(d,h),d=h.pendingProps,L=P._init,P=L(P._payload),h.type=P,L=h.tag=Wp(P),d=Qo(P,d),L){case 0:h=Rg(null,h,P,d,S);break e;case 1:h=wy(null,h,P,d,S);break e;case 11:h=yy(null,h,P,d,S);break e;case 14:h=nl(null,h,P,Qo(P.type,d),S);break e}throw Error(a(306,P,""))}return h;case 0:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:Qo(P,L),Rg(d,h,P,L,S);case 1:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:Qo(P,L),wy(d,h,P,L,S);case 3:e:{if(Cy(h),d===null)throw Error(a(387));P=h.pendingProps,R=h.memoizedState,L=R.element,oy(d,h),hp(h,P,null,S);var j=h.memoizedState;if(P=j.element,vt&&R.isDehydrated)if(R={element:P,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},h.updateQueue.baseState=R,h.memoizedState=R,h.flags&256){L=Oc(Error(a(423)),h),h=_y(d,h,P,S,L);break e}else if(P!==L){L=Oc(Error(a(424)),h),h=_y(d,h,P,S,L);break e}else for(vt&&(wo=rg(h.stateNode.containerInfo),Yn=h,Vn=!0,$i=null,Co=!1),S=cy(h,null,P,S),h.child=S;S;)S.flags=S.flags&-3|4096,S=S.sibling;else{if(gc(),P===L){h=ds(d,h,S);break e}Pi(d,h,P,S)}h=h.child}return h;case 5:return Lt(h),d===null&&df(h),P=h.type,L=h.pendingProps,R=d!==null?d.memoizedProps:null,j=L.children,Ce(P,L)?j=null:R!==null&&Ce(P,R)&&(h.flags|=32),xy(d,h),Pi(d,h,j,S),h.child;case 6:return d===null&&df(h),null;case 13:return ky(d,h,S);case 4:return me(h,h.stateNode.containerInfo),P=h.pendingProps,d===null?h.child=bc(h,null,P,S):Pi(d,h,P,S),h.child;case 11:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:Qo(P,L),yy(d,h,P,L,S);case 7:return Pi(d,h,h.pendingProps,S),h.child;case 8:return Pi(d,h,h.pendingProps.children,S),h.child;case 12:return Pi(d,h,h.pendingProps.children,S),h.child;case 10:e:{if(P=h.type._context,L=h.pendingProps,R=h.memoizedProps,j=L.value,iy(h,P,j),R!==null)if(q(R.value,j)){if(R.children===L.children&&!Qr.current){h=ds(d,h,S);break e}}else for(R=h.child,R!==null&&(R.return=h);R!==null;){var se=R.dependencies;if(se!==null){j=R.child;for(var he=se.firstContext;he!==null;){if(he.context===P){if(R.tag===1){he=us(-1,S&-S),he.tag=2;var ze=R.updateQueue;if(ze!==null){ze=ze.shared;var it=ze.pending;it===null?he.next=he:(he.next=it.next,it.next=he),ze.pending=he}}R.lanes|=S,he=R.alternate,he!==null&&(he.lanes|=S),mf(R.return,S,h),se.lanes|=S;break}he=he.next}}else if(R.tag===10)j=R.type===h.type?null:R.child;else if(R.tag===18){if(j=R.return,j===null)throw Error(a(341));j.lanes|=S,se=j.alternate,se!==null&&(se.lanes|=S),mf(j,S,h),j=R.sibling}else j=R.child;if(j!==null)j.return=R;else for(j=R;j!==null;){if(j===h){j=null;break}if(R=j.sibling,R!==null){R.return=j.return,j=R;break}j=j.return}R=j}Pi(d,h,L.children,S),h=h.child}return h;case 9:return L=h.type,P=h.pendingProps.children,vc(h,S),L=Ji(L),P=P(L),h.flags|=1,Pi(d,h,P,S),h.child;case 14:return P=h.type,L=Qo(P,h.pendingProps),L=Qo(P.type,L),nl(d,h,P,L,S);case 15:return by(d,h,h.type,h.pendingProps,S);case 17:return P=h.type,L=h.pendingProps,L=h.elementType===P?L:Qo(P,L),Ma(d,h),h.tag=1,Jr(P)?(d=!0,ss(h)):d=!1,vc(h,S),sy(h,P,L),bg(h,P,L,S),ta(null,h,P,!0,d,S);case 19:return Py(d,h,S);case 22:return Sy(d,h,S)}throw Error(a(156,h.tag))};function Ai(d,h){return fc(d,h)}function Ia(d,h,S,P){this.tag=d,this.key=S,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(d,h,S,P){return new Ia(d,h,S,P)}function Qg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Wp(d){if(typeof d=="function")return Qg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===x)return 11;if(d===C)return 14}return 2}function ro(d,h){var S=d.alternate;return S===null?(S=To(d.tag,h,d.key,d.mode),S.elementType=d.elementType,S.type=d.type,S.stateNode=d.stateNode,S.alternate=d,d.alternate=S):(S.pendingProps=h,S.type=d.type,S.flags=0,S.subtreeFlags=0,S.deletions=null),S.flags=d.flags&14680064,S.childLanes=d.childLanes,S.lanes=d.lanes,S.child=d.child,S.memoizedProps=d.memoizedProps,S.memoizedState=d.memoizedState,S.updateQueue=d.updateQueue,h=d.dependencies,S.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},S.sibling=d.sibling,S.index=d.index,S.ref=d.ref,S}function Nf(d,h,S,P,L,R){var j=2;if(P=d,typeof d=="function")Qg(d)&&(j=1);else if(typeof d=="string")j=5;else e:switch(d){case f:return fl(S.children,L,R,h);case p:j=8,L|=8;break;case m:return d=To(12,S,h,L|2),d.elementType=m,d.lanes=R,d;case E:return d=To(13,S,h,L),d.elementType=E,d.lanes=R,d;case _:return d=To(19,S,h,L),d.elementType=_,d.lanes=R,d;case A:return Up(S,L,R,h);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:j=10;break e;case y:j=9;break e;case x:j=11;break e;case C:j=14;break e;case T:j=16,P=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return h=To(j,S,h,L),h.elementType=d,h.type=P,h.lanes=R,h}function fl(d,h,S,P){return d=To(7,d,P,h),d.lanes=S,d}function Up(d,h,S,P){return d=To(22,d,P,h),d.elementType=A,d.lanes=S,d.stateNode={isHidden:!1},d}function jp(d,h,S){return d=To(6,d,null,h),d.lanes=S,d}function hl(d,h,S){return h=To(4,d.children!==null?d.children:[],d.key,h),h.lanes=S,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}function Bf(d,h,S,P,L){this.tag=h,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=pt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dc(0),this.expirationTimes=dc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.identifierPrefix=P,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function Ry(d,h,S,P,L,R,j,se,he){return d=new Bf(d,h,S,se,he),h===1?(h=1,R===!0&&(h|=8)):h=0,R=To(3,null,null,h),d.current=R,R.stateNode=d,R.memoizedState={element:P,isDehydrated:S,cache:null,transitions:null,pendingSuspenseBoundaries:null},yg(R),d}function Jg(d){if(!d)return Ko;d=d._reactInternals;e:{if(F(d)!==d||d.tag!==1)throw Error(a(170));var h=d;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(Jr(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(a(171))}if(d.tag===1){var S=d.type;if(Jr(S))return au(d,S,h)}return h}function em(d){var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=te(h),d===null?null:d.stateNode}function zf(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var S=d.retryLane;d.retryLane=S!==0&&S<h?S:h}}function $f(d,h){zf(d,h),(d=d.alternate)&&zf(d,h)}function Gp(d){return d=te(d),d===null?null:d.stateNode}function tm(){return null}return n.attemptContinuousHydration=function(d){if(d.tag===13){var h=Jo(d,134217728);if(h!==null){var S=mi();Po(h,d,134217728,S)}$f(d,134217728)}},n.attemptDiscreteHydration=function(d){if(d.tag===13){var h=Jo(d,1);if(h!==null){var S=mi();Po(h,d,1,S)}$f(d,1)}},n.attemptHydrationAtCurrentPriority=function(d){if(d.tag===13){var h=Nr(d),S=Jo(d,h);if(S!==null){var P=mi();Po(S,d,h,P)}$f(d,h)}},n.attemptSynchronousHydration=function(d){switch(d.tag){case 3:var h=d.stateNode;if(h.current.memoizedState.isDehydrated){var S=Zs(h.pendingLanes);S!==0&&(lu(h,S|1),ri(h,qn()),(Ft&6)===0&&(sl(),St()))}break;case 13:Gg(function(){var P=Jo(d,1);if(P!==null){var L=mi();Po(P,d,1,L)}}),$f(d,1)}},n.batchedUpdates=function(d,h){var S=Ft;Ft|=1;try{return d(h)}finally{Ft=S,Ft===0&&(sl(),pe&&St())}},n.createComponentSelector=function(d){return{$$typeof:Lp,value:d}},n.createContainer=function(d,h,S,P,L,R,j){return Ry(d,h,!1,null,S,P,L,R,j)},n.createHasPseudoClassSelector=function(d){return{$$typeof:Ap,value:d}},n.createHydrationContainer=function(d,h,S,P,L,R,j,se,he){return d=Ry(S,P,!0,d,L,R,j,se,he),d.context=Jg(null),S=d.current,P=mi(),L=Nr(S),R=us(P,L),R.callback=h!=null?h:null,el(S,R,L),d.current.lanes=L,Ta(d,L,P),ri(d,P),d},n.createPortal=function(d,h,S){var P=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:P==null?null:""+P,children:d,containerInfo:h,implementation:S}},n.createRoleSelector=function(d){return{$$typeof:Op,value:d}},n.createTestNameSelector=function(d){return{$$typeof:Nc,value:d}},n.createTextSelector=function(d){return{$$typeof:Rp,value:d}},n.deferredUpdates=function(d){var h=Ut,S=ur.transition;try{return ur.transition=null,Ut=16,d()}finally{Ut=h,ur.transition=S}},n.discreteUpdates=function(d,h,S,P,L){var R=Ut,j=ur.transition;try{return ur.transition=null,Ut=1,d(h,S,P,L)}finally{Ut=R,ur.transition=j,Ft===0&&sl()}},n.findAllNodes=Wg,n.findBoundingRects=function(d,h){if(!Pt)throw Error(a(363));h=Wg(d,h),d=[];for(var S=0;S<h.length;S++)d.push(fn(h[S]));for(h=d.length-1;0<h;h--){S=d[h];for(var P=S.x,L=P+S.width,R=S.y,j=R+S.height,se=h-1;0<=se;se--)if(h!==se){var he=d[se],ze=he.x,it=ze+he.width,Mt=he.y,Ze=Mt+he.height;if(P>=ze&&R>=Mt&&L<=it&&j<=Ze){d.splice(h,1);break}else if(P!==ze||S.width!==he.width||Ze<R||Mt>j){if(!(R!==Mt||S.height!==he.height||it<P||ze>L)){ze>P&&(he.width+=ze-P,he.x=P),it<L&&(he.width=L-ze),d.splice(h,1);break}}else{Mt>R&&(he.height+=Mt-R,he.y=R),Ze<j&&(he.height=j-Mt),d.splice(h,1);break}}}return d},n.findHostInstance=em,n.findHostInstanceWithNoPortals=function(d){return d=Y(d),d=d!==null?z(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return em(d)},n.flushControlled=function(d){var h=Ft;Ft|=1;var S=ur.transition,P=Ut;try{ur.transition=null,Ut=1,d()}finally{Ut=P,ur.transition=S,Ft=h,Ft===0&&(sl(),St())}},n.flushPassiveEffects=vu,n.flushSync=Gg,n.focusWithin=function(d,h){if(!Pt)throw Error(a(363));for(d=Mp(d),h=Bc(d,h),h=Array.from(h),d=0;d<h.length;){var S=h[d++];if(!De(S)){if(S.tag===5&&tn(S.stateNode))return!0;for(S=S.child;S!==null;)h.push(S),S=S.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Ut},n.getFindAllNodesFailureDescription=function(d,h){if(!Pt)throw Error(a(363));var S=0,P=[];d=[Mp(d),0];for(var L=0;L<d.length;){var R=d[L++],j=d[L++],se=h[j];if((R.tag!==5||!De(R))&&(Hg(R,se)&&(P.push(Vg(se)),j++,j>S&&(S=j)),j<h.length))for(R=R.child;R!==null;)d.push(R,j),R=R.sibling}if(S<h.length){for(d=[];S<h.length;S++)d.push(Vg(h[S]));return`findAllNodes was able to match part of the selector:
`+(P.join(" > ")+`
No matching component was found for:
`)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return K(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:Gp,findFiberByHostInstance:d.findFiberByHostInstance||tm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(h.isDisabled||!h.supportsFiber)d=!0;else{try{pn=h.inject(d),jt=h}catch(S){}d=!!h.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,h,S,P){if(!Pt)throw Error(a(363));d=Wg(d,h);var L=Zt(d,S,P).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,h){var S=h._getVersion;S=S(h._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[h,S]:d.mutableSourceEagerHydrationData.push(h,S)},n.runWithPriority=function(d,h){var S=Ut;try{return Ut=d,h()}finally{Ut=S}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,h,S,P){var L=h.current,R=mi(),j=Nr(L);return S=Jg(S),h.context===null?h.context=S:h.pendingContext=S,h=us(R,j),h.payload={element:d},P=P===void 0?null:P,P!==null&&(h.callback=P),d=el(L,h,j),d!==null&&(Po(d,L,j,R),fp(d,L,j)),j},n};(function(e){e.exports=VTe})(mG);const WTe=Y9(mG.exports);var DE={exports:{}},Qh={};/**
* @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.
*/Qh.ConcurrentRoot=1;Qh.ContinuousEventPriority=4;Qh.DefaultEventPriority=16;Qh.DiscreteEventPriority=1;Qh.IdleEventPriority=536870912;Qh.LegacyRoot=0;(function(e){e.exports=Qh})(DE);const SI={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let xI=!1,wI=!1;const NE=".react-konva-event",UTe=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
Consider to add onDragMove or onDragEnd events.
For more info see: https://github.com/konvajs/react-konva/issues/256
`,jTe=`ReactKonva: You are using "zIndex" attribute for a Konva node.
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
For more info see: https://github.com/konvajs/react-konva/issues/194
`,GTe={};function fx(e,t,n=GTe){if(!xI&&"zIndex"in t&&(console.warn(jTe),xI=!0),!wI&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(UTe),wI=!0)}for(var o in n)if(!SI[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var f=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!SI[o]){var a=o.slice(0,2)==="on",y=n[o]!==t[o];if(a&&y){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||f&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),ef(e));for(var l in v)e.on(l+NE,v[l])}function ef(e){if(!lt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const vG={},qTe={};Dh.Node.prototype._applyProps=fx;function YTe(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),ef(e)}function KTe(e,t,n){let r=Dh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${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=Dh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return fx(l,o),l}function XTe(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function ZTe(e,t,n){return!1}function QTe(e){return e}function JTe(){return null}function eLe(){return null}function tLe(e,t,n,r){return qTe}function nLe(){}function rLe(e){}function iLe(e,t){return!1}function oLe(){return vG}function aLe(){return vG}const sLe=setTimeout,lLe=clearTimeout,uLe=-1;function cLe(e,t){return!1}const dLe=!1,fLe=!0,hLe=!0;function pLe(e,t){t.parent===e?t.moveToTop():e.add(t),ef(e)}function gLe(e,t){t.parent===e?t.moveToTop():e.add(t),ef(e)}function yG(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),ef(e)}function mLe(e,t,n){yG(e,t,n)}function vLe(e,t){t.destroy(),t.off(NE),ef(e)}function yLe(e,t){t.destroy(),t.off(NE),ef(e)}function bLe(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function SLe(e,t,n){}function xLe(e,t,n,r,i){fx(e,i,r)}function wLe(e){e.hide(),ef(e)}function CLe(e){}function _Le(e,t){(t.visible==null||t.visible)&&e.show()}function kLe(e,t){}function ELe(e){}function PLe(){}const TLe=()=>DE.exports.DefaultEventPriority,LLe=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:YTe,createInstance:KTe,createTextInstance:XTe,finalizeInitialChildren:ZTe,getPublicInstance:QTe,prepareForCommit:JTe,preparePortalMount:eLe,prepareUpdate:tLe,resetAfterCommit:nLe,resetTextContent:rLe,shouldDeprioritizeSubtree:iLe,getRootHostContext:oLe,getChildHostContext:aLe,scheduleTimeout:sLe,cancelTimeout:lLe,noTimeout:uLe,shouldSetTextContent:cLe,isPrimaryRenderer:dLe,warnsIfNotActing:fLe,supportsMutation:hLe,appendChild:pLe,appendChildToContainer:gLe,insertBefore:yG,insertInContainerBefore:mLe,removeChild:vLe,removeChildFromContainer:yLe,commitTextUpdate:bLe,commitMount:SLe,commitUpdate:xLe,hideInstance:wLe,hideTextInstance:CLe,unhideInstance:_Le,unhideTextInstance:kLe,clearContainer:ELe,detachDeletedInstance:PLe,getCurrentEventPriority:TLe,now:N0.exports.unstable_now,idlePriority:N0.exports.unstable_IdlePriority,run:N0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var ALe=Object.defineProperty,OLe=Object.defineProperties,RLe=Object.getOwnPropertyDescriptors,CI=Object.getOwnPropertySymbols,MLe=Object.prototype.hasOwnProperty,ILe=Object.prototype.propertyIsEnumerable,_I=(e,t,n)=>t in e?ALe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kI=(e,t)=>{for(var n in t||(t={}))MLe.call(t,n)&&_I(e,n,t[n]);if(CI)for(var n of CI(t))ILe.call(t,n)&&_I(e,n,t[n]);return e},DLe=(e,t)=>OLe(e,RLe(t));function BE(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=BE(r,t,n);if(i)return i;r=t?null:r.sibling}}function bG(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch(t){return e}}const zE=bG(k.exports.createContext(null));class SG extends k.exports.Component{render(){return b(zE.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:NLe,ReactCurrentDispatcher:BLe}=k.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function zLe(){const e=k.exports.useContext(zE);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=k.exports.useId();return k.exports.useMemo(()=>{var r;return(r=NLe.current)!=null?r:BE(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Rm=[],EI=new WeakMap;function $Le(){var e;const t=zLe();Rm.splice(0,Rm.length),BE(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==zE&&Rm.push(bG(i))});for(const n of Rm){const r=(e=BLe.current)==null?void 0:e.readContext(n);EI.set(n,r)}return k.exports.useMemo(()=>Rm.reduce((n,r)=>i=>k.exports.createElement(n,null,k.exports.createElement(r.Provider,DLe(kI({},i),{value:EI.get(r)}))),n=>b(SG,{...kI({},n)})),[])}function FLe(e){const t=oe.useRef();return oe.useLayoutEffect(()=>{t.current=e}),t.current}const HLe=e=>{const t=oe.useRef(),n=oe.useRef(),r=oe.useRef(),i=FLe(e),o=$Le(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return oe.useLayoutEffect(()=>(n.current=new Dh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Qm.createContainer(n.current,DE.exports.LegacyRoot,!1,null),Qm.updateContainer(b(o,{children:e.children}),r.current),()=>{!Dh.isBrowser||(a(null),Qm.updateContainer(null,r.current,null),n.current.destroy())}),[]),oe.useLayoutEffect(()=>{a(n.current),fx(n.current,e,i),Qm.updateContainer(b(o,{children:e.children}),r.current,null)}),b("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Mm="Layer",Ku="Group",Xu="Rect",Gf="Circle",fb="Line",xG="Image",VLe="Transformer",Qm=WTe(LLe);Qm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:oe.version,rendererPackageName:"react-konva"});const WLe=oe.forwardRef((e,t)=>b(SG,{children:b(HLe,{...e,forwardedRef:t})})),ULe=ot([en],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),jLe=e=>{const{...t}=e,{objects:n}=ye(ULe);return b(Ku,{listening:!1,...t,children:n.filter(Vk).map((r,i)=>b(fb,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},kh=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},GLe=ot(en,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:o,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:u,isTransformingBoundingBox:f,stageScale:p,stageDimensions:m,boundingBoxCoordinates:v,boundingBoxDimensions:y,shouldRestrictStrokesToBox:x}=e,E=x?{clipX:v.x,clipY:v.y,clipWidth:y.width,clipHeight:y.height}:{};return{cursorPosition:t,brushX:t?t.x:m.width/2,brushY:t?t.y:m.height/2,radius:n/2,colorPickerOuterRadius:YR/p,colorPickerInnerRadius:(YR-a9+1)/p,maskColorString:kh({...i,a:.5}),brushColorString:kh(o),colorPickerColorString:kh(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||f||!t)&&l,strokeWidth:1.5/p,dotRadius:1.5/p,clip:E}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),qLe=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:o,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:f,brushColorString:p,colorPickerColorString:m,colorPickerInnerRadius:v,colorPickerOuterRadius:y,clip:x}=ye(GLe);return l?ee(Ku,{listening:!1,...x,...t,children:[a==="colorPicker"?ee(In,{children:[b(Gf,{x:n,y:r,radius:y,stroke:p,strokeWidth:a9,strokeScaleEnabled:!1}),b(Gf,{x:n,y:r,radius:v,stroke:m,strokeWidth:a9,strokeScaleEnabled:!1})]}):ee(In,{children:[b(Gf,{x:n,y:r,radius:i,fill:s==="mask"?o:p,globalCompositeOperation:a==="eraser"?"destination-out":"source-out"}),b(Gf,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:f*2,strokeEnabled:!0,listening:!1}),b(Gf,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:f,strokeEnabled:!0,listening:!1})]}),b(Gf,{x:n,y:r,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),b(Gf,{x:n,y:r,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},YLe=ot(en,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageScale:r,isDrawing:i,isTransformingBoundingBox:o,isMovingBoundingBox:a,tool:s,shouldSnapToGrid:l}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:i,isMovingBoundingBox:a,isTransformingBoundingBox:o,stageScale:r,shouldSnapToGrid:l,tool:s,hitStrokeWidth:20/r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),KLe=e=>{const{...t}=e,n=Ie(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:s,stageScale:l,shouldSnapToGrid:u,tool:f,hitStrokeWidth:p}=ye(YLe),m=k.exports.useRef(null),v=k.exports.useRef(null),[y,x]=k.exports.useState(!1);k.exports.useEffect(()=>{var te;!m.current||!v.current||(m.current.nodes([v.current]),(te=m.current.getLayer())==null||te.batchDraw())},[]);const E=64*l,_=k.exports.useCallback(te=>{if(!u){n(S6({x:Math.floor(te.target.x()),y:Math.floor(te.target.y())}));return}const G=te.target.x(),z=te.target.y(),W=Il(G,64),K=Il(z,64);te.target.x(W),te.target.y(K),n(S6({x:W,y:K}))},[n,u]),C=k.exports.useCallback(()=>{if(!v.current)return;const te=v.current,G=te.scaleX(),z=te.scaleY(),W=Math.round(te.width()*G),K=Math.round(te.height()*z),Z=Math.round(te.x()),U=Math.round(te.y());n(jm({width:W,height:K})),n(S6({x:u?hd(Z,64):Z,y:u?hd(U,64):U})),te.scaleX(1),te.scaleY(1)},[n,u]),T=k.exports.useCallback((te,G,z)=>{const W=te.x%E,K=te.y%E;return{x:hd(G.x,E)+W,y:hd(G.y,E)+K}},[E]),A=()=>{n(w6(!0))},M=()=>{n(w6(!1)),n(x6(!1)),n(M3(!1)),x(!1)},I=()=>{n(x6(!0))},D=()=>{n(w6(!1)),n(x6(!1)),n(M3(!1)),x(!1)},B=()=>{x(!0)},F=()=>{!s&&!a&&x(!1)},H=()=>{n(M3(!0))},Y=()=>{n(M3(!1))};return ee(Ku,{...t,children:[b(Xu,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:H,onMouseOver:H,onMouseLeave:Y,onMouseOut:Y}),b(Xu,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:p,listening:!o&&f==="move",onDragStart:I,onDragEnd:D,onDragMove:_,onMouseDown:I,onMouseOut:F,onMouseOver:B,onMouseEnter:B,onMouseUp:D,onTransform:C,onTransformEnd:M,ref:v,stroke:y?"rgba(255,255,255,0.7)":"white",strokeWidth:(y?8:1)/l,width:i.width,x:r.x,y:r.y}),b(VLe,{anchorCornerRadius:3,anchorDragBoundFunc:T,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:f==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&f==="move",onDragStart:I,onDragEnd:D,onMouseDown:A,onMouseUp:M,onTransformEnd:M,ref:m,rotateEnabled:!1})]})},XLe=ot([en,Sr,xr],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isMaskEnabled:s,shouldSnapToGrid:l}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isStaging:n,isMaskEnabled:s,shouldSnapToGrid:l}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),ZLe=()=>{const e=Ie(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i,isMaskEnabled:o,shouldSnapToGrid:a}=ye(XLe),s=k.exports.useRef(null),l=SU(),u=()=>e(Wk());je(["shift+c"],()=>{u()},{enabled:()=>!i,preventDefault:!0},[]);const f=()=>e(Y2(!o));je(["h"],()=>{f()},{enabled:()=>!i,preventDefault:!0},[o]),je(["n"],()=>{e(rb(!a))},{enabled:!0,preventDefault:!0},[a]),je("esc",()=>{e(lSe())},{enabled:()=>!0,preventDefault:!0}),je("shift+h",()=>{e(gSe(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),je(["space"],p=>{p.repeat||(l==null||l.container().focus(),r!=="move"&&(s.current=r,e(Vl("move"))),r==="move"&&s.current&&s.current!=="move"&&(e(Vl(s.current)),s.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,s])},QLe=ot(en,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:kh(t)}}),PI=e=>`data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<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;">
<g transform="matrix(0.5,0,0,0.5,0,0)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-10)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-15)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-20)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-25)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
<g transform="matrix(0.5,0,0,0.5,0,-30)">
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
</g>
</svg>`.replaceAll("black",e),JLe=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ye(QLe),[a,s]=k.exports.useState(null),[l,u]=k.exports.useState(0),f=k.exports.useRef(null),p=k.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return k.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=PI(n)},[a,n]),k.exports.useEffect(()=>{!a||(a.src=PI(n))},[a,n]),k.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!ai.exports.isNumber(r.x)||!ai.exports.isNumber(r.y)||!ai.exports.isNumber(o)||!ai.exports.isNumber(i.width)||!ai.exports.isNumber(i.height)?null:b(Xu,{ref:f,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:ai.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},eAe=ot([en],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),tAe=e=>{const t=Ie(),{isMoveStageKeyHeld:n,stageScale:r}=ye(eAe);return k.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=We.clamp(r*Wbe**s,Ube,jbe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(ySe(l)),t(xW(u))},[e,n,r,t])},$E=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:r.x,y:r.y}},wG=()=>{const e=Ie(),t=Fs(),n=SU();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=h0.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(fSe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(tSe())}}},nAe=ot([Sr,en,xr],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),rAe=e=>{const t=Ie(),{tool:n,isStaging:r}=ye(nAe),{commitColorUnderCursor:i}=wG();return k.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(tb(!0));return}if(n==="colorPicker"){i();return}const a=$E(e.current);!a||(o.evt.preventDefault(),t(fW(!0)),t(eSe([a.x,a.y])))},[e,n,r,t,i])},iAe=ot([Sr,en,xr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),oAe=(e,t)=>{const n=Ie(),{tool:r,isDrawing:i,isStaging:o}=ye(iAe);return k.exports.useCallback(()=>{if(r==="move"||o){n(tb(!1));return}if(!t.current&&i&&e.current){const a=$E(e.current);if(!a)return;n(uW([a.x,a.y]))}else t.current=!1;n(fW(!1))},[t,n,i,o,e,r])},aAe=ot([Sr,en,xr],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),sAe=(e,t,n)=>{const r=Ie(),{isDrawing:i,tool:o,isStaging:a}=ye(aAe),{updateColorUnderCursor:s}=wG();return k.exports.useCallback(()=>{if(!e.current)return;const l=$E(e.current);if(!!l){if(r(hSe(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(uW([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},lAe=()=>{const e=Ie();return k.exports.useCallback(()=>{e(iSe())},[e])},uAe=ot([en,xr],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),cAe=()=>{const e=Ie(),{tool:t,isStaging:n,isMovingBoundingBox:r}=ye(uAe);return{handleDragStart:k.exports.useCallback(()=>{!((t==="move"||n)&&!r)||e(tb(!0))},[e,r,n,t]),handleDragMove:k.exports.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const o={x:i.target.x(),y:i.target.y()};e(xW(o))},[e,r,n,t]),handleDragEnd:k.exports.useCallback(()=>{!((t==="move"||n)&&!r)||e(tb(!1))},[e,r,n,t])}};var qf=k.exports,dAe=function(t,n,r){const i=qf.useRef("loading"),o=qf.useRef(),[a,s]=qf.useState(0),l=qf.useRef(),u=qf.useRef(),f=qf.useRef();return(l.current!==t||u.current!==n||f.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,f.current=r),qf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const CG=e=>{const{url:t,x:n,y:r}=e,[i]=dAe(t);return b(xG,{x:n,y:r,image:i,listening:!1})},fAe=ot([en],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),hAe=()=>{const{objects:e}=ye(fAe);return e?b(Ku,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(eb(t))return b(CG,{x:t.x,y:t.y,url:t.image.url},n);if(Ybe(t)){const r=b(fb,{points:t.points,stroke:t.color?kh(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n);return t.clip?b(Ku,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(Kbe(t))return b(Xu,{x:t.x,y:t.y,width:t.width,height:t.height,fill:kh(t.color)},n);if(Xbe(t))return b(Xu,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},pAe=ot([en],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),gAe={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},mAe=()=>{const{colorMode:e}=T2(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ye(pAe),[i,o]=k.exports.useState([]),a=k.exports.useCallback(s=>s/t,[t]);return k.exports.useLayoutEffect(()=>{const s=gAe[e],{width:l,height:u}=r,{x:f,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(f),y:a(p)}},v={x:Math.ceil(a(f)/64)*64,y:Math.ceil(a(p)/64)*64},y={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,y.x1),y1:Math.min(m.y1,y.y1),x2:Math.max(m.x2,y.x2),y2:Math.max(m.y2,y.y2)},_=E.x2-E.x1,C=E.y2-E.y1,T=Math.round(_/64)+1,A=Math.round(C/64)+1,M=We.range(0,T).map(D=>b(fb,{x:E.x1+D*64,y:E.y1,points:[0,0,0,C],stroke:s,strokeWidth:1},`x_${D}`)),I=We.range(0,A).map(D=>b(fb,{x:E.x1,y:E.y1+D*64,points:[0,0,_,0],stroke:s,strokeWidth:1},`y_${D}`));o(M.concat(I))},[t,n,r,e,a]),b(Ku,{children:i})},vAe=ot([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:We.isEqual}}),yAe=e=>{const{...t}=e,n=ye(vAe),[r,i]=k.exports.useState(null);if(k.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!(n!=null&&n.boundingBox))return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?b(xG,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},D0=e=>Math.round(e*100)/100,bAe=ot([en],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${D0(n)}, ${D0(r)})`}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function SAe(){const{cursorCoordinatesString:e}=ye(bAe),{t}=Ge();return b("div",{children:`${t("unifiedcanvas:cursorPosition")}: ${e}`})}const xAe=ot([en],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},scaledBoundingBoxDimensions:{width:s,height:l},boundingBoxCoordinates:{x:u,y:f},stageScale:p,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:y}=e;let x="inherit";return(y==="none"&&(o<512||a<512)||y==="manual"&&s*l<512*512)&&(x="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:x,boundingBoxCoordinatesString:`(${D0(u)}, ${D0(f)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${D0(r)}\xD7${D0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(p*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:y!=="auto",shouldShowScaledBoundingBox:y!=="none"}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),wAe=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:f,shouldShowBoundingBox:p}=ye(xAe),{t:m}=Ge();return ee("div",{className:"canvas-status-text",children:[b("div",{style:{color:e},children:`${m("unifiedcanvas:activeLayer")}: ${t}`}),b("div",{children:`${m("unifiedcanvas:canvasScale")}: ${u}%`}),p&&b("div",{style:{color:n},children:`${m("unifiedcanvas:boundingBox")}: ${i}`}),a&&b("div",{style:{color:n},children:`${m("unifiedcanvas:scaledBoundingBox")}: ${o}`}),f&&ee(In,{children:[b("div",{children:`${m("unifiedcanvas:boundingBoxPosition")}: ${r}`}),b("div",{children:`${m("unifiedcanvas:canvasDimensions")}: ${l}`}),b("div",{children:`${m("unifiedcanvas:canvasPosition")}: ${s}`}),b(SAe,{})]})]})},CAe=ot([en],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i,boundingBoxCoordinates:{x:o,y:a},boundingBoxDimensions:{width:s,height:l}}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),_Ae=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}=ye(CAe);return ee(Ku,{...t,children:[r&&n&&b(CG,{url:n.image.url,x:o,y:a}),i&&ee(Ku,{children:[b(Xu,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),b(Xu,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},kAe=ot([en],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),EAe=()=>{const e=Ie(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ye(kAe),{t:o}=Ge(),a=k.exports.useCallback(()=>{e(ZR(!0))},[e]),s=k.exports.useCallback(()=>{e(ZR(!1))},[e]);je(["left"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),je(["right"],()=>{u()},{enabled:()=>!0,preventDefault:!0}),je(["enter"],()=>{f()},{enabled:()=>!0,preventDefault:!0});const l=()=>e(aSe()),u=()=>e(oSe()),f=()=>e(nSe());return r?b(bt,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:a,onMouseOut:s,children:ee(Yi,{isAttached:!0,children:[b(Qe,{tooltip:`${o("unifiedcanvas:previous")} (Left)`,"aria-label":`${o("unifiedcanvas:previous")} (Left)`,icon:b(qCe,{}),onClick:l,"data-selected":!0,isDisabled:t}),b(Qe,{tooltip:`${o("unifiedcanvas:next")} (Right)`,"aria-label":`${o("unifiedcanvas:next")} (Right)`,icon:b(YCe,{}),onClick:u,"data-selected":!0,isDisabled:n}),b(Qe,{tooltip:`${o("unifiedcanvas:accept")} (Enter)`,"aria-label":`${o("unifiedcanvas:accept")} (Enter)`,icon:b(nE,{}),onClick:f,"data-selected":!0}),b(Qe,{tooltip:o("unifiedcanvas:showHide"),"aria-label":o("unifiedcanvas:showHide"),"data-alert":!i,icon:i?b(e7e,{}):b(JCe,{}),onClick:()=>e(mSe(!i)),"data-selected":!0}),b(Qe,{tooltip:o("unifiedcanvas:saveToGallery"),"aria-label":o("unifiedcanvas:saveToGallery"),icon:b(oE,{}),onClick:()=>e(Cxe(r.image.url)),"data-selected":!0}),b(Qe,{tooltip:o("unifiedcanvas:discardAll"),"aria-label":o("unifiedcanvas:discardAll"),icon:b(iE,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(rSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},PAe=ot(en,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,shouldDarkenOutsideBoundingBox:o,stageCoordinates:a,stageDimensions:r,stageScale:i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),TAe=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ye(PAe);return ee(Ku,{children:[b(Xu,{offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fill:"rgba(0,0,0,0.4)",listening:!1,visible:n}),b(Xu,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},LAe=ot([en,xr],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:f,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v,shouldRestrictStrokesToBox:y}=e;let x="none";return f==="move"||t?p?x="grabbing":x="grab":o?x=void 0:y&&!a&&(x="default"),{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:x,stageDimensions:l,stageScale:r,tool:f,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),_G=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:f}=ye(LAe);ZLe();const p=k.exports.useRef(null),m=k.exports.useRef(null),v=k.exports.useCallback(F=>{j6e(F),p.current=F},[]),y=k.exports.useCallback(F=>{U6e(F),m.current=F},[]),x=k.exports.useRef({x:0,y:0}),E=k.exports.useRef(!1),_=tAe(p),C=rAe(p),T=oAe(p,E),A=sAe(p,E,x),M=lAe(),{handleDragStart:I,handleDragMove:D,handleDragEnd:B}=cAe();return b("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(WLe,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:C,onTouchMove:A,onTouchEnd:T,onMouseDown:C,onMouseLeave:M,onMouseMove:A,onMouseUp:T,onDragStart:I,onDragMove:D,onDragEnd:B,onContextMenu:F=>F.evt.preventDefault(),onWheel:_,draggable:(l==="move"||u)&&!t,children:[b(Mm,{id:"grid",visible:r,children:b(mAe,{})}),b(Mm,{id:"base",ref:y,listening:!1,imageSmoothingEnabled:!1,children:b(hAe,{})}),ee(Mm,{id:"mask",visible:e,listening:!1,children:[b(jLe,{visible:!0,listening:!1}),b(JLe,{listening:!1})]}),b(Mm,{children:b(TAe,{})}),ee(Mm,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&b(qLe,{visible:l!=="move",listening:!1}),b(_Ae,{visible:u}),f&&b(yAe,{}),b(KLe,{visible:n&&!u})]})]}),b(wAe,{}),b(EAe,{})]})})},AAe=ot([en,Sr,tc],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function kG(){const e=Ie(),{t}=Ge(),{canUndo:n,activeTabName:r}=ye(AAe),i=()=>{e(bSe())};return je(["meta+z","ctrl+z"],()=>{i()},{enabled:()=>n,preventDefault:!0},[r,n]),b(Qe,{"aria-label":`${t("unifiedcanvas:undo")} (Ctrl+Z)`,tooltip:`${t("unifiedcanvas:undo")} (Ctrl+Z)`,icon:b(g7e,{}),onClick:i,isDisabled:!n})}const OAe=ot([en,Sr,tc],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function EG(){const e=Ie(),{canRedo:t,activeTabName:n}=ye(OAe),{t:r}=Ge(),i=()=>{e(sSe())};return je(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{i()},{enabled:()=>t,preventDefault:!0},[n,t]),b(Qe,{"aria-label":`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,tooltip:`${r("unifiedcanvas:redo")} (Ctrl+Shift+Z)`,icon:b(d7e,{}),onClick:i,isDisabled:!t})}const PG=Pe((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:f,onClose:p}=s2(),m=k.exports.useRef(null),v=()=>{r(),p()},y=()=>{o&&o(),p()};return ee(In,{children:[k.exports.cloneElement(l,{onClick:f,ref:t}),b(_H,{isOpen:u,leastDestructiveRef:m,onClose:p,children:b(E1,{children:ee(kH,{className:"modal",children:[b(CS,{fontSize:"lg",fontWeight:"bold",children:s}),b(f2,{children:a}),ee(wS,{children:[b(Za,{ref:m,onClick:y,className:"modal-close-btn",children:i}),b(Za,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),TG=()=>{const e=ye(xr),t=Ie(),{t:n}=Ge(),r=()=>{t(_xe()),t(Uk()),t(cW())};return ee(PG,{title:n("unifiedcanvas:emptyTempImageFolder"),acceptCallback:r,acceptButtonText:n("unifiedcanvas:emptyFolder"),triggerComponent:b(co,{leftIcon:b(Xh,{}),size:"sm",isDisabled:e,children:n("unifiedcanvas:emptyTempImageFolder")}),children:[b("p",{children:n("unifiedcanvas:emptyTempImagesFolderMessage")}),b("br",{}),b("p",{children:n("unifiedcanvas:emptyTempImagesFolderConfirm")})]})},LG=()=>{const e=ye(xr),t=Ie(),{t:n}=Ge();return ee(PG,{title:n("unifiedcanvas:clearCanvasHistory"),acceptCallback:()=>t(cW()),acceptButtonText:n("unifiedcanvas:clearHistory"),triggerComponent:b(co,{size:"sm",leftIcon:b(Xh,{}),isDisabled:e,children:n("unifiedcanvas:clearCanvasHistory")}),children:[b("p",{children:n("unifiedcanvas:clearCanvasHistoryMessage")}),b("br",{}),b("p",{children:n("unifiedcanvas:clearCanvasHistoryConfirm")})]})},RAe=ot([en],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),MAe=()=>{const e=Ie(),{t}=Ge(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldDarkenOutsideBoundingBox:i,shouldShowCanvasDebugInfo:o,shouldShowGrid:a,shouldShowIntermediates:s,shouldSnapToGrid:l,shouldRestrictStrokesToBox:u}=ye(RAe);je(["n"],()=>{e(rb(!l))},{enabled:!0,preventDefault:!0},[l]);const f=p=>e(rb(p.target.checked));return b(zs,{trigger:"hover",triggerComponent:b(Qe,{tooltip:t("unifiedcanvas:canvasSettings"),"aria-label":t("unifiedcanvas:canvasSettings"),icon:b(XS,{})}),children:ee(bt,{direction:"column",gap:"0.5rem",children:[b(pr,{label:t("unifiedcanvas:showIntermediates"),isChecked:s,onChange:p=>e(SW(p.target.checked))}),b(pr,{label:t("unifiedcanvas:showGrid"),isChecked:a,onChange:p=>e(bW(p.target.checked))}),b(pr,{label:t("unifiedcanvas:snapToGrid"),isChecked:l,onChange:f}),b(pr,{label:t("unifiedcanvas:darkenOutsideSelection"),isChecked:i,onChange:p=>e(mW(p.target.checked))}),b(pr,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:p=>e(pW(p.target.checked))}),b(pr,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:p=>e(gW(p.target.checked))}),b(pr,{label:t("unifiedcanvas:limitStrokesToBox"),isChecked:u,onChange:p=>e(wW(p.target.checked))}),b(pr,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:o,onChange:p=>e(yW(p.target.checked))}),b(LG,{}),b(TG,{})]})})};function hx(){return(hx=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 AG(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function F9(e){var t=k.exports.useRef(e),n=k.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var O1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Tv=function(e){return"touches"in e},H9=function(e){return e&&e.ownerDocument.defaultView||self},TI=function(e,t,n){var r=e.getBoundingClientRect(),i=Tv(t)?function(o,a){for(var s=0;s<o.length;s++)if(o[s].identifier===a)return o[s];return o[0]}(t.touches,n):t;return{left:O1((i.pageX-(r.left+H9(e).pageXOffset))/r.width),top:O1((i.pageY-(r.top+H9(e).pageYOffset))/r.height)}},LI=function(e){!Tv(e)&&e.preventDefault()},FE=oe.memo(function(e){var t=e.onMove,n=e.onKey,r=AG(e,["onMove","onKey"]),i=k.exports.useRef(null),o=F9(t),a=F9(n),s=k.exports.useRef(null),l=k.exports.useRef(!1),u=k.exports.useMemo(function(){var v=function(E){LI(E),(Tv(E)?E.touches.length>0:E.buttons>0)&&i.current?o(TI(i.current,E,s.current)):x(!1)},y=function(){return x(!1)};function x(E){var _=l.current,C=H9(i.current),T=E?C.addEventListener:C.removeEventListener;T(_?"touchmove":"mousemove",v),T(_?"touchend":"mouseup",y)}return[function(E){var _=E.nativeEvent,C=i.current;if(C&&(LI(_),!function(A,M){return M&&!Tv(A)}(_,l.current)&&C)){if(Tv(_)){l.current=!0;var T=_.changedTouches||[];T.length&&(s.current=T[0].identifier)}C.focus(),o(TI(C,_,s.current)),x(!0)}},function(E){var _=E.which||E.keyCode;_<37||_>40||(E.preventDefault(),a({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},x]},[a,o]),f=u[0],p=u[1],m=u[2];return k.exports.useEffect(function(){return m},[m]),b("div",{...hx({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),px=function(e){return e.filter(Boolean).join(" ")},HE=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=px(["react-colorful__pointer",e.className]);return b("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:b("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},po=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},OG=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:po(e.h),s:po(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:po(i/2),a:po(r,2)}},V9=function(e){var t=OG(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},V6=function(e){var t=OG(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},IAe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:po(255*[r,s,a,a,l,r][u]),g:po(255*[l,r,r,s,a,a][u]),b:po(255*[a,a,l,r,r,s][u]),a:po(i,2)}},DAe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:po(60*(s<0?s+6:s)),s:po(o?a/o*100:0),v:po(o/255*100),a:i}},NAe=oe.memo(function(e){var t=e.hue,n=e.onChange,r=px(["react-colorful__hue",e.className]);return oe.createElement("div",{className:r},oe.createElement(FE,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:O1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":po(t),"aria-valuemax":"360","aria-valuemin":"0"},oe.createElement(HE,{className:"react-colorful__hue-pointer",left:t/360,color:V9({h:t,s:100,v:100,a:1})})))}),BAe=oe.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:V9({h:t.h,s:100,v:100,a:1})};return oe.createElement("div",{className:"react-colorful__saturation",style:r},oe.createElement(FE,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:O1(t.s+100*i.left,0,100),v:O1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+po(t.s)+"%, Brightness "+po(t.v)+"%"},oe.createElement(HE,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:V9(t)})))}),RG=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function zAe(e,t,n){var r=F9(n),i=k.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=k.exports.useRef({color:t,hsva:o});k.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),k.exports.useEffect(function(){var u;RG(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=k.exports.useCallback(function(u){a(function(f){return Object.assign({},f,u)})},[]);return[o,l]}var $Ae=typeof window<"u"?k.exports.useLayoutEffect:k.exports.useEffect,FAe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},AI=new Map,HAe=function(e){$Ae(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!AI.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}`,AI.set(t,n);var r=FAe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},VAe=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+V6(Object.assign({},n,{a:0}))+", "+V6(Object.assign({},n,{a:1}))+")"},o=px(["react-colorful__alpha",t]),a=po(100*n.a);return oe.createElement("div",{className:o},b("div",{className:"react-colorful__alpha-gradient",style:i}),oe.createElement(FE,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:O1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},oe.createElement(HE,{className:"react-colorful__alpha-pointer",left:n.a,color:V6(n)})))},WAe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AG(e,["className","colorModel","color","onChange"]),s=k.exports.useRef(null);HAe(s);var l=zAe(n,i,o),u=l[0],f=l[1],p=px(["react-colorful",t]);return oe.createElement("div",hx({},a,{ref:s,className:p}),b(BAe,{hsva:u,onChange:f}),b(NAe,{hue:u.h,onChange:f}),oe.createElement(VAe,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},UAe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:DAe,fromHsva:IAe,equal:RG},jAe=function(e){return oe.createElement(WAe,hx({},e,{colorModel:UAe}))};const hb=e=>{const{styleClass:t,...n}=e;return b(jAe,{className:`invokeai__color-picker ${t}`,...n})},GAe=ot([en,xr],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:o}=e;return{layer:r,maskColor:n,maskColorString:kh(n),isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),qAe=()=>{const e=Ie(),{t}=Ge(),{layer:n,maskColor:r,isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:a}=ye(GAe);je(["q"],()=>{s()},{enabled:()=>!a,preventDefault:!0},[n]),je(["shift+c"],()=>{l()},{enabled:()=>!a,preventDefault:!0},[]),je(["h"],()=>{u()},{enabled:()=>!a,preventDefault:!0},[i]);const s=()=>{e(nb(n==="mask"?"base":"mask"))},l=()=>e(Wk()),u=()=>e(Y2(!i));return b(zs,{trigger:"hover",triggerComponent:b(Yi,{children:b(Qe,{"aria-label":t("unifiedcanvas:maskingOptions"),tooltip:t("unifiedcanvas:maskingOptions"),icon:b(o7e,{}),style:n==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:a})}),children:ee(bt,{direction:"column",gap:"0.5rem",children:[b(pr,{label:`${t("unifiedcanvas:enableMask")} (H)`,isChecked:i,onChange:u}),b(pr,{label:t("unifiedcanvas:preserveMaskedArea"),isChecked:o,onChange:f=>e(vW(f.target.checked))}),b(hb,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:r,onChange:f=>e(hW(f))}),ee(co,{size:"sm",leftIcon:b(Xh,{}),onClick:l,children:[t("unifiedcanvas:clearMask")," (Shift+C)"]})]})})},YAe=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),f=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(f);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},KAe=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},XAe=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},ZAe={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},gd=(e=ZAe)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(Hbe("Exporting Image")),t(O0(!1));const u=n(),{stageScale:f,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,y=Fs();if(!y){t(Bu(!1)),t(O0(!0));return}const{dataURL:x,boundingBox:E}=YAe(y,f,v,i?{...p,...m}:void 0);if(!x){t(Bu(!1)),t(O0(!0));return}const _=new FormData;_.append("data",JSON.stringify({dataURL:x,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:_})).json(),{url:A,width:M,height:I}=T,D={uuid:R0(),category:o?"result":"user",...T};a&&(KAe(A),t(Wm({title:qt.t("toast:downloadImageStarted"),status:"success",duration:2500,isClosable:!0}))),s&&(XAe(A,M,I),t(Wm({title:qt.t("toast:imageCopied"),status:"success",duration:2500,isClosable:!0}))),o&&(t(A0({image:D,category:"result"})),t(Wm({title:qt.t("toast:imageSavedToGallery"),status:"success",duration:2500,isClosable:!0}))),l&&(t(pSe({kind:"image",layer:"base",...E,image:D})),t(Wm({title:qt.t("toast:canvasMerged"),status:"success",duration:2500,isClosable:!0}))),t(Bu(!1)),t(N4(qt.t("common:statusConnected"))),t(O0(!0))},QAe=ot([en,xr,tc],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushSize:a}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),JAe=()=>{const e=Ie(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=ye(QAe),{t:o}=Ge();je(["b"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[]),je(["e"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),je(["c"],()=>{l()},{enabled:()=>!i,preventDefault:!0},[t]),je(["shift+f"],()=>{u()},{enabled:()=>!i,preventDefault:!0}),je(["delete","backspace"],()=>{f()},{enabled:()=>!i,preventDefault:!0}),je(["BracketLeft"],()=>{e(s1(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),je(["BracketRight"],()=>{e(s1(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),je(["shift+BracketLeft"],()=>{e(a1({...n,a:We.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),je(["shift+BracketRight"],()=>{e(a1({...n,a:We.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const a=()=>e(Vl("brush")),s=()=>e(Vl("eraser")),l=()=>e(Vl("colorPicker")),u=()=>e(lW()),f=()=>e(sW());return ee(Yi,{isAttached:!0,children:[b(Qe,{"aria-label":`${o("unifiedcanvas:brush")} (B)`,tooltip:`${o("unifiedcanvas:brush")} (B)`,icon:b(jU,{}),"data-selected":t==="brush"&&!i,onClick:a,isDisabled:i}),b(Qe,{"aria-label":`${o("unifiedcanvas:eraser")} (E)`,tooltip:`${o("unifiedcanvas:eraser")} (E)`,icon:b(HU,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:s}),b(Qe,{"aria-label":`${o("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${o("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:b(WU,{}),isDisabled:i,onClick:u}),b(Qe,{"aria-label":`${o("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${o("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:b(iE,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:f}),b(Qe,{"aria-label":`${o("unifiedcanvas:colorPicker")} (C)`,tooltip:`${o("unifiedcanvas:colorPicker")} (C)`,icon:b(VU,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:l}),b(zs,{trigger:"hover",triggerComponent:b(Qe,{"aria-label":o("unifiedcanvas:brushOptions"),tooltip:o("unifiedcanvas:brushOptions"),icon:b(aE,{})}),children:ee(bt,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[b(bt,{gap:"1rem",justifyContent:"space-between",children:b($o,{label:o("unifiedcanvas:brushSize"),value:r,withInput:!0,onChange:p=>e(s1(p)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),b(hb,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:p=>e(a1(p))})]})})]})};let OI;const VE=()=>({setOpenUploader:e=>{e&&(OI=e)},openUploader:OI}),eOe=ot([tc,en,xr],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o,layer:a,isMaskEnabled:s}=t;return{isProcessing:r,isStaging:n,isMaskEnabled:s,tool:i,layer:a,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),tOe=()=>{const e=Ie(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=ye(eOe),s=Fs(),{t:l}=Ge(),{openUploader:u}=VE();je(["v"],()=>{f()},{enabled:()=>!n,preventDefault:!0},[]),je(["r"],()=>{p()},{enabled:()=>!0,preventDefault:!0},[s]),je(["shift+m"],()=>{v()},{enabled:()=>!n,preventDefault:!0},[s,t]),je(["shift+s"],()=>{y()},{enabled:()=>!n,preventDefault:!0},[s,t]),je(["meta+c","ctrl+c"],()=>{x()},{enabled:()=>!n,preventDefault:!0},[s,t]),je(["shift+d"],()=>{E()},{enabled:()=>!n,preventDefault:!0},[s,t]);const f=()=>e(Vl("move")),p=()=>{const C=Fs();if(!C)return;const T=C.getClientRect({skipTransform:!0});e(dW({contentRect:T}))},m=()=>{e(Uk()),e(RS())},v=()=>{e(gd({cropVisible:!1,shouldSetAsInitialImage:!0}))},y=()=>{e(gd({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},x=()=>{e(gd({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},E=()=>{e(gd({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))},_=C=>{const T=C.target.value;e(nb(T)),T==="mask"&&!r&&e(Y2(!0))};return ee("div",{className:"inpainting-settings",children:[b(Hs,{tooltip:`${l("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:oW,onChange:_,isDisabled:n}),b(qAe,{}),b(JAe,{}),ee(Yi,{isAttached:!0,children:[b(Qe,{"aria-label":`${l("unifiedcanvas:move")} (V)`,tooltip:`${l("unifiedcanvas:move")} (V)`,icon:b(zU,{}),"data-selected":o==="move"||n,onClick:f}),b(Qe,{"aria-label":`${l("unifiedcanvas:resetView")} (R)`,tooltip:`${l("unifiedcanvas:resetView")} (R)`,icon:b(FU,{}),onClick:p})]}),ee(Yi,{isAttached:!0,children:[b(Qe,{"aria-label":`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${l("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:b(UU,{}),onClick:v,isDisabled:n}),b(Qe,{"aria-label":`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${l("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:b(oE,{}),onClick:y,isDisabled:n}),b(Qe,{"aria-label":`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${l("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:b(X2,{}),onClick:x,isDisabled:n}),b(Qe,{"aria-label":`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${l("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:b(rE,{}),onClick:E,isDisabled:n})]}),ee(Yi,{isAttached:!0,children:[b(kG,{}),b(EG,{})]}),ee(Yi,{isAttached:!0,children:[b(Qe,{"aria-label":`${l("common:upload")}`,tooltip:`${l("common:upload")}`,icon:b(KS,{}),onClick:u,isDisabled:n}),b(Qe,{"aria-label":`${l("unifiedcanvas:clearCanvas")}`,tooltip:`${l("unifiedcanvas:clearCanvas")}`,icon:b(Xh,{}),onClick:m,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),b(Yi,{isAttached:!0,children:b(MAe,{})})]})},nOe=ot([en],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),rOe=()=>{const e=Ie(),{doesCanvasNeedScaling:t}=ye(nOe);return k.exports.useLayoutEffect(()=>{e(li(!0));const n=We.debounce(()=>{e(li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),b("div",{className:"workarea-single-view",children:b("div",{className:"workarea-split-view-left",children:ee("div",{className:"inpainting-main-area",children:[b(tOe,{}),b("div",{className:"inpainting-canvas-area",children:t?b(gG,{}):b(_G,{})})]})})})},iOe=ot([en,xr],(e,t)=>{const{layer:n,isMaskEnabled:r}=e;return{layer:n,isMaskEnabled:r,isStaging:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function oOe(){const e=Ie(),{t}=Ge(),{layer:n,isMaskEnabled:r,isStaging:i}=ye(iOe),o=()=>{e(nb(n==="mask"?"base":"mask"))};je(["q"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[n]);const a=s=>{const l=s.target.value;e(nb(l)),l==="mask"&&!r&&e(Y2(!0))};return b(Hs,{tooltip:`${t("unifiedcanvas:layer")} (Q)`,tooltipProps:{hasArrow:!0,placement:"top"},value:n,validValues:oW,onChange:a,isDisabled:i})}const aOe=ot([en,xr,tc],(e,t,n)=>{const{isProcessing:r}=n,{tool:i}=e;return{tool:i,isStaging:t,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),sOe=()=>{const e=Ie(),{t}=Ge(),{tool:n,isStaging:r}=ye(aOe);je(["b"],()=>{i()},{enabled:()=>!r,preventDefault:!0},[]),je(["e"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n]),je(["c"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n]),je(["shift+f"],()=>{s()},{enabled:()=>!r,preventDefault:!0}),je(["delete","backspace"],()=>{l()},{enabled:()=>!r,preventDefault:!0});const i=()=>e(Vl("brush")),o=()=>e(Vl("eraser")),a=()=>e(Vl("colorPicker")),s=()=>e(lW()),l=()=>e(sW());return ee(bt,{flexDirection:"column",gap:"0.5rem",children:[ee(Yi,{children:[b(Qe,{"aria-label":`${t("unifiedcanvas:brush")} (B)`,tooltip:`${t("unifiedcanvas:brush")} (B)`,icon:b(jU,{}),"data-selected":n==="brush"&&!r,onClick:i,isDisabled:r}),b(Qe,{"aria-label":`${t("unifiedcanvas:eraser")} (E)`,tooltip:`${t("unifiedcanvas:eraser")} (B)`,icon:b(HU,{}),"data-selected":n==="eraser"&&!r,isDisabled:r,onClick:o})]}),ee(Yi,{children:[b(Qe,{"aria-label":`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,tooltip:`${t("unifiedcanvas:fillBoundingBox")} (Shift+F)`,icon:b(WU,{}),isDisabled:r,onClick:s}),b(Qe,{"aria-label":`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,tooltip:`${t("unifiedcanvas:eraseBoundingBox")} (Del/Backspace)`,icon:b(iE,{style:{transform:"rotate(45deg)"}}),isDisabled:r,onClick:l})]}),b(Qe,{"aria-label":`${t("unifiedcanvas:colorPicker")} (C)`,tooltip:`${t("unifiedcanvas:colorPicker")} (C)`,icon:b(VU,{}),"data-selected":n==="colorPicker"&&!r,isDisabled:r,onClick:a,width:"max-content"})]})},lOe=ot([en],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldShowCanvasDebugInfo:r,shouldShowIntermediates:i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),uOe=()=>{const e=Ie(),{t}=Ge(),{shouldAutoSave:n,shouldCropToBoundingBoxOnSave:r,shouldShowCanvasDebugInfo:i,shouldShowIntermediates:o}=ye(lOe);return b(zs,{trigger:"hover",triggerComponent:b(Qe,{tooltip:t("unifiedcanvas:canvasSettings"),tooltipProps:{placement:"bottom"},"aria-label":t("unifiedcanvas:canvasSettings"),icon:b(XS,{})}),children:ee(bt,{direction:"column",gap:"0.5rem",children:[b(pr,{label:t("unifiedcanvas:showIntermediates"),isChecked:o,onChange:a=>e(SW(a.target.checked))}),b(pr,{label:t("unifiedcanvas:autoSaveToGallery"),isChecked:n,onChange:a=>e(pW(a.target.checked))}),b(pr,{label:t("unifiedcanvas:saveBoxRegionOnly"),isChecked:r,onChange:a=>e(gW(a.target.checked))}),b(pr,{label:t("unifiedcanvas:showCanvasDebugInfo"),isChecked:i,onChange:a=>e(yW(a.target.checked))}),b(LG,{}),b(TG,{})]})})};function cOe(){const e=ye(o=>o.canvas.tool),t=ye(xr),n=Ie(),{t:r}=Ge();je(["v"],()=>{i()},{enabled:()=>!t,preventDefault:!0},[]);const i=()=>n(Vl("move"));return b(Qe,{"aria-label":`${r("unifiedcanvas:move")} (V)`,tooltip:`${r("unifiedcanvas:move")} (V)`,icon:b(zU,{}),"data-selected":e==="move"||t,onClick:i})}function dOe(){const e=Fs(),t=Ie(),{t:n}=Ge();je(["r"],()=>{r()},{enabled:()=>!0,preventDefault:!0},[e]);const r=()=>{const i=Fs();if(!i)return;const o=i.getClientRect({skipTransform:!0});t(dW({contentRect:o}))};return b(Qe,{"aria-label":`${n("unifiedcanvas:resetView")} (R)`,tooltip:`${n("unifiedcanvas:resetView")} (R)`,icon:b(FU,{}),onClick:r})}function fOe(){const e=Ie(),{t}=Ge(),n=Fs(),r=ye(xr),i=ye(a=>a.system.isProcessing);je(["shift+m"],()=>{o()},{enabled:()=>!r,preventDefault:!0},[n,i]);const o=()=>{e(gd({cropVisible:!1,shouldSetAsInitialImage:!0}))};return b(Qe,{"aria-label":`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,tooltip:`${t("unifiedcanvas:mergeVisible")} (Shift+M)`,icon:b(UU,{}),onClick:o,isDisabled:r})}function hOe(){const e=ye(xr),t=Fs(),n=ye(s=>s.system.isProcessing),r=ye(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Ie(),{t:o}=Ge();je(["shift+s"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(gd({cropVisible:!r,cropToBoundingBox:r,shouldSaveToGallery:!0}))};return b(Qe,{"aria-label":`${o("unifiedcanvas:saveToGallery")} (Shift+S)`,tooltip:`${o("unifiedcanvas:saveToGallery")} (Shift+S)`,icon:b(oE,{}),onClick:a,isDisabled:e})}function pOe(){const e=ye(xr),t=Fs(),n=ye(s=>s.system.isProcessing),r=ye(s=>s.canvas.shouldCropToBoundingBoxOnSave),i=Ie(),{t:o}=Ge();je(["meta+c","ctrl+c"],()=>{a()},{enabled:()=>!e,preventDefault:!0},[t,n]);const a=()=>{i(gd({cropVisible:!r,cropToBoundingBox:r,shouldCopy:!0}))};return b(Qe,{"aria-label":`${o("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,tooltip:`${o("unifiedcanvas:copyToClipboard")} (Cmd/Ctrl+C)`,icon:b(X2,{}),onClick:a,isDisabled:e})}function gOe(){const e=Ie(),{t}=Ge(),n=Fs(),r=ye(xr),i=ye(s=>s.system.isProcessing),o=ye(s=>s.canvas.shouldCropToBoundingBoxOnSave);je(["shift+d"],()=>{a()},{enabled:()=>!r,preventDefault:!0},[n,i]);const a=()=>{e(gd({cropVisible:!o,cropToBoundingBox:o,shouldDownload:!0}))};return b(Qe,{"aria-label":`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,tooltip:`${t("unifiedcanvas:downloadAsImage")} (Shift+D)`,icon:b(rE,{}),onClick:a,isDisabled:r})}function mOe(){const e=ye(xr),{openUploader:t}=VE(),{t:n}=Ge();return b(Qe,{"aria-label":n("common:upload"),tooltip:n("common:upload"),icon:b(KS,{}),onClick:t,isDisabled:e})}function vOe(){const e=Ie(),{t}=Ge(),n=ye(xr),r=()=>{e(Uk()),e(RS())};return b(Qe,{"aria-label":t("unifiedcanvas:clearCanvas"),tooltip:t("unifiedcanvas:clearCanvas"),icon:b(Xh,{}),onClick:r,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})}function yOe(){const e=ye(i=>i.options.shouldPinOptionsPanel),t=Ie(),{t:n}=Ge(),r=()=>{t(Du(!0)),e&&setTimeout(()=>t(li(!0)),400)};return ee(bt,{flexDirection:"column",gap:"0.5rem",children:[b(Qe,{tooltip:`${n("options:showOptionsPanel")} (O)`,tooltipProps:{placement:"top"},"aria-label":n("options:showOptionsPanel"),onClick:r,children:b(aE,{})}),b(bt,{children:b(bE,{iconButton:!0})}),b(bt,{children:b(SE,{width:"100%",height:"40px"})})]})}const bOe=()=>{const e=ye(t=>t.options.shouldShowOptionsPanel);return ee(bt,{flexDirection:"column",rowGap:"0.5rem",width:"6rem",children:[b(oOe,{}),b(sOe,{}),ee(bt,{gap:"0.5rem",children:[b(cOe,{}),b(dOe,{})]}),ee(bt,{columnGap:"0.5rem",children:[b(fOe,{}),b(hOe,{})]}),ee(bt,{columnGap:"0.5rem",children:[b(pOe,{}),b(gOe,{})]}),ee(bt,{gap:"0.5rem",children:[b(kG,{}),b(EG,{})]}),ee(bt,{gap:"0.5rem",children:[b(mOe,{}),b(vOe,{})]}),b(uOe,{}),!e&&b(yOe,{})]})};function SOe(){const e=Ie(),t=ye(i=>i.canvas.brushSize),{t:n}=Ge(),r=ye(xr);return je(["BracketLeft"],()=>{e(s1(Math.max(t-5,5)))},{enabled:()=>!r,preventDefault:!0},[t]),je(["BracketRight"],()=>{e(s1(Math.min(t+5,500)))},{enabled:()=>!r,preventDefault:!0},[t]),b($o,{label:n("unifiedcanvas:brushSize"),value:t,withInput:!0,onChange:i=>e(s1(i)),sliderNumberInputProps:{max:500},inputReadOnly:!1,width:"100px",isCompact:!0})}const xOe=ot([en,xr],(e,t)=>{const{brushColor:n,maskColor:r,layer:i}=e;return{brushColor:n,maskColor:r,layer:i,isStaging:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function wOe(){const e=Ie(),{brushColor:t,maskColor:n,layer:r,isStaging:i}=ye(xOe),o=()=>{if(r==="base")return`rgba(${t.r},${t.g},${t.b},${t.a})`;if(r==="mask")return`rgba(${n.r},${n.g},${n.b},${n.a})`};return je(["shift+BracketLeft"],()=>{e(a1({...t,a:We.clamp(t.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),je(["shift+BracketRight"],()=>{e(a1({...t,a:We.clamp(t.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[t]),b(zs,{trigger:"hover",triggerComponent:b(Ud,{style:{width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",borderRadius:"99999999px",backgroundColor:o(),cursor:"pointer"}}),children:ee(bt,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[r==="base"&&b(hb,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:t,onChange:a=>e(a1(a))}),r==="mask"&&b(hb,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:a=>e(hW(a))})]})})}function MG(){return ee(bt,{columnGap:"1rem",alignItems:"center",children:[b(SOe,{}),b(wOe,{})]})}function COe(){const e=Ie(),t=ye(r=>r.canvas.shouldRestrictStrokesToBox),{t:n}=Ge();return b(pr,{label:n("unifiedcanvas:betaLimitToBox"),isChecked:t,onChange:r=>e(wW(r.target.checked))})}function _Oe(){return ee(bt,{gap:"1rem",alignItems:"center",children:[b(MG,{}),b(COe,{})]})}function kOe(){const e=Ie(),{t}=Ge();return b(co,{size:"sm",leftIcon:b(Xh,{}),onClick:()=>e(Wk()),tooltip:`${t("unifiedcanvas:clearMask")} (Shift+C)`,children:t("unifiedcanvas:betaClear")})}function EOe(){const e=ye(i=>i.canvas.isMaskEnabled),t=Ie(),{t:n}=Ge(),r=()=>t(Y2(!e));return b(pr,{label:`${n("unifiedcanvas:enableMask")} (H)`,isChecked:e,onChange:r})}function POe(){const e=Ie(),{t}=Ge(),n=ye(r=>r.canvas.shouldPreserveMaskedArea);return b(pr,{label:t("unifiedcanvas:betaPreserveMasked"),isChecked:n,onChange:r=>e(vW(r.target.checked))})}function TOe(){return ee(bt,{gap:"1rem",alignItems:"center",children:[b(MG,{}),b(EOe,{}),b(POe,{}),b(kOe,{})]})}function LOe(){const e=ye(r=>r.canvas.shouldDarkenOutsideBoundingBox),t=Ie(),{t:n}=Ge();return b(pr,{label:n("unifiedcanvas:betaDarkenOutside"),isChecked:e,onChange:r=>t(mW(r.target.checked))})}function AOe(){const e=ye(r=>r.canvas.shouldShowGrid),t=Ie(),{t:n}=Ge();return b(pr,{label:n("unifiedcanvas:showGrid"),isChecked:e,onChange:r=>t(bW(r.target.checked))})}function OOe(){const e=ye(i=>i.canvas.shouldSnapToGrid),t=Ie(),{t:n}=Ge(),r=i=>t(rb(i.target.checked));return b(pr,{label:`${n("unifiedcanvas:snapToGrid")} (N)`,isChecked:e,onChange:r})}function ROe(){return ee(bt,{alignItems:"center",gap:"1rem",children:[b(AOe,{}),b(OOe,{}),b(LOe,{})]})}const MOe=ot([en],e=>{const{tool:t,layer:n}=e;return{tool:t,layer:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function IOe(){const{tool:e,layer:t}=ye(MOe);return ee(bt,{height:"2rem",minHeight:"2rem",maxHeight:"2rem",alignItems:"center",children:[t=="base"&&["brush","eraser","colorPicker"].includes(e)&&b(_Oe,{}),t=="mask"&&["brush","eraser","colorPicker"].includes(e)&&b(TOe,{}),e=="move"&&b(ROe,{})]})}const DOe=ot([en],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),NOe=()=>{const e=Ie(),{doesCanvasNeedScaling:t}=ye(DOe);return k.exports.useLayoutEffect(()=>{e(li(!0));const n=We.debounce(()=>{e(li(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),b("div",{className:"workarea-single-view",children:ee(bt,{flexDirection:"row",width:"100%",height:"100%",columnGap:"1rem",padding:"1rem",children:[b(bOe,{}),ee(bt,{width:"100%",height:"100%",flexDirection:"column",rowGap:"1rem",children:[b(IOe,{}),t?b(gG,{}):b(_G,{})]})]})})};function BOe(){const e=ye(t=>t.options.shouldUseCanvasBetaLayout);return b(RE,{optionsPanel:b(FTe,{}),styleClass:"inpainting-workarea-overrides",children:e?b(NOe,{}):b(rOe,{})})}const zOe=dt({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:b("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"})});function $Oe(){const{t:e}=Ge();return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[b("h1",{children:e("common:training")}),ee("p",{children:[e("common:trainingDesc1"),b("br",{}),b("br",{}),e("common:trainingDesc2")]})]})}const FOe=dt({displayName:"TrainingIcon",viewBox:"0 0 3544 3544",path:b("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"})});function HOe(e){const{i18n:t}=Ge(),n=localStorage.getItem("i18nextLng");oe.useEffect(()=>{e()},[e]),oe.useEffect(()=>{t.on("languageChanged",()=>{e()})},[e,t,n])}const Va={txt2img:{title:b(L8e,{fill:"black",boxSize:"2.5rem"}),workarea:b(yPe,{}),tooltip:"Text To Image"},img2img:{title:b(E8e,{fill:"black",boxSize:"2.5rem"}),workarea:b(hPe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:b(zOe,{fill:"black",boxSize:"2.5rem"}),workarea:b(BOe,{}),tooltip:"Unified Canvas"},nodes:{title:b(P8e,{fill:"black",boxSize:"2.5rem"}),workarea:b(_8e,{}),tooltip:"Nodes"},postprocess:{title:b(T8e,{fill:"black",boxSize:"2.5rem"}),workarea:b(k8e,{}),tooltip:"Post Processing"},training:{title:b(FOe,{fill:"black",boxSize:"2.5rem"}),workarea:b($Oe,{}),tooltip:"Training"}};function VOe(){Va.txt2img.tooltip=qt.t("common:text2img"),Va.img2img.tooltip=qt.t("common:img2img"),Va.unifiedCanvas.tooltip=qt.t("common:unifiedCanvas"),Va.nodes.tooltip=qt.t("common:nodes"),Va.postprocess.tooltip=qt.t("common:postProcessing"),Va.training.tooltip=qt.t("common:training")}function WOe(){const e=ye(o=>o.options.activeTab),t=ye(o=>o.options.isLightBoxOpen);HOe(VOe);const n=Ie();je("1",()=>{n(Do(0))}),je("2",()=>{n(Do(1))}),je("3",()=>{n(Do(2))}),je("4",()=>{n(Do(3))}),je("5",()=>{n(Do(4))}),je("6",()=>{n(Do(5))}),je("z",()=>{n(Iu(!t))},[t]);const r=()=>{const o=[];return Object.keys(Va).forEach(a=>{o.push(b(Zi,{hasArrow:!0,label:Va[a].tooltip,placement:"right",children:b(JH,{children:Va[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(Va).forEach(a=>{o.push(b(ZH,{className:"app-tabs-panel",children:Va[a].workarea},a))}),o};return ee(XH,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(Do(o))},children:[b("div",{className:"app-tabs-list",children:r()}),b(QH,{className:"app-tabs-panels",children:t?b(OTe,{}):i()})]})}var UOe=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 ey(e,t){var n=jOe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function jOe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=UOe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var GOe=[".DS_Store","Thumbs.db"];function qOe(e){return $1(this,void 0,void 0,function(){return F1(this,function(t){return pb(e)&&YOe(e.dataTransfer)?[2,QOe(e.dataTransfer,e.type)]:KOe(e)?[2,XOe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ZOe(e)]:[2,[]]})})}function YOe(e){return pb(e)}function KOe(e){return pb(e)&&pb(e.target)}function pb(e){return typeof e=="object"&&e!==null}function XOe(e){return W9(e.target.files).map(function(t){return ey(t)})}function ZOe(e){return $1(this,void 0,void 0,function(){var t;return F1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return ey(r)})]}})})}function QOe(e,t){return $1(this,void 0,void 0,function(){var n,r;return F1(this,function(i){switch(i.label){case 0:return e.items?(n=W9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(JOe))]):[3,2];case 1:return r=i.sent(),[2,RI(IG(r))];case 2:return[2,RI(W9(e.files).map(function(o){return ey(o)}))]}})})}function RI(e){return e.filter(function(t){return GOe.indexOf(t.name)===-1})}function W9(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function JOe(e){if(typeof e.webkitGetAsEntry!="function")return MI(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?DG(t):MI(e)}function IG(e){return e.reduce(function(t,n){return w7(w7([],KA(t),!1),KA(Array.isArray(n)?IG(n):[n]),!1)},[])}function MI(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ey(t);return Promise.resolve(n)}function eRe(e){return $1(this,void 0,void 0,function(){return F1(this,function(t){return[2,e.isDirectory?DG(e):tRe(e)]})})}function DG(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return $1(a,void 0,void 0,function(){var l,u,f;return F1(this,function(p){switch(p.label){case 0:if(s.length)return[3,5];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=p.sent(),n(l),[3,4];case 3:return u=p.sent(),r(u),[3,4];case 4:return[3,6];case 5:f=Promise.all(s.map(eRe)),i.push(f),o(),p.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function tRe(e){return $1(this,void 0,void 0,function(){return F1(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=ey(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var nRe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function II(e){return oRe(e)||iRe(e)||BG(e)||rRe()}function rRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oRe(e){if(Array.isArray(e))return U9(e)}function DI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(r){NG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w2(e,t){return lRe(e)||sRe(e,t)||BG(e,t)||aRe()}function aRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BG(e,t){if(!!e){if(typeof e=="string")return U9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U9(e,t)}}function U9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function lRe(e){if(Array.isArray(e))return e}var uRe="file-invalid-type",cRe="file-too-large",dRe="file-too-small",fRe="too-many-files",hRe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:uRe,message:"File type must be ".concat(n)}},BI=function(t){return{code:cRe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},zI=function(t){return{code:dRe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},pRe={code:fRe,message:"Too many files"};function zG(e,t){var n=e.type==="application/x-moz-file"||nRe(e,t);return[n,n?null:hRe(t)]}function $G(e,t,n){if(rh(e.size))if(rh(t)&&rh(n)){if(e.size>n)return[!1,BI(n)];if(e.size<t)return[!1,zI(t)]}else{if(rh(t)&&e.size<t)return[!1,zI(t)];if(rh(n)&&e.size>n)return[!1,BI(n)]}return[!0,null]}function rh(e){return e!=null}function gRe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=zG(l,n),f=w2(u,1),p=f[0],m=$G(l,r,i),v=w2(m,1),y=v[0],x=s?s(l):null;return p&&y&&!x})}function gb(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function n4(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function $I(e){e.preventDefault()}function mRe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function vRe(e){return e.indexOf("Edge/")!==-1}function yRe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return mRe(e)||vRe(e)}function Sl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!gb(r)&&s&&s.apply(void 0,[r].concat(o)),gb(r)})}}function bRe(){return"showOpenFilePicker"in window}function SRe(e){if(rh(e)){var t=Object.entries(e).filter(function(n){var r=w2(n,2),i=r[0],o=r[1],a=!0;return FG(i)||(console.warn('Skipped "'.concat(i,'" 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.')),a=!1),(!Array.isArray(o)||!o.every(HG))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=w2(r,2),o=i[0],a=i[1];return NI(NI({},n),{},NG({},o,a))},{});return[{description:"Files",accept:t}]}return e}function xRe(e){if(rh(e))return Object.entries(e).reduce(function(t,n){var r=w2(n,2),i=r[0],o=r[1];return[].concat(II(t),[i],II(o))},[]).filter(function(t){return FG(t)||HG(t)}).join(",")}function wRe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function CRe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function FG(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function HG(e){return/^.*\.[\w]+$/.test(e)}var _Re=["children"],kRe=["open"],ERe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],PRe=["refKey","onChange","onClick"];function TRe(e){return ORe(e)||ARe(e)||VG(e)||LRe()}function LRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ARe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ORe(e){if(Array.isArray(e))return j9(e)}function W6(e,t){return IRe(e)||MRe(e,t)||VG(e,t)||RRe()}function RRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VG(e,t){if(!!e){if(typeof e=="string")return j9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j9(e,t)}}function j9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function IRe(e){if(Array.isArray(e))return e}function FI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FI(Object(n),!0).forEach(function(r){G9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mb(e,t){if(e==null)return{};var n=DRe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function DRe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var WE=k.exports.forwardRef(function(e,t){var n=e.children,r=mb(e,_Re),i=UG(r),o=i.open,a=mb(i,kRe);return k.exports.useImperativeHandle(t,function(){return{open:o}},[o]),b(k.exports.Fragment,{children:n(fr(fr({},a),{},{open:o}))})});WE.displayName="Dropzone";var WG={disabled:!1,getFilesFromEvent:qOe,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};WE.defaultProps=WG;WE.propTypes={children:$n.exports.func,accept:$n.exports.objectOf($n.exports.arrayOf($n.exports.string)),multiple:$n.exports.bool,preventDropOnDocument:$n.exports.bool,noClick:$n.exports.bool,noKeyboard:$n.exports.bool,noDrag:$n.exports.bool,noDragEventsBubbling:$n.exports.bool,minSize:$n.exports.number,maxSize:$n.exports.number,maxFiles:$n.exports.number,disabled:$n.exports.bool,getFilesFromEvent:$n.exports.func,onFileDialogCancel:$n.exports.func,onFileDialogOpen:$n.exports.func,useFsAccessApi:$n.exports.bool,autoFocus:$n.exports.bool,onDragEnter:$n.exports.func,onDragLeave:$n.exports.func,onDragOver:$n.exports.func,onDrop:$n.exports.func,onDropAccepted:$n.exports.func,onDropRejected:$n.exports.func,onError:$n.exports.func,validator:$n.exports.func};var q9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function UG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=fr(fr({},WG),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,x=t.onFileDialogCancel,E=t.onFileDialogOpen,_=t.useFsAccessApi,C=t.autoFocus,T=t.preventDropOnDocument,A=t.noClick,M=t.noKeyboard,I=t.noDrag,D=t.noDragEventsBubbling,B=t.onError,F=t.validator,H=k.exports.useMemo(function(){return xRe(n)},[n]),Y=k.exports.useMemo(function(){return SRe(n)},[n]),te=k.exports.useMemo(function(){return typeof E=="function"?E:HI},[E]),G=k.exports.useMemo(function(){return typeof x=="function"?x:HI},[x]),z=k.exports.useRef(null),W=k.exports.useRef(null),K=k.exports.useReducer(NRe,q9),Z=W6(K,2),U=Z[0],Q=Z[1],ue=U.isFocused,fe=U.isFileDialogActive,Te=k.exports.useRef(typeof window<"u"&&window.isSecureContext&&_&&bRe()),Oe=function(){!Te.current&&fe&&setTimeout(function(){if(W.current){var nt=W.current.files;nt.length||(Q({type:"closeDialog"}),G())}},300)};k.exports.useEffect(function(){return window.addEventListener("focus",Oe,!1),function(){window.removeEventListener("focus",Oe,!1)}},[W,fe,G,Te]);var ve=k.exports.useRef([]),Ce=function(nt){z.current&&z.current.contains(nt.target)||(nt.preventDefault(),ve.current=[])};k.exports.useEffect(function(){return T&&(document.addEventListener("dragover",$I,!1),document.addEventListener("drop",Ce,!1)),function(){T&&(document.removeEventListener("dragover",$I),document.removeEventListener("drop",Ce))}},[z,T]),k.exports.useEffect(function(){return!r&&C&&z.current&&z.current.focus(),function(){}},[z,C,r]);var Re=k.exports.useCallback(function(De){B?B(De):console.error(De)},[B]),Ye=k.exports.useCallback(function(De){De.preventDefault(),De.persist(),Pt(De),ve.current=[].concat(TRe(ve.current),[De.target]),n4(De)&&Promise.resolve(i(De)).then(function(nt){if(!(gb(De)&&!D)){var tn=nt.length,Zt=tn>0&&gRe({files:nt,accept:H,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:F}),Ee=tn>0&&!Zt;Q({isDragAccept:Zt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(De)}}).catch(function(nt){return Re(nt)})},[i,u,Re,D,H,a,o,s,l,F]),Ue=k.exports.useCallback(function(De){De.preventDefault(),De.persist(),Pt(De);var nt=n4(De);if(nt&&De.dataTransfer)try{De.dataTransfer.dropEffect="copy"}catch(tn){}return nt&&p&&p(De),!1},[p,D]),pt=k.exports.useCallback(function(De){De.preventDefault(),De.persist(),Pt(De);var nt=ve.current.filter(function(Zt){return z.current&&z.current.contains(Zt)}),tn=nt.indexOf(De.target);tn!==-1&&nt.splice(tn,1),ve.current=nt,!(nt.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),n4(De)&&f&&f(De))},[z,f,D]),wt=k.exports.useCallback(function(De,nt){var tn=[],Zt=[];De.forEach(function(Ee){var Ct=zG(Ee,H),Wt=W6(Ct,2),$e=Wt[0],ct=Wt[1],hn=$G(Ee,a,o),Be=W6(hn,2),gt=Be[0],rt=Be[1],Bt=F?F(Ee):null;if($e&&gt&&!Bt)tn.push(Ee);else{var ln=[ct,rt];Bt&&(ln=ln.concat(Bt)),Zt.push({file:Ee,errors:ln.filter(function(wr){return wr})})}}),(!s&&tn.length>1||s&&l>=1&&tn.length>l)&&(tn.forEach(function(Ee){Zt.push({file:Ee,errors:[pRe]})}),tn.splice(0)),Q({acceptedFiles:tn,fileRejections:Zt,type:"setFiles"}),m&&m(tn,Zt,nt),Zt.length>0&&y&&y(Zt,nt),tn.length>0&&v&&v(tn,nt)},[Q,s,H,a,o,l,m,v,y,F]),ut=k.exports.useCallback(function(De){De.preventDefault(),De.persist(),Pt(De),ve.current=[],n4(De)&&Promise.resolve(i(De)).then(function(nt){gb(De)&&!D||wt(nt,De)}).catch(function(nt){return Re(nt)}),Q({type:"reset"})},[i,wt,Re,D]),ft=k.exports.useCallback(function(){if(Te.current){Q({type:"openDialog"}),te();var De={multiple:s,types:Y};window.showOpenFilePicker(De).then(function(nt){return i(nt)}).then(function(nt){wt(nt,null),Q({type:"closeDialog"})}).catch(function(nt){wRe(nt)?(G(nt),Q({type:"closeDialog"})):CRe(nt)?(Te.current=!1,W.current?(W.current.value=null,W.current.click()):Re(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."))):Re(nt)});return}W.current&&(Q({type:"openDialog"}),te(),W.current.value=null,W.current.click())},[Q,te,G,_,wt,Re,Y,s]),vt=k.exports.useCallback(function(De){!z.current||!z.current.isEqualNode(De.target)||(De.key===" "||De.key==="Enter"||De.keyCode===32||De.keyCode===13)&&(De.preventDefault(),ft())},[z,ft]),ke=k.exports.useCallback(function(){Q({type:"focus"})},[]),at=k.exports.useCallback(function(){Q({type:"blur"})},[]),Rt=k.exports.useCallback(function(){A||(yRe()?setTimeout(ft,0):ft())},[A,ft]),tt=function(nt){return r?null:nt},yt=function(nt){return M?null:tt(nt)},dn=function(nt){return I?null:tt(nt)},Pt=function(nt){D&&nt.stopPropagation()},Yt=k.exports.useMemo(function(){return function(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},nt=De.refKey,tn=nt===void 0?"ref":nt,Zt=De.role,Ee=De.onKeyDown,Ct=De.onFocus,Wt=De.onBlur,$e=De.onClick,ct=De.onDragEnter,hn=De.onDragOver,Be=De.onDragLeave,gt=De.onDrop,rt=mb(De,ERe);return fr(fr(G9({onKeyDown:yt(Sl(Ee,vt)),onFocus:yt(Sl(Ct,ke)),onBlur:yt(Sl(Wt,at)),onClick:tt(Sl($e,Rt)),onDragEnter:dn(Sl(ct,Ye)),onDragOver:dn(Sl(hn,Ue)),onDragLeave:dn(Sl(Be,pt)),onDrop:dn(Sl(gt,ut)),role:typeof Zt=="string"&&Zt!==""?Zt:"presentation"},tn,z),!r&&!M?{tabIndex:0}:{}),rt)}},[z,vt,ke,at,Rt,Ye,Ue,pt,ut,M,I,r]),fn=k.exports.useCallback(function(De){De.stopPropagation()},[]),Cn=k.exports.useMemo(function(){return function(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},nt=De.refKey,tn=nt===void 0?"ref":nt,Zt=De.onChange,Ee=De.onClick,Ct=mb(De,PRe),Wt=G9({accept:H,multiple:s,type:"file",style:{display:"none"},onChange:tt(Sl(Zt,ut)),onClick:tt(Sl(Ee,fn)),tabIndex:-1},tn,W);return fr(fr({},Wt),Ct)}},[W,n,s,ut,r]);return fr(fr({},U),{},{isFocused:ue&&!r,getRootProps:Yt,getInputProps:Cn,rootRef:z,inputRef:W,open:tt(ft)})}function NRe(e,t){switch(t.type){case"focus":return fr(fr({},e),{},{isFocused:!0});case"blur":return fr(fr({},e),{},{isFocused:!1});case"openDialog":return fr(fr({},q9),{},{isFileDialogActive:!0});case"closeDialog":return fr(fr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return fr(fr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return fr(fr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return fr({},q9);default:return e}}function HI(){}const BRe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return je("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&b("div",{className:"dropzone-overlay is-drag-accept",children:ee(wh,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[b(wh,{size:"lg",children:"Invalid Upload"}),b(wh,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},VI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Sr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:R0(),category:"user",...l};t(A0({image:u,category:"user"})),o==="unifiedCanvas"?t(MS(u)):o==="img2img"&&t(j1(u))},zRe=e=>{const{children:t}=e,n=Ie(),r=ye(Sr),i=j2({}),{t:o}=Ge(),[a,s]=k.exports.useState(!1),{setOpenUploader:l}=VE(),u=k.exports.useCallback(T=>{s(!0);const A=T.errors.reduce((M,I)=>M+`
`+I.message,"");i({title:o("toast:uploadFailed"),description:A,status:"error",isClosable:!0})},[o,i]),f=k.exports.useCallback(async T=>{n(VI({imageFile:T}))},[n]),p=k.exports.useCallback((T,A)=>{A.forEach(M=>{u(M)}),T.forEach(M=>{f(M)})},[f,u]),{getRootProps:m,getInputProps:v,isDragAccept:y,isDragReject:x,isDragActive:E,open:_}=UG({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:p,onDragOver:()=>s(!0),maxFiles:1});l(_),k.exports.useEffect(()=>{const T=A=>{var B;const M=(B=A.clipboardData)==null?void 0:B.items;if(!M)return;const I=[];for(const F of M)F.kind==="file"&&["image/png","image/jpg"].includes(F.type)&&I.push(F);if(!I.length)return;if(A.stopImmediatePropagation(),I.length>1){i({description:o("toast:uploadFailedMultipleImagesDesc"),status:"error",isClosable:!0});return}const D=I[0].getAsFile();if(!D){i({description:o("toast:uploadFailedUnableToLoadDesc"),status:"error",isClosable:!0});return}n(VI({imageFile:D}))};return document.addEventListener("paste",T),()=>{document.removeEventListener("paste",T)}},[o,n,i,r]);const C=["img2img","unifiedCanvas"].includes(r)?` to ${Va[r].tooltip}`:"";return b(kE.Provider,{value:_,children:ee("div",{...m({style:{}}),onKeyDown:T=>{T.key},children:[b("input",{...v()}),t,E&&a&&b(BRe,{isDragAccept:y,isDragReject:x,overlaySecondaryText:C,setIsHandlingUpload:s})]})})},$Re=()=>{const e=Ie(),t=ye(w7e),n=j2();k.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(Fbe())},[e,n,t])},jG=ot([e=>e.options,e=>e.gallery,Sr],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o,shouldUseCanvasBetaLayout:a}=e,{shouldShowGallery:s,shouldPinGallery:l,shouldHoldGalleryOpen:u}=t,f=a&&n==="unifiedCanvas",p=!f&&!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),m=!(s||u&&!l)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!f&&(!r||!i),shouldShowOptionsPanelButton:p,shouldShowOptionsPanel:i,shouldShowGallery:s,shouldPinGallery:l,shouldShowGalleryButton:m}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),FRe=()=>{const e=Ie(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=ye(jG),s=()=>{e(Du(!0)),i&&setTimeout(()=>e(li(!0)),400)};return je("f",()=>{o||t?(e(Du(!1)),e(kd(!1))):(e(Du(!0)),e(kd(!0))),(a||i)&&setTimeout(()=>e(li(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[b(Qe,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:b(aE,{})}),r&&ee(In,{children:[b(bE,{iconButton:!0}),b(SE,{})]})]}):null},HRe=()=>{const e=Ie(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=ye(jG),a=()=>{e(kd(!0)),r&&e(li(!0))};return je("f",()=>{t||i?(e(Du(!1)),e(kd(!1))):(e(Du(!0)),e(kd(!0))),(r||o)&&setTimeout(()=>e(li(!0)),400)},[t,i]),n?b(Qe,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:a,children:b(fj,{})}):null};C8e();const VRe=()=>($Re(),ee("div",{className:"App",children:[ee(zRe,{children:[b(HCe,{}),ee("div",{className:"app-content",children:[b(O7e,{}),b(WOe,{})]}),b("div",{className:"app-console",children:b(w8e,{})})]}),b(FRe,{}),b(HRe,{})]}));const WRe=wB({key:"invokeai-style-cache",prepend:!0});j6.createRoot(document.getElementById("root")).render(b(oe.StrictMode,{children:b(RCe,{store:wU,children:b(RU,{loading:b(IM,{}),persistor:MU,children:b(ene,{value:WRe,children:b(Zye,{children:b(oe.Suspense,{fallback:b(IM,{}),children:b(VRe,{})})})})})})}));export{jRe as __vite_legacy_guard};