var rK=Object.defineProperty;var iK=(e,t,n)=>t in e?rK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var en=(e,t,n)=>(iK(e,typeof t!="symbol"?t+"":t,n),n);function $Te(){import("data:text/javascript,")}function oK(e,t){for(var n=0;nr[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 ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Xt={};/** * @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 Kv=Symbol.for("react.element"),aK=Symbol.for("react.portal"),sK=Symbol.for("react.fragment"),lK=Symbol.for("react.strict_mode"),uK=Symbol.for("react.profiler"),cK=Symbol.for("react.provider"),dK=Symbol.for("react.context"),fK=Symbol.for("react.forward_ref"),hK=Symbol.for("react.suspense"),pK=Symbol.for("react.memo"),gK=Symbol.for("react.lazy"),ME=Symbol.iterator;function mK(e){return e===null||typeof e!="object"?null:(e=ME&&e[ME]||e["@@iterator"],typeof e=="function"?e:null)}var lI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uI=Object.assign,cI={};function c1(e,t,n){this.props=e,this.context=t,this.refs=cI,this.updater=n||lI}c1.prototype.isReactComponent={};c1.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")};c1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dI(){}dI.prototype=c1.prototype;function e9(e,t,n){this.props=e,this.context=t,this.refs=cI,this.updater=n||lI}var t9=e9.prototype=new dI;t9.constructor=e9;uI(t9,c1.prototype);t9.isPureReactComponent=!0;var RE=Array.isArray,fI=Object.prototype.hasOwnProperty,n9={current:null},hI={key:!0,ref:!0,__self:!0,__source:!0};function pI(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)fI.call(t,r)&&!hI.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Me=G[me];if(0>>1;mei(be,le))Hei(Je,be)?(G[me]=Je,G[He]=le,me=He):(G[me]=be,G[Se]=le,me=Se);else if(Hei(Je,le))G[me]=Je,G[He]=le,me=He;else break e}}return Z}function i(G,Z){var le=G.sortIndex-Z.sortIndex;return le!==0?le:G.id-Z.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=[],h=1,g=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,_=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(G){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=G)r(u),Z.sortIndex=Z.expirationTime,t(l,Z);else break;Z=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,J(I);else{var Z=n(u);Z!==null&&X(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,P(B),B=-1),v=!0;var le=m;try{for(T(Z),g=n(l);g!==null&&(!(g.expirationTime>Z)||G&&!j());){var me=g.callback;if(typeof me=="function"){g.callback=null,m=g.priorityLevel;var Me=me(g.expirationTime<=Z);Z=e.unstable_now(),typeof Me=="function"?g.callback=Me:g===n(l)&&r(l),T(Z)}else r(l);g=n(l)}if(g!==null)var we=!0;else{var Se=n(u);Se!==null&&X(M,Se.startTime-Z),we=!1}return we}finally{g=null,m=le,v=!1}}var O=!1,D=null,B=-1,$=5,W=-1;function j(){return!(e.unstable_now()-W<$)}function ne(){if(D!==null){var G=e.unstable_now();W=G;var Z=!0;try{Z=D(!0,G)}finally{Z?H():(O=!1,D=null)}}else O=!1}var H;if(typeof _=="function")H=function(){_(ne)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,te=K.port2;K.port1.onmessage=ne,H=function(){te.postMessage(null)}}else H=function(){E(ne,0)};function J(G){D=G,O||(O=!0,H())}function X(G,Z){B=E(function(){G(e.unstable_now())},Z)}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(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,J(I))},e.unstable_forceFrameRate=function(G){0>G||125me?(G.sortIndex=le,t(u,G),n(l)===null&&G===n(u)&&(w?(P(B),B=-1):w=!0,X(M,le-me))):(G.sortIndex=Me,t(l,G),S||v||(S=!0,J(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var le=m;m=Z;try{return G.apply(this,arguments)}finally{m=le}}}})(gI);(function(e){e.exports=gI})(g0);/** * @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 mI=C.exports,ga=g0.exports;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),r6=Object.prototype.hasOwnProperty,xK=/^[: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]*$/,OE={},DE={};function wK(e){return r6.call(DE,e)?!0:r6.call(OE,e)?!1:xK.test(e)?DE[e]=!0:(OE[e]=!0,!1)}function CK(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 _K(e,t,n,r){if(t===null||typeof t>"u"||CK(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 lo(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 Ii={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ii[e]=new lo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ii[t]=new lo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ii[e]=new lo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ii[e]=new lo(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){Ii[e]=new lo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ii[e]=new lo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ii[e]=new lo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ii[e]=new lo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ii[e]=new lo(e,5,!1,e.toLowerCase(),null,!1,!1)});var i9=/[\-:]([a-z])/g;function o9(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(i9,o9);Ii[t]=new lo(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(i9,o9);Ii[t]=new lo(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(i9,o9);Ii[t]=new lo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ii[e]=new lo(e,1,!1,e.toLowerCase(),null,!1,!1)});Ii.xlinkHref=new lo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ii[e]=new lo(e,1,!1,e.toLowerCase(),null,!0,!0)});function a9(e,t,n,r){var i=Ii.hasOwnProperty(t)?Ii[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{rx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?um(e):""}function kK(e){switch(e.tag){case 5:return um(e.type);case 16:return um("Lazy");case 13:return um("Suspense");case 19:return um("SuspenseList");case 0:case 2:case 15:return e=ix(e.type,!1),e;case 11:return e=ix(e.type.render,!1),e;case 1:return e=ix(e.type,!0),e;default:return""}}function s6(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 Kp:return"Fragment";case qp:return"Portal";case i6:return"Profiler";case s9:return"StrictMode";case o6:return"Suspense";case a6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case SI:return(e.displayName||"Context")+".Consumer";case yI:return(e._context.displayName||"Context")+".Provider";case l9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case u9:return t=e.displayName||null,t!==null?t:s6(e.type)||"Memo";case Nc:t=e._payload,e=e._init;try{return s6(e(t))}catch(n){}}return null}function EK(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 s6(t);case 8:return t===s9?"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 dd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function PK(e){var t=xI(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 py(e){e._valueTracker||(e._valueTracker=PK(e))}function wI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function p4(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 l6(e,t){var n=t.checked;return pr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function BE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dd(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 CI(e,t){t=t.checked,t!=null&&a9(e,"checked",t,!1)}function u6(e,t){CI(e,t);var n=dd(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")?c6(e,t.type,n):t.hasOwnProperty("defaultValue")&&c6(e,t.type,dd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zE(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 c6(e,t,n){(t!=="number"||p4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cm=Array.isArray;function m0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=gy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ov(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tm={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},TK=["Webkit","ms","Moz","O"];Object.keys(Tm).forEach(function(e){TK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tm[t]=Tm[e]})});function PI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tm.hasOwnProperty(e)&&Tm[e]?(""+t).trim():t+"px"}function TI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=PI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var LK=pr({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 h6(e,t){if(t){if(LK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function p6(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 g6=null;function c9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var m6=null,v0=null,y0=null;function HE(e){if(e=Qv(e)){if(typeof m6!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=D5(t),m6(e.stateNode,e.type,t))}}function LI(e){v0?y0?y0.push(e):y0=[e]:v0=e}function AI(){if(v0){var e=v0,t=y0;if(y0=v0=null,HE(e),t)for(e=0;e>>=0,e===0?32:31-($K(e)/HK|0)|0}var my=64,vy=4194304;function dm(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 y4(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=dm(s):(o&=a,o!==0&&(r=dm(o)))}else a=n&~i,a!==0?r=dm(a):o!==0&&(r=dm(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;0n;n++)t.push(e);return t}function Xv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ks(t),e[t]=n}function GK(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=Am),XE=String.fromCharCode(32),ZE=!1;function XI(e,t){switch(e){case"keyup":return SX.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xp=!1;function xX(e,t){switch(e){case"compositionend":return ZI(t);case"keypress":return t.which!==32?null:(ZE=!0,XE);case"textInput":return e=t.data,e===XE&&ZE?null:e;default:return null}}function wX(e,t){if(Xp)return e==="compositionend"||!y9&&XI(e,t)?(e=qI(),T3=g9=Uc=null,Xp=!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)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=tP(n)}}function tO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nO(){for(var e=window,t=p4();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=p4(e.document)}return t}function S9(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 MX(e){var t=nO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tO(n.ownerDocument.documentElement,n)){if(r!==null&&S9(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=nP(n,o);var a=nP(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=document.documentMode,Zp=null,w6=null,Rm=null,C6=!1;function rP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;C6||Zp==null||Zp!==p4(r)||(r=Zp,"selectionStart"in r&&S9(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}),Rm&&dv(Rm,r)||(Rm=r,r=x4(w6,"onSelect"),0e0||(e.current=L6[e0],L6[e0]=null,e0--)}function Kn(e,t){e0++,L6[e0]=e.current,e.current=t}var fd={},Gi=bd(fd),Ro=bd(!1),sh=fd;function V0(e,t){var n=e.type.contextTypes;if(!n)return fd;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 Io(e){return e=e.childContextTypes,e!=null}function C4(){Jn(Ro),Jn(Gi)}function cP(e,t,n){if(Gi.current!==fd)throw Error(Oe(168));Kn(Gi,t),Kn(Ro,n)}function dO(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(Oe(108,EK(e)||"Unknown",i));return pr({},n,r)}function _4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fd,sh=Gi.current,Kn(Gi,e),Kn(Ro,Ro.current),!0}function dP(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=dO(e,t,sh),r.__reactInternalMemoizedMergedChildContext=e,Jn(Ro),Jn(Gi),Kn(Gi,e)):Jn(Ro),Kn(Ro,n)}var pu=null,N5=!1,yx=!1;function fO(e){pu===null?pu=[e]:pu.push(e)}function VX(e){N5=!0,fO(e)}function xd(){if(!yx&&pu!==null){yx=!0;var e=0,t=Mn;try{var n=pu;for(Mn=1;e>=a,i-=a,mu=1<<32-ks(t)+i|n<B?($=D,D=null):$=D.sibling;var W=m(P,D,T[B],M);if(W===null){D===null&&(D=$);break}e&&D&&W.alternate===null&&t(P,D),_=o(W,_,B),O===null?I=W:O.sibling=W,O=W,D=$}if(B===T.length)return n(P,D),ir&&Tf(P,B),I;if(D===null){for(;BB?($=D,D=null):$=D.sibling;var j=m(P,D,W.value,M);if(j===null){D===null&&(D=$);break}e&&D&&j.alternate===null&&t(P,D),_=o(j,_,B),O===null?I=j:O.sibling=j,O=j,D=$}if(W.done)return n(P,D),ir&&Tf(P,B),I;if(D===null){for(;!W.done;B++,W=T.next())W=g(P,W.value,M),W!==null&&(_=o(W,_,B),O===null?I=W:O.sibling=W,O=W);return ir&&Tf(P,B),I}for(D=r(P,D);!W.done;B++,W=T.next())W=v(D,P,B,W.value,M),W!==null&&(e&&W.alternate!==null&&D.delete(W.key===null?B:W.key),_=o(W,_,B),O===null?I=W:O.sibling=W,O=W);return e&&D.forEach(function(ne){return t(P,ne)}),ir&&Tf(P,B),I}function E(P,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Kp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case hy:e:{for(var I=T.key,O=_;O!==null;){if(O.key===I){if(I=T.type,I===Kp){if(O.tag===7){n(P,O.sibling),_=i(O,T.props.children),_.return=P,P=_;break e}}else if(O.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Nc&&yP(I)===O.type){n(P,O.sibling),_=i(O,T.props),_.ref=Wg(P,O,T),_.return=P,P=_;break e}n(P,O);break}else t(P,O);O=O.sibling}T.type===Kp?(_=Zf(T.props.children,P.mode,M,T.key),_.return=P,P=_):(M=N3(T.type,T.key,T.props,null,P.mode,M),M.ref=Wg(P,_,T),M.return=P,P=M)}return a(P);case qp:e:{for(O=T.key;_!==null;){if(_.key===O)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(P,_.sibling),_=i(_,T.children||[]),_.return=P,P=_;break e}else{n(P,_);break}else t(P,_);_=_.sibling}_=Ex(T,P.mode,M),_.return=P,P=_}return a(P);case Nc:return O=T._init,E(P,_,O(T._payload),M)}if(cm(T))return S(P,_,T,M);if(Bg(T))return w(P,_,T,M);_y(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(P,_.sibling),_=i(_,T),_.return=P,P=_):(n(P,_),_=kx(T,P.mode,M),_.return=P,P=_),a(P)):n(P,_)}return E}var G0=bO(!0),xO=bO(!1),Jv={},kl=bd(Jv),gv=bd(Jv),mv=bd(Jv);function Hf(e){if(e===Jv)throw Error(Oe(174));return e}function T9(e,t){switch(Kn(mv,t),Kn(gv,e),Kn(kl,Jv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:f6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=f6(t,e)}Jn(kl),Kn(kl,t)}function j0(){Jn(kl),Jn(gv),Jn(mv)}function wO(e){Hf(mv.current);var t=Hf(kl.current),n=f6(t,e.type);t!==n&&(Kn(gv,e),Kn(kl,n))}function L9(e){gv.current===e&&(Jn(kl),Jn(gv))}var dr=bd(0);function A4(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 Sx=[];function A9(){for(var e=0;en?n:4,e(!0);var r=bx.transition;bx.transition={};try{e(!1),t()}finally{Mn=n,bx.transition=r}}function zO(){return Va().memoizedState}function YX(e,t,n){var r=rd(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},FO(e))$O(t,n);else if(n=mO(e,t,n,r),n!==null){var i=oo();Es(n,e,r,i),HO(n,t,r)}}function qX(e,t,n){var r=rd(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(FO(e))$O(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,Rs(s,a)){var l=t.interleaved;l===null?(i.next=i,E9(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch(u){}finally{}n=mO(e,t,i,r),n!==null&&(i=oo(),Es(n,e,r,i),HO(n,t,r))}}function FO(e){var t=e.alternate;return e===hr||t!==null&&t===hr}function $O(e,t){Im=M4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function HO(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,f9(e,n)}}var R4={readContext:Wa,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},KX={readContext:Wa,useCallback:function(e,t){return dl().memoizedState=[e,t===void 0?null:t],e},useContext:Wa,useEffect:bP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,R3(4194308,4,IO.bind(null,t,e),n)},useLayoutEffect:function(e,t){return R3(4194308,4,e,t)},useInsertionEffect:function(e,t){return R3(4,2,e,t)},useMemo:function(e,t){var n=dl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dl();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=YX.bind(null,hr,e),[r.memoizedState,e]},useRef:function(e){var t=dl();return e={current:e},t.memoizedState=e},useState:SP,useDebugValue:D9,useDeferredValue:function(e){return dl().memoizedState=e},useTransition:function(){var e=SP(!1),t=e[0];return e=jX.bind(null,e[1]),dl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=hr,i=dl();if(ir){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),mi===null)throw Error(Oe(349));(uh&30)!==0||kO(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,bP(PO.bind(null,r,o,e),[e]),r.flags|=2048,Sv(9,EO.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=dl(),t=mi.identifierPrefix;if(ir){var n=vu,r=mu;n=(r&~(1<<32-ks(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vv++,0<\/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[vl]=t,e[pv]=r,XO(e,t,!1,!1),t.stateNode=e;e:{switch(a=p6(n,r),n){case"dialog":Zn("cancel",e),Zn("close",e),i=r;break;case"iframe":case"object":case"embed":Zn("load",e),i=r;break;case"video":case"audio":for(i=0;iq0&&(t.flags|=128,r=!0,Vg(o,!1),t.lanes=4194304)}else{if(!r)if(e=A4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ir)return Fi(t),null}else 2*Nr()-o.renderingStartTime>q0&&n!==1073741824&&(t.flags|=128,r=!0,Vg(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=Nr(),t.sibling=null,n=dr.current,Kn(dr,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return H9(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(oa&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function rZ(e,t){switch(x9(t),t.tag){case 1:return Io(t.type)&&C4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return j0(),Jn(Ro),Jn(Gi),A9(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return L9(t),null;case 13:if(Jn(dr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));U0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Jn(dr),null;case 4:return j0(),null;case 10:return k9(t.type._context),null;case 22:case 23:return H9(),null;case 24:return null;default:return null}}var Ey=!1,Wi=!1,iZ=typeof WeakSet=="function"?WeakSet:Set,rt=null;function i0(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){_r(e,t,r)}else n.current=null}function H6(e,t,n){try{n()}catch(r){_r(e,t,r)}}var LP=!1;function oZ(e,t){if(_6=S4,e=nO(),S9(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(M){n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,g=e,m=null;t:for(;;){for(var v;g!==n||i!==0&&g.nodeType!==3||(s=a+i),g!==o||r!==0&&g.nodeType!==3||(l=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(k6={focusedElem:e,selectionRange:n},S4=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){t=rt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,_=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ys(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=_}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(Oe(163))}}catch(M){_r(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}return S=LP,LP=!1,S}function Om(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&&H6(t,n,o)}i=i.next}while(i!==r)}}function F5(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 W6(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 JO(e){var t=e.alternate;t!==null&&(e.alternate=null,JO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vl],delete t[pv],delete t[T6],delete t[HX],delete t[WX])),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 eD(e){return e.tag===5||e.tag===3||e.tag===4}function AP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eD(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 V6(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=w4));else if(r!==4&&(e=e.child,e!==null))for(V6(e,t,n),e=e.sibling;e!==null;)V6(e,t,n),e=e.sibling}function U6(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(U6(e,t,n),e=e.sibling;e!==null;)U6(e,t,n),e=e.sibling}var Li=null,Ss=!1;function Tc(e,t,n){for(n=n.child;n!==null;)tD(e,t,n),n=n.sibling}function tD(e,t,n){if(_l&&typeof _l.onCommitFiberUnmount=="function")try{_l.onCommitFiberUnmount(M5,n)}catch(s){}switch(n.tag){case 5:Wi||i0(n,t);case 6:var r=Li,i=Ss;Li=null,Tc(e,t,n),Li=r,Ss=i,Li!==null&&(Ss?(e=Li,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Li.removeChild(n.stateNode));break;case 18:Li!==null&&(Ss?(e=Li,n=n.stateNode,e.nodeType===8?vx(e.parentNode,n):e.nodeType===1&&vx(e,n),uv(e)):vx(Li,n.stateNode));break;case 4:r=Li,i=Ss,Li=n.stateNode.containerInfo,Ss=!0,Tc(e,t,n),Li=r,Ss=i;break;case 0:case 11:case 14:case 15:if(!Wi&&(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)&&H6(n,t,a),i=i.next}while(i!==r)}Tc(e,t,n);break;case 1:if(!Wi&&(i0(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){_r(n,t,s)}Tc(e,t,n);break;case 21:Tc(e,t,n);break;case 22:n.mode&1?(Wi=(r=Wi)||n.memoizedState!==null,Tc(e,t,n),Wi=r):Tc(e,t,n);break;default:Tc(e,t,n)}}function MP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new iZ),t.forEach(function(r){var i=pZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hs(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Nr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sZ(r/1960))-r,10e?16:e,Gc===null)var r=!1;else{if(e=Gc,Gc=null,D4=0,(sn&6)!==0)throw Error(Oe(331));var i=sn;for(sn|=4,rt=e.current;rt!==null;){var o=rt,a=o.child;if((rt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lNr()-F9?Xf(e,0):z9|=n),Oo(e,t)}function uD(e,t){t===0&&((e.mode&1)===0?t=1:(t=vy,vy<<=1,(vy&130023424)===0&&(vy=4194304)));var n=oo();e=_u(e,t),e!==null&&(Xv(e,t,n),Oo(e,n))}function hZ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uD(e,n)}function pZ(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(Oe(314))}r!==null&&r.delete(t),uD(e,n)}var cD;cD=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ro.current)Mo=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Mo=!1,tZ(e,t,n);Mo=(e.flags&131072)!==0}else Mo=!1,ir&&(t.flags&1048576)!==0&&hO(t,E4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;I3(e,t),e=t.pendingProps;var i=V0(t,Gi.current);b0(t,n),i=R9(null,t,r,e,i,n);var o=I9();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,Io(r)?(o=!0,_4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,P9(t),i.updater=B5,t.stateNode=i,i._reactInternals=t,O6(t,r,e,n),t=B6(null,t,r,!0,o,n)):(t.tag=0,ir&&o&&b9(t),no(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(I3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=mZ(r),e=ys(r,e),i){case 0:t=N6(null,t,r,e,n);break e;case 1:t=EP(null,t,r,e,n);break e;case 11:t=_P(null,t,r,e,n);break e;case 14:t=kP(null,t,r,ys(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ys(r,i),N6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ys(r,i),EP(e,t,r,i,n);case 3:e:{if(YO(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,vO(e,t),L4(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=Y0(Error(Oe(423)),t),t=PP(e,t,r,n,i);break e}else if(r!==i){i=Y0(Error(Oe(424)),t),t=PP(e,t,r,n,i);break e}else for(ua=ed(t.stateNode.containerInfo.firstChild),da=t,ir=!0,xs=null,n=xO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(U0(),r===i){t=ku(e,t,n);break e}no(e,t,r,n)}t=t.child}return t;case 5:return wO(t),e===null&&M6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,E6(r,i)?a=null:o!==null&&E6(r,o)&&(t.flags|=32),jO(e,t),no(e,t,a,n),t.child;case 6:return e===null&&M6(t),null;case 13:return qO(e,t,n);case 4:return T9(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=G0(t,null,r,n):no(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ys(r,i),_P(e,t,r,i,n);case 7:return no(e,t,t.pendingProps,n),t.child;case 8:return no(e,t,t.pendingProps.children,n),t.child;case 12:return no(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,Kn(P4,r._currentValue),r._currentValue=a,o!==null)if(Rs(o.value,a)){if(o.children===i.children&&!Ro.current){t=ku(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=Su(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),R6(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(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),R6(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}no(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,b0(t,n),i=Wa(i),r=r(i),t.flags|=1,no(e,t,r,n),t.child;case 14:return r=t.type,i=ys(r,t.pendingProps),i=ys(r.type,i),kP(e,t,r,i,n);case 15:return UO(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ys(r,i),I3(e,t),t.tag=1,Io(r)?(e=!0,_4(t)):e=!1,b0(t,n),SO(t,r,i),O6(t,r,i,n),B6(null,t,r,!0,e,n);case 19:return KO(e,t,n);case 22:return GO(e,t,n)}throw Error(Oe(156,t.tag))};function dD(e,t){return BI(e,t)}function gZ(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 za(e,t,n,r){return new gZ(e,t,n,r)}function V9(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mZ(e){if(typeof e=="function")return V9(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l9)return 11;if(e===u9)return 14}return 2}function id(e,t){var n=e.alternate;return n===null?(n=za(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 N3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")V9(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Kp:return Zf(n.children,i,o,t);case s9:a=8,i|=8;break;case i6:return e=za(12,n,t,i|2),e.elementType=i6,e.lanes=o,e;case o6:return e=za(13,n,t,i),e.elementType=o6,e.lanes=o,e;case a6:return e=za(19,n,t,i),e.elementType=a6,e.lanes=o,e;case bI:return H5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yI:a=10;break e;case SI:a=9;break e;case l9:a=11;break e;case u9:a=14;break e;case Nc:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=za(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Zf(e,t,n,r){return e=za(7,e,r,t),e.lanes=n,e}function H5(e,t,n,r){return e=za(22,e,r,t),e.elementType=bI,e.lanes=n,e.stateNode={isHidden:!1},e}function kx(e,t,n){return e=za(6,e,null,t),e.lanes=n,e}function Ex(e,t,n){return t=za(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vZ(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=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function U9(e,t,n,r,i,o,a,s,l){return e=new vZ(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=za(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},P9(o),e}function yZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ya})(Fl);const Ly=J7(Fl.exports);var FP=Fl.exports;n6.createRoot=FP.createRoot,n6.hydrateRoot=FP.hydrateRoot;var Ps=Boolean(globalThis==null?void 0:globalThis.document)?C.exports.useLayoutEffect:C.exports.useEffect,j5={exports:{}},Y5={};/** * @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 CZ=C.exports,_Z=Symbol.for("react.element"),kZ=Symbol.for("react.fragment"),EZ=Object.prototype.hasOwnProperty,PZ=CZ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TZ={key:!0,ref:!0,__self:!0,__source:!0};function gD(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)EZ.call(t,r)&&!TZ.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:_Z,type:e,key:o,ref:a,props:i,_owner:PZ.current}}Y5.Fragment=kZ;Y5.jsx=gD;Y5.jsxs=gD;(function(e){e.exports=Y5})(j5);const Rn=j5.exports.Fragment,b=j5.exports.jsx,ee=j5.exports.jsxs;var q9=C.exports.createContext({});q9.displayName="ColorModeContext";function e2(){const e=C.exports.useContext(q9);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Ay={light:"chakra-ui-light",dark:"chakra-ui-dark"};function LZ(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?Ay.dark:Ay.light),document.body.classList.remove(r?Ay.light:Ay.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 AZ="chakra-ui-color-mode";function MZ(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 RZ=MZ(AZ),$P=()=>{};function HP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function mD(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=RZ}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>HP(a,s)),[h,g]=C.exports.useState(()=>HP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>LZ({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Ps(()=>{i==="system"&&g(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const _=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t!=null?t:E,toggleColorMode:t?$P:_,setColorMode:t?$P:P,forced:t!==void 0}),[E,_,P,t]);return b(q9.Provider,{value:T,children:n})}mD.displayName="ColorModeProvider";var K6={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]",h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",O="[object String]",D="[object Undefined]",B="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",j="[object Float32Array]",ne="[object Float64Array]",H="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",J="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,me=/^\[object .+?Constructor\]$/,Me=/^(?:0|[1-9]\d*)$/,we={};we[j]=we[ne]=we[H]=we[K]=we[te]=we[J]=we[X]=we[G]=we[Z]=!0,we[s]=we[l]=we[$]=we[h]=we[W]=we[g]=we[m]=we[v]=we[w]=we[E]=we[_]=we[M]=we[I]=we[O]=we[B]=!1;var Se=typeof ws=="object"&&ws&&ws.Object===Object&&ws,be=typeof self=="object"&&self&&self.Object===Object&&self,He=Se||be||Function("return this")(),Je=t&&!t.nodeType&&t,tt=Je&&!0&&e&&!e.nodeType&&e,ht=tt&&tt.exports===Je,_t=ht&&Se.process,gt=function(){try{var U=tt&&tt.require&&tt.require("util").types;return U||_t&&_t.binding&&_t.binding("util")}catch(re){}}(),ft=gt&>.isTypedArray;function vt(U,re,he){switch(he.length){case 0:return U.call(re);case 1:return U.call(re,he[0]);case 2:return U.call(re,he[0],he[1]);case 3:return U.call(re,he[0],he[1],he[2])}return U.apply(re,he)}function Pe(U,re){for(var he=-1,Ye=Array(U);++he-1}function I1(U,re){var he=this.__data__,Ye=Ja(he,U);return Ye<0?(++this.size,he.push([U,re])):he[Ye][1]=re,this}Fo.prototype.clear=Dd,Fo.prototype.delete=R1,Fo.prototype.get=Vu,Fo.prototype.has=Nd,Fo.prototype.set=I1;function Ns(U){var re=-1,he=U==null?0:U.length;for(this.clear();++re1?he[Bt-1]:void 0,yt=Bt>2?he[2]:void 0;for(pn=U.length>3&&typeof pn=="function"?(Bt--,pn):void 0,yt&&Fh(he[0],he[1],yt)&&(pn=Bt<3?void 0:pn,Bt=1),re=Object(re);++Ye-1&&U%1==0&&U0){if(++re>=i)return arguments[0]}else re=0;return U.apply(void 0,arguments)}}function qu(U){if(U!=null){try{return un.call(U)}catch(re){}try{return U+""}catch(re){}}return""}function Ca(U,re){return U===re||U!==U&&re!==re}var Hd=Gl(function(){return arguments}())?Gl:function(U){return Gn(U)&&bn.call(U,"callee")&&!De.call(U,"callee")},ql=Array.isArray;function Wt(U){return U!=null&&Hh(U.length)&&!Xu(U)}function $h(U){return Gn(U)&&Wt(U)}var Ku=on||j1;function Xu(U){if(!Vo(U))return!1;var re=zs(U);return re==v||re==S||re==u||re==T}function Hh(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Vo(U){var re=typeof U;return U!=null&&(re=="object"||re=="function")}function Gn(U){return U!=null&&typeof U=="object"}function Wd(U){if(!Gn(U)||zs(U)!=_)return!1;var re=ot(U);if(re===null)return!0;var he=bn.call(re,"constructor")&&re.constructor;return typeof he=="function"&&he instanceof he&&un.call(he)==Zt}var Wh=ft?nt(ft):Gu;function Vd(U){return Kr(U,Vh(U))}function Vh(U){return Wt(U)?V1(U,!0):Fs(U)}var dn=es(function(U,re,he,Ye){$o(U,re,he,Ye)});function Vt(U){return function(){return U}}function Uh(U){return U}function j1(){return!1}e.exports=dn})(K6,K6.exports);const xl=K6.exports;function Ts(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Wf(e,...t){return IZ(e)?e(...t):e}var IZ=e=>typeof e=="function",OZ=e=>/!(important)?$/.test(e),WP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,X6=(e,t)=>n=>{const r=String(t),i=OZ(r),o=WP(r),a=e?`${e}.${o}`:o;let s=Ts(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=WP(s),i?`${s} !important`:s};function xv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var u;const s=X6(t,o)(a);let l=(u=n==null?void 0:n(s,a))!=null?u:s;return r&&(l=r(l,a)),l}}var My=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ps(e,t){return n=>{const r={property:n,scale:e};return r.transform=xv({scale:e,transform:t}),r}}var DZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function NZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:DZ(t),transform:n?xv({scale:n,compose:r}):r}}var vD=["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 BZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...vD].join(" ")}function zZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...vD].join(" ")}var FZ={"--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(" ")},$Z={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 HZ(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 WZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},yD="& > :not(style) ~ :not(style)",VZ={[yD]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},UZ={[yD]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Z6={"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"},GZ=new Set(Object.values(Z6)),SD=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),jZ=e=>e.trim();function YZ(e,t){var g;var n;if(e==null||SD.has(e))return e;const r=new RegExp("(?^[a-z-A-Z]+)\\((?(.*))\\)","g"),{type:i,values:o}=(g=(n=r.exec(e))==null?void 0:n.groups)!=null?g:{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(jZ).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=s in Z6?Z6[s]:s;l.unshift(u);const h=l.map(m=>{if(GZ.has(m))return m;const v=m.indexOf(" "),[S,w]=v!==-1?[m.substr(0,v),m.substr(v+1)]:[m],E=bD(w)?w:w&&w.split(" "),P=`colors.${S}`,_=P in t.__cssMap?t.__cssMap[P].varRef:S;return E?[_,...Array.isArray(E)?E:[E]].join(" "):_});return`${a}(${h.join(", ")})`}var bD=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),qZ=(e,t)=>YZ(e,t!=null?t:{});function KZ(e){return/^var\(--.+\)$/.test(e)}var XZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},sl=e=>t=>`${e}(${t})`,an={filter(e){return e!=="auto"?e:FZ},backdropFilter(e){return e!=="auto"?e:$Z},ring(e){return HZ(an.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?BZ():e==="auto-gpu"?zZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=XZ(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(KZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:qZ,blur:sl("blur"),opacity:sl("opacity"),brightness:sl("brightness"),contrast:sl("contrast"),dropShadow:sl("drop-shadow"),grayscale:sl("grayscale"),hueRotate:sl("hue-rotate"),invert:sl("invert"),saturate:sl("saturate"),sepia:sl("sepia"),bgImage(e){return e==null||bD(e)||SD.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=WZ[e])!=null?i:{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},oe={borderWidths:ps("borderWidths"),borderStyles:ps("borderStyles"),colors:ps("colors"),borders:ps("borders"),radii:ps("radii",an.px),space:ps("space",My(an.vh,an.px)),spaceT:ps("space",My(an.vh,an.px)),degreeT(e){return{property:e,transform:an.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:xv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ps("sizes",My(an.vh,an.px)),sizesT:ps("sizes",My(an.vh,an.fraction)),shadows:ps("shadows"),logical:NZ,blur:ps("blur",an.blur)},B3={background:oe.colors("background"),backgroundColor:oe.colors("backgroundColor"),backgroundImage:oe.propT("backgroundImage",an.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:an.bgClip},bgSize:oe.prop("backgroundSize"),bgPosition:oe.prop("backgroundPosition"),bg:oe.colors("background"),bgColor:oe.colors("backgroundColor"),bgPos:oe.prop("backgroundPosition"),bgRepeat:oe.prop("backgroundRepeat"),bgAttachment:oe.prop("backgroundAttachment"),bgGradient:oe.propT("backgroundImage",an.gradient),bgClip:{transform:an.bgClip}};Object.assign(B3,{bgImage:B3.backgroundImage,bgImg:B3.backgroundImage});var mn={border:oe.borders("border"),borderWidth:oe.borderWidths("borderWidth"),borderStyle:oe.borderStyles("borderStyle"),borderColor:oe.colors("borderColor"),borderRadius:oe.radii("borderRadius"),borderTop:oe.borders("borderTop"),borderBlockStart:oe.borders("borderBlockStart"),borderTopLeftRadius:oe.radii("borderTopLeftRadius"),borderStartStartRadius:oe.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:oe.radii("borderTopRightRadius"),borderStartEndRadius:oe.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:oe.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:oe.borders("borderRight"),borderInlineEnd:oe.borders("borderInlineEnd"),borderBottom:oe.borders("borderBottom"),borderBlockEnd:oe.borders("borderBlockEnd"),borderBottomLeftRadius:oe.radii("borderBottomLeftRadius"),borderBottomRightRadius:oe.radii("borderBottomRightRadius"),borderLeft:oe.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:oe.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:oe.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:oe.borders(["borderLeft","borderRight"]),borderInline:oe.borders("borderInline"),borderY:oe.borders(["borderTop","borderBottom"]),borderBlock:oe.borders("borderBlock"),borderTopWidth:oe.borderWidths("borderTopWidth"),borderBlockStartWidth:oe.borderWidths("borderBlockStartWidth"),borderTopColor:oe.colors("borderTopColor"),borderBlockStartColor:oe.colors("borderBlockStartColor"),borderTopStyle:oe.borderStyles("borderTopStyle"),borderBlockStartStyle:oe.borderStyles("borderBlockStartStyle"),borderBottomWidth:oe.borderWidths("borderBottomWidth"),borderBlockEndWidth:oe.borderWidths("borderBlockEndWidth"),borderBottomColor:oe.colors("borderBottomColor"),borderBlockEndColor:oe.colors("borderBlockEndColor"),borderBottomStyle:oe.borderStyles("borderBottomStyle"),borderBlockEndStyle:oe.borderStyles("borderBlockEndStyle"),borderLeftWidth:oe.borderWidths("borderLeftWidth"),borderInlineStartWidth:oe.borderWidths("borderInlineStartWidth"),borderLeftColor:oe.colors("borderLeftColor"),borderInlineStartColor:oe.colors("borderInlineStartColor"),borderLeftStyle:oe.borderStyles("borderLeftStyle"),borderInlineStartStyle:oe.borderStyles("borderInlineStartStyle"),borderRightWidth:oe.borderWidths("borderRightWidth"),borderInlineEndWidth:oe.borderWidths("borderInlineEndWidth"),borderRightColor:oe.colors("borderRightColor"),borderInlineEndColor:oe.colors("borderInlineEndColor"),borderRightStyle:oe.borderStyles("borderRightStyle"),borderInlineEndStyle:oe.borderStyles("borderInlineEndStyle"),borderTopRadius:oe.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:oe.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:oe.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:oe.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(mn,{rounded:mn.borderRadius,roundedTop:mn.borderTopRadius,roundedTopLeft:mn.borderTopLeftRadius,roundedTopRight:mn.borderTopRightRadius,roundedTopStart:mn.borderStartStartRadius,roundedTopEnd:mn.borderStartEndRadius,roundedBottom:mn.borderBottomRadius,roundedBottomLeft:mn.borderBottomLeftRadius,roundedBottomRight:mn.borderBottomRightRadius,roundedBottomStart:mn.borderEndStartRadius,roundedBottomEnd:mn.borderEndEndRadius,roundedLeft:mn.borderLeftRadius,roundedRight:mn.borderRightRadius,roundedStart:mn.borderInlineStartRadius,roundedEnd:mn.borderInlineEndRadius,borderStart:mn.borderInlineStart,borderEnd:mn.borderInlineEnd,borderTopStartRadius:mn.borderStartStartRadius,borderTopEndRadius:mn.borderStartEndRadius,borderBottomStartRadius:mn.borderEndStartRadius,borderBottomEndRadius:mn.borderEndEndRadius,borderStartRadius:mn.borderInlineStartRadius,borderEndRadius:mn.borderInlineEndRadius,borderStartWidth:mn.borderInlineStartWidth,borderEndWidth:mn.borderInlineEndWidth,borderStartColor:mn.borderInlineStartColor,borderEndColor:mn.borderInlineEndColor,borderStartStyle:mn.borderInlineStartStyle,borderEndStyle:mn.borderInlineEndStyle});var ZZ={color:oe.colors("color"),textColor:oe.colors("color"),fill:oe.colors("fill"),stroke:oe.colors("stroke")},Q6={boxShadow:oe.shadows("boxShadow"),mixBlendMode:!0,blendMode:oe.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:oe.prop("backgroundBlendMode"),opacity:!0};Object.assign(Q6,{shadow:Q6.boxShadow});var QZ={filter:{transform:an.filter},blur:oe.blur("--chakra-blur"),brightness:oe.propT("--chakra-brightness",an.brightness),contrast:oe.propT("--chakra-contrast",an.contrast),hueRotate:oe.degreeT("--chakra-hue-rotate"),invert:oe.propT("--chakra-invert",an.invert),saturate:oe.propT("--chakra-saturate",an.saturate),dropShadow:oe.propT("--chakra-drop-shadow",an.dropShadow),backdropFilter:{transform:an.backdropFilter},backdropBlur:oe.blur("--chakra-backdrop-blur"),backdropBrightness:oe.propT("--chakra-backdrop-brightness",an.brightness),backdropContrast:oe.propT("--chakra-backdrop-contrast",an.contrast),backdropHueRotate:oe.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:oe.propT("--chakra-backdrop-invert",an.invert),backdropSaturate:oe.propT("--chakra-backdrop-saturate",an.saturate)},z4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:an.flexDirection},experimental_spaceX:{static:VZ,transform:xv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:UZ,transform:xv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:oe.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:oe.space("gap"),rowGap:oe.space("rowGap"),columnGap:oe.space("columnGap")};Object.assign(z4,{flexDir:z4.flexDirection});var xD={gridGap:oe.space("gridGap"),gridColumnGap:oe.space("gridColumnGap"),gridRowGap:oe.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},JZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:an.outline},outlineOffset:!0,outlineColor:oe.colors("outlineColor")},Ia={width:oe.sizesT("width"),inlineSize:oe.sizesT("inlineSize"),height:oe.sizes("height"),blockSize:oe.sizes("blockSize"),boxSize:oe.sizes(["width","height"]),minWidth:oe.sizes("minWidth"),minInlineSize:oe.sizes("minInlineSize"),minHeight:oe.sizes("minHeight"),minBlockSize:oe.sizes("minBlockSize"),maxWidth:oe.sizes("maxWidth"),maxInlineSize:oe.sizes("maxInlineSize"),maxHeight:oe.sizes("maxHeight"),maxBlockSize:oe.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:oe.propT("float",an.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ia,{w:Ia.width,h:Ia.height,minW:Ia.minWidth,maxW:Ia.maxWidth,minH:Ia.minHeight,maxH:Ia.maxHeight,overscroll:Ia.overscrollBehavior,overscrollX:Ia.overscrollBehaviorX,overscrollY:Ia.overscrollBehaviorY});var eQ={listStyleType:!0,listStylePosition:!0,listStylePos:oe.prop("listStylePosition"),listStyleImage:!0,listStyleImg:oe.prop("listStyleImage")};function tQ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{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}},rQ=nQ(tQ),iQ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},oQ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Px=(e,t,n)=>{const r={},i=rQ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},aQ={srOnly:{transform(e){return e===!0?iQ:e==="focusable"?oQ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Px(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Px(t,e,n)}},Bm={position:!0,pos:oe.prop("position"),zIndex:oe.prop("zIndex","zIndices"),inset:oe.spaceT("inset"),insetX:oe.spaceT(["left","right"]),insetInline:oe.spaceT("insetInline"),insetY:oe.spaceT(["top","bottom"]),insetBlock:oe.spaceT("insetBlock"),top:oe.spaceT("top"),insetBlockStart:oe.spaceT("insetBlockStart"),bottom:oe.spaceT("bottom"),insetBlockEnd:oe.spaceT("insetBlockEnd"),left:oe.spaceT("left"),insetInlineStart:oe.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:oe.spaceT("right"),insetInlineEnd:oe.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Bm,{insetStart:Bm.insetInlineStart,insetEnd:Bm.insetInlineEnd});var sQ={ring:{transform:an.ring},ringColor:oe.colors("--chakra-ring-color"),ringOffset:oe.prop("--chakra-ring-offset-width"),ringOffsetColor:oe.colors("--chakra-ring-offset-color"),ringInset:oe.prop("--chakra-ring-inset")},Qn={margin:oe.spaceT("margin"),marginTop:oe.spaceT("marginTop"),marginBlockStart:oe.spaceT("marginBlockStart"),marginRight:oe.spaceT("marginRight"),marginInlineEnd:oe.spaceT("marginInlineEnd"),marginBottom:oe.spaceT("marginBottom"),marginBlockEnd:oe.spaceT("marginBlockEnd"),marginLeft:oe.spaceT("marginLeft"),marginInlineStart:oe.spaceT("marginInlineStart"),marginX:oe.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:oe.spaceT("marginInline"),marginY:oe.spaceT(["marginTop","marginBottom"]),marginBlock:oe.spaceT("marginBlock"),padding:oe.space("padding"),paddingTop:oe.space("paddingTop"),paddingBlockStart:oe.space("paddingBlockStart"),paddingRight:oe.space("paddingRight"),paddingBottom:oe.space("paddingBottom"),paddingBlockEnd:oe.space("paddingBlockEnd"),paddingLeft:oe.space("paddingLeft"),paddingInlineStart:oe.space("paddingInlineStart"),paddingInlineEnd:oe.space("paddingInlineEnd"),paddingX:oe.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:oe.space("paddingInline"),paddingY:oe.space(["paddingTop","paddingBottom"]),paddingBlock:oe.space("paddingBlock")};Object.assign(Qn,{m:Qn.margin,mt:Qn.marginTop,mr:Qn.marginRight,me:Qn.marginInlineEnd,marginEnd:Qn.marginInlineEnd,mb:Qn.marginBottom,ml:Qn.marginLeft,ms:Qn.marginInlineStart,marginStart:Qn.marginInlineStart,mx:Qn.marginX,my:Qn.marginY,p:Qn.padding,pt:Qn.paddingTop,py:Qn.paddingY,px:Qn.paddingX,pb:Qn.paddingBottom,pl:Qn.paddingLeft,ps:Qn.paddingInlineStart,paddingStart:Qn.paddingInlineStart,pr:Qn.paddingRight,pe:Qn.paddingInlineEnd,paddingEnd:Qn.paddingInlineEnd});var lQ={textDecorationColor:oe.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:oe.shadows("textShadow")},uQ={clipPath:!0,transform:oe.propT("transform",an.transform),transformOrigin:!0,translateX:oe.spaceT("--chakra-translate-x"),translateY:oe.spaceT("--chakra-translate-y"),skewX:oe.degreeT("--chakra-skew-x"),skewY:oe.degreeT("--chakra-skew-y"),scaleX:oe.prop("--chakra-scale-x"),scaleY:oe.prop("--chakra-scale-y"),scale:oe.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:oe.degreeT("--chakra-rotate")},cQ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:oe.prop("transitionDuration","transition.duration"),transitionProperty:oe.prop("transitionProperty","transition.property"),transitionTimingFunction:oe.prop("transitionTimingFunction","transition.easing")},dQ={fontFamily:oe.prop("fontFamily","fonts"),fontSize:oe.prop("fontSize","fontSizes",an.px),fontWeight:oe.prop("fontWeight","fontWeights"),lineHeight:oe.prop("lineHeight","lineHeights"),letterSpacing:oe.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"}},fQ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:oe.spaceT("scrollMargin"),scrollMarginTop:oe.spaceT("scrollMarginTop"),scrollMarginBottom:oe.spaceT("scrollMarginBottom"),scrollMarginLeft:oe.spaceT("scrollMarginLeft"),scrollMarginRight:oe.spaceT("scrollMarginRight"),scrollMarginX:oe.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:oe.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:oe.spaceT("scrollPadding"),scrollPaddingTop:oe.spaceT("scrollPaddingTop"),scrollPaddingBottom:oe.spaceT("scrollPaddingBottom"),scrollPaddingLeft:oe.spaceT("scrollPaddingLeft"),scrollPaddingRight:oe.spaceT("scrollPaddingRight"),scrollPaddingX:oe.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:oe.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function wD(e){return Ts(e)&&e.reference?e.reference:String(e)}var q5=(e,...t)=>t.map(wD).join(` ${e} `).replace(/calc/g,""),VP=(...e)=>`calc(${q5("+",...e)})`,UP=(...e)=>`calc(${q5("-",...e)})`,J6=(...e)=>`calc(${q5("*",...e)})`,GP=(...e)=>`calc(${q5("/",...e)})`,jP=e=>{const t=wD(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:J6(t,-1)},Df=Object.assign(e=>({add:(...t)=>Df(VP(e,...t)),subtract:(...t)=>Df(UP(e,...t)),multiply:(...t)=>Df(J6(e,...t)),divide:(...t)=>Df(GP(e,...t)),negate:()=>Df(jP(e)),toString:()=>e.toString()}),{add:VP,subtract:UP,multiply:J6,divide:GP,negate:jP});function hQ(e,t="-"){return e.replace(/\s+/g,t)}function pQ(e){const t=hQ(e.toString());return mQ(gQ(t))}function gQ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function mQ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function vQ(e,t=""){return[t,e].filter(Boolean).join("-")}function yQ(e,t){return`var(${e}${t?`, ${t}`:""})`}function SQ(e,t=""){return pQ(`--${vQ(e,t)}`)}function Fn(e,t,n){const r=SQ(e,n);return{variable:r,reference:yQ(r,t)}}function bQ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function xQ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function eC(e){if(e==null)return e;const{unitless:t}=xQ(e);return t||typeof e=="number"?`${e}px`:e}var CD=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,K9=e=>Object.fromEntries(Object.entries(e).sort(CD));function YP(e){const t=K9(e);return Object.assign(Object.values(t),t)}function wQ(e){const t=Object.keys(K9(e));return new Set(t)}function qP(e){var n;if(!e)return e;e=(n=eC(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 hm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${eC(e)})`),t&&n.push("and",`(max-width: ${eC(t)})`),n.join(" ")}function CQ(e){var o;if(!e)return null;e.base=(o=e.base)!=null?o:"0px";const t=YP(e),n=Object.entries(e).sort(CD).map(([a,s],l,u)=>{var g;let[,h]=(g=u[l+1])!=null?g:[];return h=parseFloat(h)>0?qP(h):void 0,{_minW:qP(s),breakpoint:a,minW:s,maxW:h,maxWQuery:hm(null,h),minWQuery:hm(s),minMaxQuery:hm(s,h)}}),r=wQ(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:K9(e),asArray:YP(e),details:n,media:[null,...t.map(a=>hm(a)).slice(1)],toArrayValue(a){if(!Ts(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(;bQ(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 h=i[u];return h!=null&&l!=null&&(s[h]=l),s},{})}}}var Pi={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}`},Lc=e=>_D(t=>e(t,"&"),"[role=group]","[data-group]",".group"),lu=e=>_D(t=>e(t,"~ &"),"[data-peer]",".peer"),_D=(e,...t)=>t.map(e).join(", "),K5={_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:Lc(Pi.hover),_peerHover:lu(Pi.hover),_groupFocus:Lc(Pi.focus),_peerFocus:lu(Pi.focus),_groupFocusVisible:Lc(Pi.focusVisible),_peerFocusVisible:lu(Pi.focusVisible),_groupActive:Lc(Pi.active),_peerActive:lu(Pi.active),_groupDisabled:Lc(Pi.disabled),_peerDisabled:lu(Pi.disabled),_groupInvalid:Lc(Pi.invalid),_peerInvalid:lu(Pi.invalid),_groupChecked:Lc(Pi.checked),_peerChecked:lu(Pi.checked),_groupFocusWithin:Lc(Pi.focusWithin),_peerFocusWithin:lu(Pi.focusWithin),_peerPlaceholderShown:lu(Pi.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]"},_Q=Object.keys(K5);function KP(e,t){return Fn(String(e).replace(/\./g,"-"),void 0,t)}function kQ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=KP(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Df.negate(s),P=Df.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=KP(S,t==null?void 0:t.cssVarPrefix);return E},g=Ts(s)?s:{default:s};n=xl(n,Object.entries(g).reduce((m,[v,S])=>{var _;var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=(_=(w=K5)==null?void 0:w[v])!=null?_:v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function EQ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function PQ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var TQ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function LQ(e){return PQ(e,TQ)}function AQ(e){return e.semanticTokens}function MQ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function RQ({tokens:e,semanticTokens:t}){var i,o;const n=Object.entries((i=tC(e))!=null?i:{}).map(([a,s])=>[a,{isSemantic:!1,value:s}]),r=Object.entries((o=tC(t,1))!=null?o:{}).map(([a,s])=>[a,{isSemantic:!0,value:s}]);return Object.fromEntries([...n,...r])}function tC(e,t=1/0){return!Ts(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Ts(i)||Array.isArray(i)?Object.entries(tC(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function IQ(e){var t;const n=MQ(e),r=LQ(n),i=AQ(n),o=RQ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=kQ(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:CQ(n.breakpoints)}),n}var X9=xl({},B3,mn,ZZ,z4,Ia,QZ,sQ,JZ,xD,aQ,Bm,Q6,Qn,fQ,dQ,lQ,uQ,eQ,cQ),OQ=Object.assign({},Qn,Ia,z4,xD,Bm),DQ=Object.keys(OQ),NQ=[...Object.keys(X9),..._Q],BQ={...X9,...K5},zQ=e=>e in BQ,FQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Wf(e[a],t);if(s==null)continue;if(s=Ts(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;ue.startsWith("--")&&typeof t=="string"&&!HQ(t),VQ=(e,t)=>{var a,s;if(t==null)return t;const n=l=>{var u,h;return(h=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:h.varRef},r=l=>{var u;return(u=n(l))!=null?u:l},[i,o]=$Q(t);return t=(s=(a=n(i))!=null?a:r(o))!=null?s:r(t),t};function UQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var g,m;var s;const l=Wf(o,r),u=FQ(l)(r);let h={};for(let v in u){const S=u[v];let w=Wf(S,r);v in n&&(v=n[v]),WQ(v,w)&&(w=VQ(r,w));let E=t[v];if(E===!0&&(E={property:v}),Ts(w)){h[v]=(g=h[v])!=null?g:{},h[v]=xl({},h[v],i(w,!0));continue}let P=(m=(s=E==null?void 0:E.transform)==null?void 0:s.call(E,w,r,l))!=null?m:w;P=E!=null&&E.processResult?i(P,!0):P;const _=Wf(E==null?void 0:E.property,r);if(!a&&(E==null?void 0:E.static)){const T=Wf(E.static,r);h=xl({},h,T)}if(_&&Array.isArray(_)){for(const T of _)h[T]=P;continue}if(_){_==="&"&&Ts(P)?h=xl({},h,P):h[_]=P;continue}if(Ts(P)){h=xl({},h,P);continue}h[v]=P}return h};return i}var kD=e=>t=>UQ({theme:t,pseudos:K5,configs:X9})(e);function er(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function GQ(e,t){if(Array.isArray(e))return e;if(Ts(e))return t(e);if(e!=null)return[e]}function jQ(e,t){for(let n=t+1;n{xl(u,{[T]:m?_[T]:{[P]:_[T]}})});continue}if(!v){m?xl(u,_):u[P]=_;continue}u[P]=_}}return u}}function qQ(e){return t=>{var a;const{variant:n,size:r,theme:i}=t,o=YQ(i);return xl({},Wf((a=e.baseStyle)!=null?a:{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function KQ(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 Sn(e){return EQ(e,["styleConfig","size","variant","colorScheme"])}function XQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ai(h1,--Bo):0,K0--,Ur===10&&(K0=1,Z5--),Ur}function fa(){return Ur=Bo2||Cv(Ur)>3?"":" "}function lJ(e,t){for(;--t&&fa()&&!(Ur<48||Ur>102||Ur>57&&Ur<65||Ur>70&&Ur<97););return t2(e,z3()+(t<6&&El()==32&&fa()==32))}function rC(e){for(;fa();)switch(Ur){case e:return Bo;case 34:case 39:e!==34&&e!==39&&rC(Ur);break;case 40:e===41&&rC(e);break;case 92:fa();break}return Bo}function uJ(e,t){for(;fa()&&e+Ur!==47+10;)if(e+Ur===42+42&&El()===47)break;return"/*"+t2(t,Bo-1)+"*"+X5(e===47?e:fa())}function cJ(e){for(;!Cv(El());)fa();return t2(e,Bo)}function dJ(e){return MD($3("",null,null,null,[""],e=AD(e),0,[0],e))}function $3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,g=a,m=0,v=0,S=0,w=1,E=1,P=1,_=0,T="",M=i,I=o,O=r,D=T;E;)switch(S=_,_=fa()){case 40:if(S!=108&&Ai(D,g-1)==58){nC(D+=_n(F3(_),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:D+=F3(_);break;case 9:case 10:case 13:case 32:D+=sJ(S);break;case 92:D+=lJ(z3()-1,7);continue;case 47:switch(El()){case 42:case 47:Ry(fJ(uJ(fa(),z3()),t,n),l);break;default:D+="/"}break;case 123*w:s[u++]=gl(D)*P;case 125*w:case 59:case 0:switch(_){case 0:case 125:E=0;case 59+h:v>0&&gl(D)-g&&Ry(v>32?ZP(D+";",r,n,g-1):ZP(_n(D," ","")+";",r,n,g-2),l);break;case 59:D+=";";default:if(Ry(O=XP(D,t,n,u,h,i,s,T,M=[],I=[],g),o),_===123)if(h===0)$3(D,t,O,O,M,o,g,s,I);else switch(m===99&&Ai(D,3)===110?100:m){case 100:case 109:case 115:$3(e,O,O,r&&Ry(XP(e,O,O,0,0,i,s,T,i,M=[],g),I),i,I,g,s,r?M:I);break;default:$3(D,O,O,O,[""],I,0,s,I)}}u=h=v=0,w=P=1,T=D="",g=a;break;case 58:g=1+gl(D),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&aJ()==125)continue}switch(D+=X5(_),_*w){case 38:P=h>0?1:(D+="\f",-1);break;case 44:s[u++]=(gl(D)-1)*P,P=1;break;case 64:El()===45&&(D+=F3(fa())),m=El(),h=g=gl(T=D+=cJ(z3())),_++;break;case 45:S===45&&gl(D)==2&&(w=0)}}return o}function XP(e,t,n,r,i,o,a,s,l,u,h){for(var g=i-1,m=i===0?o:[""],v=J9(m),S=0,w=0,E=0;S0?m[P]+" "+_:_n(_,/&\f/g,m[P])))&&(l[E++]=T);return Q5(e,t,n,i===0?Z9:s,l,u,h)}function fJ(e,t,n){return Q5(e,t,n,ED,X5(oJ()),wv(e,2,-2),0)}function ZP(e,t,n,r){return Q5(e,t,n,Q9,wv(e,0,r),wv(e,r+1,-1),r)}function w0(e,t){for(var n="",r=J9(e),i=0;i6)switch(Ai(e,t+1)){case 109:if(Ai(e,t+4)!==45)break;case 102:return _n(e,/(.+:)(.+)-([^]+)/,"$1"+vn+"$2-$3$1"+F4+(Ai(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~nC(e,"stretch")?ID(_n(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ai(e,t+1)!==115)break;case 6444:switch(Ai(e,gl(e)-3-(~nC(e,"!important")&&10))){case 107:return _n(e,":",":"+vn)+e;case 101:return _n(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+vn+(Ai(e,14)===45?"inline-":"")+"box$3$1"+vn+"$2$3$1"+$i+"$2box$3")+e}break;case 5936:switch(Ai(e,t+11)){case 114:return vn+e+$i+_n(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return vn+e+$i+_n(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return vn+e+$i+_n(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return vn+e+$i+e+e}return e}var xJ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Q9:t.return=ID(t.value,t.length);break;case PD:return w0([Gg(t,{value:_n(t.value,"@","@"+vn)})],i);case Z9:if(t.length)return iJ(t.props,function(o){switch(rJ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return w0([Gg(t,{props:[_n(o,/:(read-\w+)/,":"+F4+"$1")]})],i);case"::placeholder":return w0([Gg(t,{props:[_n(o,/:(plac\w+)/,":"+vn+"input-$1")]}),Gg(t,{props:[_n(o,/:(plac\w+)/,":"+F4+"$1")]}),Gg(t,{props:[_n(o,/:(plac\w+)/,$i+"input-$1")]})],i)}return""})}},wJ=[xJ],OD=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(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||wJ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=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 IJ={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},OJ=/[A-Z]|^ms/g,DJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,HD=function(t){return t.charCodeAt(1)===45},eT=function(t){return t!=null&&typeof t!="boolean"},Tx=RD(function(e){return HD(e)?e:e.replace(OJ,"-$&").toLowerCase()}),tT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(DJ,function(r,i,o){return ml={name:i,styles:o,next:ml},i})}return IJ[t]!==1&&!HD(t)&&typeof n=="number"&&n!==0?n+"px":n};function _v(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 ml={name:n.name,styles:n.styles,next:ml},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ml={name:r.name,styles:r.styles,next:ml},r=r.next;var i=n.styles+";";return i}return NJ(e,t,n)}case"function":{if(e!==void 0){var o=ml,a=n(e);return ml=o,_v(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function NJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function JJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{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}},qD=eee(JJ);function KD(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var XD=e=>KD(e,t=>t!=null);function tee(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var nee=tee();function ZD(e,...t){return ZJ(e)?e(...t):e}function ree(...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 iee(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.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 oee=/^((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)-.*))$/,aee=RD(function(e){return oee.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),see=aee,lee=function(t){return t!=="theme"},oT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?see:lee},aT=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},uee=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return FD(n,r,i),zJ(function(){return $D(n,r,i)}),null},cee=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=aT(t,n,r),l=s||oT(i),u=!l("as");return function(){var h=arguments,g=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,v=1;v[g,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([g,m])=>[g,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h!=null?h:"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var fee=kn("accordion").parts("root","container","button","panel").extend("icon"),hee=kn("alert").parts("title","description","container").extend("icon","spinner"),pee=kn("avatar").parts("label","badge","container").extend("excessLabel","group"),gee=kn("breadcrumb").parts("link","item","container").extend("separator");kn("button").parts();var mee=kn("checkbox").parts("control","icon","container").extend("label");kn("progress").parts("track","filledTrack").extend("label");var vee=kn("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),yee=kn("editable").parts("preview","input","textarea"),See=kn("form").parts("container","requiredIndicator","helperText"),bee=kn("formError").parts("text","icon"),xee=kn("input").parts("addon","field","element"),wee=kn("list").parts("container","item","icon"),Cee=kn("menu").parts("button","list","item").extend("groupTitle","command","divider"),_ee=kn("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),kee=kn("numberinput").parts("root","field","stepperGroup","stepper");kn("pininput").parts("field");var Eee=kn("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),Pee=kn("progress").parts("label","filledTrack","track"),Tee=kn("radio").parts("container","control","label"),Lee=kn("select").parts("field","icon"),Aee=kn("slider").parts("container","track","thumb","filledTrack","mark"),Mee=kn("stat").parts("container","label","helpText","number","icon"),Ree=kn("switch").parts("container","track","thumb"),Iee=kn("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Oee=kn("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Dee=kn("tag").parts("container","label","closeButton"),Nee=kn("card").parts("container","header","body","footer");function Ri(e,t){Bee(e)&&(e="100%");var n=zee(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 Iy(e){return Math.min(1,Math.max(0,e))}function Bee(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function zee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function QD(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Oy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Vf(e){return e.length===1?"0"+e:String(e)}function Fee(e,t,n){return{r:Ri(e,255)*255,g:Ri(t,255)*255,b:Ri(n,255)*255}}function sT(e,t,n){e=Ri(e,255),t=Ri(t,255),n=Ri(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+(t1&&(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 $ee(e,t,n){var r,i,o;if(e=Ri(e,360),t=Ri(t,100),n=Ri(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=Lx(s,a,e+1/3),i=Lx(s,a,e),o=Lx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function lT(e,t,n){e=Ri(e,255),t=Ri(t,255),n=Ri(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>16,g:(e&65280)>>8,b:e&255}}var sC={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 Gee(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=qee(e)),typeof e=="object"&&(uu(e.r)&&uu(e.g)&&uu(e.b)?(t=Fee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):uu(e.h)&&uu(e.s)&&uu(e.v)?(r=Oy(e.s),i=Oy(e.v),t=Hee(e.h,r,i),a=!0,s="hsv"):uu(e.h)&&uu(e.s)&&uu(e.l)&&(r=Oy(e.s),o=Oy(e.l),t=$ee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=QD(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 jee="[-\\+]?\\d+%?",Yee="[-\\+]?\\d*\\.\\d+%?",jc="(?:".concat(Yee,")|(?:").concat(jee,")"),Ax="[\\s|\\(]+(".concat(jc,")[,|\\s]+(").concat(jc,")[,|\\s]+(").concat(jc,")\\s*\\)?"),Mx="[\\s|\\(]+(".concat(jc,")[,|\\s]+(").concat(jc,")[,|\\s]+(").concat(jc,")[,|\\s]+(").concat(jc,")\\s*\\)?"),vs={CSS_UNIT:new RegExp(jc),rgb:new RegExp("rgb"+Ax),rgba:new RegExp("rgba"+Mx),hsl:new RegExp("hsl"+Ax),hsla:new RegExp("hsla"+Mx),hsv:new RegExp("hsv"+Ax),hsva:new RegExp("hsva"+Mx),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 qee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(sC[e])e=sC[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=vs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=vs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=vs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=vs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=vs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=vs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=vs.hex8.exec(e),n?{r:ia(n[1]),g:ia(n[2]),b:ia(n[3]),a:cT(n[4]),format:t?"name":"hex8"}:(n=vs.hex6.exec(e),n?{r:ia(n[1]),g:ia(n[2]),b:ia(n[3]),format:t?"name":"hex"}:(n=vs.hex4.exec(e),n?{r:ia(n[1]+n[1]),g:ia(n[2]+n[2]),b:ia(n[3]+n[3]),a:cT(n[4]+n[4]),format:t?"name":"hex8"}:(n=vs.hex3.exec(e),n?{r:ia(n[1]+n[1]),g:ia(n[2]+n[2]),b:ia(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function uu(e){return Boolean(vs.CSS_UNIT.exec(String(e)))}var n2=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=Uee(t)),this.originalInput=t;var i=Gee(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=QD(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=lT(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=lT(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=sT(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=sT(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),uT(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),Wee(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(Ri(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(Ri(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="#"+uT(this.r,this.g,this.b,!1),n=0,r=Object.entries(sC);n=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=Iy(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=Iy(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=Iy(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=Iy(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;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(JD(e));return e.count=t,n}var r=Kee(e.hue,e.seed),i=Xee(r,e),o=Zee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new n2(a)}function Kee(e,t){var n=Jee(e),r=$4(n,t);return r<0&&(r=360+r),r}function Xee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return $4([0,100],t.seed);var n=eN(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 $4([r,i],t.seed)}function Zee(e,t,n){var r=Qee(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 $4([r,i],n.seed)}function Qee(e,t){for(var n=eN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function Jee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=nN.find(function(a){return a.name===e});if(n){var r=tN(n);if(r.hueRange)return r.hueRange}var i=new n2(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function eN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=nN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function $4(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 tN(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 nN=[{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 ete(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,ro=(e,t,n)=>{const r=ete(e,`colors.${t}`,t),{isValid:i}=new n2(r);return i?r:n},nte=e=>t=>{const n=ro(t,e);return new n2(n).isDark()?"dark":"light"},rte=e=>t=>nte(e)(t)==="dark",X0=(e,t)=>n=>{const r=ro(n,e);return new n2(r).setAlpha(t).toRgbString()};function dT(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 ite(e){const t=JD().toHexString();return!e||tte(e)?t:e.string&&e.colors?ate(e.string,e.colors):e.string&&!e.colors?ote(e.string):e.colors&&!e.string?ste(e.colors):t}function ote(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function ate(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function o8(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function lte(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function rN(e){return lte(e)&&e.reference?e.reference:String(e)}var dS=(e,...t)=>t.map(rN).join(` ${e} `).replace(/calc/g,""),fT=(...e)=>`calc(${dS("+",...e)})`,hT=(...e)=>`calc(${dS("-",...e)})`,lC=(...e)=>`calc(${dS("*",...e)})`,pT=(...e)=>`calc(${dS("/",...e)})`,gT=e=>{const t=rN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:lC(t,-1)},gu=Object.assign(e=>({add:(...t)=>gu(fT(e,...t)),subtract:(...t)=>gu(hT(e,...t)),multiply:(...t)=>gu(lC(e,...t)),divide:(...t)=>gu(pT(e,...t)),negate:()=>gu(gT(e)),toString:()=>e.toString()}),{add:fT,subtract:hT,multiply:lC,divide:pT,negate:gT});function ute(e){return!Number.isInteger(parseFloat(e.toString()))}function cte(e,t="-"){return e.replace(/\s+/g,t)}function iN(e){const t=cte(e.toString());return t.includes("\\.")?e:ute(e)?t.replace(".","\\."):e}function dte(e,t=""){return[t,iN(e)].filter(Boolean).join("-")}function fte(e,t){return`var(${iN(e)}${t?`, ${t}`:""})`}function hte(e,t=""){return`--${dte(e,t)}`}function oi(e,t){const n=hte(e,t==null?void 0:t.prefix);return{variable:n,reference:fte(n,pte(t==null?void 0:t.fallback))}}function pte(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:gte,defineMultiStyleConfig:mte}=er(fee.keys),vte={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},yte={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Ste={pt:"2",px:"4",pb:"5"},bte={fontSize:"1.25em"},xte=gte({container:vte,button:yte,panel:Ste,icon:bte}),wte=mte({baseStyle:xte}),{definePartsStyle:r2,defineMultiStyleConfig:Cte}=er(hee.keys),ha=Fn("alert-fg"),Eu=Fn("alert-bg"),_te=r2({container:{bg:Eu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:ha.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:ha.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function a8(e){const{theme:t,colorScheme:n}=e,r=X0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var kte=r2(e=>{const{colorScheme:t}=e,n=a8(e);return{container:{[ha.variable]:`colors.${t}.500`,[Eu.variable]:n.light,_dark:{[ha.variable]:`colors.${t}.200`,[Eu.variable]:n.dark}}}}),Ete=r2(e=>{const{colorScheme:t}=e,n=a8(e);return{container:{[ha.variable]:`colors.${t}.500`,[Eu.variable]:n.light,_dark:{[ha.variable]:`colors.${t}.200`,[Eu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:ha.reference}}}),Pte=r2(e=>{const{colorScheme:t}=e,n=a8(e);return{container:{[ha.variable]:`colors.${t}.500`,[Eu.variable]:n.light,_dark:{[ha.variable]:`colors.${t}.200`,[Eu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:ha.reference}}}),Tte=r2(e=>{const{colorScheme:t}=e;return{container:{[ha.variable]:"colors.white",[Eu.variable]:`colors.${t}.500`,_dark:{[ha.variable]:"colors.gray.900",[Eu.variable]:`colors.${t}.200`},color:ha.reference}}}),Lte={subtle:kte,"left-accent":Ete,"top-accent":Pte,solid:Tte},Ate=Cte({baseStyle:_te,variants:Lte,defaultProps:{variant:"subtle",colorScheme:"blue"}}),oN={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"},Mte={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"},Rte={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Ite={...oN,...Mte,container:Rte},aN=Ite,Ote=e=>typeof e=="function";function ao(e,...t){return Ote(e)?e(...t):e}var{definePartsStyle:sN,defineMultiStyleConfig:Dte}=er(pee.keys),C0=Fn("avatar-border-color"),Rx=Fn("avatar-bg"),Nte={borderRadius:"full",border:"0.2em solid",[C0.variable]:"white",_dark:{[C0.variable]:"colors.gray.800"},borderColor:C0.reference},Bte={[Rx.variable]:"colors.gray.200",_dark:{[Rx.variable]:"colors.whiteAlpha.400"},bgColor:Rx.reference},mT=Fn("avatar-background"),zte=e=>{const{name:t,theme:n}=e,r=t?ite({string:t}):"colors.gray.400",i=rte(r)(n);let o="white";return i||(o="gray.800"),{bg:mT.reference,"&:not([data-loaded])":{[mT.variable]:r},color:o,[C0.variable]:"colors.white",_dark:{[C0.variable]:"colors.gray.800"},borderColor:C0.reference,verticalAlign:"top"}},Fte=sN(e=>({badge:ao(Nte,e),excessLabel:ao(Bte,e),container:ao(zte,e)}));function Ac(e){const t=e!=="100%"?aN[e]:void 0;return sN({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 $te={"2xs":Ac(4),xs:Ac(6),sm:Ac(8),md:Ac(12),lg:Ac(16),xl:Ac(24),"2xl":Ac(32),full:Ac("100%")},Hte=Dte({baseStyle:Fte,sizes:$te,defaultProps:{size:"md"}}),Wte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},_0=Fn("badge-bg"),wl=Fn("badge-color"),Vte=e=>{const{colorScheme:t,theme:n}=e,r=X0(`${t}.500`,.6)(n);return{[_0.variable]:`colors.${t}.500`,[wl.variable]:"colors.white",_dark:{[_0.variable]:r,[wl.variable]:"colors.whiteAlpha.800"},bg:_0.reference,color:wl.reference}},Ute=e=>{const{colorScheme:t,theme:n}=e,r=X0(`${t}.200`,.16)(n);return{[_0.variable]:`colors.${t}.100`,[wl.variable]:`colors.${t}.800`,_dark:{[_0.variable]:r,[wl.variable]:`colors.${t}.200`},bg:_0.reference,color:wl.reference}},Gte=e=>{const{colorScheme:t,theme:n}=e,r=X0(`${t}.200`,.8)(n);return{[wl.variable]:`colors.${t}.500`,_dark:{[wl.variable]:r},color:wl.reference,boxShadow:`inset 0 0 0px 1px ${wl.reference}`}},jte={solid:Vte,subtle:Ute,outline:Gte},Fm={baseStyle:Wte,variants:jte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Yte,definePartsStyle:qte}=er(gee.keys),Kte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Xte=qte({link:Kte}),Zte=Yte({baseStyle:Xte}),Qte={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"}}},lN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:St("inherit","whiteAlpha.900")(e),_hover:{bg:St("gray.100","whiteAlpha.200")(e)},_active:{bg:St("gray.200","whiteAlpha.300")(e)}};const r=X0(`${t}.200`,.12)(n),i=X0(`${t}.200`,.24)(n);return{color:St(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:St(`${t}.50`,r)(e)},_active:{bg:St(`${t}.100`,i)(e)}}},Jte=e=>{const{colorScheme:t}=e,n=St("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"},...ao(lN,e)}},ene={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},tne=e=>{var s;const{colorScheme:t}=e;if(t==="gray"){const l=St("gray.100","whiteAlpha.200")(e);return{bg:l,_hover:{bg:St("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:St("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=(s=ene[t])!=null?s:{},a=St(n,`${t}.200`)(e);return{bg:a,color:St(r,"gray.800")(e),_hover:{bg:St(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:St(o,`${t}.400`)(e)}}},nne=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:St(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:St(`${t}.700`,`${t}.500`)(e)}}},rne={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},ine={ghost:lN,outline:Jte,solid:tne,link:nne,unstyled:rne},one={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"}},ane={baseStyle:Qte,variants:ine,sizes:one,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Qf,defineMultiStyleConfig:sne}=er(Nee.keys),H4=Fn("card-bg"),k0=Fn("card-padding"),lne=Qf({container:{[H4.variable]:"chakra-body-bg",backgroundColor:H4.reference,color:"chakra-body-text"},body:{padding:k0.reference,flex:"1 1 0%"},header:{padding:k0.reference},footer:{padding:k0.reference}}),une={sm:Qf({container:{borderRadius:"base",[k0.variable]:"space.3"}}),md:Qf({container:{borderRadius:"md",[k0.variable]:"space.5"}}),lg:Qf({container:{borderRadius:"xl",[k0.variable]:"space.7"}})},cne={elevated:Qf({container:{boxShadow:"base",_dark:{[H4.variable]:"colors.gray.700"}}}),outline:Qf({container:{borderWidth:"1px",borderColor:"chakra-border-color"}}),filled:Qf({container:{[H4.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{padding:0},header:{padding:0},footer:{padding:0}}},dne=sne({baseStyle:lne,variants:cne,sizes:une,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:H3,defineMultiStyleConfig:fne}=er(mee.keys),$m=Fn("checkbox-size"),hne=e=>{const{colorScheme:t}=e;return{w:$m.reference,h:$m.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:St(`${t}.500`,`${t}.200`)(e),borderColor:St(`${t}.500`,`${t}.200`)(e),color:St("white","gray.900")(e),_hover:{bg:St(`${t}.600`,`${t}.300`)(e),borderColor:St(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:St("gray.200","transparent")(e),bg:St("gray.200","whiteAlpha.300")(e),color:St("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:St(`${t}.500`,`${t}.200`)(e),borderColor:St(`${t}.500`,`${t}.200`)(e),color:St("white","gray.900")(e)},_disabled:{bg:St("gray.100","whiteAlpha.100")(e),borderColor:St("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:St("red.500","red.300")(e)}}},pne={_disabled:{cursor:"not-allowed"}},gne={userSelect:"none",_disabled:{opacity:.4}},mne={transitionProperty:"transform",transitionDuration:"normal"},vne=H3(e=>({icon:mne,container:pne,control:ao(hne,e),label:gne})),yne={sm:H3({control:{[$m.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:H3({control:{[$m.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:H3({control:{[$m.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},W4=fne({baseStyle:vne,sizes:yne,defaultProps:{size:"md",colorScheme:"blue"}}),Hm=oi("close-button-size"),jg=oi("close-button-bg"),Sne={w:[Hm.reference],h:[Hm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[jg.variable]:"colors.blackAlpha.100",_dark:{[jg.variable]:"colors.whiteAlpha.100"}},_active:{[jg.variable]:"colors.blackAlpha.200",_dark:{[jg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:jg.reference},bne={lg:{[Hm.variable]:"sizes.10",fontSize:"md"},md:{[Hm.variable]:"sizes.8",fontSize:"xs"},sm:{[Hm.variable]:"sizes.6",fontSize:"2xs"}},xne={baseStyle:Sne,sizes:bne,defaultProps:{size:"md"}},{variants:wne,defaultProps:Cne}=Fm,_ne={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},kne={baseStyle:_ne,variants:wne,defaultProps:Cne},Ene={w:"100%",mx:"auto",maxW:"prose",px:"4"},Pne={baseStyle:Ene},Tne={opacity:.6,borderColor:"inherit"},Lne={borderStyle:"solid"},Ane={borderStyle:"dashed"},Mne={solid:Lne,dashed:Ane},Rne={baseStyle:Tne,variants:Mne,defaultProps:{variant:"solid"}},{definePartsStyle:uC,defineMultiStyleConfig:Ine}=er(vee.keys),Ix=Fn("drawer-bg"),Ox=Fn("drawer-box-shadow");function Mp(e){return uC(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var One={bg:"blackAlpha.600",zIndex:"overlay"},Dne={display:"flex",zIndex:"modal",justifyContent:"center"},Nne=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ix.variable]:"colors.white",[Ox.variable]:"shadows.lg",_dark:{[Ix.variable]:"colors.gray.700",[Ox.variable]:"shadows.dark-lg"},bg:Ix.reference,boxShadow:Ox.reference}},Bne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},zne={position:"absolute",top:"2",insetEnd:"3"},Fne={px:"6",py:"2",flex:"1",overflow:"auto"},$ne={px:"6",py:"4"},Hne=uC(e=>({overlay:One,dialogContainer:Dne,dialog:ao(Nne,e),header:Bne,closeButton:zne,body:Fne,footer:$ne})),Wne={xs:Mp("xs"),sm:Mp("md"),md:Mp("lg"),lg:Mp("2xl"),xl:Mp("4xl"),full:Mp("full")},Vne=Ine({baseStyle:Hne,sizes:Wne,defaultProps:{size:"xs"}}),{definePartsStyle:Une,defineMultiStyleConfig:Gne}=er(yee.keys),jne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Yne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},qne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Kne=Une({preview:jne,input:Yne,textarea:qne}),Xne=Gne({baseStyle:Kne}),{definePartsStyle:Zne,defineMultiStyleConfig:Qne}=er(See.keys),E0=Fn("form-control-color"),Jne={marginStart:"1",[E0.variable]:"colors.red.500",_dark:{[E0.variable]:"colors.red.300"},color:E0.reference},ere={mt:"2",[E0.variable]:"colors.gray.600",_dark:{[E0.variable]:"colors.whiteAlpha.600"},color:E0.reference,lineHeight:"normal",fontSize:"sm"},tre=Zne({container:{width:"100%",position:"relative"},requiredIndicator:Jne,helperText:ere}),nre=Qne({baseStyle:tre}),{definePartsStyle:rre,defineMultiStyleConfig:ire}=er(bee.keys),P0=Fn("form-error-color"),ore={[P0.variable]:"colors.red.500",_dark:{[P0.variable]:"colors.red.300"},color:P0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},are={marginEnd:"0.5em",[P0.variable]:"colors.red.500",_dark:{[P0.variable]:"colors.red.300"},color:P0.reference},sre=rre({text:ore,icon:are}),lre=ire({baseStyle:sre}),ure={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},cre={baseStyle:ure},dre={fontFamily:"heading",fontWeight:"bold"},fre={"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}},hre={baseStyle:dre,sizes:fre,defaultProps:{size:"xl"}},{definePartsStyle:yu,defineMultiStyleConfig:pre}=er(xee.keys),gre=yu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Mc={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"}},mre={lg:yu({field:Mc.lg,addon:Mc.lg}),md:yu({field:Mc.md,addon:Mc.md}),sm:yu({field:Mc.sm,addon:Mc.sm}),xs:yu({field:Mc.xs,addon:Mc.xs})};function s8(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||St("blue.500","blue.300")(e),errorBorderColor:n||St("red.500","red.300")(e)}}var vre=yu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=s8(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:St("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ro(t,r),boxShadow:`0 0 0 1px ${ro(t,r)}`},_focusVisible:{zIndex:1,borderColor:ro(t,n),boxShadow:`0 0 0 1px ${ro(t,n)}`}},addon:{border:"1px solid",borderColor:St("inherit","whiteAlpha.50")(e),bg:St("gray.100","whiteAlpha.300")(e)}}}),yre=yu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=s8(e);return{field:{border:"2px solid",borderColor:"transparent",bg:St("gray.100","whiteAlpha.50")(e),_hover:{bg:St("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ro(t,r)},_focusVisible:{bg:"transparent",borderColor:ro(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:St("gray.100","whiteAlpha.50")(e)}}}),Sre=yu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=s8(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ro(t,r),boxShadow:`0px 1px 0px 0px ${ro(t,r)}`},_focusVisible:{borderColor:ro(t,n),boxShadow:`0px 1px 0px 0px ${ro(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),bre=yu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),xre={outline:vre,filled:yre,flushed:Sre,unstyled:bre},yn=pre({baseStyle:gre,sizes:mre,variants:xre,defaultProps:{size:"md",variant:"outline"}}),Dx=Fn("kbd-bg"),wre={[Dx.variable]:"colors.gray.100",_dark:{[Dx.variable]:"colors.whiteAlpha.100"},bg:Dx.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},Cre={baseStyle:wre},_re={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},kre={baseStyle:_re},{defineMultiStyleConfig:Ere,definePartsStyle:Pre}=er(wee.keys),Tre={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Lre=Pre({icon:Tre}),Are=Ere({baseStyle:Lre}),{defineMultiStyleConfig:Mre,definePartsStyle:Rre}=er(Cee.keys),pl=Fn("menu-bg"),Nx=Fn("menu-shadow"),Ire={[pl.variable]:"#fff",[Nx.variable]:"shadows.sm",_dark:{[pl.variable]:"colors.gray.700",[Nx.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:pl.reference,boxShadow:Nx.reference},Ore={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[pl.variable]:"colors.gray.100",_dark:{[pl.variable]:"colors.whiteAlpha.100"}},_active:{[pl.variable]:"colors.gray.200",_dark:{[pl.variable]:"colors.whiteAlpha.200"}},_expanded:{[pl.variable]:"colors.gray.100",_dark:{[pl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:pl.reference},Dre={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Nre={opacity:.6},Bre={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},zre={transitionProperty:"common",transitionDuration:"normal"},Fre=Rre({button:zre,list:Ire,item:Ore,groupTitle:Dre,command:Nre,divider:Bre}),$re=Mre({baseStyle:Fre}),{defineMultiStyleConfig:Hre,definePartsStyle:cC}=er(_ee.keys),Wre={bg:"blackAlpha.600",zIndex:"modal"},Vre=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Ure=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:St("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:St("lg","dark-lg")(e)}},Gre={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},jre={position:"absolute",top:"2",insetEnd:"3"},Yre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},qre={px:"6",py:"4"},Kre=cC(e=>({overlay:Wre,dialogContainer:ao(Vre,e),dialog:ao(Ure,e),header:Gre,closeButton:jre,body:ao(Yre,e),footer:qre}));function gs(e){return cC(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Xre={xs:gs("xs"),sm:gs("sm"),md:gs("md"),lg:gs("lg"),xl:gs("xl"),"2xl":gs("2xl"),"3xl":gs("3xl"),"4xl":gs("4xl"),"5xl":gs("5xl"),"6xl":gs("6xl"),full:gs("full")},Zre=Hre({baseStyle:Kre,sizes:Xre,defaultProps:{size:"md"}}),Qre={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"}},uN=Qre,{defineMultiStyleConfig:Jre,definePartsStyle:cN}=er(kee.keys),l8=oi("number-input-stepper-width"),dN=oi("number-input-input-padding"),eie=gu(l8).add("0.5rem").toString(),Bx=oi("number-input-bg"),zx=oi("number-input-color"),Fx=oi("number-input-border-color"),tie={[l8.variable]:"sizes.6",[dN.variable]:eie},nie=e=>{var n;var t;return(n=(t=ao(yn.baseStyle,e))==null?void 0:t.field)!=null?n:{}},rie={width:l8.reference},iie={borderStart:"1px solid",borderStartColor:Fx.reference,color:zx.reference,bg:Bx.reference,[zx.variable]:"colors.chakra-body-text",[Fx.variable]:"colors.chakra-border-color",_dark:{[zx.variable]:"colors.whiteAlpha.800",[Fx.variable]:"colors.whiteAlpha.300"},_active:{[Bx.variable]:"colors.gray.200",_dark:{[Bx.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},oie=cN(e=>{var t;return{root:tie,field:(t=ao(nie,e))!=null?t:{},stepperGroup:rie,stepper:iie}});function Dy(e){var s;var t,n;const r=(t=yn.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=uN.fontSizes[o];return cN({field:{...r.field,paddingInlineEnd:dN.reference,verticalAlign:"top"},stepper:{fontSize:gu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var aie={xs:Dy("xs"),sm:Dy("sm"),md:Dy("md"),lg:Dy("lg")},sie=Jre({baseStyle:oie,sizes:aie,variants:yn.variants,defaultProps:yn.defaultProps}),vT,lie={...(vT=yn.baseStyle)==null?void 0:vT.field,textAlign:"center"},uie={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"}},yT,nI,cie={outline:e=>{var r;var t,n;return(r=(n=ao((t=yn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var r;var t,n;return(r=(n=ao((t=yn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var r;var t,n;return(r=(n=ao((t=yn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(nI=(yT=yn.variants)==null?void 0:yT.unstyled.field)!=null?nI:{}},die={baseStyle:lie,sizes:uie,variants:cie,defaultProps:yn.defaultProps},{defineMultiStyleConfig:fie,definePartsStyle:hie}=er(Eee.keys),Ny=oi("popper-bg"),pie=oi("popper-arrow-bg"),ST=oi("popper-arrow-shadow-color"),gie={zIndex:10},mie={[Ny.variable]:"colors.white",bg:Ny.reference,[pie.variable]:Ny.reference,[ST.variable]:"colors.gray.200",_dark:{[Ny.variable]:"colors.gray.700",[ST.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},vie={px:3,py:2,borderBottomWidth:"1px"},yie={px:3,py:2},Sie={px:3,py:2,borderTopWidth:"1px"},bie={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},xie=hie({popper:gie,content:mie,header:vie,body:yie,footer:Sie,closeButton:bie}),wie=fie({baseStyle:xie}),{defineMultiStyleConfig:Cie,definePartsStyle:pm}=er(Pee.keys),_ie=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=St(dT(),dT("1rem","rgba(0,0,0,0.1)"))(e),a=St(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( to right, transparent 0%, ${ro(n,a)} 50%, transparent 100% )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},kie={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Eie=e=>({bg:St("gray.100","whiteAlpha.300")(e)}),Pie=e=>({transitionProperty:"common",transitionDuration:"slow",..._ie(e)}),Tie=pm(e=>({label:kie,filledTrack:Pie(e),track:Eie(e)})),Lie={xs:pm({track:{h:"1"}}),sm:pm({track:{h:"2"}}),md:pm({track:{h:"3"}}),lg:pm({track:{h:"4"}})},Aie=Cie({sizes:Lie,baseStyle:Tie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Mie,definePartsStyle:W3}=er(Tee.keys),Rie=e=>{var t;const n=(t=ao(W4.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"}}}},Iie=W3(e=>{var t,n,r,i;return{label:(n=(t=W4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=W4).baseStyle)==null?void 0:i.call(r,e).container,control:Rie(e)}}),Oie={md:W3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:W3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:W3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Die=Mie({baseStyle:Iie,sizes:Oie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Nie,definePartsStyle:Bie}=er(Lee.keys),By=Fn("select-bg"),bT,zie={...(bT=yn.baseStyle)==null?void 0:bT.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:By.reference,[By.variable]:"colors.white",_dark:{[By.variable]:"colors.gray.700"},"> option, > optgroup":{bg:By.reference}},Fie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},$ie=Bie({field:zie,icon:Fie}),zy={paddingInlineEnd:"8"},xT,wT,CT,_T,kT,ET,PT,TT,Hie={lg:{...(xT=yn.sizes)==null?void 0:xT.lg,field:{...(wT=yn.sizes)==null?void 0:wT.lg.field,...zy}},md:{...(CT=yn.sizes)==null?void 0:CT.md,field:{...(_T=yn.sizes)==null?void 0:_T.md.field,...zy}},sm:{...(kT=yn.sizes)==null?void 0:kT.sm,field:{...(ET=yn.sizes)==null?void 0:ET.sm.field,...zy}},xs:{...(PT=yn.sizes)==null?void 0:PT.xs,field:{...(TT=yn.sizes)==null?void 0:TT.xs.field,...zy},icon:{insetEnd:"1"}}},Wie=Nie({baseStyle:$ie,sizes:Hie,variants:yn.variants,defaultProps:yn.defaultProps}),$x=Fn("skeleton-start-color"),Hx=Fn("skeleton-end-color"),Vie={[$x.variable]:"colors.gray.100",[Hx.variable]:"colors.gray.400",_dark:{[$x.variable]:"colors.gray.800",[Hx.variable]:"colors.gray.600"},background:$x.reference,borderColor:Hx.reference,opacity:.7,borderRadius:"sm"},Uie={baseStyle:Vie},Wx=Fn("skip-link-bg"),Gie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Wx.variable]:"colors.white",_dark:{[Wx.variable]:"colors.gray.700"},bg:Wx.reference}},jie={baseStyle:Gie},{defineMultiStyleConfig:Yie,definePartsStyle:fS}=er(Aee.keys),Pv=Fn("slider-thumb-size"),Tv=Fn("slider-track-size"),Hc=Fn("slider-bg"),qie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...o8({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Kie=e=>({...o8({orientation:e.orientation,horizontal:{h:Tv.reference},vertical:{w:Tv.reference}}),overflow:"hidden",borderRadius:"sm",[Hc.variable]:"colors.gray.200",_dark:{[Hc.variable]:"colors.whiteAlpha.200"},_disabled:{[Hc.variable]:"colors.gray.300",_dark:{[Hc.variable]:"colors.whiteAlpha.300"}},bg:Hc.reference}),Xie=e=>{const{orientation:t}=e;return{...o8({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:Pv.reference,h:Pv.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"}}},Zie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Hc.variable]:`colors.${t}.500`,_dark:{[Hc.variable]:`colors.${t}.200`},bg:Hc.reference}},Qie=fS(e=>({container:qie(e),track:Kie(e),thumb:Xie(e),filledTrack:Zie(e)})),Jie=fS({container:{[Pv.variable]:"sizes.4",[Tv.variable]:"sizes.1"}}),eoe=fS({container:{[Pv.variable]:"sizes.3.5",[Tv.variable]:"sizes.1"}}),toe=fS({container:{[Pv.variable]:"sizes.2.5",[Tv.variable]:"sizes.0.5"}}),noe={lg:Jie,md:eoe,sm:toe},roe=Yie({baseStyle:Qie,sizes:noe,defaultProps:{size:"md",colorScheme:"blue"}}),Nf=oi("spinner-size"),ioe={width:[Nf.reference],height:[Nf.reference]},ooe={xs:{[Nf.variable]:"sizes.3"},sm:{[Nf.variable]:"sizes.4"},md:{[Nf.variable]:"sizes.6"},lg:{[Nf.variable]:"sizes.8"},xl:{[Nf.variable]:"sizes.12"}},aoe={baseStyle:ioe,sizes:ooe,defaultProps:{size:"md"}},{defineMultiStyleConfig:soe,definePartsStyle:fN}=er(Mee.keys),loe={fontWeight:"medium"},uoe={opacity:.8,marginBottom:"2"},coe={verticalAlign:"baseline",fontWeight:"semibold"},doe={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},foe=fN({container:{},label:loe,helpText:uoe,number:coe,icon:doe}),hoe={md:fN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},poe=soe({baseStyle:foe,sizes:hoe,defaultProps:{size:"md"}}),{defineMultiStyleConfig:goe,definePartsStyle:V3}=er(Ree.keys),Wm=oi("switch-track-width"),Jf=oi("switch-track-height"),Vx=oi("switch-track-diff"),moe=gu.subtract(Wm,Jf),dC=oi("switch-thumb-x"),Yg=oi("switch-bg"),voe=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Wm.reference],height:[Jf.reference],transitionProperty:"common",transitionDuration:"fast",[Yg.variable]:"colors.gray.300",_dark:{[Yg.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Yg.variable]:`colors.${t}.500`,_dark:{[Yg.variable]:`colors.${t}.200`}},bg:Yg.reference}},yoe={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Jf.reference],height:[Jf.reference],_checked:{transform:`translateX(${dC.reference})`}},Soe=V3(e=>({container:{[Vx.variable]:moe,[dC.variable]:Vx.reference,_rtl:{[dC.variable]:gu(Vx).negate().toString()}},track:voe(e),thumb:yoe})),boe={sm:V3({container:{[Wm.variable]:"1.375rem",[Jf.variable]:"sizes.3"}}),md:V3({container:{[Wm.variable]:"1.875rem",[Jf.variable]:"sizes.4"}}),lg:V3({container:{[Wm.variable]:"2.875rem",[Jf.variable]:"sizes.6"}})},xoe=goe({baseStyle:Soe,sizes:boe,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:woe,definePartsStyle:T0}=er(Iee.keys),Coe=T0({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"}}),V4={"&[data-is-numeric=true]":{textAlign:"end"}},_oe=T0(e=>{const{colorScheme:t}=e;return{th:{color:St("gray.600","gray.400")(e),borderBottom:"1px",borderColor:St(`${t}.100`,`${t}.700`)(e),...V4},td:{borderBottom:"1px",borderColor:St(`${t}.100`,`${t}.700`)(e),...V4},caption:{color:St("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),koe=T0(e=>{const{colorScheme:t}=e;return{th:{color:St("gray.600","gray.400")(e),borderBottom:"1px",borderColor:St(`${t}.100`,`${t}.700`)(e),...V4},td:{borderBottom:"1px",borderColor:St(`${t}.100`,`${t}.700`)(e),...V4},caption:{color:St("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:St(`${t}.100`,`${t}.700`)(e)},td:{background:St(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Eoe={simple:_oe,striped:koe,unstyled:{}},Poe={sm:T0({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:T0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:T0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Toe=woe({baseStyle:Coe,variants:Eoe,sizes:Poe,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Lo=Fn("tabs-color"),Cs=Fn("tabs-bg"),Fy=Fn("tabs-border-color"),{defineMultiStyleConfig:Loe,definePartsStyle:Pl}=er(Oee.keys),Aoe=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Moe=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}}},Roe=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Ioe={p:4},Ooe=Pl(e=>({root:Aoe(e),tab:Moe(e),tablist:Roe(e),tabpanel:Ioe})),Doe={sm:Pl({tab:{py:1,px:4,fontSize:"sm"}}),md:Pl({tab:{fontSize:"md",py:2,px:4}}),lg:Pl({tab:{fontSize:"lg",py:3,px:4}})},Noe=Pl(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:{[Lo.variable]:`colors.${t}.600`,_dark:{[Lo.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Cs.variable]:"colors.gray.200",_dark:{[Cs.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Lo.reference,bg:Cs.reference}}}),Boe=Pl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Fy.reference]:"transparent",_selected:{[Lo.variable]:`colors.${t}.600`,[Fy.variable]:"colors.white",_dark:{[Lo.variable]:`colors.${t}.300`,[Fy.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Fy.reference},color:Lo.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),zoe=Pl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Cs.variable]:"colors.gray.50",_dark:{[Cs.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Cs.variable]:"colors.white",[Lo.variable]:`colors.${t}.600`,_dark:{[Cs.variable]:"colors.gray.800",[Lo.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Lo.reference,bg:Cs.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Foe=Pl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:ro(n,`${t}.700`),bg:ro(n,`${t}.100`)}}}}),$oe=Pl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Lo.variable]:"colors.gray.600",_dark:{[Lo.variable]:"inherit"},_selected:{[Lo.variable]:"colors.white",[Cs.variable]:`colors.${t}.600`,_dark:{[Lo.variable]:"colors.gray.800",[Cs.variable]:`colors.${t}.300`}},color:Lo.reference,bg:Cs.reference}}}),Hoe=Pl({}),Woe={line:Noe,enclosed:Boe,"enclosed-colored":zoe,"soft-rounded":Foe,"solid-rounded":$oe,unstyled:Hoe},Voe=Loe({baseStyle:Ooe,sizes:Doe,variants:Woe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Uoe,definePartsStyle:eh}=er(Dee.keys),Goe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},joe={lineHeight:1.2,overflow:"visible"},Yoe={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}},qoe=eh({container:Goe,label:joe,closeButton:Yoe}),Koe={sm:eh({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:eh({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:eh({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Xoe={subtle:eh(e=>{var t;return{container:(t=Fm.variants)==null?void 0:t.subtle(e)}}),solid:eh(e=>{var t;return{container:(t=Fm.variants)==null?void 0:t.solid(e)}}),outline:eh(e=>{var t;return{container:(t=Fm.variants)==null?void 0:t.outline(e)}})},Zoe=Uoe({variants:Xoe,baseStyle:qoe,sizes:Koe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),LT,Qoe={...(LT=yn.baseStyle)==null?void 0:LT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},AT,rI,Joe={outline:e=>{var n;var t;return(n=(t=yn.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var n;var t;return(n=(t=yn.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var n;var t;return(n=(t=yn.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(rI=(AT=yn.variants)==null?void 0:AT.unstyled.field)!=null?rI:{}},MT,RT,IT,OT,iI,oI,aI,sI,eae={xs:(iI=(MT=yn.sizes)==null?void 0:MT.xs.field)!=null?iI:{},sm:(oI=(RT=yn.sizes)==null?void 0:RT.sm.field)!=null?oI:{},md:(aI=(IT=yn.sizes)==null?void 0:IT.md.field)!=null?aI:{},lg:(sI=(OT=yn.sizes)==null?void 0:OT.lg.field)!=null?sI:{}},tae={baseStyle:Qoe,sizes:eae,variants:Joe,defaultProps:{size:"md",variant:"outline"}},$y=oi("tooltip-bg"),Ux=oi("tooltip-fg"),nae=oi("popper-arrow-bg"),rae={bg:$y.reference,color:Ux.reference,[$y.variable]:"colors.gray.700",[Ux.variable]:"colors.whiteAlpha.900",_dark:{[$y.variable]:"colors.gray.300",[Ux.variable]:"colors.gray.900"},[nae.variable]:$y.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},iae={baseStyle:rae},oae={Accordion:wte,Alert:Ate,Avatar:Hte,Badge:Fm,Breadcrumb:Zte,Button:ane,Checkbox:W4,CloseButton:xne,Code:kne,Container:Pne,Divider:Rne,Drawer:Vne,Editable:Xne,Form:nre,FormError:lre,FormLabel:cre,Heading:hre,Input:yn,Kbd:Cre,Link:kre,List:Are,Menu:$re,Modal:Zre,NumberInput:sie,PinInput:die,Popover:wie,Progress:Aie,Radio:Die,Select:Wie,Skeleton:Uie,SkipLink:jie,Slider:roe,Spinner:aoe,Stat:poe,Switch:xoe,Table:Toe,Tabs:Voe,Tag:Zoe,Textarea:tae,Tooltip:iae,Card:dne},aae={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},sae=aae,lae={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},uae=lae,cae={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"}},dae=cae,fae={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},hae=fae,pae={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"},gae=pae,mae={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"},vae={"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)"},yae={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Sae={property:mae,easing:vae,duration:yae},bae=Sae,xae={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},wae=xae,Cae={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},_ae=Cae,kae={breakpoints:uae,zIndices:wae,radii:hae,blur:_ae,colors:dae,...uN,sizes:aN,shadows:gae,space:oN,borders:sae,transition:bae},Eae={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"}}},Pae={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"}}},Tae="ltr",Lae={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Aae={semanticTokens:Eae,direction:Tae,...kae,components:oae,styles:Pae,config:Lae},Mae=typeof Element<"u",Rae=typeof Map=="function",Iae=typeof Set=="function",Oae=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function U3(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(!U3(e[r],t[r]))return!1;return!0}var o;if(Rae&&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(!U3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Iae&&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(Oae&&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(Mae&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!U3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Dae=function(t,n){try{return U3(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 p1(){const e=C.exports.useContext(kv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function hN(){const e=e2(),t=p1();return{...e,theme:t}}function Nae(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 Bae(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 zae(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 g,m;if(e==="breakpoints")return Nae(o,l,(g=a[u])!=null?g:l);const h=`${e}.${l}`;return Bae(o,h,(m=a[u])!=null?m:l)});return Array.isArray(t)?s:s[0]}}function Fae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>IQ(n),[n]);return ee(WJ,{theme:i,children:[b($ae,{root:t}),r]})}function $ae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return b(uS,{styles:n=>({[t]:n.__cssVars})})}iee({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function Hae(){const{colorMode:e}=e2();return b(uS,{styles:t=>{const n=qD(t,"styles.global"),r=ZD(n,{theme:t,colorMode:e});return r?kD(r)(t):void 0}})}var Wae=new Set([...NQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Vae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Uae(e){return Vae.has(e)||!Wae.has(e)}var Gae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=KD(a,(g,m)=>zQ(m)),l=ZD(e,t),u=Object.assign({},i,l,XD(s),o),h=kD(u)(t.theme);return r?[h,r]:h};function Gx(e,t){const{baseStyle:n,...r}=t!=null?t:{};r.shouldForwardProp||(r.shouldForwardProp=Uae);const i=Gae({baseStyle:n}),o=aC(e,r)(i);return se.forwardRef(function(l,u){const{colorMode:h,forced:g}=e2();return se.createElement(o,{ref:u,"data-theme":g?h:void 0,...l})})}function Ee(e){return C.exports.forwardRef(e)}function pN(e,t={}){var h;const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=hN(),a=e?qD(i,`components.${e}`):void 0,s=n||a,l=xl({theme:i,colorMode:o},(h=s==null?void 0:s.defaultProps)!=null?h:{},XD(QJ(r,["children"]))),u=C.exports.useRef({});if(s){const m=qQ(s)(l);Dae(u.current,m)||(u.current=m)}return u.current}function uo(e,t={}){return pN(e,t)}function Oi(e,t={}){return pN(e,t)}function jae(){const e=new Map;return new Proxy(Gx,{apply(t,n,r){return Gx(...r)},get(t,n){return e.has(n)||e.set(n,Gx(n)),e.get(n)}})}var xe=jae();function Yae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function En(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o!=null?o:Yae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function qae(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 Vn(...e){return t=>{e.forEach(n=>{qae(n,t)})}}function Kae(...e){return C.exports.useMemo(()=>Vn(...e),e)}function DT(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 Xae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function NT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function BT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var fC=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,U4=e=>e,Zae=class{constructor(){en(this,"descendants",new Map);en(this,"register",e=>{if(e!=null)return Xae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});en(this,"unregister",e=>{this.descendants.delete(e);const t=DT(Array.from(this.descendants.keys()));this.assignIndex(t)});en(this,"destroy",()=>{this.descendants.clear()});en(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});en(this,"count",()=>this.descendants.size);en(this,"enabledCount",()=>this.enabledValues().length);en(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));en(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));en(this,"item",e=>{if(this.count()!==0)return this.values()[e]});en(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});en(this,"first",()=>this.item(0));en(this,"firstEnabled",()=>this.enabledItem(0));en(this,"last",()=>this.item(this.descendants.size-1));en(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});en(this,"indexOf",e=>{var n;var t;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1});en(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));en(this,"next",(e,t=!0)=>{const n=NT(e,this.count(),t);return this.item(n)});en(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=NT(r,this.enabledCount(),t);return this.enabledItem(i)});en(this,"prev",(e,t=!0)=>{const n=BT(e,this.count()-1,t);return this.item(n)});en(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=BT(r,this.enabledCount()-1,t);return this.enabledItem(i)});en(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=DT(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 Qae(){const e=C.exports.useRef(new Zae);return fC(()=>()=>e.current.destroy()),e.current}var[Jae,gN]=En({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function ese(e){const t=gN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);fC(()=>()=>{!i.current||t.unregister(i.current)},[]),fC(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=U4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Vn(o,i)}}function mN(){return[U4(Jae),()=>U4(gN()),()=>Qae(),i=>ese(i)]}var Br=(...e)=>e.filter(Boolean).join(" "),zT={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"},xa=Ee((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Br("chakra-icon",s),g={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:g},v=r!=null?r:zT.viewBox;if(n&&typeof n!="string")return se.createElement(xe.svg,{as:n,...m,...u});const S=a!=null?a:zT.path;return se.createElement(xe.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});xa.displayName="Icon";function at(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Ee((s,l)=>b(xa,{ref:l,viewBox:t,...i,...s,children:o.length?o:b("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function fr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function hS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=fr(r),a=fr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,g=fr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,g]}const u8=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),pS=C.exports.createContext({});function tse(){return C.exports.useContext(pS).visualElement}const g1=C.exports.createContext(null),Sh=typeof document<"u",G4=Sh?C.exports.useLayoutEffect:C.exports.useEffect,vN=C.exports.createContext({strict:!1});function nse(e,t,n,r){const i=tse(),o=C.exports.useContext(vN),a=C.exports.useContext(g1),s=C.exports.useContext(u8).reducedMotion,l=C.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 G4(()=>{u&&u.render()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),G4(()=>()=>u&&u.notify("Unmount"),[]),u}function a0(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rse(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):a0(n)&&(n.current=r))},[t])}function Lv(e){return typeof e=="string"||Array.isArray(e)}function gS(e){return typeof e=="object"&&typeof e.start=="function"}const ise=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function mS(e){return gS(e.animate)||ise.some(t=>Lv(e[t]))}function yN(e){return Boolean(mS(e)||e.variants)}function ose(e,t){if(mS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Lv(n)?n:void 0,animate:Lv(r)?r:void 0}}return e.inherit!==!1?t:{}}function ase(e){const{initial:t,animate:n}=ose(e,C.exports.useContext(pS));return C.exports.useMemo(()=>({initial:t,animate:n}),[FT(t),FT(n)])}function FT(e){return Array.isArray(e)?e.join(" "):e}const cu=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Av={measureLayout:cu(["layout","layoutId","drag"]),animation:cu(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:cu(["exit"]),drag:cu(["drag","dragControls"]),focus:cu(["whileFocus"]),hover:cu(["whileHover","onHoverStart","onHoverEnd"]),tap:cu(["whileTap","onTap","onTapStart","onTapCancel"]),pan:cu(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:cu(["whileInView","onViewportEnter","onViewportLeave"])};function sse(e){for(const t in e)t==="projectionNodeConstructor"?Av.projectionNodeConstructor=e[t]:Av[t].Component=e[t]}function vS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let lse=1;function use(){return vS(()=>{if(Vm.hasEverUpdated)return lse++})}const c8=C.exports.createContext({});class cse extends se.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const SN=C.exports.createContext({}),dse=Symbol.for("motionComponentSymbol");function fse({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&sse(e);function a(l,u){const h={...C.exports.useContext(u8),...l,layoutId:hse(l)},{isStatic:g}=h;let m=null;const v=ase(l),S=g?void 0:use(),w=i(l,g);if(!g&&Sh){v.visualElement=nse(o,w,h,t);const E=C.exports.useContext(vN).strict,P=C.exports.useContext(SN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Av.projectionNodeConstructor,P))}return ee(cse,{visualElement:v.visualElement,props:h,children:[m,b(pS.Provider,{value:v,children:r(o,l,S,rse(w,v.visualElement,u),w,g,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[dse]=o,s}function hse({layoutId:e}){const t=C.exports.useContext(c8).id;return t&&e!==void 0?t+"-"+e:e}function pse(e){function t(r,i={}){return fse(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 gse=["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 d8(e){return typeof e!="string"||e.includes("-")?!1:!!(gse.indexOf(e)>-1||/[A-Z]/.test(e))}const j4={};function mse(e){Object.assign(j4,e)}const Y4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],m1=new Set(Y4);function bN(e,{layout:t,layoutId:n}){return m1.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!j4[e]||e==="opacity")}const Il=e=>!!(e!=null&&e.getVelocity),vse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yse=(e,t)=>Y4.indexOf(e)-Y4.indexOf(t);function Sse({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(yse);for(const s of t)a+=`${vse[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 xN(e){return e.startsWith("--")}const bse=(e,t)=>t&&typeof e=="number"?t.transform(e):e,wN=(e,t)=>n=>Math.max(Math.min(n,t),e),Um=e=>e%1?Number(e.toFixed(5)):e,Mv=/(-)?([\d]*\.?[\d])+/g,hC=/(#[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,xse=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function i2(e){return typeof e=="string"}const bh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gm=Object.assign(Object.assign({},bh),{transform:wN(0,1)}),Hy=Object.assign(Object.assign({},bh),{default:1}),o2=e=>({test:t=>i2(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ic=o2("deg"),Tl=o2("%"),Ct=o2("px"),wse=o2("vh"),Cse=o2("vw"),$T=Object.assign(Object.assign({},Tl),{parse:e=>Tl.parse(e)/100,transform:e=>Tl.transform(e*100)}),f8=(e,t)=>n=>Boolean(i2(n)&&xse.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),CN=(e,t,n)=>r=>{if(!i2(r))return r;const[i,o,a,s]=r.match(Mv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Uf={test:f8("hsl","hue"),parse:CN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Tl.transform(Um(t))+", "+Tl.transform(Um(n))+", "+Um(Gm.transform(r))+")"},_se=wN(0,255),jx=Object.assign(Object.assign({},bh),{transform:e=>Math.round(_se(e))}),Yc={test:f8("rgb","red"),parse:CN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jx.transform(e)+", "+jx.transform(t)+", "+jx.transform(n)+", "+Um(Gm.transform(r))+")"};function kse(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 pC={test:f8("#"),parse:kse,transform:Yc.transform},to={test:e=>Yc.test(e)||pC.test(e)||Uf.test(e),parse:e=>Yc.test(e)?Yc.parse(e):Uf.test(e)?Uf.parse(e):pC.parse(e),transform:e=>i2(e)?e:e.hasOwnProperty("red")?Yc.transform(e):Uf.transform(e)},_N="${c}",kN="${n}";function Ese(e){var t,n,r,i;return isNaN(e)&&i2(e)&&((n=(t=e.match(Mv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(hC))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function EN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(hC);r&&(n=r.length,e=e.replace(hC,_N),t.push(...r.map(to.parse)));const i=e.match(Mv);return i&&(e=e.replace(Mv,kN),t.push(...i.map(bh.parse))),{values:t,numColors:n,tokenised:e}}function PN(e){return EN(e).values}function TN(e){const{values:t,numColors:n,tokenised:r}=EN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Tse(e){const t=PN(e);return TN(e)(t.map(Pse))}const Pu={test:Ese,parse:PN,createTransformer:TN,getAnimatableNone:Tse},Lse=new Set(["brightness","contrast","saturate","opacity"]);function Ase(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Mv)||[];if(!r)return e;const i=n.replace(r,"");let o=Lse.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Mse=/([a-z-]*)\(.*?\)/g,gC=Object.assign(Object.assign({},Pu),{getAnimatableNone:e=>{const t=e.match(Mse);return t?t.map(Ase).join(" "):e}}),HT={...bh,transform:Math.round},LN={borderWidth:Ct,borderTopWidth:Ct,borderRightWidth:Ct,borderBottomWidth:Ct,borderLeftWidth:Ct,borderRadius:Ct,radius:Ct,borderTopLeftRadius:Ct,borderTopRightRadius:Ct,borderBottomRightRadius:Ct,borderBottomLeftRadius:Ct,width:Ct,maxWidth:Ct,height:Ct,maxHeight:Ct,size:Ct,top:Ct,right:Ct,bottom:Ct,left:Ct,padding:Ct,paddingTop:Ct,paddingRight:Ct,paddingBottom:Ct,paddingLeft:Ct,margin:Ct,marginTop:Ct,marginRight:Ct,marginBottom:Ct,marginLeft:Ct,rotate:Ic,rotateX:Ic,rotateY:Ic,rotateZ:Ic,scale:Hy,scaleX:Hy,scaleY:Hy,scaleZ:Hy,skew:Ic,skewX:Ic,skewY:Ic,distance:Ct,translateX:Ct,translateY:Ct,translateZ:Ct,x:Ct,y:Ct,z:Ct,perspective:Ct,transformPerspective:Ct,opacity:Gm,originX:$T,originY:$T,originZ:Ct,zIndex:HT,fillOpacity:Gm,strokeOpacity:Gm,numOctaves:HT};function h8(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,g=!0;for(const m in t){const v=t[m];if(xN(m)){o[m]=v;continue}const S=LN[m],w=bse(v,S);if(m1.has(m)){if(u=!0,a[m]=w,s.push(m),!g)continue;v!==(S.default||0)&&(g=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Sse(e,n,g,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const p8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function AN(e,t,n){for(const r in t)!Il(t[r])&&!bN(r,n)&&(e[r]=t[r])}function Rse({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=p8();return h8(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Ise(e,t,n){const r=e.style||{},i={};return AN(i,r,e),Object.assign(i,Rse(e,t,n)),e.transformValues?e.transformValues(i):i}function Ose(e,t,n){const r={},i=Ise(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 Dse=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Nse=["whileTap","onTap","onTapStart","onTapCancel"],Bse=["onPan","onPanStart","onPanSessionStart","onPanEnd"],zse=["whileInView","onViewportEnter","onViewportLeave","viewport"],Fse=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",...zse,...Nse,...Dse,...Bse]);function q4(e){return Fse.has(e)}let MN=e=>!q4(e);function $se(e){!e||(MN=t=>t.startsWith("on")?!q4(t):e(t))}try{$se(require("@emotion/is-prop-valid").default)}catch(e){}function Hse(e,t,n){const r={};for(const i in e)(MN(i)||n===!0&&q4(i)||!t&&!q4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function WT(e,t,n){return typeof e=="string"?e:Ct.transform(t+n*e)}function Wse(e,t,n){const r=WT(t,e.x,e.width),i=WT(n,e.y,e.height);return`${r} ${i}`}const Vse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Use={offset:"strokeDashoffset",array:"strokeDasharray"};function Gse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Vse:Use;e[o.offset]=Ct.transform(-r);const a=Ct.transform(t),s=Ct.transform(n);e[o.array]=`${a} ${s}`}function g8(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){h8(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Wse(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),o!==void 0&&Gse(g,o,a,s,!1)}const RN=()=>({...p8(),attrs:{}});function jse(e,t){const n=C.exports.useMemo(()=>{const r=RN();return g8(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};AN(r,e.style,e),n.style={...r,...n.style}}return n}function Yse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(d8(n)?jse:Ose)(r,a,s),g={...Hse(r,typeof n=="string",e),...u,ref:o};return i&&(g["data-projection-id"]=i),C.exports.createElement(n,g)}}const IN=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function ON(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 DN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function NN(e,t,n,r){ON(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(DN.has(i)?i:IN(i),t.attrs[i])}function m8(e){const{style:t}=e,n={};for(const r in t)(Il(t[r])||bN(r,e))&&(n[r]=t[r]);return n}function BN(e){const t=m8(e);for(const n in e)if(Il(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function v8(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 Rv=e=>Array.isArray(e),qse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),zN=e=>Rv(e)?e[e.length-1]||0:e;function G3(e){const t=Il(e)?e.get():e;return qse(t)?t.toValue():t}function Kse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:Xse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const FN=e=>(t,n)=>{const r=C.exports.useContext(pS),i=C.exports.useContext(g1),o=()=>Kse(e,t,r,i);return n?o():vS(o)};function Xse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=G3(o[m]);let{initial:a,animate:s}=e;const l=mS(e),u=yN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const g=h?s:a;return g&&typeof g!="boolean"&&!gS(g)&&(Array.isArray(g)?g:[g]).forEach(v=>{const S=v8(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const _ in P){let T=P[_];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[_]=T)}for(const _ in w)i[_]=w[_]}),i}const Zse={useVisualState:FN({scrapeMotionValuesFromProps:BN,createRenderState:RN,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}}g8(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),NN(t,n)}})},Qse={useVisualState:FN({scrapeMotionValuesFromProps:m8,createRenderState:p8})};function Jse(e,{forwardMotionProps:t=!1},n,r,i){return{...d8(e)?Zse:Qse,preloadedFeatures:n,useRender:Yse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var qn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(qn||(qn={}));function yS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mC(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return yS(i,t,n,r)},[e,t,n,r])}function ele({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(qn.Focus,!0)},i=()=>{n&&n.setActive(qn.Focus,!1)};mC(t,"focus",e?r:void 0),mC(t,"blur",e?i:void 0)}function $N(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function HN(e){return!!e.touches}function tle(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const nle={pageX:0,pageY:0};function rle(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||nle;return{x:r[t+"X"],y:r[t+"Y"]}}function ile(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function y8(e,t="page"){return{point:HN(e)?rle(e,t):ile(e,t)}}const WN=(e,t=!1)=>{const n=r=>e(r,y8(r));return t?tle(n):n},ole=()=>Sh&&window.onpointerdown===null,ale=()=>Sh&&window.ontouchstart===null,sle=()=>Sh&&window.onmousedown===null,lle={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},ule={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function VN(e){return ole()?e:ale()?ule[e]:sle()?lle[e]:e}function L0(e,t,n,r){return yS(e,VN(t),WN(n,t==="pointerdown"),r)}function K4(e,t,n,r){return mC(e,VN(t),n&&WN(n,t==="pointerdown"),r)}function UN(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const VT=UN("dragHorizontal"),UT=UN("dragVertical");function GN(e){let t=!1;if(e==="y")t=UT();else if(e==="x")t=VT();else{const n=VT(),r=UT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function jN(){const e=GN(!0);return e?(e(),!1):!0}function GT(e,t,n){return(r,i)=>{!$N(r)||jN()||(e.animationState&&e.animationState.setActive(qn.Hover,t),n&&n(r,i))}}function cle({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){K4(r,"pointerenter",e||n?GT(r,!0,e):void 0,{passive:!e}),K4(r,"pointerleave",t||n?GT(r,!1,t):void 0,{passive:!t})}const YN=(e,t)=>t?e===t?!0:YN(e,t.parentElement):!1;function S8(e){return C.exports.useEffect(()=>()=>e(),[])}function qN(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);iMath.min(Math.max(n,e),t),Yx=.001,fle=.01,jT=10,hle=.05,ple=1;function gle({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;dle(e<=jT*1e3);let a=1-t;a=Z4(hle,ple,a),e=Z4(fle,jT,e/1e3),a<1?(i=u=>{const h=u*a,g=h*e,m=h-n,v=vC(u,a),S=Math.exp(-g);return Yx-m/v*S},o=u=>{const g=u*a*e,m=g*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-g),w=vC(Math.pow(u,2),a);return(-i(u)+Yx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),g=(u-n)*e+1;return-Yx+h*g},o=u=>{const h=Math.exp(-u*e),g=(n-u)*(e*e);return h*g});const s=5/e,l=vle(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 mle=12;function vle(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ble(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!YT(e,Sle)&&YT(e,yle)){const n=gle(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function b8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=qN(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:g,isResolvedFromDuration:m}=ble(o),v=qT,S=qT;function w(){const E=h?-(h/1e3):0,P=n-t,_=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)),_<1){const M=vC(T,_);v=I=>{const O=Math.exp(-_*T*I);return n-O*((E+_*T*P)/M*Math.sin(M*I)+P*Math.cos(M*I))},S=I=>{const O=Math.exp(-_*T*I);return _*T*O*(Math.sin(M*I)*(E+_*T*P)/M+P*Math.cos(M*I))-O*(Math.cos(M*I)*(E+_*T*P)-M*P*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const O=Math.exp(-_*T*I),D=Math.min(M*I,300);return n-O*((E+_*T*P)*Math.sinh(D)+M*P*Math.cosh(D))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=g;else{const _=S(E)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}b8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const qT=e=>0,Iv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},kr=(e,t,n)=>-n*e+n*t+e;function qx(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 KT({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=qx(l,s,e+1/3),o=qx(l,s,e),a=qx(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const xle=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},wle=[pC,Yc,Uf],XT=e=>wle.find(t=>t.test(e)),KN=(e,t)=>{let n=XT(e),r=XT(t),i=n.parse(e),o=r.parse(t);n===Uf&&(i=KT(i),n=Yc),r===Uf&&(o=KT(o),r=Yc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=xle(i[l],o[l],s));return a.alpha=kr(i.alpha,o.alpha,s),n.transform(a)}},yC=e=>typeof e=="number",Cle=(e,t)=>n=>t(e(n)),SS=(...e)=>e.reduce(Cle);function XN(e,t){return yC(e)?n=>kr(e,t,n):to.test(e)?KN(e,t):QN(e,t)}const ZN=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>XN(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=XN(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function ZT(e){const t=Pu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=Pu.createTransformer(t),r=ZT(e),i=ZT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?SS(ZN(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},kle=(e,t)=>n=>kr(e,t,n);function Ele(e){if(typeof e=="number")return kle;if(typeof e=="string")return to.test(e)?KN:QN;if(Array.isArray(e))return ZN;if(typeof e=="object")return _le}function Ple(e,t,n){const r=[],i=n||Ele(e[0]),o=e.length-1;for(let a=0;an(Iv(e,t,r))}function Lle(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(;li||l===r);l++);o=l-1}const s=Iv(e[o],e[o+1],i);return t[o](s)}}function JN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;X4(o===t.length),X4(!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=Ple(t,r,i),s=o===2?Tle(e,a):Lle(e,a);return n?l=>s(Z4(e[0],e[o-1],l)):s}const bS=e=>t=>1-e(1-t),x8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ale=e=>t=>Math.pow(t,e),eB=e=>t=>t*t*((e+1)*t-e),Mle=e=>{const t=eB(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},tB=1.525,Rle=4/11,Ile=8/11,Ole=9/10,w8=e=>e,C8=Ale(2),Dle=bS(C8),nB=x8(C8),rB=e=>1-Math.sin(Math.acos(e)),_8=bS(rB),Nle=x8(_8),k8=eB(tB),Ble=bS(k8),zle=x8(k8),Fle=Mle(tB),$le=4356/361,Hle=35442/1805,Wle=16061/1805,Q4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Q4(1-e*2)):.5*Q4(e*2-1)+.5;function Gle(e,t){return e.map(()=>t||nB).splice(0,e.length-1)}function jle(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Yle(e,t){return e.map(n=>n*t)}function j3({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=Yle(r&&r.length===a.length?r:jle(a),i);function l(){return JN(s,a,{ease:Array.isArray(n)?n:Gle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function qle({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:h=>{const g=-s*Math.exp(-h/r);return a.done=!(g>i||g<-i),a.value=a.done?u:u+g,a},flipTarget:()=>{}}}const QT={keyframes:j3,spring:b8,decay:qle};function Kle(e){if(Array.isArray(e.to))return j3;if(QT[e.type])return QT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?j3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?b8:j3}const iB=1/60*1e3,Xle=typeof performance<"u"?()=>performance.now():()=>Date.now(),oB=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Xle()),iB);function Zle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&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(e[t]=Zle(()=>Ov=!0),e),{}),Jle=a2.reduce((e,t)=>{const n=xS[t];return e[t]=(r,i=!1,o=!1)=>(Ov||nue(),n.schedule(r,i,o)),e},{}),eue=a2.reduce((e,t)=>(e[t]=xS[t].cancel,e),{});a2.reduce((e,t)=>(e[t]=()=>xS[t].process(A0),e),{});const tue=e=>xS[e].process(A0),aB=e=>{Ov=!1,A0.delta=SC?iB:Math.max(Math.min(e-A0.timestamp,Qle),1),A0.timestamp=e,bC=!0,a2.forEach(tue),bC=!1,Ov&&(SC=!1,oB(aB))},nue=()=>{Ov=!0,SC=!0,bC||oB(aB)},rue=()=>A0;function sB(e,t,n=0){return e-t-n}function iue(e,t,n=0,r=!0){return r?sB(t+-e,t,n):t-(e-t)+n}function oue(e,t,n,r){return r?e>=t+n:e<=-n}const aue=e=>{const t=({delta:n})=>e(n);return{start:()=>Jle.update(t,!0),stop:()=>eue.update(t)}};function lB(e){var t,n,{from:r,autoplay:i=!0,driver:o=aue,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:g,onComplete:m,onRepeat:v,onUpdate:S}=e,w=qN(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,_=0,T=w.duration,M,I=!1,O=!0,D;const B=Kle(w);!((n=(t=B).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(D=JN([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=B(Object.assign(Object.assign({},w),{from:r,to:E}));function W(){_++,l==="reverse"?(O=_%2===0,a=iue(a,T,u,O)):(a=sB(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function j(){P.stop(),m&&m()}function ne(K){if(O||(K=-K),a+=K,!I){const te=$.next(Math.max(0,a));M=te.value,D&&(M=D(M)),I=O?te.done:a<=0}S==null||S(M),I&&(_===0&&(T!=null||(T=a)),_{g==null||g(),P.stop()}}}function uB(e,t){return t?e*(1e3/t):0}function sue({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:h,onUpdate:g,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;g==null||g(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),I=M===n?-1:1;let O,D;const B=$=>{O=D,D=$,t=uB($-O,rue().delta),(I===1&&$>M||I===-1&&$S==null?void 0:S.stop()}}const xC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),JT=e=>xC(e)&&e.hasOwnProperty("z"),Wy=(e,t)=>Math.abs(e-t);function E8(e,t){if(yC(e)&&yC(t))return Wy(e,t);if(xC(e)&&xC(t)){const n=Wy(e.x,t.x),r=Wy(e.y,t.y),i=JT(e)&&JT(t)?Wy(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const cB=(e,t)=>1-3*t+3*e,dB=(e,t)=>3*t-6*e,fB=e=>3*e,J4=(e,t,n)=>((cB(t,n)*e+dB(t,n))*e+fB(t))*e,hB=(e,t,n)=>3*cB(t,n)*e*e+2*dB(t,n)*e+fB(t),lue=1e-7,uue=10;function cue(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=J4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>lue&&++s=fue?hue(a,g,e,n):m===0?g:cue(a,s,s+Vy,e,n)}return a=>a===0||a===1?a:J4(o(a),t,r)}function gue({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(qn.Tap,!1),!jN()}function g(S,w){!h()||(YN(i.current,S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=SS(L0(window,"pointerup",g,l),L0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(qn.Tap,!0),t&&t(S,w))}K4(i,"pointerdown",o?v:void 0,l),S8(u)}const mue="production",pB=typeof process>"u"||process.env===void 0?mue:"production",eL=new Set;function gB(e,t,n){e||eL.has(t)||(console.warn(t),n&&console.warn(n),eL.add(t))}const wC=new WeakMap,Kx=new WeakMap,vue=e=>{const t=wC.get(e.target);t&&t(e)},yue=e=>{e.forEach(vue)};function Sue({root:e,...t}){const n=e||document;Kx.has(n)||Kx.set(n,{});const r=Kx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(yue,{root:e,...t})),r[i]}function bue(e,t,n){const r=Sue(t);return wC.set(e,n),r.observe(e),()=>{wC.delete(e),r.unobserve(e)}}function xue({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?_ue:Cue)(a,o.current,e,i)}const wue={some:0,all:1};function Cue(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:wue[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(qn.InView,h);const g=n.getProps(),m=h?g.onViewportEnter:g.onViewportLeave;m&&m(u)};return bue(n.current,s,l)},[e,r,i,o])}function _ue(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(pB!=="production"&&gB(!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(qn.InView,!0)}))},[e])}const qc=e=>t=>(e(t),null),kue={inView:qc(xue),tap:qc(gue),focus:qc(ele),hover:qc(cle)};function P8(){const e=C.exports.useContext(g1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Eue(){return Pue(C.exports.useContext(g1))}function Pue(e){return e===null?!0:e.isPresent}function mB(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Tue={linear:w8,easeIn:C8,easeInOut:nB,easeOut:Dle,circIn:rB,circInOut:Nle,circOut:_8,backIn:k8,backInOut:zle,backOut:Ble,anticipate:Fle,bounceIn:Vle,bounceInOut:Ule,bounceOut:Q4},tL=e=>{if(Array.isArray(e)){X4(e.length===4);const[t,n,r,i]=e;return pue(t,n,r,i)}else if(typeof e=="string")return Tue[e];return e},Lue=e=>Array.isArray(e)&&typeof e[0]!="number",nL=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Pu.test(t)&&!t.startsWith("url(")),wf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Uy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xx=()=>({type:"keyframes",ease:"linear",duration:.3}),Aue=e=>({type:"keyframes",duration:.8,values:e}),rL={x:wf,y:wf,z:wf,rotate:wf,rotateX:wf,rotateY:wf,rotateZ:wf,scaleX:Uy,scaleY:Uy,scale:Uy,opacity:Xx,backgroundColor:Xx,color:Xx,default:Uy},Mue=(e,t)=>{let n;return Rv(t)?n=Aue:n=rL[e]||rL.default,{to:t,...n(t)}},Rue={...LN,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:gC,WebkitFilter:gC},T8=e=>Rue[e];function L8(e,t){var n;let r=T8(e);return r!==gC&&(r=Pu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Iue={current:!1},vB=1/60*1e3,Oue=typeof performance<"u"?()=>performance.now():()=>Date.now(),yB=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Oue()),vB);function Due(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const g=h&&i,m=g?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),g&&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(e[t]=Due(()=>Dv=!0),e),{}),Ls=s2.reduce((e,t)=>{const n=wS[t];return e[t]=(r,i=!1,o=!1)=>(Dv||zue(),n.schedule(r,i,o)),e},{}),fh=s2.reduce((e,t)=>(e[t]=wS[t].cancel,e),{}),Zx=s2.reduce((e,t)=>(e[t]=()=>wS[t].process(M0),e),{}),Bue=e=>wS[e].process(M0),SB=e=>{Dv=!1,M0.delta=CC?vB:Math.max(Math.min(e-M0.timestamp,Nue),1),M0.timestamp=e,_C=!0,s2.forEach(Bue),_C=!1,Dv&&(CC=!1,yB(SB))},zue=()=>{Dv=!0,CC=!0,_C||yB(SB)},kC=()=>M0;function bB(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(fh.read(r),e(o-t))};return Ls.read(r,!0),()=>fh.read(r)}function Fue({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 $ue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=e5(o.duration)),o.repeatDelay&&(a.repeatDelay=e5(o.repeatDelay)),e&&(a.ease=Lue(e)?e.map(tL):tL(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 Hue(e,t){var n,r;return(r=(n=(A8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Wue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Vue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Wue(t),Fue(e)||(e={...e,...Mue(n,t.to)}),{...t,...$ue(e)}}function Uue(e,t,n,r,i){const o=A8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=nL(e,n);a==="none"&&s&&typeof n=="string"?a=L8(e,n):iL(a)&&typeof n=="string"?a=oL(n):!Array.isArray(n)&&iL(n)&&typeof a=="string"&&(n=oL(a));const l=nL(e,a);function u(){const g={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?sue({...g,...o}):lB({...Vue(o,g,e),onUpdate:m=>{g.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{g.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const g=zN(n);return t.set(g),i(),o.onUpdate&&o.onUpdate(g),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function iL(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function oL(e){return typeof e=="number"?0:L8("",e)}function A8(e,t){return e[t]||e.default||e}function M8(e,t,n,r={}){return Iue.current&&(r={type:!1}),t.start(i=>{let o;const a=Uue(e,t,n,r,i),s=Hue(r,e),l=()=>o=a();let u;return s?u=bB(l,e5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Gue=e=>/^\-?\d*\.?\d+$/.test(e),jue=e=>/^0[^.\s]+$/.test(e);function R8(e,t){e.indexOf(t)===-1&&e.push(t)}function I8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class jm{constructor(){this.subscriptions=[]}add(t){return R8(this.subscriptions,t),()=>I8(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!isNaN(parseFloat(e));class que{constructor(t){this.version="7.6.9",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new jm,this.velocityUpdateSubscribers=new jm,this.renderSubscribers=new jm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=kC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ls.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=()=>Ls.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=Yue(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?uB(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 Z0(e){return new que(e)}const xB=e=>t=>t.test(e),Kue={test:e=>e==="auto",parse:e=>e},wB=[bh,Ct,Tl,Ic,Cse,wse,Kue],qg=e=>wB.find(xB(e)),Xue=[...wB,to,Pu],Zue=e=>Xue.find(xB(e));function Que(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Jue(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function CS(e,t,n){const r=e.getProps();return v8(r,t,n!==void 0?n:r.custom,Que(e),Jue(e))}function ece(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Z0(n))}function tce(e,t){const n=CS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=zN(o[a]);ece(e,a,s)}}function nce(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;sEC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=EC(e,t,n);else{const i=typeof t=="function"?CS(e,t,n.custom):t;r=CB(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function EC(e,t,n={}){var r;const i=CS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>CB(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:g,staggerDirection:m}=o;return ace(e,t,h+u,g,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function CB(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 h=[],g=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||g&&lce(g,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&m1.has(m)&&(w={...w,type:!1,delay:0});let E=M8(m,v,S,w);t5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&tce(e,s)})}function ace(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(sce).forEach((u,h)=>{a.push(EC(u,t,{...o,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function sce(e,t){return e.sortNodePosition(t)}function lce({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const O8=[qn.Animate,qn.InView,qn.Focus,qn.Hover,qn.Tap,qn.Drag,qn.Exit],uce=[...O8].reverse(),cce=O8.length;function dce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>oce(e,n,r)))}function fce(e){let t=dce(e);const n=pce();let r=!0;const i=(l,u)=>{const h=CS(e,u);if(h){const{transition:g,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const g=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let _=0;_E&&O;const j=Array.isArray(I)?I:[I];let ne=j.reduce(i,{});D===!1&&(ne={});const{prevResolvedValues:H={}}=M,K={...H,...ne},te=J=>{W=!0,S.delete(J),M.needsAnimating[J]=!0};for(const J in K){const X=ne[J],G=H[J];w.hasOwnProperty(J)||(X!==G?Rv(X)&&Rv(G)?!mB(X,G)||$?te(J):M.protectedKeys[J]=!0:X!==void 0?te(J):S.add(J):X!==void 0&&S.has(J)?te(J):M.protectedKeys[J]=!0)}M.prevProp=I,M.prevResolvedValues=ne,M.isActive&&(w={...w,...ne}),r&&e.blockInitialAnimation&&(W=!1),W&&!B&&v.push(...j.map(J=>({animation:J,options:{type:T,...l}})))}if(S.size){const _={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(_[T]=M)}),v.push({animation:_})}let P=Boolean(v.length);return r&&g.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var g;if(n[l].isActive===u)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function hce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!mB(t,e):!1}function Cf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pce(){return{[qn.Animate]:Cf(!0),[qn.InView]:Cf(),[qn.Hover]:Cf(),[qn.Tap]:Cf(),[qn.Drag]:Cf(),[qn.Focus]:Cf(),[qn.Exit]:Cf()}}const gce={animation:qc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=fce(e)),gS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:qc(e=>{const{custom:t,visualElement:n}=e,[r,i]=P8(),o=C.exports.useContext(g1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(qn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class _B{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=Jx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=E8(u.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=u,{timestamp:v}=kC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Qx(h,this.transformPagePoint),$N(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Ls.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:g,onSessionEnd:m}=this.handlers,v=Jx(Qx(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(u,v),m&&m(u,v)},HN(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=y8(t),o=Qx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=kC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Jx(o,this.history)),this.removeListeners=SS(L0(window,"pointermove",this.handlePointerMove),L0(window,"pointerup",this.handlePointerUp),L0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fh.update(this.updatePoint)}}function Qx(e,t){return t?{point:t(e.point)}:e}function aL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jx({point:e},t){return{point:e,delta:aL(e,kB(t)),offset:aL(e,mce(t)),velocity:vce(t,.1)}}function mce(e){return e[0]}function kB(e){return e[e.length-1]}function vce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=kB(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>e5(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 ma(e){return e.max-e.min}function sL(e,t=0,n=.01){return E8(e,t)n&&(e=r?kr(n,e,r.max):Math.min(e,n)),e}function dL(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 bce(e,{top:t,left:n,bottom:r,right:i}){return{x:dL(e.x,n,i),y:dL(e.y,t,r)}}function fL(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Iv(t.min,t.max-r,e.min):r>i&&(n=Iv(e.min,e.max-i,t.min)),Z4(0,1,n)}function Cce(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 PC=.35;function _ce(e=PC){return e===!1?e=0:e===!0&&(e=PC),{x:hL(e,"left","right"),y:hL(e,"top","bottom")}}function hL(e,t,n){return{min:pL(e,t),max:pL(e,n)}}function pL(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const gL=()=>({translate:0,scale:1,origin:0,originPoint:0}),Km=()=>({x:gL(),y:gL()}),mL=()=>({min:0,max:0}),ei=()=>({x:mL(),y:mL()});function fl(e){return[e("x"),e("y")]}function EB({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function kce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ece(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 ew(e){return e===void 0||e===1}function TC({scale:e,scaleX:t,scaleY:n}){return!ew(e)||!ew(t)||!ew(n)}function Af(e){return TC(e)||PB(e)||e.z||e.rotate||e.rotateX||e.rotateY}function PB(e){return vL(e.x)||vL(e.y)}function vL(e){return e&&e!=="0%"}function n5(e,t,n){const r=e-n,i=t*r;return n+i}function yL(e,t,n,r,i){return i!==void 0&&(e=n5(e,i,r)),n5(e,n,r)+t}function LC(e,t=0,n=1,r,i){e.min=yL(e.min,t,n,r,i),e.max=yL(e.max,t,n,r,i)}function TB(e,{x:t,y:n}){LC(e.x,t.translate,t.scale,t.originPoint),LC(e.y,n.translate,n.scale,n.originPoint)}function Pce(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{this.stopAnimation(),n&&this.snapToCursor(y8(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();h&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=GN(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fl(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Tl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.layoutBox[v];P&&(E=ma(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m==null||m(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(qn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Ice(v),this.currentDirection!==null&&(g==null||g(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 _B(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(qn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Gy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Sce(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&&a0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=bce(r.layoutBox,t):this.constraints=!1,this.elastic=_ce(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&fl(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Cce(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!a0(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ace(r,i.root,this.visualElement.getTransformPagePoint());let a=xce(i.layout.layoutBox,o);if(n){const s=n(kce(a));this.hasMutatedConstraints=!!s,s&&(a=EB(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=fl(h=>{var g;if(!Gy(h,n,this.currentDirection))return;let m=(g=l==null?void 0:l[h])!==null&&g!==void 0?g:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return M8(t,r,0,n)}stopAnimation(){fl(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){fl(n=>{const{drag:r}=this.getProps();if(!Gy(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]-kr(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!a0(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};fl(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=wce({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(),fl(s=>{if(!Gy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(kr(u,h,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;Mce.set(this.visualElement,this);const n=this.visualElement.current,r=L0(n,"pointerdown",u=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();a0(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=yS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(fl(g=>{const m=this.getAxisMotionValue(g);!m||(this.originPoint[g]+=u[g].translate,m.set(m.get()+u[g].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=PC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Gy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ice(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Oce(e){const{dragControls:t,visualElement:n}=e,r=vS(()=>new Rce(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Dce({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(u8),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,g)=>{a.current=null,n&&n(h,g)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new _B(h,l,{transformPagePoint:s})}K4(i,"pointerdown",o&&u),S8(()=>a.current&&a.current.end())}const Nce={pan:qc(Dce),drag:qc(Oce)};function AC(e){return typeof e=="string"&&e.startsWith("var(--")}const AB=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Bce(e){const t=AB.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function MC(e,t,n=1){const[r,i]=Bce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():AC(i)?MC(i,t,n+1):i}function zce(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(!AC(o))return;const a=MC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!AC(o))continue;const a=MC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Fce=new Set(["width","height","top","left","right","bottom","x","y"]),MB=e=>Fce.has(e),$ce=e=>Object.keys(e).some(MB),RB=(e,t)=>{e.set(t,!1),e.set(t)},bL=e=>e===bh||e===Ct;var xL;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(xL||(xL={}));const wL=(e,t)=>parseFloat(e.split(", ")[t]),CL=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return wL(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?wL(o[1],e):0}},Hce=new Set(["x","y","z"]),Wce=Y4.filter(e=>!Hce.has(e));function Vce(e){const t=[];return Wce.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 _L={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:CL(4,13),y:CL(5,14)},Uce=(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]=_L[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);RB(h,s[u]),e[u]=_L[u](l,o)}),e},Gce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(MB);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],g=qg(h);const m=t[l];let v;if(Rv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],g=qg(h);for(let E=w;E=0?window.pageYOffset:null,u=Uce(t,e,s);return o.length&&o.forEach(([h,g])=>{e.getValue(h).set(g)}),e.render(),Sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function jce(e,t,n,r){return $ce(t)?Gce(e,t,n,r):{target:t,transitionEnd:r}}const Yce=(e,t,n,r)=>{const i=zce(e,t,r);return t=i.target,r=i.transitionEnd,jce(e,t,n,r)},RC={current:null},IB={current:!1};function qce(){if(IB.current=!0,!!Sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>RC.current=e.matches;e.addListener(t),t()}else RC.current=!1}function Kce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(Il(o))e.addValue(i,o),t5(r)&&r.add(i);else if(Il(a))e.addValue(i,Z0(o)),t5(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,Z0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const OB=Object.keys(Av),Xce=OB.length,kL=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Zce{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=()=>Ls.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=mS(n),this.isVariantNode=yN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const h in u){const g=u[h];a[h]!==void 0&&Il(g)&&(g.set(a[h],!1),t5(l)&&l.add(h))}}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)),IB.current||qce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:RC.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(),fh.update(this.notifyUpdate),fh.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=m1.has(t),i=n.onChange(a=>{this.latestValues[t]=a,this.props.onUpdate&&Ls.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;lthis.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):ei()}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;nr.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=Z0(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=v8(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&&!Il(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 jm),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const DB=["initial",...O8],Qce=DB.length;class NB extends Zce{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=ice(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){nce(this,r,a);const s=Yce(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function Jce(e){return window.getComputedStyle(e)}class ede extends NB{readValueFromInstance(t,n){if(m1.has(n)){const r=T8(n);return r&&r.default||0}else{const r=Jce(t),i=(xN(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return LB(t,n)}build(t,n,r,i){h8(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return m8(t)}renderInstance(t,n,r,i){ON(t,n,r,i)}}class tde extends NB{getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return m1.has(n)?((r=T8(n))===null||r===void 0?void 0:r.default)||0:(n=DN.has(n)?n:IN(n),t.getAttribute(n))}measureInstanceViewportBox(){return ei()}scrapeMotionValuesFromProps(t){return BN(t)}build(t,n,r,i){g8(t,n,r,i.transformTemplate)}renderInstance(t,n,r,i){NN(t,n,r,i)}}const nde=(e,t)=>d8(e)?new tde(t,{enableHardwareAcceleration:!1}):new ede(t,{enableHardwareAcceleration:!0});function EL(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Kg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ct.test(e))e=parseFloat(e);else return e;const n=EL(e,t.target.x),r=EL(e,t.target.y);return`${n}% ${r}%`}},PL="_$css",rde={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(AB,v=>(o.push(v),PL)));const a=Pu.parse(e);if(a.length>5)return r;const s=Pu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const g=kr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=g),typeof a[3+l]=="number"&&(a[3+l]/=g);let m=s(a);if(i){let v=0;m=m.replace(PL,()=>{const S=o[v];return v++,S})}return m}};class ide extends se.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;mse(ade),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()})),Vm.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()||Ls.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 ode(e){const[t,n]=P8(),r=C.exports.useContext(c8);return b(ide,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(SN),isPresent:t,safeToRemove:n})}const ade={borderRadius:{...Kg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kg,borderTopRightRadius:Kg,borderBottomLeftRadius:Kg,borderBottomRightRadius:Kg,boxShadow:rde},sde={measureLayout:ode};function lde(e,t,n={}){const r=Il(e)?e:Z0(e);return M8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const BB=["TopLeft","TopRight","BottomLeft","BottomRight"],ude=BB.length,TL=e=>typeof e=="string"?parseFloat(e):e,LL=e=>typeof e=="number"||Ct.test(e);function cde(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=kr(0,(a=n.opacity)!==null&&a!==void 0?a:1,dde(r)),e.opacityExit=kr((s=t.opacity)!==null&&s!==void 0?s:1,0,fde(r))):o&&(e.opacity=kr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Iv(e,t,r))}function ML(e,t){e.min=t.min,e.max=t.max}function ms(e,t){ML(e.x,t.x),ML(e.y,t.y)}function RL(e,t,n,r,i){return e-=t,e=n5(e,1/n,r),i!==void 0&&(e=n5(e,1/i,r)),e}function hde(e,t=0,n=1,r=.5,i,o=e,a=e){if(Tl.test(t)&&(t=parseFloat(t),t=kr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=kr(o.min,o.max,r);e===o&&(s-=t),e.min=RL(e.min,t,n,s,i),e.max=RL(e.max,t,n,s,i)}function IL(e,t,[n,r,i],o,a){hde(e,t[n],t[r],t[i],t.scale,o,a)}const pde=["x","scaleX","originX"],gde=["y","scaleY","originY"];function OL(e,t,n,r){IL(e.x,t,pde,n==null?void 0:n.x,r==null?void 0:r.x),IL(e.y,t,gde,n==null?void 0:n.y,r==null?void 0:r.y)}function DL(e){return e.translate===0&&e.scale===1}function FB(e){return DL(e.x)&&DL(e.y)}function $B(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 NL(e){return ma(e.x)/ma(e.y)}function mde(e,t,n=.1){return E8(e,t)<=n}class vde{constructor(){this.members=[]}add(t){R8(this.members,t),t.scheduleRender()}remove(t){if(I8(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 BL(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:h}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),h&&(r+=`rotateY(${h}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 yde=(e,t)=>e.depth-t.depth;class Sde{constructor(){this.children=[],this.isDirty=!1}add(t){R8(this.children,t),this.isDirty=!0}remove(t){I8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yde),this.isDirty=!1,this.children.forEach(t)}}const zL=["","X","Y","Z"],FL=1e3;let bde=0;function HB({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=bde++,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(kde),this.nodes.forEach(Ede)},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;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=bB(v,250),Vm.hasAnimatedSinceResize&&(Vm.hasAnimatedSinceResize=!1,this.nodes.forEach(HL))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&g&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(P=(E=this.options.transition)!==null&&E!==void 0?E:g.getDefaultTransition())!==null&&P!==void 0?P:Mde,{onLayoutAnimationStart:O,onLayoutAnimationComplete:D}=g.getProps(),B=!this.targetLayout||!$B(this.targetLayout,w)||S,$=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||$||v&&(B||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...A8(I,"layout"),onPlay:O,onComplete:D};g.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&HL(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}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,fh.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(Pde),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.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{var T;const M=_/1e3;WL(v.x,a.x,M),WL(v.y,a.y,M),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((T=this.relativeParent)===null||T===void 0?void 0:T.layout)&&(qm(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lde(this.relativeTarget,this.relativeTargetOrigin,S,M)),w&&(this.animationValues=m,cde(m,g,this.latestValues,M,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},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&&(fh.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ls.update(()=>{Vm.hasAnimatedSinceResize=!0,this.currentAnimation=lde(0,FL,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.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,FL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&WB(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ei();const g=ma(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+g;const m=ma(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ms(s,l),s0(s,h),Ym(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new vde),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.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 h=0;h{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach($L),this.root.sharedNodes.clear()}}}function xde(e){e.updateLayout()}function wde(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"?fl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ma(S);S.min=o[v].min,S.max=S.min+w}):WB(s,i.layoutBox,o)&&fl(v=>{const S=l?i.measuredBox[v]:i.layoutBox[v],w=ma(o[v]);S.max=S.min+w});const u=Km();Ym(u,o,i.layoutBox);const h=Km();l?Ym(h,e.applyTransform(a,!0),i.measuredBox):Ym(h,o,i.layoutBox);const g=!FB(u);let m=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:S,layout:w}=v;if(S&&w){const E=ei();qm(E,i.layoutBox,S.layoutBox);const P=ei();qm(P,o,w.layoutBox),$B(E,P)||(m=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:h,layoutDelta:u,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Cde(e){e.clearSnapshot()}function $L(e){e.clearMeasurements()}function _de(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function HL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function kde(e){e.resolveTargetDelta()}function Ede(e){e.calcProjection()}function Pde(e){e.resetRotation()}function Tde(e){e.removeLeadSnapshot()}function WL(e,t,n){e.translate=kr(t.translate,0,n),e.scale=kr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function VL(e,t,n,r){e.min=kr(t.min,n.min,r),e.max=kr(t.max,n.max,r)}function Lde(e,t,n,r){VL(e.x,t.x,n.x,r),VL(e.y,t.y,n.y,r)}function Ade(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Mde={duration:.45,ease:[.4,0,.1,1]};function Rde(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 UL(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Ide(e){UL(e.x),UL(e.y)}function WB(e,t,n){return e==="position"||e==="preserve-aspect"&&!mde(NL(t),NL(n),.2)}const Ode=HB({attachResizeListener:(e,t)=>yS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),tw={current:void 0},Dde=HB({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!tw.current){const e=new Ode(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),tw.current=e}return tw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Nde={...gce,...kue,...Nce,...sde},$l=pse((e,t)=>Jse(e,t,Nde,nde,Dde));function VB(){const e=C.exports.useRef(!1);return G4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Bde(){const e=VB(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Ls.postRender(r),[r]),t]}class zde extends C.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 Fde({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.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(zde,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const nw=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=vS($de),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const g of s.values())if(!g)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,g)=>s.set(g,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=b(Fde,{isPresent:n,children:e})),b(g1.Provider,{value:u,children:e})};function $de(){return new Map}const Gp=e=>e.key||"";function Hde(e,t){e.forEach(n=>{const r=Gp(n);t.set(r,n)})}function Wde(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const Cd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",gB(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Bde();const l=C.exports.useContext(c8).forceRender;l&&(s=l);const u=VB(),h=Wde(e);let g=h;const m=new Set,v=C.exports.useRef(g),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(G4(()=>{w.current=!1,Hde(h,S),v.current=g}),S8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return b(Rn,{children:g.map(T=>b(nw,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Gp(T)))});g=[...g];const E=v.current.map(Gp),P=h.map(Gp),_=E.length;for(let T=0;T<_;T++){const M=E[T];P.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(g=[]),m.forEach(T=>{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=E.indexOf(T),O=()=>{S.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=h,u.current===!1)return;s(),r&&r()}};g.splice(I,0,b(nw,{isPresent:!1,onExitComplete:O,custom:t,presenceAffectsLayout:o,mode:a,children:M},Gp(M)))}),g=g.map(T=>{const M=T.key;return m.has(M)?T:b(nw,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Gp(T))}),pB!=="production"&&a==="wait"&&g.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),b(Rn,{children:m.size?g:g.map(T=>C.exports.cloneElement(T))})};var yl=function(){return yl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]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 IC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Vde(){return!1}var Ude=e=>{const{condition:t,message:n}=e;t&&Vde()&&console.warn(n)},Gf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Xg={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 OC(e){var n;switch((n=e==null?void 0:e.direction)!=null?n:"right"){case"right":return Xg.slideRight;case"left":return Xg.slideLeft;case"bottom":return Xg.slideDown;case"top":return Xg.slideUp;default:return Xg.slideRight}}var th={enter:{duration:.2,ease:Gf.easeOut},exit:{duration:.1,ease:Gf.easeIn}},As={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})},Gde=e=>e!=null&&parseInt(e.toString(),10)>0,jL={exit:{height:{duration:.2,ease:Gf.ease},opacity:{duration:.3,ease:Gf.ease}},enter:{height:{duration:.3,ease:Gf.ease},opacity:{duration:.4,ease:Gf.ease}}},jde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:Gde(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(o=n==null?void 0:n.exit)!=null?o:As.exit(jL.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:As.enter(jL.enter,i)}}},GB=C.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:h,...g}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),Ude({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h==null?void 0:h.enter,exit:r?h==null?void 0:h.exit:{...h==null?void 0:h.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return b(Cd,{initial:!1,custom:w,children:E&&se.createElement($l.div,{ref:t,...g,className:l2("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:jde,initial:r?"exit":!1,animate:P,exit:"exit"})})});GB.displayName="Collapse";var Yde={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:As.enter(th.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:As.exit(th.exit,n),transitionEnd:t==null?void 0:t.exit}}},jB={initial:"exit",animate:"enter",exit:"exit",variants:Yde},qde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",g=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return b(Cd,{custom:m,children:g&&se.createElement($l.div,{ref:n,className:l2("chakra-fade",o),custom:m,...jB,animate:h,...u})})});qde.displayName="Fade";var Kde={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:As.exit(th.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:As.enter(th.enter,n),transitionEnd:e==null?void 0:e.enter}}},YB={initial:"exit",animate:"enter",exit:"exit",variants:Kde},Xde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...g}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return b(Cd,{custom:S,children:m&&se.createElement($l.div,{ref:n,className:l2("chakra-offset-slide",s),...YB,animate:v,custom:S,...g})})});Xde.displayName="ScaleFade";var YL={exit:{duration:.15,ease:Gf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Zde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:i}=OC({direction:e});return{...i,transition:(o=t==null?void 0:t.exit)!=null?o:As.exit(YL.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:i}=OC({direction:e});return{...i,transition:(o=n==null?void 0:n.enter)!=null?o:As.enter(YL.enter,r),transitionEnd:t==null?void 0:t.enter}}},qB=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:g,...m}=t,v=OC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return b(Cd,{custom:P,children:w&&se.createElement($l.div,{...m,ref:n,initial:"exit",className:l2("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:Zde,style:S,...g})})});qB.displayName="Slide";var Qde={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:As.exit(th.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:As.enter(th.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:As.exit(th.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},DC={initial:"initial",animate:"enter",exit:"exit",variants:Qde},Jde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:g,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:g};return b(Cd,{custom:w,children:v&&se.createElement($l.div,{ref:n,className:l2("chakra-offset-slide",a),custom:w,...DC,animate:S,...m})})});Jde.displayName="SlideFade";var u2=(...e)=>e.filter(Boolean).join(" ");function efe(){return!1}var _S=e=>{const{condition:t,message:n}=e;t&&efe()&&console.warn(n)};function rw(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[tfe,kS]=En({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[nfe,D8]=En({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[rfe,WTe,ife,ofe]=mN(),jf=Ee(function(t,n){const{getButtonProps:r}=D8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...kS().button};return se.createElement(xe.button,{...i,className:u2("chakra-accordion__button",t.className),__css:a})});jf.displayName="AccordionButton";function afe(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;ufe(e),cfe(e);const s=ife(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,g]=hS({value:r,defaultValue(){return i?n!=null?n:[]:n!=null?n:-1},onChange:t});return{index:h,setIndex:g,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(_=>_!==v);g(P)}else E?g(v):o&&g(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[sfe,N8]=En({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function lfe(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=N8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r!=null?r:l,h=`accordion-button-${u}`,g=`accordion-panel-${u}`;dfe(e);const{register:m,index:v,descendants:S}=ofe({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);ffe({isOpen:w,isDisabled:t});const P=()=>{E==null||E(!0)},_=()=>{E==null||E(!1)},T=C.exports.useCallback(()=>{E==null||E(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(B=>{const W={ArrowDown:()=>{const j=S.nextEnabled(v);j==null||j.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j==null||j.node.focus()},Home:()=>{const j=S.firstEnabled();j==null||j.node.focus()},End:()=>{const j=S.lastEnabled();j==null||j.node.focus()}}[B.key];W&&(B.preventDefault(),W(B))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),O=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:Vn(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":g,onClick:rw($.onClick,T),onFocus:rw($.onFocus,I),onKeyDown:rw($.onKeyDown,M)}},[h,t,w,T,I,M,g,m]),D=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:g,"aria-labelledby":h,hidden:!w}},[h,w,g]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:_,getButtonProps:O,getPanelProps:D,htmlProps:i}}function ufe(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;_S({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function cfe(e){_S({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 dfe(e){_S({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 ffe(e){_S({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Yf(e){const{isOpen:t,isDisabled:n}=D8(),{reduceMotion:r}=N8(),i=u2("chakra-accordion__icon",e.className),o=kS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return b(xa,{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"})})}Yf.displayName="AccordionIcon";var qf=Ee(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=lfe(t),l={...kS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return se.createElement(nfe,{value:u},se.createElement(xe.div,{ref:n,...o,className:u2("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});qf.displayName="AccordionItem";var Kf=Ee(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=N8(),{getPanelProps:s,isOpen:l}=D8(),u=s(o,n),h=u2("chakra-accordion__panel",r),g=kS();a||delete u.hidden;const m=se.createElement(xe.div,{...u,__css:g.panel,className:h});return a?m:b(GB,{in:l,...i,children:m})});Kf.displayName="AccordionPanel";var ES=Ee(function({children:t,reduceMotion:n,...r},i){const o=Oi("Accordion",r),a=Sn(r),{htmlProps:s,descendants:l,...u}=afe(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return se.createElement(rfe,{value:l},se.createElement(sfe,{value:h},se.createElement(tfe,{value:o},se.createElement(xe.div,{ref:i,...s,className:u2("chakra-accordion",r.className),__css:o.root},t))))});ES.displayName="Accordion";var hfe=(...e)=>e.filter(Boolean).join(" "),pfe=wd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),c2=Ee((e,t)=>{const n=uo("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=Sn(e),u=hfe("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${pfe} ${o} linear infinite`,...n};return se.createElement(xe.div,{ref:t,__css:h,className:u,...l},r&&se.createElement(xe.span,{srOnly:!0},r))});c2.displayName="Spinner";var PS=(...e)=>e.filter(Boolean).join(" ");function gfe(e){return b(xa,{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 mfe(e){return b(xa,{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 qL(e){return b(xa,{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[vfe,yfe]=En({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[Sfe,B8]=En({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),KB={info:{icon:mfe,colorScheme:"blue"},warning:{icon:qL,colorScheme:"orange"},success:{icon:gfe,colorScheme:"green"},error:{icon:qL,colorScheme:"red"},loading:{icon:c2,colorScheme:"blue"}};function bfe(e){return KB[e].colorScheme}function xfe(e){return KB[e].icon}var XB=Ee(function(t,n){var u;const{status:r="info",addRole:i=!0,...o}=Sn(t),a=(u=t.colorScheme)!=null?u:bfe(r),s=Oi("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return se.createElement(vfe,{value:{status:r}},se.createElement(Sfe,{value:s},se.createElement(xe.div,{role:i?"alert":void 0,ref:n,...o,className:PS("chakra-alert",t.className),__css:l})))});XB.displayName="Alert";var ZB=Ee(function(t,n){const i={display:"inline",...B8().description};return se.createElement(xe.div,{ref:n,...t,className:PS("chakra-alert__desc",t.className),__css:i})});ZB.displayName="AlertDescription";function QB(e){const{status:t}=yfe(),n=xfe(t),r=B8(),i=t==="loading"?r.spinner:r.icon;return se.createElement(xe.span,{display:"inherit",...e,className:PS("chakra-alert__icon",e.className),__css:i},e.children||b(n,{h:"100%",w:"100%"}))}QB.displayName="AlertIcon";var JB=Ee(function(t,n){const r=B8();return se.createElement(xe.div,{ref:n,...t,className:PS("chakra-alert__title",t.className),__css:r.title})});JB.displayName="AlertTitle";function wfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Cfe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const g=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i==null||i(w)},S.onerror=w=>{v(),h("failed"),o==null||o(w)},g.current=S},[n,a,r,s,i,o,t]),v=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)};return Ps(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var _fe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",r5=Ee(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return b("img",{width:r,height:i,ref:n,alt:o,...a})});r5.displayName="NativeImage";var TS=Ee(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:g,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Cfe({...t,ignoreFallback:E}),_=_fe(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:wfe(S,["onError","onLoad"])};return _?i||se.createElement(xe.img,{as:r5,className:"chakra-image__placeholder",src:r,...T}):se.createElement(xe.img,{as:r5,src:o,srcSet:a,crossOrigin:g,loading:u,referrerPolicy:v,className:"chakra-image",...T})});TS.displayName="Image";Ee((e,t)=>se.createElement(xe.img,{ref:t,as:r5,className:"chakra-image",...e}));function LS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var AS=(...e)=>e.filter(Boolean).join(" "),KL=e=>e?"":void 0,[kfe,Efe]=En({strict:!1,name:"ButtonGroupContext"});function NC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=AS("chakra-button__icon",n);return se.createElement(xe.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}NC.displayName="ButtonIcon";function BC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=b(c2,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=AS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return se.createElement(xe.div,{className:l,...s,__css:h},i)}BC.displayName="ButtonSpinner";function Pfe(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Ua=Ee((e,t)=>{const n=Efe(),r=uo("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:g="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=Sn(e),_=C.exports.useMemo(()=>{const O={...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:O}}},[r,n]),{ref:T,type:M}=Pfe(E),I={rightIcon:u,leftIcon:l,iconSpacing:g,children:s};return se.createElement(xe.button,{disabled:i||o,ref:Kae(t,T),as:E,type:m!=null?m:M,"data-active":KL(a),"data-loading":KL(o),__css:_,className:AS("chakra-button",w),...P},o&&S==="start"&&b(BC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:g,children:v}),o?h||se.createElement(xe.span,{opacity:0},b(XL,{...I})):b(XL,{...I}),o&&S==="end"&&b(BC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:g,children:v}))});Ua.displayName="Button";function XL(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ee(Rn,{children:[t&&b(NC,{marginEnd:i,children:t}),r,n&&b(NC,{marginStart:i,children:n})]})}var Ao=Ee(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,g=AS("chakra-button__group",a),m=C.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}},se.createElement(kfe,{value:m},se.createElement(xe.div,{ref:n,role:"group",__css:v,className:g,"data-attached":l?"":void 0,...h}))});Ao.displayName="ButtonGroup";var Ga=Ee((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return b(Ua,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ga.displayName="IconButton";var S1=(...e)=>e.filter(Boolean).join(" "),jy=e=>e?"":void 0,iw=e=>e?!0:void 0;function ZL(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Tfe,ez]=En({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Lfe,b1]=En({strict:!1,name:"FormControlContext"});function Afe(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,g=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),_=C.exports.useCallback((D={},B=null)=>({id:g,...D,ref:Vn(B,$=>{!$||w(!0)})}),[g]),T=C.exports.useCallback((D={},B=null)=>{var $,W;return{...D,ref:B,"data-focus":jy(E),"data-disabled":jy(i),"data-invalid":jy(r),"data-readonly":jy(o),id:($=D.id)!=null?$:u,htmlFor:(W=D.htmlFor)!=null?W:l}},[l,i,E,r,o,u]),M=C.exports.useCallback((D={},B=null)=>({id:h,...D,ref:Vn(B,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((D={},B=null)=>({...D,...a,ref:B,role:"group"}),[a]),O=C.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:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:g,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:O}}var _d=Ee(function(t,n){const r=Oi("Form",t),i=Sn(t),{getRootProps:o,htmlProps:a,...s}=Afe(i),l=S1("chakra-form-control",t.className);return se.createElement(Lfe,{value:s},se.createElement(Tfe,{value:r},se.createElement(xe.div,{...o({},n),className:l,__css:r.container})))});_d.displayName="FormControl";var Mfe=Ee(function(t,n){const r=b1(),i=ez(),o=S1("chakra-form__helper-text",t.className);return se.createElement(xe.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});Mfe.displayName="FormHelperText";function z8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=F8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":iw(n),"aria-required":iw(i),"aria-readonly":iw(r)}}function F8(e){var S,w,E;const t=b1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:g,...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:(S=r!=null?r:u)!=null?S:t==null?void 0:t.isDisabled,isReadOnly:(w=i!=null?i:l)!=null?w: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:ZL(t==null?void 0:t.onFocus,h),onBlur:ZL(t==null?void 0:t.onBlur,g)}}var[Rfe,Ife]=En({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),Ofe=Ee((e,t)=>{const n=Oi("FormError",e),r=Sn(e),i=b1();return i!=null&&i.isInvalid?se.createElement(Rfe,{value:n},se.createElement(xe.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:S1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Ofe.displayName="FormErrorMessage";var Dfe=Ee((e,t)=>{const n=Ife(),r=b1();if(!(r!=null&&r.isInvalid))return null;const i=S1("chakra-form__error-icon",e.className);return b(xa,{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"})})});Dfe.displayName="FormErrorIcon";var xh=Ee(function(t,n){var m;const r=uo("FormLabel",t),i=Sn(t),{className:o,children:a,requiredIndicator:s=b(tz,{}),optionalIndicator:l=null,...u}=i,h=b1(),g=(m=h==null?void 0:h.getLabelProps(u,n))!=null?m:{ref:n,...u};return se.createElement(xe.label,{...g,className:S1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h!=null&&h.isRequired?s:l)});xh.displayName="FormLabel";var tz=Ee(function(t,n){const r=b1(),i=ez();if(!(r!=null&&r.isRequired))return null;const o=S1("chakra-form__required-indicator",t.className);return se.createElement(xe.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});tz.displayName="RequiredIndicator";function hd(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var $8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Nfe=xe("span",{baseStyle:$8});Nfe.displayName="VisuallyHidden";var Bfe=xe("input",{baseStyle:$8});Bfe.displayName="VisuallyHiddenInput";var QL=!1,MS=null,Q0=!1,zC=new Set,zfe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Ffe(e){return!(e.metaKey||!zfe&&e.altKey||e.ctrlKey)}function H8(e,t){zC.forEach(n=>n(e,t))}function JL(e){Q0=!0,Ffe(e)&&(MS="keyboard",H8("keyboard",e))}function Rp(e){MS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Q0=!0,H8("pointer",e))}function $fe(e){e.target===window||e.target===document||(Q0||(MS="keyboard",H8("keyboard",e)),Q0=!1)}function Hfe(){Q0=!1}function eA(){return MS!=="pointer"}function Wfe(){if(typeof window>"u"||QL)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Q0=!0,e.apply(this,n)},document.addEventListener("keydown",JL,!0),document.addEventListener("keyup",JL,!0),window.addEventListener("focus",$fe,!0),window.addEventListener("blur",Hfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Rp,!0),document.addEventListener("pointermove",Rp,!0),document.addEventListener("pointerup",Rp,!0)):(document.addEventListener("mousedown",Rp,!0),document.addEventListener("mousemove",Rp,!0),document.addEventListener("mouseup",Rp,!0)),QL=!0}function Vfe(e){Wfe(),e(eA());const t=()=>e(eA());return zC.add(t),()=>{zC.delete(t)}}var[VTe,Ufe]=En({name:"CheckboxGroupContext",strict:!1}),Gfe=(...e)=>e.filter(Boolean).join(" "),eo=e=>e?"":void 0;function Ra(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function jfe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function Yfe(e){return se.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 qfe(e){return se.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 Kfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?qfe:Yfe;return n||t?se.createElement(xe.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},b(i,{...r})):null}function Xfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function nz(e={}){const t=F8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:g,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,O=Xfe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=fr(v),B=fr(s),$=fr(l),[W,j]=C.exports.useState(!1),[ne,H]=C.exports.useState(!1),[K,te]=C.exports.useState(!1),[J,X]=C.exports.useState(!1);C.exports.useEffect(()=>Vfe(j),[]);const G=C.exports.useRef(null),[Z,le]=C.exports.useState(!0),[me,Me]=C.exports.useState(!!h),we=g!==void 0,Se=we?g:me,be=C.exports.useCallback(Pe=>{if(r||n){Pe.preventDefault();return}we||Me(Se?Pe.target.checked:S?!0:Pe.target.checked),D==null||D(Pe)},[r,n,Se,we,S,D]);Ps(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),hd(()=>{n&&H(!1)},[n,H]),Ps(()=>{const Pe=G.current;!(Pe!=null&&Pe.form)||(Pe.form.onreset=()=>{Me(!!h)})},[]);const He=n&&!m,Je=C.exports.useCallback(Pe=>{Pe.key===" "&&X(!0)},[X]),tt=C.exports.useCallback(Pe=>{Pe.key===" "&&X(!1)},[X]);Ps(()=>{if(!G.current)return;G.current.checked!==Se&&Me(G.current.checked)},[G.current]);const ht=C.exports.useCallback((Pe={},nt=null)=>{const At=Xe=>{ne&&Xe.preventDefault(),X(!0)};return{...Pe,ref:nt,"data-active":eo(J),"data-hover":eo(K),"data-checked":eo(Se),"data-focus":eo(ne),"data-focus-visible":eo(ne&&W),"data-indeterminate":eo(S),"data-disabled":eo(n),"data-invalid":eo(o),"data-readonly":eo(r),"aria-hidden":!0,onMouseDown:Ra(Pe.onMouseDown,At),onMouseUp:Ra(Pe.onMouseUp,()=>X(!1)),onMouseEnter:Ra(Pe.onMouseEnter,()=>te(!0)),onMouseLeave:Ra(Pe.onMouseLeave,()=>te(!1))}},[J,Se,n,ne,W,K,S,o,r]),_t=C.exports.useCallback((Pe={},nt=null)=>({...O,...Pe,ref:Vn(nt,At=>{!At||le(At.tagName==="LABEL")}),onClick:Ra(Pe.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var Xe;(Xe=G.current)==null||Xe.focus()}))}),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[O,n,Se,o,Z]),gt=C.exports.useCallback((Pe={},nt=null)=>({...Pe,ref:Vn(G,nt),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ra(Pe.onChange,be),onBlur:Ra(Pe.onBlur,B,()=>H(!1)),onFocus:Ra(Pe.onFocus,$,()=>H(!0)),onKeyDown:Ra(Pe.onKeyDown,Je),onKeyUp:Ra(Pe.onKeyUp,tt),required:i,checked:Se,disabled:He,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:$8}),[w,E,a,be,B,$,Je,tt,i,Se,He,r,_,T,M,o,u,n,P]),ft=C.exports.useCallback((Pe={},nt=null)=>({...Pe,ref:nt,onMouseDown:Ra(Pe.onMouseDown,tA),onTouchStart:Ra(Pe.onTouchStart,tA),"data-disabled":eo(n),"data-checked":eo(Se),"data-invalid":eo(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:ne,isChecked:Se,isActive:J,isHovered:K,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:_t,getCheckboxProps:ht,getInputProps:gt,getLabelProps:ft,htmlProps:O}}function tA(e){e.preventDefault(),e.stopPropagation()}var Zfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},Qfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},Jfe=wd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),ehe=wd({from:{opacity:0},to:{opacity:1}}),the=wd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),rz=Ee(function(t,n){const r=Ufe(),i={...r,...t},o=Oi("Checkbox",i),a=Sn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:g,icon:m=b(Kfe,{}),isChecked:v,isDisabled:S=r==null?void 0:r.isDisabled,onChange:w,inputProps:E,...P}=a;let _=v;(r==null?void 0:r.value)&&a.value&&(_=r.value.includes(a.value));let T=w;(r==null?void 0:r.onChange)&&a.value&&(T=jfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:O,getLabelProps:D,getRootProps:B}=nz({...P,isDisabled:S,isChecked:_,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${ehe} 20ms linear, ${the} 200ms linear`:`${Jfe} 200ms linear`,fontSize:g,color:h,...o.icon}),[h,g,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return se.createElement(xe.label,{__css:{...Qfe,...o.container},className:Gfe("chakra-checkbox",l),...B()},b("input",{className:"chakra-checkbox__input",...I(E,n)}),se.createElement(xe.span,{__css:{...Zfe,...o.control},className:"chakra-checkbox__control",...O()},W),u&&se.createElement(xe.span,{className:"chakra-checkbox__label",...D(),__css:{marginStart:s,...o.label}},u))});rz.displayName="Checkbox";function nhe(e){return b(xa,{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 RS=Ee(function(t,n){const r=uo("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=Sn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return se.createElement(xe.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||b(nhe,{width:"1em",height:"1em"}))});RS.displayName="CloseButton";function rhe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function W8(e,t){let n=rhe(e);const r=10**(t!=null?t:10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function FC(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 i5(e,t,n){return(e-t)*100/(n-t)}function iz(e,t,n){return(n-t)*e+t}function $C(e,t,n){const r=Math.round((e-t)/n)*n+t,i=FC(n);return W8(r,i)}function R0(e,t,n){return e==null?e:(n{var W;return r==null?"":(W=ow(r,o,n))!=null?W:""}),m=typeof i<"u",v=m?i:h,S=oz(Oc(v),o),w=n!=null?n:S,E=C.exports.useCallback(W=>{W!==v&&(m||g(W.toString()),u==null||u(W.toString(),Oc(W)))},[u,m,v]),P=C.exports.useCallback(W=>{let j=W;return l&&(j=R0(j,a,s)),W8(j,w)},[w,l,s,a]),_=C.exports.useCallback((W=o)=>{let j;v===""?j=Oc(W):j=Oc(v)+W,j=P(j),E(j)},[P,o,E,v]),T=C.exports.useCallback((W=o)=>{let j;v===""?j=Oc(-W):j=Oc(v)-W,j=P(j),E(j)},[P,o,E,v]),M=C.exports.useCallback(()=>{var j;let W;r==null?W="":W=(j=ow(r,o,n))!=null?j:a,E(W)},[r,n,o,E,a]),I=C.exports.useCallback(W=>{var ne;const j=(ne=ow(W,o,w))!=null?ne:a;E(j)},[w,o,E,a]),O=Oc(v);return{isOutOfRange:O>s||Ob(uS,{styles:az}),ahe=()=>b(uS,{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; } ${az} `});function nh(e,t,n,r){const i=fr(n);return C.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 she(e){return"current"in e}var sz=()=>typeof window<"u";function lhe(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var uhe=e=>sz()&&e.test(navigator.vendor),che=e=>sz()&&e.test(lhe()),dhe=()=>che(/mac|iphone|ipad|ipod/i),fhe=()=>dhe()&&uhe(/apple/i);function hhe(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};nh(i,"pointerdown",o=>{if(!fhe()||!r)return;const a=o.target,l=(n!=null?n:[t]).some(u=>{const h=she(u)?u.current:u;return(h==null?void 0:h.contains(a))||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var phe=nee?C.exports.useLayoutEffect:C.exports.useEffect;function nA(e,t=[]){const n=C.exports.useRef(e);return phe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function ghe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function mhe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function Nv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=nA(n),a=nA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=ghe(r,s),g=mhe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a==null||a()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o==null||o()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":g,onClick:ree(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:g})}}function V8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var U8=Ee(function(t,n){const{htmlSize:r,...i}=t,o=Oi("Input",i),a=Sn(i),s=z8(a),l=Br("chakra-input",t.className);return se.createElement(xe.input,{size:r,...s,__css:o.field,ref:n,className:l})});U8.displayName="Input";U8.id="Input";var[vhe,lz]=En({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),yhe=Ee(function(t,n){const r=Oi("Input",t),{children:i,className:o,...a}=Sn(t),s=Br("chakra-input__group",o),l={},u=LS(i),h=r.field;u.forEach(m=>{var v,S;!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=(v=h.height)!=null?v:h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=(S=h.height)!=null?S:h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const g=u.map(m=>{var v,S;const w=V8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return se.createElement(xe.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},b(vhe,{value:r,children:g}))});yhe.displayName="InputGroup";var She={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},bhe=xe("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),G8=Ee(function(t,n){var s;const{placement:r="left",...i}=t,o=(s=She[r])!=null?s:{},a=lz();return b(bhe,{ref:n,...i,__css:{...a.addon,...o}})});G8.displayName="InputAddon";var uz=Ee(function(t,n){return b(G8,{ref:n,placement:"left",...t,className:Br("chakra-input__left-addon",t.className)})});uz.displayName="InputLeftAddon";uz.id="InputLeftAddon";var cz=Ee(function(t,n){return b(G8,{ref:n,placement:"right",...t,className:Br("chakra-input__right-addon",t.className)})});cz.displayName="InputRightAddon";cz.id="InputRightAddon";var xhe=xe("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),IS=Ee(function(t,n){var u,h;const{placement:r="left",...i}=t,o=lz(),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:(h=a==null?void 0:a.height)!=null?h:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...o.element};return b(xhe,{ref:n,__css:l,...i})});IS.id="InputElement";IS.displayName="InputElement";var dz=Ee(function(t,n){const{className:r,...i}=t,o=Br("chakra-input__left-element",r);return b(IS,{ref:n,placement:"left",className:o,...i})});dz.id="InputLeftElement";dz.displayName="InputLeftElement";var fz=Ee(function(t,n){const{className:r,...i}=t,o=Br("chakra-input__right-element",r);return b(IS,{ref:n,placement:"right",className:o,...i})});fz.id="InputRightElement";fz.displayName="InputRightElement";function whe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function pd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):whe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Che=Ee(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Br("chakra-aspect-ratio",i);return se.createElement(xe.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:pd(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)});Che.displayName="AspectRatio";var _he=Ee(function(t,n){const r=uo("Badge",t),{className:i,...o}=Sn(t);return se.createElement(xe.span,{ref:n,className:Br("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});_he.displayName="Badge";var wh=xe("div");wh.displayName="Box";var hz=Ee(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return b(wh,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});hz.displayName="Square";var khe=Ee(function(t,n){const{size:r,...i}=t;return b(hz,{size:r,ref:n,borderRadius:"9999px",...i})});khe.displayName="Circle";var pz=xe("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});pz.displayName="Center";var Ehe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ee(function(t,n){const{axis:r="both",...i}=t;return se.createElement(xe.div,{ref:n,__css:Ehe[r],...i,position:"absolute"})});var Phe=Ee(function(t,n){const r=uo("Code",t),{className:i,...o}=Sn(t);return se.createElement(xe.code,{ref:n,className:Br("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Phe.displayName="Code";var The=Ee(function(t,n){const{className:r,centerContent:i,...o}=Sn(t),a=uo("Container",t);return se.createElement(xe.div,{ref:n,className:Br("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});The.displayName="Container";var Lhe=Ee(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=uo("Divider",t),{className:g,orientation:m="horizontal",__css:v,...S}=Sn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return se.createElement(xe.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Br("chakra-divider",g)})});Lhe.displayName="Divider";var rn=Ee(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,g={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return se.createElement(xe.div,{ref:n,__css:g,...h})});rn.displayName="Flex";var gz=Ee(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:g,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:g,gridTemplateColumns:v};return se.createElement(xe.div,{ref:n,__css:w,...S})});gz.displayName="Grid";function rA(e){return pd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Ahe=Ee(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,g=V8({gridArea:r,gridColumn:rA(i),gridRow:rA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return se.createElement(xe.div,{ref:n,__css:g,...h})});Ahe.displayName="GridItem";var rh=Ee(function(t,n){const r=uo("Heading",t),{className:i,...o}=Sn(t);return se.createElement(xe.h2,{ref:n,className:Br("chakra-heading",t.className),...o,__css:r})});rh.displayName="Heading";Ee(function(t,n){const r=uo("Mark",t),i=Sn(t);return b(wh,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Mhe=Ee(function(t,n){const r=uo("Kbd",t),{className:i,...o}=Sn(t);return se.createElement(xe.kbd,{ref:n,className:Br("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Mhe.displayName="Kbd";var ih=Ee(function(t,n){const r=uo("Link",t),{className:i,isExternal:o,...a}=Sn(t);return se.createElement(xe.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Br("chakra-link",i),...a,__css:r})});ih.displayName="Link";Ee(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return se.createElement(xe.a,{...s,ref:n,className:Br("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%"}}})});Ee(function(t,n){const{className:r,...i}=t;return se.createElement(xe.div,{ref:n,position:"relative",...i,className:Br("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Rhe,mz]=En({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),j8=Ee(function(t,n){const r=Oi("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=Sn(t),u=LS(i),g=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return se.createElement(Rhe,{value:r},se.createElement(xe.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...g},...l},u))});j8.displayName="List";var Ihe=Ee((e,t)=>{const{as:n,...r}=e;return b(j8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Ihe.displayName="OrderedList";var Ohe=Ee(function(t,n){const{as:r,...i}=t;return b(j8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Ohe.displayName="UnorderedList";var Dhe=Ee(function(t,n){const r=mz();return se.createElement(xe.li,{ref:n,...t,__css:r.item})});Dhe.displayName="ListItem";var Nhe=Ee(function(t,n){const r=mz();return b(xa,{ref:n,role:"presentation",...t,__css:r.icon})});Nhe.displayName="ListIcon";var Bhe=Ee(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=p1(),h=s?Fhe(s,u):$he(r);return b(gz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Bhe.displayName="SimpleGrid";function zhe(e){return typeof e=="number"?`${e}px`:e}function Fhe(e,t){return pd(e,n=>{const r=zae("sizes",n,zhe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function $he(e){return pd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var vz=xe("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});vz.displayName="Spacer";var HC="& > *:not(style) ~ *:not(style)";function Hhe(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,[HC]:pd(n,i=>r[i])}}function Whe(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{"&":pd(n,i=>r[i])}}var yz=e=>se.createElement(xe.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yz.displayName="StackItem";var Y8=Ee((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:g,...m}=e,v=n?"row":r!=null?r:"column",S=C.exports.useMemo(()=>Hhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>Whe({spacing:a,direction:v}),[a,v]),E=!!u,P=!g&&!E,_=C.exports.useMemo(()=>{const M=LS(l);return P?M:M.map((I,O)=>{const D=typeof I.key<"u"?I.key:O,B=O+1===M.length,W=g?b(yz,{children:I},D):I;if(!E)return W;const j=C.exports.cloneElement(u,{__css:w}),ne=B?null:j;return ee(C.exports.Fragment,{children:[W,ne]},D)})},[u,w,E,P,g,l]),T=Br("chakra-stack",h);return se.createElement(xe.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[HC]:S[HC]},...m},_)});Y8.displayName="Stack";var Sz=Ee((e,t)=>b(Y8,{align:"center",...e,direction:"row",ref:t}));Sz.displayName="HStack";var bz=Ee((e,t)=>b(Y8,{align:"center",...e,direction:"column",ref:t}));bz.displayName="VStack";var To=Ee(function(t,n){const r=uo("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=Sn(t),u=V8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return se.createElement(xe.p,{ref:n,className:Br("chakra-text",t.className),...u,...l,__css:r})});To.displayName="Text";function iA(e){return typeof e=="number"?`${e}px`:e}var Vhe=Ee(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:g,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>pd(w,_=>iA(X6("space",_)(P))),"--chakra-wrap-y-spacing":P=>pd(E,_=>iA(X6("space",_)(P))),"--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]),S=C.exports.useMemo(()=>g?C.exports.Children.map(a,(w,E)=>b(xz,{children:w},E)):a,[a,g]);return se.createElement(xe.div,{ref:n,className:Br("chakra-wrap",h),overflow:"hidden",...m},se.createElement(xe.ul,{className:"chakra-wrap__list",__css:v},S))});Vhe.displayName="Wrap";var xz=Ee(function(t,n){const{className:r,...i}=t;return se.createElement(xe.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Br("chakra-wrap__listitem",r),...i})});xz.displayName="WrapItem";var Uhe={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[]}}}},wz=Uhe,Ip=()=>{},Ghe={document:wz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Ip,removeEventListener:Ip,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Ip,removeListener:Ip}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Ip,setInterval:()=>0,clearInterval:Ip},jhe=Ghe,Yhe={window:jhe,document:wz},Cz=typeof window<"u"?{window,document}:Yhe,_z=C.exports.createContext(Cz);_z.displayName="EnvironmentContext";function kz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.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}:Cz},[r,n]);return ee(_z.Provider,{value:s,children:[t,!n&&o&&b("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}kz.displayName="EnvironmentProvider";var qhe=e=>e?"":void 0;function Khe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function aw(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Xhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:g,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,_]=C.exports.useState(!1),T=Khe(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},I=w?g:g||0,O=n&&!r,D=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l==null||l(X)},[n,l]),B=C.exports.useCallback(X=>{P&&aw(X)&&(X.preventDefault(),X.stopPropagation(),_(!1),T.remove(document,"keyup",B,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u==null||u(X),n||X.defaultPrevented||X.metaKey||!aw(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),_(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",B,!1)},[n,w,u,i,o,T,B]),W=C.exports.useCallback(X=>{if(h==null||h(X),n||X.defaultPrevented||X.metaKey||!aw(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),_(!1),X.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(X=>{X.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),ne=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||_(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a==null||a(X)},[n,w,a,T,j]),H=C.exports.useCallback(X=>{X.button===0&&(w||_(!1),s==null||s(X))},[s,w]),K=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m==null||m(X)},[n,m]),te=C.exports.useCallback(X=>{P&&(X.preventDefault(),_(!1)),v==null||v(X)},[P,v]),J=Vn(t,M);return w?{...S,ref:J,type:"button","aria-disabled":O?void 0:n,disabled:O,onClick:D,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:J,role:"button","data-active":qhe(P),"aria-disabled":n?"true":void 0,tabIndex:O?void 0:I,onClick:D,onMouseDown:ne,onMouseUp:H,onKeyUp:W,onKeyDown:$,onMouseOver:K,onMouseLeave:te}}function Ez(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Pz(e){var n;if(!Ez(e))return!1;const t=(n=e.ownerDocument.defaultView)!=null?n:window;return e instanceof t.HTMLElement}function Zhe(e){var n;var t;return(n=(t=Tz(e))==null?void 0:t.defaultView)!=null?n:window}function Tz(e){return Ez(e)?e.ownerDocument:document}function Qhe(e){return Tz(e).activeElement}var Lz=e=>e.hasAttribute("tabindex"),Jhe=e=>Lz(e)&&e.tabIndex===-1;function epe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Az(e){return e.parentElement&&Az(e.parentElement)?!0:e.hidden}function tpe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Mz(e){if(!Pz(e)||Az(e)||epe(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]():tpe(e)?!0:Lz(e)}function npe(e){return e?Pz(e)&&Mz(e)&&!Jhe(e):!1}var rpe=["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]"],ipe=rpe.join(),ope=e=>e.offsetWidth>0&&e.offsetHeight>0;function Rz(e){const t=Array.from(e.querySelectorAll(ipe));return t.unshift(e),t.filter(n=>Mz(n)&&ope(n))}function ape(e){const t=e.current;if(!t)return!1;const n=Qhe(t);return!n||t.contains(n)?!1:!!npe(n)}function spe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;hd(()=>{if(!o||ape(e))return;const a=(i==null?void 0:i.current)||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var lpe={preventScroll:!0,shouldFocus:!1};function upe(e,t=lpe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=cpe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Ps(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var g;(g=n.current)==null||g.focus({preventScroll:r})});else{const g=Rz(a);g.length>0&&requestAnimationFrame(()=>{g[0].focus({preventScroll:r})})}},[o,r,a,n]);hd(()=>{h()},[h]),nh(a,"transitionend",h)}function cpe(e){return"current"in e}var Do="top",ja="bottom",Ya="right",No="left",q8="auto",d2=[Do,ja,Ya,No],J0="start",Bv="end",dpe="clippingParents",Iz="viewport",Zg="popper",fpe="reference",oA=d2.reduce(function(e,t){return e.concat([t+"-"+J0,t+"-"+Bv])},[]),Oz=[].concat(d2,[q8]).reduce(function(e,t){return e.concat([t,t+"-"+J0,t+"-"+Bv])},[]),hpe="beforeRead",ppe="read",gpe="afterRead",mpe="beforeMain",vpe="main",ype="afterMain",Spe="beforeWrite",bpe="write",xpe="afterWrite",wpe=[hpe,ppe,gpe,mpe,vpe,ype,Spe,bpe,xpe];function Ol(e){return e?(e.nodeName||"").toLowerCase():null}function Ka(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function hh(e){var t=Ka(e).Element;return e instanceof t||e instanceof Element}function Ha(e){var t=Ka(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function K8(e){if(typeof ShadowRoot>"u")return!1;var t=Ka(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Cpe(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];!Ha(o)||!Ol(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 _pe(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},{});!Ha(i)||!Ol(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const kpe={name:"applyStyles",enabled:!0,phase:"write",fn:Cpe,effect:_pe,requires:["computeStyles"]};function Ll(e){return e.split("-")[0]}var oh=Math.max,o5=Math.min,e1=Math.round;function WC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Dz(){return!/^((?!chrome|android).)*safari/i.test(WC())}function t1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ha(e)&&(i=e.offsetWidth>0&&e1(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&e1(r.height)/e.offsetHeight||1);var a=hh(e)?Ka(e):window,s=a.visualViewport,l=!Dz()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,g=r.width/i,m=r.height/o;return{width:g,height:m,top:h,right:u+g,bottom:h+m,left:u,x:u,y:h}}function X8(e){var t=t1(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 Nz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&K8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Tu(e){return Ka(e).getComputedStyle(e)}function Epe(e){return["table","td","th"].indexOf(Ol(e))>=0}function kd(e){return((hh(e)?e.ownerDocument:e.document)||window.document).documentElement}function OS(e){return Ol(e)==="html"?e:e.assignedSlot||e.parentNode||(K8(e)?e.host:null)||kd(e)}function aA(e){return!Ha(e)||Tu(e).position==="fixed"?null:e.offsetParent}function Ppe(e){var t=/firefox/i.test(WC()),n=/Trident/i.test(WC());if(n&&Ha(e)){var r=Tu(e);if(r.position==="fixed")return null}var i=OS(e);for(K8(i)&&(i=i.host);Ha(i)&&["html","body"].indexOf(Ol(i))<0;){var o=Tu(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=Ka(e),n=aA(e);n&&Epe(n)&&Tu(n).position==="static";)n=aA(n);return n&&(Ol(n)==="html"||Ol(n)==="body"&&Tu(n).position==="static")?t:n||Ppe(e)||t}function Z8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Xm(e,t,n){return oh(e,o5(t,n))}function Tpe(e,t,n){var r=Xm(e,t,n);return r>n?n:r}function Bz(){return{top:0,right:0,bottom:0,left:0}}function zz(e){return Object.assign({},Bz(),e)}function Fz(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Lpe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,zz(typeof t!="number"?t:Fz(t,d2))};function Ape(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ll(n.placement),l=Z8(s),u=[No,Ya].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var g=Lpe(i.padding,n),m=X8(o),v=l==="y"?Do:No,S=l==="y"?ja:Ya,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=f2(o),_=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=g[v],I=_-m[h]-g[S],O=_/2-m[h]/2+T,D=Xm(M,O,I),B=l;n.modifiersData[r]=(t={},t[B]=D,t.centerOffset=D-O,t)}}function Mpe(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)||!Nz(t.elements.popper,i)||(t.elements.arrow=i))}const Rpe={name:"arrow",enabled:!0,phase:"main",fn:Ape,effect:Mpe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function n1(e){return e.split("-")[1]}var Ipe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ope(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:e1(t*i)/i||0,y:e1(n*i)/i||0}}function sA(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,h=e.roundOffsets,g=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=No,M=Do,I=window;if(u){var O=f2(n),D="clientHeight",B="clientWidth";if(O===Ka(n)&&(O=kd(n),Tu(O).position!=="static"&&s==="absolute"&&(D="scrollHeight",B="scrollWidth")),O=O,i===Do||(i===No||i===Ya)&&o===Bv){M=ja;var $=g&&O===I&&I.visualViewport?I.visualViewport.height:O[D];w-=$-r.height,w*=l?1:-1}if(i===No||(i===Do||i===ja)&&o===Bv){T=Ya;var W=g&&O===I&&I.visualViewport?I.visualViewport.width:O[B];v-=W-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Ipe),ne=h===!0?Ope({x:v,y:w}):{x:v,y:w};if(v=ne.x,w=ne.y,l){var H;return Object.assign({},j,(H={},H[M]=_?"0":"",H[T]=P?"0":"",H.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",H))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Dpe(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:Ll(t.placement),variation:n1(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,sA(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,sA(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 Npe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dpe,data:{}};var Yy={passive:!0};function Bpe(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=Ka(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Yy)}),s&&l.addEventListener("resize",n.update,Yy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Yy)}),s&&l.removeEventListener("resize",n.update,Yy)}}const zpe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bpe,data:{}};var Fpe={left:"right",right:"left",bottom:"top",top:"bottom"};function q3(e){return e.replace(/left|right|bottom|top/g,function(t){return Fpe[t]})}var $pe={start:"end",end:"start"};function lA(e){return e.replace(/start|end/g,function(t){return $pe[t]})}function Q8(e){var t=Ka(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function J8(e){return t1(kd(e)).left+Q8(e).scrollLeft}function Hpe(e,t){var n=Ka(e),r=kd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=Dz();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+J8(e),y:l}}function Wpe(e){var t,n=kd(e),r=Q8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=oh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=oh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+J8(e),l=-r.scrollTop;return Tu(i||n).direction==="rtl"&&(s+=oh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function e_(e){var t=Tu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $z(e){return["html","body","#document"].indexOf(Ol(e))>=0?e.ownerDocument.body:Ha(e)&&e_(e)?e:$z(OS(e))}function Zm(e,t){var n;t===void 0&&(t=[]);var r=$z(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ka(r),a=i?[o].concat(o.visualViewport||[],e_(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Zm(OS(a)))}function VC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Vpe(e,t){var n=t1(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 uA(e,t,n){return t===Iz?VC(Hpe(e,n)):hh(t)?Vpe(t,n):VC(Wpe(kd(e)))}function Upe(e){var t=Zm(OS(e)),n=["absolute","fixed"].indexOf(Tu(e).position)>=0,r=n&&Ha(e)?f2(e):e;return hh(r)?t.filter(function(i){return hh(i)&&Nz(i,r)&&Ol(i)!=="body"}):[]}function Gpe(e,t,n,r){var i=t==="clippingParents"?Upe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=uA(e,u,r);return l.top=oh(h.top,l.top),l.right=o5(h.right,l.right),l.bottom=o5(h.bottom,l.bottom),l.left=oh(h.left,l.left),l},uA(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 Hz(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ll(r):null,o=r?n1(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Do:l={x:a,y:t.y-n.height};break;case ja:l={x:a,y:t.y+t.height};break;case Ya:l={x:t.x+t.width,y:s};break;case No:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?Z8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case J0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Bv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function zv(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?dpe:s,u=n.rootBoundary,h=u===void 0?Iz:u,g=n.elementContext,m=g===void 0?Zg:g,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=zz(typeof E!="number"?E:Fz(E,d2)),_=m===Zg?fpe:Zg,T=e.rects.popper,M=e.elements[S?_:m],I=Gpe(hh(M)?M:M.contextElement||kd(e.elements.popper),l,h,a),O=t1(e.elements.reference),D=Hz({reference:O,element:T,strategy:"absolute",placement:i}),B=VC(Object.assign({},T,D)),$=m===Zg?B:O,W={top:I.top-$.top+P.top,bottom:$.bottom-I.bottom+P.bottom,left:I.left-$.left+P.left,right:$.right-I.right+P.right},j=e.modifiersData.offset;if(m===Zg&&j){var ne=j[i];Object.keys(W).forEach(function(H){var K=[Ya,ja].indexOf(H)>=0?1:-1,te=[Do,ja].indexOf(H)>=0?"y":"x";W[H]+=ne[te]*K})}return W}function jpe(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?Oz:l,h=n1(r),g=h?s?oA:oA.filter(function(S){return n1(S)===h}):d2,m=g.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=g);var v=m.reduce(function(S,w){return S[w]=zv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[Ll(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Ype(e){if(Ll(e)===q8)return[];var t=q3(e);return[lA(e),t,lA(t)]}function qpe(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,h=n.boundary,g=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=Ll(E),_=P===E,T=l||(_||!S?[q3(E)]:Ype(E)),M=[E].concat(T).reduce(function(Se,be){return Se.concat(Ll(be)===q8?jpe(t,{placement:be,boundary:h,rootBoundary:g,padding:u,flipVariations:S,allowedAutoPlacements:w}):be)},[]),I=t.rects.reference,O=t.rects.popper,D=new Map,B=!0,$=M[0],W=0;W=0,te=K?"width":"height",J=zv(t,{placement:j,boundary:h,rootBoundary:g,altBoundary:m,padding:u}),X=K?H?Ya:No:H?ja:Do;I[te]>O[te]&&(X=q3(X));var G=q3(X),Z=[];if(o&&Z.push(J[ne]<=0),s&&Z.push(J[X]<=0,J[G]<=0),Z.every(function(Se){return Se})){$=j,B=!1;break}D.set(j,Z)}if(B)for(var le=S?3:1,me=function(be){var He=M.find(function(Je){var tt=D.get(Je);if(tt)return tt.slice(0,be).every(function(ht){return ht})});if(He)return $=He,"break"},Me=le;Me>0;Me--){var we=me(Me);if(we==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Kpe={name:"flip",enabled:!0,phase:"main",fn:qpe,requiresIfExists:["offset"],data:{_skip:!1}};function cA(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 dA(e){return[Do,Ya,ja,No].some(function(t){return e[t]>=0})}function Xpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=zv(t,{elementContext:"reference"}),s=zv(t,{altBoundary:!0}),l=cA(a,r),u=cA(s,i,o),h=dA(l),g=dA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Zpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xpe};function Qpe(e,t,n){var r=Ll(e),i=[No,Do].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,[No,Ya].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Jpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=Oz.reduce(function(h,g){return h[g]=Qpe(g,t.rects,o),h},{}),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 e0e={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jpe};function t0e(e){var t=e.state,n=e.name;t.modifiersData[n]=Hz({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const n0e={name:"popperOffsets",enabled:!0,phase:"read",fn:t0e,data:{}};function r0e(e){return e==="x"?"y":"x"}function i0e(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,h=n.altBoundary,g=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=zv(t,{boundary:l,rootBoundary:u,padding:g,altBoundary:h}),P=Ll(t.placement),_=n1(t.placement),T=!_,M=Z8(P),I=r0e(M),O=t.modifiersData.popperOffsets,D=t.rects.reference,B=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ne={x:0,y:0};if(!!O){if(o){var H,K=M==="y"?Do:No,te=M==="y"?ja:Ya,J=M==="y"?"height":"width",X=O[M],G=X+E[K],Z=X-E[te],le=v?-B[J]/2:0,me=_===J0?D[J]:B[J],Me=_===J0?-B[J]:-D[J],we=t.elements.arrow,Se=v&&we?X8(we):{width:0,height:0},be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bz(),He=be[K],Je=be[te],tt=Xm(0,D[J],Se[J]),ht=T?D[J]/2-le-tt-He-W.mainAxis:me-tt-He-W.mainAxis,_t=T?-D[J]/2+le+tt+Je+W.mainAxis:Me+tt+Je+W.mainAxis,gt=t.elements.arrow&&f2(t.elements.arrow),ft=gt?M==="y"?gt.clientTop||0:gt.clientLeft||0:0,vt=(H=j==null?void 0:j[M])!=null?H:0,Pe=X+ht-vt-ft,nt=X+_t-vt,At=Xm(v?o5(G,Pe):G,X,v?oh(Z,nt):Z);O[M]=At,ne[M]=At-X}if(s){var Xe,mt=M==="x"?Do:No,ln=M==="x"?ja:Ya,kt=O[I],Gt=I==="y"?"height":"width",un=kt+E[mt],bn=kt-E[ln],Ie=[Do,No].indexOf(P)!==-1,Ze=(Xe=j==null?void 0:j[I])!=null?Xe:0,Zt=Ie?un:kt-D[Gt]-B[Gt]-Ze+W.altAxis,qt=Ie?kt+D[Gt]+B[Gt]-Ze-W.altAxis:bn,ke=v&&Ie?Tpe(Zt,kt,qt):Xm(v?Zt:un,kt,v?qt:bn);O[I]=ke,ne[I]=ke-kt}t.modifiersData[r]=ne}}const o0e={name:"preventOverflow",enabled:!0,phase:"main",fn:i0e,requiresIfExists:["offset"]};function a0e(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function s0e(e){return e===Ka(e)||!Ha(e)?Q8(e):a0e(e)}function l0e(e){var t=e.getBoundingClientRect(),n=e1(t.width)/e.offsetWidth||1,r=e1(t.height)/e.offsetHeight||1;return n!==1||r!==1}function u0e(e,t,n){n===void 0&&(n=!1);var r=Ha(t),i=Ha(t)&&l0e(t),o=kd(t),a=t1(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ol(t)!=="body"||e_(o))&&(s=s0e(t)),Ha(t)?(l=t1(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=J8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function c0e(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 d0e(e){var t=c0e(e);return wpe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function f0e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function h0e(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 fA={placement:"bottom",modifiers:[],strategy:"absolute"};function hA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Gr={arrowShadowColor:Op("--popper-arrow-shadow-color"),arrowSize:Op("--popper-arrow-size","8px"),arrowSizeHalf:Op("--popper-arrow-size-half"),arrowBg:Op("--popper-arrow-bg"),transformOrigin:Op("--popper-transform-origin"),arrowOffset:Op("--popper-arrow-offset")};function v0e(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 y0e={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"},S0e=e=>y0e[e],pA={scroll:!0,resize:!0};function b0e(e){let t;return typeof e=="object"?t={enabled:!0,options:{...pA,...e}}:t={enabled:e,options:pA},t}var x0e={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`}},w0e={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{gA(e)},effect:({state:e})=>()=>{gA(e)}},gA=e=>{e.elements.popper.style.setProperty(Gr.transformOrigin.var,S0e(e.placement))},C0e={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{_0e(e)}},_0e=e=>{var t;if(!e.placement)return;const n=k0e(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Gr.arrowSize.varRef,height:Gr.arrowSize.varRef,zIndex:-1});const r={[Gr.arrowSizeHalf.var]:`calc(${Gr.arrowSize.varRef} / 2)`,[Gr.arrowOffset.var]:`calc(${Gr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},k0e=e=>{if(e.startsWith("top"))return{property:"bottom",value:Gr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Gr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Gr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Gr.arrowOffset.varRef}},E0e={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{mA(e)},effect:({state:e})=>()=>{mA(e)}},mA=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:Gr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:v0e(e.placement)})},P0e={"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"}},T0e={"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 L0e(e,t="ltr"){var i;var n;const r=((n=P0e[e])==null?void 0:n[t])||e;return t==="ltr"?r:(i=T0e[e])!=null?i:r}function Wz(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:h="clippingParents",preventOverflow:g=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=L0e(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=_.current)==null||W.call(_),E.current=m0e(S.current,w.current,{placement:P,modifiers:[E0e,C0e,w0e,{...x0e,enabled:!!m},{name:"eventListeners",...b0e(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:!!g,options:{boundary:h}},...n!=null?n:[]],strategy:i}),E.current.forceUpdate(),_.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,g,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=E.current)==null||W.destroy(),E.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},j=null)=>({...W,ref:Vn(M,j)}),[M]),O=C.exports.useCallback(W=>{w.current=W,T()},[T]),D=C.exports.useCallback((W={},j=null)=>({...W,ref:Vn(O,j),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,O,m]),B=C.exports.useCallback((W={},j=null)=>{const{size:ne,shadowColor:H,bg:K,style:te,...J}=W;return{...J,ref:j,"data-popper-arrow":"",style:A0e(W)}},[]),$=C.exports.useCallback((W={},j=null)=>({...W,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=E.current)==null||W.update()},forceUpdate(){var W;(W=E.current)==null||W.forceUpdate()},transformOrigin:Gr.transformOrigin.varRef,referenceRef:M,popperRef:O,getPopperProps:D,getArrowProps:B,getArrowInnerProps:$,getReferenceProps:I}}function A0e(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 Vz(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=fr(n),a=fr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,g=C.exports.useId(),m=i!=null?i:`disclosure-${g}`,v=C.exports.useCallback(()=>{h||l(!1),a==null||a()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o==null||o()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function P(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function M0e(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),nh(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=Zhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function Uz(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[R0e,I0e]=En({strict:!1,name:"PortalManagerContext"});function Gz(e){const{children:t,zIndex:n}=e;return b(R0e,{value:{zIndex:n},children:t})}Gz.displayName="PortalManager";var[jz,O0e]=En({strict:!1,name:"PortalContext"}),t_="chakra-portal",D0e=".chakra-portal",N0e=e=>b("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),B0e=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=O0e(),l=I0e();Ps(()=>{if(!r)return;const h=r.ownerDocument,g=t&&s!=null?s:h.body;if(!g)return;o.current=h.createElement("div"),o.current.className=t_,g.appendChild(o.current),a({});const m=o.current;return()=>{g.contains(m)&&g.removeChild(m)}},[r]);const u=l!=null&&l.zIndex?b(N0e,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?Fl.exports.createPortal(b(jz,{value:o.current,children:u}),o.current):b("span",{ref:h=>{h&&i(h)}})},z0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i!=null?i:typeof window<"u"?document.body:void 0,a=C.exports.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=t_),l},[i]),[,s]=C.exports.useState({});return Ps(()=>s({}),[]),Ps(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Fl.exports.createPortal(b(jz,{value:r?a:null,children:t}),a):null};function Ch(e){const{containerRef:t,...n}=e;return t?b(z0e,{containerRef:t,...n}):b(B0e,{...n})}Ch.defaultProps={appendToParentPortal:!0};Ch.className=t_;Ch.selector=D0e;Ch.displayName="Portal";var F0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Dp=new WeakMap,qy=new WeakMap,Ky={},sw=0,Yz=function(e){return e&&(e.host||Yz(e.parentNode))},$0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Yz(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)})},H0e=function(e,t,n,r){var i=$0e(t,Array.isArray(e)?e:[e]);Ky[n]||(Ky[n]=new WeakMap);var o=Ky[n],a=[],s=new Set,l=new Set(i),u=function(g){!g||s.has(g)||(s.add(g),u(g.parentNode))};i.forEach(u);var h=function(g){!g||l.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(Dp.get(m)||0)+1,E=(o.get(m)||0)+1;Dp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&qy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),sw++,function(){a.forEach(function(g){var m=Dp.get(g)-1,v=o.get(g)-1;Dp.set(g,m),o.set(g,v),m||(qy.has(g)||g.removeAttribute(r),qy.delete(g)),v||g.removeAttribute(n)}),sw--,sw||(Dp=new WeakMap,Dp=new WeakMap,qy=new WeakMap,Ky={})}},qz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||F0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),H0e(r,i,n,"aria-hidden")):function(){return null}};function n_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Bn={exports:{}},W0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",V0e=W0e,U0e=V0e;function Kz(){}function Xz(){}Xz.resetWarningCache=Kz;var G0e=function(){function e(r,i,o,a,s,l){if(l!==U0e){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:Xz,resetWarningCache:Kz};return n.PropTypes=n,n};Bn.exports=G0e();var UC="data-focus-lock",Zz="data-focus-lock-disabled",j0e="data-no-focus-lock",Y0e="data-autofocus-inside",q0e="data-no-autofocus";function K0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function X0e(e,t){var n=C.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 Qz(e,t){return X0e(t||null,function(n){return e.forEach(function(r){return K0e(r,n)})})}var lw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function Jz(e){return e}function eF(e,t){t===void 0&&(t=Jz);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 h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function r_(e,t){return t===void 0&&(t=Jz),eF(e,t)}function tF(e){e===void 0&&(e={});var t=eF(null);return t.options=yl({async:!0,ssr:!1},e),t}var nF=function(e){var t=e.sideCar,n=UB(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,{...yl({},n)})};nF.isSideCarExport=!0;function Z0e(e,t){return e.useMedium(t),nF}var rF=r_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),iF=r_(),Q0e=r_(),J0e=tF({async:!0}),e1e=[],i_=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,g=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?e1e:M,O=t.as,D=O===void 0?"div":O,B=t.lockProps,$=B===void 0?{}:B,W=t.sideCar,j=t.returnFocus,ne=t.focusOptions,H=t.onActivation,K=t.onDeactivation,te=C.exports.useState({}),J=te[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&H&&H(s.current),l.current=!0},[H]),G=C.exports.useCallback(function(){l.current=!1,K&&K(s.current)},[K]);C.exports.useEffect(function(){g||(u.current=null)},[]);var Z=C.exports.useCallback(function(Je){var tt=u.current;if(tt&&tt.focus){var ht=typeof j=="function"?j(tt):j;if(ht){var _t=typeof ht=="object"?ht:void 0;u.current=null,Je?Promise.resolve().then(function(){return tt.focus(_t)}):tt.focus(_t)}}},[j]),le=C.exports.useCallback(function(Je){l.current&&rF.useMedium(Je)},[]),me=iF.useMedium,Me=C.exports.useCallback(function(Je){s.current!==Je&&(s.current=Je,a(Je))},[]),we=In((r={},r[Zz]=g&&"disabled",r[UC]=E,r),$),Se=m!==!0,be=Se&&m!=="tail",He=Qz([n,Me]);return ee(Rn,{children:[Se&&[b("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw},"guard-first"),T?b("div",{"data-focus-guard":!0,tabIndex:g?-1:1,style:lw},"guard-nearest"):null],!g&&b(W,{id:J,sideCar:J0e,observed:o,disabled:g,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:X,onDeactivation:G,returnFocus:Z,focusOptions:ne}),b(D,{ref:He,...we,className:P,onBlur:me,onFocus:le,children:h}),be&&b("div",{"data-focus-guard":!0,tabIndex:g?-1:0,style:lw})]})});i_.propTypes={};i_.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 oF=i_;function GC(e,t){return GC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GC(e,t)}function o_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,GC(e,t)}function aF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t1e(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){o_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var g=h.prototype;return g.componentDidMount=function(){o.push(this),s()},g.componentDidUpdate=function(){s()},g.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},g.render=function(){return b(i,{...this.props})},h}(C.exports.PureComponent);return aF(l,"displayName","SideEffect("+n(i)+")"),l}}var Hl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(u1e)},c1e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],s_=c1e.join(","),d1e="".concat(s_,", [data-focus-guard]"),gF=function(e,t){var n;return Hl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?d1e:s_)?[i]:[],gF(i))},[])},l_=function(e,t){return e.reduce(function(n,r){return n.concat(gF(r,t),r.parentNode?Hl(r.parentNode.querySelectorAll(s_)).filter(function(i){return i===r}):[])},[])},f1e=function(e){var t=e.querySelectorAll("[".concat(Y0e,"]"));return Hl(t).map(function(n){return l_([n])}).reduce(function(n,r){return n.concat(r)},[])},u_=function(e,t){return Hl(e).filter(function(n){return uF(t,n)}).filter(function(n){return a1e(n)})},vA=function(e,t){return t===void 0&&(t=new Map),Hl(e).filter(function(n){return cF(t,n)})},YC=function(e,t,n){return pF(u_(l_(e,n),t),!0,n)},yA=function(e,t){return pF(u_(l_(e),t),!1)},h1e=function(e,t){return u_(f1e(e),t)},Fv=function(e,t){return e.shadowRoot?Fv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Hl(e.children).some(function(n){return Fv(n,t)})},p1e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},mF=function(e){return e.parentNode?mF(e.parentNode):e},c_=function(e){var t=jC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(UC);return n.push.apply(n,i?p1e(Hl(mF(r).querySelectorAll("[".concat(UC,'="').concat(i,'"]:not([').concat(Zz,'="disabled"])')))):[r]),n},[])},vF=function(e){return e.activeElement?e.activeElement.shadowRoot?vF(e.activeElement.shadowRoot):e.activeElement:void 0},d_=function(){return document.activeElement?document.activeElement.shadowRoot?vF(document.activeElement.shadowRoot):document.activeElement:void 0},g1e=function(e){return e===document.activeElement},m1e=function(e){return Boolean(Hl(e.querySelectorAll("iframe")).some(function(t){return g1e(t)}))},yF=function(e){var t=document&&d_();return!t||t.dataset&&t.dataset.focusGuard?!1:c_(e).some(function(n){return Fv(n,t)||m1e(n)})},v1e=function(){var e=document&&d_();return e?Hl(document.querySelectorAll("[".concat(j0e,"]"))).some(function(t){return Fv(t,e)}):!1},y1e=function(e,t){return t.filter(hF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},f_=function(e,t){return hF(e)&&e.name?y1e(e,t):e},S1e=function(e){var t=new Set;return e.forEach(function(n){return t.add(f_(n,e))}),e.filter(function(n){return t.has(n)})},SA=function(e){return e[0]&&e.length>1?f_(e[0],e):e[0]},bA=function(e,t){return e.length>1?e.indexOf(f_(e[t],e)):t},SF="NEW_FOCUS",b1e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=a_(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,g=l-u,m=t.indexOf(o),v=t.indexOf(a),S=S1e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=bA(e,0),_=bA(e,i-1);if(l===-1||h===-1)return SF;if(!g&&h>=0)return h;if(l<=m&&s&&Math.abs(g)>1)return _;if(l>=v&&s&&Math.abs(g)>1)return P;if(g&&Math.abs(E)>1)return h;if(l<=m)return _;if(l>v)return P;if(g)return Math.abs(g)>1?h:(i+h+g)%i}},x1e=function(e){return function(t){var n,r=(n=dF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},w1e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=vA(r.filter(x1e(n)));return i&&i.length?SA(i):SA(vA(t))},qC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&qC(e.parentNode.host||e.parentNode,t),t},uw=function(e,t){for(var n=qC(e),r=qC(t),i=0;i=0)return o}return!1},bF=function(e,t,n){var r=jC(e),i=jC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=uw(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=uw(o,l);u&&(!a||Fv(u,a)?a=u:a=uw(u,a))})}),a},C1e=function(e,t){return e.reduce(function(n,r){return n.concat(h1e(r,t))},[])},_1e=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(l1e)},k1e=function(e,t){var n=document&&d_(),r=c_(e).filter(a5),i=bF(n||e,e,r),o=new Map,a=yA(r,o),s=YC(r,o).filter(function(m){var v=m.node;return a5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=yA([i],o).map(function(m){var v=m.node;return v}),u=_1e(l,s),h=u.map(function(m){var v=m.node;return v}),g=b1e(h,l,n,t);return g===SF?{node:w1e(a,h,C1e(r,o))}:g===void 0?g:u[g]}},E1e=function(e){var t=c_(e).filter(a5),n=bF(e,e,t),r=new Map,i=YC([n],r,!0),o=YC(t,r).filter(function(a){var s=a.node;return a5(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:a_(s)}})},P1e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},cw=0,dw=!1,T1e=function(e,t,n){n===void 0&&(n={});var r=k1e(e,t);if(!dw&&r){if(cw>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),dw=!0,setTimeout(function(){dw=!1},1);return}cw++,P1e(r.node,n.focusOptions),cw--}};const xF=T1e;function wF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var L1e=function(){return document&&document.activeElement===document.body},A1e=function(){return L1e()||v1e()},I0=null,l0=null,O0=null,$v=!1,M1e=function(){return!0},R1e=function(t){return(I0.whiteList||M1e)(t)},I1e=function(t,n){O0={observerNode:t,portaledElement:n}},O1e=function(t){return O0&&O0.portaledElement===t};function xA(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 D1e=function(t){return t&&"current"in t?t.current:t},N1e=function(t){return t?Boolean($v):$v==="meanwhile"},B1e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},z1e=function(t,n){return n.some(function(r){return B1e(t,r,r)})},s5=function(){var t=!1;if(I0){var n=I0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||O0&&O0.portaledElement,h=document&&document.activeElement;if(u){var g=[u].concat(a.map(D1e).filter(Boolean));if((!h||R1e(h))&&(i||N1e(s)||!A1e()||!l0&&o)&&(u&&!(yF(g)||h&&z1e(h,g)||O1e(h))&&(document&&!l0&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=xF(g,l0,{focusOptions:l}),O0={})),$v=!1,l0=document&&document.activeElement),document){var m=document&&document.activeElement,v=E1e(g),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),xA(S,v.length,1,v),xA(S,-1,-1,v))}}}return t},CF=function(t){s5()&&t&&(t.stopPropagation(),t.preventDefault())},h_=function(){return wF(s5)},F1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||I1e(r,n)},$1e=function(){return null},_F=function(){$v="just",setTimeout(function(){$v="meanwhile"},0)},H1e=function(){document.addEventListener("focusin",CF),document.addEventListener("focusout",h_),window.addEventListener("blur",_F)},W1e=function(){document.removeEventListener("focusin",CF),document.removeEventListener("focusout",h_),window.removeEventListener("blur",_F)};function V1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function U1e(e){var t=e.slice(-1)[0];t&&!I0&&H1e();var n=I0,r=n&&t&&t.id===n.id;I0=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(),s5(),wF(s5)):(W1e(),l0=null)}rF.assignSyncMedium(F1e);iF.assignMedium(h_);Q0e.assignMedium(function(e){return e({moveFocusInside:xF,focusInside:yF})});const G1e=t1e(V1e,U1e)($1e);var kF=C.exports.forwardRef(function(t,n){return b(oF,{sideCar:G1e,ref:n,...t})}),EF=oF.propTypes||{};EF.sideCar;n_(EF,["sideCar"]);kF.propTypes={};const j1e=kF;var PF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&Rz(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),g=C.exports.useCallback(()=>{var v;(v=n==null?void 0:n.current)==null||v.focus()},[n]);return b(j1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:g,returnFocus:i&&!n,children:o})};PF.displayName="FocusLock";var K3="right-scroll-bar-position",X3="width-before-scroll-bar",Y1e="with-scroll-bars-hidden",q1e="--removed-body-scroll-bar-size",TF=tF(),fw=function(){},DS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:fw,onWheelCapture:fw,onTouchMoveCapture:fw}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,_=UB(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=Qz([n,t]),I=yl(yl({},_),i);return ee(Rn,{children:[h&&b(T,{sideCar:TF,removeScrollBar:u,shards:g,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),yl(yl({},I),{ref:M})):b(P,{...yl({},I,{className:l,ref:M}),children:s})]})});DS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};DS.classNames={fullWidth:X3,zeroRight:K3};var K1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function X1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=K1e();return t&&e.setAttribute("nonce",t),e}function Z1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Q1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var J1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=X1e())&&(Z1e(t,n),Q1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ege=function(){var e=J1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LF=function(){var e=ege(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},tge={left:0,top:0,right:0,gap:0},hw=function(e){return parseInt(e||"",10)||0},nge=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[hw(n),hw(r),hw(i)]},rge=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tge;var t=nge(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])}},ige=LF(),oge=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(Y1e,` { 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(K3,` { right: `).concat(s,"px ").concat(r,`; } .`).concat(X3,` { margin-right: `).concat(s,"px ").concat(r,`; } .`).concat(K3," .").concat(K3,` { right: 0 `).concat(r,`; } .`).concat(X3," .").concat(X3,` { margin-right: 0 `).concat(r,`; } body { `).concat(q1e,": ").concat(s,`px; } `)},age=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return rge(i)},[i]);return b(ige,{styles:oge(o,!t,i,n?"":"!important")})},KC=!1;if(typeof window<"u")try{var Xy=Object.defineProperty({},"passive",{get:function(){return KC=!0,!0}});window.addEventListener("test",Xy,Xy),window.removeEventListener("test",Xy,Xy)}catch(e){KC=!1}var Np=KC?{passive:!1}:!1,sge=function(e){return e.tagName==="TEXTAREA"},AF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sge(e)&&n[t]==="visible")},lge=function(e){return AF(e,"overflowY")},uge=function(e){return AF(e,"overflowX")},wA=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=MF(e,n);if(r){var i=RF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},cge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},MF=function(e,t){return e==="v"?lge(t):uge(t)},RF=function(e,t){return e==="v"?cge(t):dge(t)},fge=function(e,t){return e==="h"&&t==="rtl"?-1:1},hge=function(e,t,n,r,i){var o=fge(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,g=0,m=0;do{var v=RF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&MF(e,s)&&(g+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&g===0||!i&&a>g)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Zy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},CA=function(e){return[e.deltaX,e.deltaY]},_A=function(e){return e&&"current"in e?e.current:e},pge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gge=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},mge=0,Bp=[];function vge(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(mge++)[0],o=C.exports.useState(function(){return LF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=IC([e.lockRef.current],(e.shards||[]).map(_A),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Zy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-P[0],M="deltaY"in w?w.deltaY:_[1]-P[1],I,O=w.target,D=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&D==="h"&&O.type==="range")return!1;var B=wA(D,O);if(!B)return!0;if(B?I=D:(I=D==="v"?"h":"v",B=wA(D,O)),!B)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return hge($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Bp.length||Bp[Bp.length-1]!==o)){var P="deltaY"in E?CA(E):Zy(E),_=t.current.filter(function(I){return I.name===E.type&&I.target===E.target&&pge(I.delta,P)})[0];if(_&&_.should){E.cancelable&&E.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(_A).filter(Boolean).filter(function(I){return I.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,_){var T={name:w,delta:E,target:P,should:_};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Zy(w),r.current=void 0},[]),g=C.exports.useCallback(function(w){u(w.type,CA(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Zy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Bp.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Np),document.addEventListener("touchmove",l,Np),document.addEventListener("touchstart",h,Np),function(){Bp=Bp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Np),document.removeEventListener("touchmove",l,Np),document.removeEventListener("touchstart",h,Np)}},[]);var v=e.removeScrollBar,S=e.inert;return ee(Rn,{children:[S?b(o,{styles:gge(i)}):null,v?b(age,{gapMode:"margin"}):null]})}const yge=Z0e(TF,vge);var IF=C.exports.forwardRef(function(e,t){return b(DS,{...yl({},e,{ref:t,sideCar:yge})})});IF.classNames=DS.classNames;const OF=IF;var _h=(...e)=>e.filter(Boolean).join(" ");function gm(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Sge=class{constructor(){en(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}},XC=new Sge;function bge(e,t){C.exports.useEffect(()=>(t&&XC.add(e),()=>{XC.remove(e)}),[t,e])}function xge(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[g,m,v]=Cge(r,"chakra-modal","chakra-modal--header","chakra-modal--body");wge(u,t&&a),bge(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(B=>{S.current=B.target},[]),E=C.exports.useCallback(B=>{B.key==="Escape"&&(B.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[P,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((B={},$=null)=>({role:"dialog",...B,ref:Vn($,u),id:g,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:gm(B.onClick,W=>W.stopPropagation())}),[v,T,g,m,P]),O=C.exports.useCallback(B=>{B.stopPropagation(),S.current===B.target&&(!XC.isTopModal(u)||(i&&(n==null||n()),s==null||s()))},[n,i,s]),D=C.exports.useCallback((B={},$=null)=>({...B,ref:Vn($,h),onClick:gm(B.onClick,O),onKeyDown:gm(B.onKeyDown,E),onMouseDown:gm(B.onMouseDown,w)}),[E,w,O]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:D}}function wge(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return qz(e.current)},[t,e,n])}function Cge(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[_ge,kh]=En({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[kge,gd]=En({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),r1=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Oi("Modal",e),E={...xge(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:g,lockFocusAcrossFrames:m};return b(kge,{value:E,children:b(_ge,{value:S,children:b(Cd,{onExitComplete:v,children:E.isOpen&&b(Ch,{...t,children:n})})})})};r1.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};r1.displayName="Modal";var Hv=Ee((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=gd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=_h("chakra-modal__body",n),s=kh();return se.createElement(xe.div,{ref:t,className:a,id:i,...r,__css:s.body})});Hv.displayName="ModalBody";var p_=Ee((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=gd(),a=_h("chakra-modal__close-btn",r),s=kh();return b(RS,{ref:t,__css:s.closeButton,className:a,onClick:gm(n,l=>{l.stopPropagation(),o()}),...i})});p_.displayName="ModalCloseButton";function DF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=gd(),[g,m]=P8();return C.exports.useEffect(()=>{!g&&m&&setTimeout(m)},[g,m]),b(PF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:b(OF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var Ege={slideInBottom:{...DC,custom:{offsetY:16,reverse:!0}},slideInRight:{...DC,custom:{offsetX:16,reverse:!0}},scale:{...YB,custom:{initialScale:.95,reverse:!0}},none:{}},Pge=xe($l.section),Tge=e=>Ege[e||"none"],NF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=Tge(n),...i}=e;return b(Pge,{ref:t,...r,...i})});NF.displayName="ModalTransition";var Wv=Ee((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=gd(),u=s(a,t),h=l(i),g=_h("chakra-modal__content",n),m=kh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=gd();return se.createElement(DF,null,se.createElement(xe.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},b(NF,{preset:w,motionProps:o,className:g,...u,__css:v,children:r})))});Wv.displayName="ModalContent";var NS=Ee((e,t)=>{const{className:n,...r}=e,i=_h("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...kh().footer};return se.createElement(xe.footer,{ref:t,...r,__css:a,className:i})});NS.displayName="ModalFooter";var BS=Ee((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=gd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=_h("chakra-modal__header",n),l={flex:0,...kh().header};return se.createElement(xe.header,{ref:t,className:a,id:i,...r,__css:l})});BS.displayName="ModalHeader";var Lge=xe($l.div),i1=Ee((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=_h("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...kh().overlay},{motionPreset:u}=gd();return b(Lge,{...i||(u==="none"?{}:jB),__css:l,ref:t,className:a,...o})});i1.displayName="ModalOverlay";function BF(e){const{leastDestructiveRef:t,...n}=e;return b(r1,{...n,initialFocusRef:t})}var zF=Ee((e,t)=>b(Wv,{ref:t,role:"alertdialog",...e})),[UTe,Age]=En(),Mge=xe(qB),Rge=Ee((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=gd(),h=s(a,t),g=l(o),m=_h("chakra-modal__content",n),v=kh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=Age();return se.createElement(DF,null,se.createElement(xe.div,{...g,className:"chakra-modal__content-container",__css:w},b(Mge,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});Rge.displayName="DrawerContent";function Ige(e,t){const n=fr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var FF=(...e)=>e.filter(Boolean).join(" "),pw=e=>e?!0:void 0;function ll(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Oge=e=>b(xa,{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"})}),Dge=e=>b(xa,{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 kA(e,t,n,r){C.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 Nge=50,EA=300;function Bge(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);Ige(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Nge:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},EA)},[e,a]),g=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},EA)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:g,stop:m,isSpinning:n}}var zge=/^[Ee0-9+\-.]$/;function Fge(e){return zge.test(e)}function $ge(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 Hge(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:h,pattern:g="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:O,onInvalid:D,getAriaValueText:B,isValidCharacter:$,format:W,parse:j,...ne}=e,H=fr(I),K=fr(O),te=fr(D),J=fr($!=null?$:Fge),X=fr(B),G=ihe(e),{update:Z,increment:le,decrement:me}=G,[Me,we]=C.exports.useState(!1),Se=!(s||l),be=C.exports.useRef(null),He=C.exports.useRef(null),Je=C.exports.useRef(null),tt=C.exports.useRef(null),ht=C.exports.useCallback(ke=>ke.split("").filter(J).join(""),[J]),_t=C.exports.useCallback(ke=>{var bt;return(bt=j==null?void 0:j(ke))!=null?bt:ke},[j]),gt=C.exports.useCallback(ke=>{var bt;return((bt=W==null?void 0:W(ke))!=null?bt:ke).toString()},[W]);hd(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!be.current)return;if(be.current.value!=G.value){const bt=_t(be.current.value);G.setValue(ht(bt))}},[_t,ht]);const ft=C.exports.useCallback((ke=a)=>{Se&&le(ke)},[le,Se,a]),vt=C.exports.useCallback((ke=a)=>{Se&&me(ke)},[me,Se,a]),Pe=Bge(ft,vt);kA(Je,"disabled",Pe.stop,Pe.isSpinning),kA(tt,"disabled",Pe.stop,Pe.isSpinning);const nt=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ht=_t(ke.currentTarget.value);Z(ht(Ht)),He.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Z,ht,_t]),At=C.exports.useCallback(ke=>{var Ht,Be;var bt;H==null||H(ke),He.current&&(ke.target.selectionStart=(Ht=He.current.start)!=null?Ht:(bt=ke.currentTarget.value)==null?void 0:bt.length,ke.currentTarget.selectionEnd=(Be=He.current.end)!=null?Be:ke.currentTarget.selectionStart)},[H]),Xe=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;$ge(ke,J)||ke.preventDefault();const bt=mt(ke)*a,Ht=ke.key,ot={ArrowUp:()=>ft(bt),ArrowDown:()=>vt(bt),Home:()=>Z(i),End:()=>Z(o)}[Ht];ot&&(ke.preventDefault(),ot(ke))},[J,a,ft,vt,Z,i,o]),mt=ke=>{let bt=1;return(ke.metaKey||ke.ctrlKey)&&(bt=.1),ke.shiftKey&&(bt=10),bt},ln=C.exports.useMemo(()=>{const ke=X==null?void 0:X(G.value);if(ke!=null)return ke;const bt=G.value.toString();return bt||void 0},[G.value,X]),kt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Gt=C.exports.useCallback(()=>{we(!1),n&&kt()},[n,we,kt]),un=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=be.current)==null||ke.focus()})},[t]),bn=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.up(),un()},[un,Pe]),Ie=C.exports.useCallback(ke=>{ke.preventDefault(),Pe.down(),un()},[un,Pe]);nh(()=>be.current,"wheel",ke=>{var De;var bt;const Be=((De=(bt=be.current)==null?void 0:bt.ownerDocument)!=null?De:document).activeElement===be.current;if(!v||!Be)return;ke.preventDefault();const ot=mt(ke)*a,cn=Math.sign(ke.deltaY);cn===-1?ft(ot):cn===1&&vt(ot)},{passive:!1});const Ze=C.exports.useCallback((ke={},bt=null)=>{const Ht=l||r&&G.isAtMax;return{...ke,ref:Vn(bt,Je),role:"button",tabIndex:-1,onPointerDown:ll(ke.onPointerDown,Be=>{Be.button!==0||Ht||bn(Be)}),onPointerLeave:ll(ke.onPointerLeave,Pe.stop),onPointerUp:ll(ke.onPointerUp,Pe.stop),disabled:Ht,"aria-disabled":pw(Ht)}},[G.isAtMax,r,bn,Pe.stop,l]),Zt=C.exports.useCallback((ke={},bt=null)=>{const Ht=l||r&&G.isAtMin;return{...ke,ref:Vn(bt,tt),role:"button",tabIndex:-1,onPointerDown:ll(ke.onPointerDown,Be=>{Be.button!==0||Ht||Ie(Be)}),onPointerLeave:ll(ke.onPointerLeave,Pe.stop),onPointerUp:ll(ke.onPointerUp,Pe.stop),disabled:Ht,"aria-disabled":pw(Ht)}},[G.isAtMin,r,Ie,Pe.stop,l]),qt=C.exports.useCallback((ke={},bt=null)=>{var Ht,Be,ot,cn;return{name:P,inputMode:m,type:"text",pattern:g,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...ke,readOnly:(Ht=ke.readOnly)!=null?Ht:s,"aria-readonly":(Be=ke.readOnly)!=null?Be:s,"aria-required":(ot=ke.required)!=null?ot:u,required:(cn=ke.required)!=null?cn:u,ref:Vn(be,bt),value:gt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":pw(h!=null?h:G.isOutOfRange),"aria-valuetext":ln,autoComplete:"off",autoCorrect:"off",onChange:ll(ke.onChange,nt),onKeyDown:ll(ke.onKeyDown,Xe),onFocus:ll(ke.onFocus,At,()=>we(!0)),onBlur:ll(ke.onBlur,K,Gt)}},[P,m,g,M,T,gt,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,ln,nt,Xe,At,K,Gt]);return{value:gt(G.value),valueAsNumber:G.valueAsNumber,isFocused:Me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Ze,getDecrementButtonProps:Zt,getInputProps:qt,htmlProps:ne}}var[Wge,zS]=En({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Vge,g_]=En({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),m_=Ee(function(t,n){const r=Oi("NumberInput",t),i=Sn(t),o=F8(i),{htmlProps:a,...s}=Hge(o),l=C.exports.useMemo(()=>s,[s]);return se.createElement(Vge,{value:l},se.createElement(Wge,{value:r},se.createElement(xe.div,{...a,ref:n,className:FF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});m_.displayName="NumberInput";var $F=Ee(function(t,n){const r=zS();return se.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}})});$F.displayName="NumberInputStepper";var v_=Ee(function(t,n){const{getInputProps:r}=g_(),i=r(t,n),o=zS();return se.createElement(xe.input,{...i,className:FF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});v_.displayName="NumberInputField";var HF=xe("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),y_=Ee(function(t,n){var a;const r=zS(),{getDecrementButtonProps:i}=g_(),o=i(t,n);return b(HF,{...o,__css:r.stepper,children:(a=t.children)!=null?a:b(Oge,{})})});y_.displayName="NumberDecrementStepper";var S_=Ee(function(t,n){var a;const{getIncrementButtonProps:r}=g_(),i=r(t,n),o=zS();return b(HF,{...i,__css:o.stepper,children:(a=t.children)!=null?a:b(Dge,{})})});S_.displayName="NumberIncrementStepper";var h2=(...e)=>e.filter(Boolean).join(" ");function Uge(e,...t){return Gge(e)?e(...t):e}var Gge=e=>typeof e=="function";function ul(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function jge(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var[Yge,Eh]=En({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[qge,p2]=En({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),zp={click:"click",hover:"hover"};function Kge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=zp.click,openDelay:h=200,closeDelay:g=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:_,onToggle:T}=Vz(e),M=C.exports.useRef(null),I=C.exports.useRef(null),O=C.exports.useRef(null),D=C.exports.useRef(!1),B=C.exports.useRef(!1);E&&(B.current=!0);const[$,W]=C.exports.useState(!1),[j,ne]=C.exports.useState(!1),H=C.exports.useId(),K=i!=null?i:H,[te,J,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(nt=>`${nt}-${K}`),{referenceRef:Z,getArrowProps:le,getPopperProps:me,getArrowInnerProps:Me,forceUpdate:we}=Wz({...w,enabled:E||!!S}),Se=M0e({isOpen:E,ref:O});hhe({enabled:E,ref:I}),spe(O,{focusRef:I,visible:E,shouldFocus:o&&u===zp.click}),upe(O,{focusRef:r,visible:E,shouldFocus:a&&u===zp.click});const be=Uz({wasSelected:B.current,enabled:m,mode:v,isSelected:Se.present}),He=C.exports.useCallback((nt={},At=null)=>{const Xe={...nt,style:{...nt.style,transformOrigin:Gr.transformOrigin.varRef,[Gr.arrowSize.var]:s?`${s}px`:void 0,[Gr.arrowShadowColor.var]:l},ref:Vn(O,At),children:be?nt.children:null,id:J,tabIndex:-1,role:"dialog",onKeyDown:ul(nt.onKeyDown,mt=>{n&&mt.key==="Escape"&&P()}),onBlur:ul(nt.onBlur,mt=>{const ln=PA(mt),kt=gw(O.current,ln),Gt=gw(I.current,ln);E&&t&&(!kt&&!Gt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":j?G:void 0};return u===zp.hover&&(Xe.role="tooltip",Xe.onMouseEnter=ul(nt.onMouseEnter,()=>{D.current=!0}),Xe.onMouseLeave=ul(nt.onMouseLeave,mt=>{mt.nativeEvent.relatedTarget!==null&&(D.current=!1,setTimeout(()=>P(),g))})),Xe},[be,J,$,X,j,G,u,n,P,E,t,g,l,s]),Je=C.exports.useCallback((nt={},At=null)=>me({...nt,style:{visibility:E?"visible":"hidden",...nt.style}},At),[E,me]),tt=C.exports.useCallback((nt,At=null)=>({...nt,ref:Vn(At,M,Z)}),[M,Z]),ht=C.exports.useRef(),_t=C.exports.useRef(),gt=C.exports.useCallback(nt=>{M.current==null&&Z(nt)},[Z]),ft=C.exports.useCallback((nt={},At=null)=>{const Xe={...nt,ref:Vn(I,At,gt),id:te,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":J};return u===zp.click&&(Xe.onClick=ul(nt.onClick,T)),u===zp.hover&&(Xe.onFocus=ul(nt.onFocus,()=>{ht.current===void 0&&_()}),Xe.onBlur=ul(nt.onBlur,mt=>{const ln=PA(mt),kt=!gw(O.current,ln);E&&t&&kt&&P()}),Xe.onKeyDown=ul(nt.onKeyDown,mt=>{mt.key==="Escape"&&P()}),Xe.onMouseEnter=ul(nt.onMouseEnter,()=>{D.current=!0,ht.current=window.setTimeout(()=>_(),h)}),Xe.onMouseLeave=ul(nt.onMouseLeave,()=>{D.current=!1,ht.current&&(clearTimeout(ht.current),ht.current=void 0),_t.current=window.setTimeout(()=>{D.current===!1&&P()},g)})),Xe},[te,E,J,u,gt,T,_,t,P,h,g]);C.exports.useEffect(()=>()=>{ht.current&&clearTimeout(ht.current),_t.current&&clearTimeout(_t.current)},[]);const vt=C.exports.useCallback((nt={},At=null)=>({...nt,id:X,ref:Vn(At,Xe=>{W(!!Xe)})}),[X]),Pe=C.exports.useCallback((nt={},At=null)=>({...nt,id:G,ref:Vn(At,Xe=>{ne(!!Xe)})}),[G]);return{forceUpdate:we,isOpen:E,onAnimationComplete:Se.onComplete,onClose:P,getAnchorProps:tt,getArrowProps:le,getArrowInnerProps:Me,getPopoverPositionerProps:Je,getPopoverProps:He,getTriggerProps:ft,getHeaderProps:vt,getBodyProps:Pe}}function gw(e,t){return e===t||(e==null?void 0:e.contains(t))}function PA(e){var n;const t=e.currentTarget.ownerDocument.activeElement;return(n=e.relatedTarget)!=null?n:t}function b_(e){const t=Oi("Popover",e),{children:n,...r}=Sn(e),i=p1(),o=Kge({...r,direction:i.direction});return b(Yge,{value:o,children:b(qge,{value:t,children:Uge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}b_.displayName="Popover";function x_(e){var l;const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=Eh(),a=p2(),s=(l=t!=null?t:n)!=null?l:r;return se.createElement(xe.div,{...i(),className:"chakra-popover__arrow-positioner"},se.createElement(xe.div,{className:h2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}x_.displayName="PopoverArrow";var Xge=Ee(function(t,n){const{getBodyProps:r}=Eh(),i=p2();return se.createElement(xe.div,{...r(t,n),className:h2("chakra-popover__body",t.className),__css:i.body})});Xge.displayName="PopoverBody";var Zge=Ee(function(t,n){const{onClose:r}=Eh(),i=p2();return b(RS,{size:"sm",onClick:r,className:h2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});Zge.displayName="PopoverCloseButton";function Qge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var Jge={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]}}},eme=xe($l.section),WF=Ee(function(t,n){const{variants:r=Jge,...i}=t,{isOpen:o}=Eh();return se.createElement(eme,{ref:n,variants:Qge(r),initial:!1,animate:o?"enter":"exit",...i})});WF.displayName="PopoverTransition";var w_=Ee(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=Eh(),u=p2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return se.createElement(xe.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},b(WF,{...i,...a(o,n),onAnimationComplete:jge(l,o.onAnimationComplete),className:h2("chakra-popover__content",t.className),__css:h}))});w_.displayName="PopoverContent";var tme=Ee(function(t,n){const{getHeaderProps:r}=Eh(),i=p2();return se.createElement(xe.header,{...r(t,n),className:h2("chakra-popover__header",t.className),__css:i.header})});tme.displayName="PopoverHeader";function C_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=Eh();return C.exports.cloneElement(t,n(t.props,t.ref))}C_.displayName="PopoverTrigger";function nme(e,t,n){return(e-t)*100/(n-t)}var rme=wd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),ime=wd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),ome=wd({"0%":{left:"-40%"},"100%":{left:"100%"}}),ame=wd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function VF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=nme(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 UF=e=>{const{size:t,isIndeterminate:n,...r}=e;return se.createElement(xe.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${ime} 2s linear infinite`:void 0},...r})};UF.displayName="Shape";var ZC=e=>se.createElement(xe.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});ZC.displayName="Circle";var sme=Ee((e,t)=>{var M;const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:g="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=VF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:((M=w.percent)!=null?M:0)*2.64,P=E==null?void 0:`${E} ${264-E}`,_=v?{css:{animation:`${rme} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return se.createElement(xe.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ee(UF,{size:n,isIndeterminate:v,children:[b(ZC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),b(ZC,{stroke:g,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});sme.displayName="CircularProgress";var[lme,ume]=En({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),cme=Ee((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=VF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...ume().filledTrack};return se.createElement(xe.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),GF=Ee((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":g,"aria-labelledby":m,title:v,role:S,...w}=Sn(e),E=Oi("Progress",e),P=u!=null?u:(n=E.track)==null?void 0:n.borderRadius,_={animation:`${ame} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${ome} 1s ease infinite normal none running`}},O={overflow:"hidden",position:"relative",...E.track};return se.createElement(xe.div,{ref:t,borderRadius:P,__css:O,...w},ee(lme,{value:E,children:[b(cme,{"aria-label":g,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:P,title:v,role:S}),l]}))});GF.displayName="Progress";var dme=xe("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});dme.displayName="CircularProgressLabel";var fme=(...e)=>e.filter(Boolean).join(" "),hme=e=>e?"":void 0;function pme(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 jF=Ee(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return se.createElement(xe.select,{...a,ref:n,className:fme("chakra-select",o)},i&&b("option",{value:"",children:i}),r)});jF.displayName="SelectField";var YF=Ee((e,t)=>{var n;const r=Oi("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:g,iconColor:m,iconSize:v,...S}=Sn(e),[w,E]=pme(S,DQ),P=z8(E),_={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 se.createElement(xe.div,{className:"chakra-select__wrapper",__css:_,...w,...i},b(jF,{ref:t,height:u!=null?u:l,minH:h!=null?h:g,placeholder:o,...P,__css:T,children:e.children}),b(qF,{"data-disabled":hme(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});YF.displayName="Select";var gme=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"})}),mme=xe("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),qF=e=>{const{children:t=b(gme,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return b(mme,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};qF.displayName="SelectIcon";function vme(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function yme(e){const t=bme(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function KF(e){return!!e.touches}function Sme(e){return KF(e)&&e.touches.length>1}function bme(e){var t;return(t=e.view)!=null?t:window}function xme(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function wme(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function XF(e,t="page"){return KF(e)?xme(e,t):wme(e,t)}function Cme(e){return t=>{const n=yme(t);(!n||n&&t.button===0)&&e(t)}}function _me(e,t=!1){function n(i){e(i,{point:XF(i)})}return t?Cme(n):n}function Z3(e,t,n,r){return vme(e,t,_me(n,t==="pointerdown"),r)}function ZF(e){const t=C.exports.useRef(null);return t.current=e,t}var kme=class{constructor(e,t,n){en(this,"history",[]);en(this,"startEvent",null);en(this,"lastEvent",null);en(this,"lastEventInfo",null);en(this,"handlers",{});en(this,"removeListeners",()=>{});en(this,"threshold",3);en(this,"win");en(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=mw(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Lme(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=iT();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)});en(this,"onPointerMove",(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,YJ.update(this.updatePoint,!0)});en(this,"onPointerUp",(e,t)=>{const n=mw(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,Sme(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:XF(e)},{timestamp:i}=iT();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o==null||o(e,mw(r,this.history)),this.removeListeners=Tme(Z3(this.win,"pointermove",this.onPointerMove),Z3(this.win,"pointerup",this.onPointerUp),Z3(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),qJ.update(this.updatePoint)}};function TA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mw(e,t){return{point:e.point,delta:TA(e.point,t[t.length-1]),offset:TA(e.point,t[0]),velocity:Pme(t,.1)}}var Eme=e=>e*1e3;function Pme(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>Eme(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 Tme(...e){return t=>e.reduce((n,r)=>r(n),t)}function vw(e,t){return Math.abs(e-t)}function LA(e){return"x"in e&&"y"in e}function Lme(e,t){if(typeof e=="number"&&typeof t=="number")return vw(e,t);if(LA(e)&&LA(t)){const n=vw(e.x,t.x),r=vw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function QF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=ZF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(g,m){u.current=null,i==null||i(g,m)}});C.exports.useEffect(()=>{var g;(g=u.current)==null||g.updateHandlers(h.current)}),C.exports.useEffect(()=>{const g=e.current;if(!g||!l)return;function m(v){u.current=new kme(v,h.current,s)}return Z3(g,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var g;(g=u.current)==null||g.end(),u.current=null},[])}function Ame(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,h=Array.isArray(u)?u[0]:u;s=h.inlineSize,l=h.blockSize}else s=e.offsetWidth,l=e.offsetHeight;t({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Mme=Boolean(globalThis==null?void 0:globalThis.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Rme(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 JF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Mme(()=>{const a=e(),s=a.map((l,u)=>Ame(l,h=>{r(g=>[...g.slice(0,u),h,...g.slice(u+1)])}));if(t){const l=a[0];s.push(Rme(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[i]),n}function Ime(e){return typeof e=="object"&&e!==null&&"current"in e}function Ome(e){const[t]=JF({observeMutation:!1,getNodes(){return[Ime(e)?e.current:e]}});return t}var Dme=Object.getOwnPropertyNames,Nme=(e,t)=>function(){return e&&(t=(0,e[Dme(e)[0]])(e=0)),t},Ed=Nme({"../../../react-shim.js"(){}});Ed();Ed();Ed();var Na=e=>e?"":void 0,D0=e=>e?!0:void 0,Pd=(...e)=>e.filter(Boolean).join(" ");Ed();function N0(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}Ed();Ed();function Bme(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 mm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Q3={width:0,height:0},Qy=e=>e||Q3;function e$(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{var P;const E=(P=r[w])!=null?P:Q3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...mm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>Qy(w).height>Qy(E).height?w:E,Q3):r.reduce((w,E)=>Qy(w).width>Qy(E).width?w:E,Q3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...mm({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",...mm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],g=u?h:n;let m=g[0];!u&&i&&(m=100-m);const v=Math.abs(g[g.length-1]-g[0]),S={...l,...mm({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:S,rootStyle:s,getThumbStyle:o}}function t$(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function zme(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:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...O}=e,D=fr(m),B=fr(v),$=fr(w),W=t$({isReversed:a,direction:s,orientation:l}),[j,ne]=hS({value:i,defaultValue:o!=null?o:[25,75],onChange:r});if(!Array.isArray(j))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof j}\``);const[H,K]=C.exports.useState(!1),[te,J]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Z=!(h||g),le=C.exports.useRef(j),me=j.map(De=>R0(De,t,n)),Me=I*S,we=Fme(me,t,n,Me),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=me,Se.current.valueBounds=we;const be=me.map(De=>n-De+t),Je=(W?be:me).map(De=>i5(De,t,n)),tt=l==="vertical",ht=C.exports.useRef(null),_t=C.exports.useRef(null),gt=JF({getNodes(){const De=_t.current,lt=De==null?void 0:De.querySelectorAll("[role=slider]");return lt?Array.from(lt):[]}}),ft=C.exports.useId(),vt=u!=null?u:ft,Pe=Bme(vt),nt=C.exports.useCallback(De=>{var zo;var lt;if(!ht.current)return;Se.current.eventSource="pointer";const Qe=ht.current.getBoundingClientRect(),{clientX:Dt,clientY:on}=(zo=(lt=De.touches)==null?void 0:lt[0])!=null?zo:De,vr=tt?Qe.bottom-on:Dt-Qe.left,or=tt?Qe.height:Qe.width;let zr=vr/or;return W&&(zr=1-zr),iz(zr,t,n)},[tt,W,n,t]),At=(n-t)/10,Xe=S||(n-t)/100,mt=C.exports.useMemo(()=>({setValueAtIndex(De,lt){if(!Z)return;const Qe=Se.current.valueBounds[De];lt=parseFloat($C(lt,Qe.min,Xe)),lt=R0(lt,Qe.min,Qe.max);const Dt=[...Se.current.value];Dt[De]=lt,ne(Dt)},setActiveIndex:G,stepUp(De,lt=Xe){const Qe=Se.current.value[De],Dt=W?Qe-lt:Qe+lt;mt.setValueAtIndex(De,Dt)},stepDown(De,lt=Xe){const Qe=Se.current.value[De],Dt=W?Qe+lt:Qe-lt;mt.setValueAtIndex(De,Dt)},reset(){ne(le.current)}}),[Xe,W,ne,Z]),ln=C.exports.useCallback(De=>{const lt=De.key,Dt={ArrowRight:()=>mt.stepUp(X),ArrowUp:()=>mt.stepUp(X),ArrowLeft:()=>mt.stepDown(X),ArrowDown:()=>mt.stepDown(X),PageUp:()=>mt.stepUp(X,At),PageDown:()=>mt.stepDown(X,At),Home:()=>{const{min:on}=we[X];mt.setValueAtIndex(X,on)},End:()=>{const{max:on}=we[X];mt.setValueAtIndex(X,on)}}[lt];Dt&&(De.preventDefault(),De.stopPropagation(),Dt(De),Se.current.eventSource="keyboard")},[mt,X,At,we]),{getThumbStyle:kt,rootStyle:Gt,trackStyle:un,innerTrackStyle:bn}=C.exports.useMemo(()=>e$({isReversed:W,orientation:l,thumbRects:gt,thumbPercents:Je}),[W,l,Je,gt]),Ie=C.exports.useCallback(De=>{var lt;const Qe=De!=null?De:X;if(Qe!==-1&&M){const Dt=Pe.getThumb(Qe),on=(lt=_t.current)==null?void 0:lt.ownerDocument.getElementById(Dt);on&&setTimeout(()=>on.focus())}},[M,X,Pe]);hd(()=>{Se.current.eventSource==="keyboard"&&(B==null||B(Se.current.value))},[me,B]);const Ze=De=>{const lt=nt(De)||0,Qe=Se.current.value.map(zr=>Math.abs(zr-lt)),Dt=Math.min(...Qe);let on=Qe.indexOf(Dt);const vr=Qe.filter(zr=>zr===Dt);vr.length>1&<>Se.current.value[on]&&(on=on+vr.length-1),G(on),mt.setValueAtIndex(on,lt),Ie(on)},Zt=De=>{if(X==-1)return;const lt=nt(De)||0;G(X),mt.setValueAtIndex(X,lt),Ie(X)};QF(_t,{onPanSessionStart(De){!Z||(K(!0),Ze(De),D==null||D(Se.current.value))},onPanSessionEnd(){!Z||(K(!1),B==null||B(Se.current.value))},onPan(De){!Z||Zt(De)}});const qt=C.exports.useCallback((De={},lt=null)=>({...De,...O,id:Pe.root,ref:Vn(lt,_t),tabIndex:-1,"aria-disabled":D0(h),"data-focused":Na(te),style:{...De.style,...Gt}}),[O,h,te,Gt,Pe]),ke=C.exports.useCallback((De={},lt=null)=>({...De,ref:Vn(lt,ht),id:Pe.track,"data-disabled":Na(h),style:{...De.style,...un}}),[h,un,Pe]),bt=C.exports.useCallback((De={},lt=null)=>({...De,ref:lt,id:Pe.innerTrack,style:{...De.style,...bn}}),[bn,Pe]),Ht=C.exports.useCallback((De,lt=null)=>{var or;const{index:Qe,...Dt}=De,on=me[Qe];if(on==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${Qe}\`. The \`value\` or \`defaultValue\` length is : ${me.length}`);const vr=we[Qe];return{...Dt,ref:lt,role:"slider",tabIndex:Z?0:void 0,id:Pe.getThumb(Qe),"data-active":Na(H&&X===Qe),"aria-valuetext":(or=$==null?void 0:$(on))!=null?or:E==null?void 0:E[Qe],"aria-valuemin":vr.min,"aria-valuemax":vr.max,"aria-valuenow":on,"aria-orientation":l,"aria-disabled":D0(h),"aria-readonly":D0(g),"aria-label":P==null?void 0:P[Qe],"aria-labelledby":P!=null&&P[Qe]||_==null?void 0:_[Qe],style:{...De.style,...kt(Qe)},onKeyDown:N0(De.onKeyDown,ln),onFocus:N0(De.onFocus,()=>{J(!0),G(Qe)}),onBlur:N0(De.onBlur,()=>{J(!1),G(-1)})}},[Pe,me,we,Z,H,X,$,E,l,h,g,P,_,kt,ln,J]),Be=C.exports.useCallback((De={},lt=null)=>({...De,ref:lt,id:Pe.output,htmlFor:me.map((Qe,Dt)=>Pe.getThumb(Dt)).join(" "),"aria-live":"off"}),[Pe,me]),ot=C.exports.useCallback((De,lt=null)=>{const{value:Qe,...Dt}=De,on=!(Qen),vr=Qe>=me[0]&&Qe<=me[me.length-1];let or=i5(Qe,t,n);or=W?100-or:or;const zr={position:"absolute",pointerEvents:"none",...mm({orientation:l,vertical:{bottom:`${or}%`},horizontal:{left:`${or}%`}})};return{...Dt,ref:lt,id:Pe.getMarker(De.value),role:"presentation","aria-hidden":!0,"data-disabled":Na(h),"data-invalid":Na(!on),"data-highlighted":Na(vr),style:{...De.style,...zr}}},[h,W,n,t,l,me,Pe]),cn=C.exports.useCallback((De,lt=null)=>{const{index:Qe,...Dt}=De;return{...Dt,ref:lt,id:Pe.getInput(Qe),type:"hidden",value:me[Qe],name:Array.isArray(T)?T[Qe]:`${T}-${Qe}`}},[T,me,Pe]);return{state:{value:me,isFocused:te,isDragging:H,getThumbPercent:De=>Je[De],getThumbMinValue:De=>we[De].min,getThumbMaxValue:De=>we[De].max},actions:mt,getRootProps:qt,getTrackProps:ke,getInnerTrackProps:bt,getThumbProps:Ht,getMarkerProps:ot,getInputProps:cn,getOutputProps:Be}}function Fme(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[$me,FS]=En({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[Hme,__]=En({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),n$=Ee(function(t,n){const r=Oi("Slider",t),i=Sn(t),{direction:o}=p1();i.direction=o;const{getRootProps:a,...s}=zme(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return se.createElement($me,{value:l},se.createElement(Hme,{value:r},se.createElement(xe.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});n$.defaultProps={orientation:"horizontal"};n$.displayName="RangeSlider";var Wme=Ee(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=FS(),a=__(),s=r(t,n);return se.createElement(xe.div,{...s,className:Pd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&b("input",{...i({index:t.index})}))});Wme.displayName="RangeSliderThumb";var Vme=Ee(function(t,n){const{getTrackProps:r}=FS(),i=__(),o=r(t,n);return se.createElement(xe.div,{...o,className:Pd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});Vme.displayName="RangeSliderTrack";var Ume=Ee(function(t,n){const{getInnerTrackProps:r}=FS(),i=__(),o=r(t,n);return se.createElement(xe.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Ume.displayName="RangeSliderFilledTrack";var Gme=Ee(function(t,n){const{getMarkerProps:r}=FS(),i=r(t,n);return se.createElement(xe.div,{...i,className:Pd("chakra-slider__marker",t.className)})});Gme.displayName="RangeSliderMark";Ed();Ed();function jme(e){var Ht;const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:g,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,O=fr(m),D=fr(v),B=fr(w),$=t$({isReversed:a,direction:s,orientation:l}),[W,j]=hS({value:i,defaultValue:o!=null?o:qme(t,n),onChange:r}),[ne,H]=C.exports.useState(!1),[K,te]=C.exports.useState(!1),J=!(h||g),X=(n-t)/10,G=S||(n-t)/100,Z=R0(W,t,n),le=n-Z+t,Me=i5($?le:Z,t,n),we=l==="vertical",Se=ZF({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:J,isReversed:$,isVertical:we,eventSource:null,focusThumbOnChange:M,orientation:l}),be=C.exports.useRef(null),He=C.exports.useRef(null),Je=C.exports.useRef(null),tt=C.exports.useId(),ht=u!=null?u:tt,[_t,gt]=[`slider-thumb-${ht}`,`slider-track-${ht}`],ft=C.exports.useCallback(Be=>{var zr;var ot;if(!be.current)return;const cn=Se.current;cn.eventSource="pointer";const De=be.current.getBoundingClientRect(),{clientX:lt,clientY:Qe}=(zr=(ot=Be.touches)==null?void 0:ot[0])!=null?zr:Be,Dt=we?De.bottom-Qe:lt-De.left,on=we?De.height:De.width;let vr=Dt/on;$&&(vr=1-vr);let or=iz(vr,cn.min,cn.max);return cn.step&&(or=parseFloat($C(or,cn.min,cn.step))),or=R0(or,cn.min,cn.max),or},[we,$,Se]),vt=C.exports.useCallback(Be=>{const ot=Se.current;!ot.isInteractive||(Be=parseFloat($C(Be,ot.min,G)),Be=R0(Be,ot.min,ot.max),j(Be))},[G,j,Se]),Pe=C.exports.useMemo(()=>({stepUp(Be=G){const ot=$?Z-Be:Z+Be;vt(ot)},stepDown(Be=G){const ot=$?Z+Be:Z-Be;vt(ot)},reset(){vt(o||0)},stepTo(Be){vt(Be)}}),[vt,$,Z,G,o]),nt=C.exports.useCallback(Be=>{const ot=Se.current,De={ArrowRight:()=>Pe.stepUp(),ArrowUp:()=>Pe.stepUp(),ArrowLeft:()=>Pe.stepDown(),ArrowDown:()=>Pe.stepDown(),PageUp:()=>Pe.stepUp(X),PageDown:()=>Pe.stepDown(X),Home:()=>vt(ot.min),End:()=>vt(ot.max)}[Be.key];De&&(Be.preventDefault(),Be.stopPropagation(),De(Be),ot.eventSource="keyboard")},[Pe,vt,X,Se]),At=(Ht=B==null?void 0:B(Z))!=null?Ht:E,Xe=Ome(He),{getThumbStyle:mt,rootStyle:ln,trackStyle:kt,innerTrackStyle:Gt}=C.exports.useMemo(()=>{const Be=Se.current,ot=Xe!=null?Xe:{width:0,height:0};return e$({isReversed:$,orientation:Be.orientation,thumbRects:[ot],thumbPercents:[Me]})},[$,Xe,Me,Se]),un=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ot;return(ot=He.current)==null?void 0:ot.focus()})},[Se]);hd(()=>{const Be=Se.current;un(),Be.eventSource==="keyboard"&&(D==null||D(Be.value))},[Z,D]);function bn(Be){const ot=ft(Be);ot!=null&&ot!==Se.current.value&&j(ot)}QF(Je,{onPanSessionStart(Be){const ot=Se.current;!ot.isInteractive||(H(!0),un(),bn(Be),O==null||O(ot.value))},onPanSessionEnd(){const Be=Se.current;!Be.isInteractive||(H(!1),D==null||D(Be.value))},onPan(Be){!Se.current.isInteractive||bn(Be)}});const Ie=C.exports.useCallback((Be={},ot=null)=>({...Be,...I,ref:Vn(ot,Je),tabIndex:-1,"aria-disabled":D0(h),"data-focused":Na(K),style:{...Be.style,...ln}}),[I,h,K,ln]),Ze=C.exports.useCallback((Be={},ot=null)=>({...Be,ref:Vn(ot,be),id:gt,"data-disabled":Na(h),style:{...Be.style,...kt}}),[h,gt,kt]),Zt=C.exports.useCallback((Be={},ot=null)=>({...Be,ref:ot,style:{...Be.style,...Gt}}),[Gt]),qt=C.exports.useCallback((Be={},ot=null)=>({...Be,ref:Vn(ot,He),role:"slider",tabIndex:J?0:void 0,id:_t,"data-active":Na(ne),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":D0(h),"aria-readonly":D0(g),"aria-label":P,"aria-labelledby":P?void 0:_,style:{...Be.style,...mt(0)},onKeyDown:N0(Be.onKeyDown,nt),onFocus:N0(Be.onFocus,()=>te(!0)),onBlur:N0(Be.onBlur,()=>te(!1))}),[J,_t,ne,At,t,n,Z,l,h,g,P,_,mt,nt]),ke=C.exports.useCallback((Be,ot=null)=>{const cn=!(Be.valuen),De=Z>=Be.value,lt=i5(Be.value,t,n),Qe={position:"absolute",pointerEvents:"none",...Yme({orientation:l,vertical:{bottom:$?`${100-lt}%`:`${lt}%`},horizontal:{left:$?`${100-lt}%`:`${lt}%`}})};return{...Be,ref:ot,role:"presentation","aria-hidden":!0,"data-disabled":Na(h),"data-invalid":Na(!cn),"data-highlighted":Na(De),style:{...Be.style,...Qe}}},[h,$,n,t,l,Z]),bt=C.exports.useCallback((Be={},ot=null)=>({...Be,ref:ot,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:K,isDragging:ne},actions:Pe,getRootProps:Ie,getTrackProps:Ze,getInnerTrackProps:Zt,getThumbProps:qt,getMarkerProps:ke,getInputProps:bt}}function Yme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function qme(e,t){return t"}),[Xme,HS]=En({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),k_=Ee((e,t)=>{const n=Oi("Slider",e),r=Sn(e),{direction:i}=p1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=jme(r),l=a(),u=o({},t);return se.createElement(Kme,{value:s},se.createElement(Xme,{value:n},se.createElement(xe.div,{...l,className:Pd("chakra-slider",e.className),__css:n.container},e.children,b("input",{...u}))))});k_.defaultProps={orientation:"horizontal"};k_.displayName="Slider";var r$=Ee((e,t)=>{const{getThumbProps:n}=$S(),r=HS(),i=n(e,t);return se.createElement(xe.div,{...i,className:Pd("chakra-slider__thumb",e.className),__css:r.thumb})});r$.displayName="SliderThumb";var i$=Ee((e,t)=>{const{getTrackProps:n}=$S(),r=HS(),i=n(e,t);return se.createElement(xe.div,{...i,className:Pd("chakra-slider__track",e.className),__css:r.track})});i$.displayName="SliderTrack";var o$=Ee((e,t)=>{const{getInnerTrackProps:n}=$S(),r=HS(),i=n(e,t);return se.createElement(xe.div,{...i,className:Pd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});o$.displayName="SliderFilledTrack";var QC=Ee((e,t)=>{const{getMarkerProps:n}=$S(),r=HS(),i=n(e,t);return se.createElement(xe.div,{...i,className:Pd("chakra-slider__marker",e.className),__css:r.mark})});QC.displayName="SliderMark";var Zme=(...e)=>e.filter(Boolean).join(" "),AA=e=>e?"":void 0,E_=Ee(function(t,n){const r=Oi("Switch",t),{spacing:i="0.5rem",children:o,...a}=Sn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:g}=nz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return se.createElement(xe.label,{...h(),className:Zme("chakra-switch",t.className),__css:m},b("input",{className:"chakra-switch__input",...l({},n)}),se.createElement(xe.span,{...u(),className:"chakra-switch__track",__css:v},se.createElement(xe.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":AA(s.isChecked),"data-hover":AA(s.isHovered)})),o&&se.createElement(xe.span,{className:"chakra-switch__label",...g(),__css:S},o))});E_.displayName="Switch";var x1=(...e)=>e.filter(Boolean).join(" ");function JC(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Qme,a$,Jme,eve]=mN();function tve(e){var _;const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,g]=C.exports.useState(t!=null?t:0),[m,v]=hS({defaultValue:t!=null?t:0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&g(r)},[r]);const S=Jme(),w=C.exports.useId();return{id:`tabs-${(_=e.id)!=null?_:w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:g,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[nve,g2]=En({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function rve(e){const{focusedIndex:t,orientation:n,direction:r}=g2(),i=a$(),o=C.exports.useCallback(a=>{const s=()=>{var _;const T=i.nextEnabled(t);T&&((_=T.node)==null||_.focus())},l=()=>{var _;const T=i.prevEnabled(t);T&&((_=T.node)==null||_.focus())},u=()=>{var _;const T=i.firstEnabled();T&&((_=T.node)==null||_.focus())},h=()=>{var _;const T=i.lastEnabled();T&&((_=T.node)==null||_.focus())},g=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>g&&l(),[w]:()=>g&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:JC(e.onKeyDown,o)}}function ive(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=g2(),{index:u,register:h}=eve({disabled:t&&!n}),g=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=Xhe({...r,ref:Vn(h,e.ref),isDisabled:t,isFocusable:n,onClick:JC(e.onClick,m)}),w="button";return{...S,id:s$(a,u),role:"tab",tabIndex:g?0:-1,type:w,"aria-selected":g,"aria-controls":l$(a,u),onFocus:t?void 0:JC(e.onFocus,v)}}var[ove,ave]=En({});function sve(e){const t=g2(),{id:n,selectedIndex:r}=t,o=LS(e.children).map((a,s)=>C.exports.createElement(ove,{key:s,value:{isSelected:s===r,id:l$(n,s),tabId:s$(n,s),selectedIndex:r}},a));return{...e,children:o}}function lve(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=g2(),{isSelected:o,id:a,tabId:s}=ave(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=Uz({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 uve(){const e=g2(),t=a$(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return Ps(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const g=requestAnimationFrame(()=>{u(!0)});return()=>{g&&cancelAnimationFrame(g)}},[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 s$(e,t){return`${e}--tab-${t}`}function l$(e,t){return`${e}--tabpanel-${t}`}var[cve,m2]=En({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),u$=Ee(function(t,n){const r=Oi("Tabs",t),{children:i,className:o,...a}=Sn(t),{htmlProps:s,descendants:l,...u}=tve(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:g,...m}=s;return se.createElement(Qme,{value:l},se.createElement(nve,{value:h},se.createElement(cve,{value:r},se.createElement(xe.div,{className:x1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});u$.displayName="Tabs";var dve=Ee(function(t,n){const r=uve(),i={...t.style,...r},o=m2();return se.createElement(xe.div,{ref:n,...t,className:x1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});dve.displayName="TabIndicator";var fve=Ee(function(t,n){const r=rve({...t,ref:n}),o={display:"flex",...m2().tablist};return se.createElement(xe.div,{...r,className:x1("chakra-tabs__tablist",t.className),__css:o})});fve.displayName="TabList";var c$=Ee(function(t,n){const r=lve({...t,ref:n}),i=m2();return se.createElement(xe.div,{outline:"0",...r,className:x1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});c$.displayName="TabPanel";var d$=Ee(function(t,n){const r=sve(t),i=m2();return se.createElement(xe.div,{...r,width:"100%",ref:n,className:x1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});d$.displayName="TabPanels";var f$=Ee(function(t,n){const r=m2(),i=ive({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return se.createElement(xe.button,{...i,className:x1("chakra-tabs__tab",t.className),__css:o})});f$.displayName="Tab";var hve=(...e)=>e.filter(Boolean).join(" ");function pve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var gve=["h","minH","height","minHeight"],h$=Ee((e,t)=>{const n=uo("Textarea",e),{className:r,rows:i,...o}=Sn(e),a=z8(o),s=i?pve(n,gve):n;return se.createElement(xe.textarea,{ref:t,rows:i,...a,className:hve("chakra-textarea",r),__css:s})});h$.displayName="Textarea";function mve(e,t){const n=fr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function e7(e,...t){return vve(e)?e(...t):e}var vve=e=>typeof e=="function";function yve(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 Sve=(e,t)=>e.find(n=>n.id===t);function MA(e,t){const n=p$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function p$(e,t){for(const[n,r]of Object.entries(e))if(Sve(r,t))return n}function bve(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 xve(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 wve={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Sl=Cve(wve);function Cve(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=_ve(i,o),{position:s,id:l}=a;return r(u=>{var m,v;const g=s.includes("top")?[a,...(m=u[s])!=null?m:[]]:[...(v=u[s])!=null?v:[],a];return{...u,[s]:g}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=MA(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:g$(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(h=>({...h,requestClose:!0})),l),{...o})})},close:i=>{r(o=>{const a=p$(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(MA(Sl.getState(),i).position)}}var RA=0;function _ve(e,t={}){var i,o;RA+=1;const n=(i=t.id)!=null?i:RA,r=(o=t.position)!=null?o:"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Sl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var kve=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 se.createElement(XB,{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(QB,{children:l}),se.createElement(xe.div,{flex:"1",maxWidth:"100%"},i&&b(JB,{id:u==null?void 0:u.title,children:i}),s&&b(ZB,{id:u==null?void 0:u.description,display:"block",children:s})),o&&b(RS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function g$(e={}){const{render:t,toastComponent:n=kve}=e;return i=>typeof t=="function"?t({...i,...e}):b(n,{...i,...e})}function Eve(e,t){const n=i=>{var o;return{...t,...i,position:yve((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=g$(o);return Sl.notify(a,o)};return r.update=(i,o)=>{Sl.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,...e7(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...e7(o.error,s)}))},r.closeAll=Sl.closeAll,r.close=Sl.close,r.isActive=Sl.isActive,r}function v2(e){const{theme:t}=hN();return C.exports.useMemo(()=>Eve(t.direction,e),[e,t.direction])}var Pve={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]}}},m$=C.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=Pve,toastSpacing:h="0.5rem"}=e,[g,m]=C.exports.useState(s),v=Eue();hd(()=>{v||r==null||r()},[v]),hd(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),mve(E,g);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>bve(a),[a]);return se.createElement($l.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},se.createElement(xe.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},e7(n,{id:t,onClose:E})))});m$.displayName="ToastComponent";var Tve=e=>{const t=C.exports.useSyncExternalStore(Sl.subscribe,Sl.getState,Sl.getState),{children:n,motionVariants:r,component:i=m$,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:xve(l),children:b(Cd,{initial:!1,children:u.map(h=>b(i,{motionVariants:r,...h},h.id))})},l)});return ee(Rn,{children:[n,b(Ch,{...o,children:s})]})};function Lve(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ave(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Mve={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 Qg(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var l5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},t7=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Rve(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:h,id:g,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:_,gutter:T,offset:M,direction:I,...O}=e,{isOpen:D,onOpen:B,onClose:$}=Vz({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:j,getArrowInnerProps:ne,getArrowProps:H}=Wz({enabled:D,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:I}),K=C.exports.useId(),J=`tooltip-${g!=null?g:K}`,X=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0)},[]),le=C.exports.useRef(),me=C.exports.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=void 0)},[]),Me=C.exports.useCallback(()=>{me(),$()},[$,me]),we=Ive(X,Me),Se=C.exports.useCallback(()=>{if(!_&&!G.current){we();const ft=t7(X);G.current=ft.setTimeout(B,t)}},[we,_,B,t]),be=C.exports.useCallback(()=>{Z();const ft=t7(X);le.current=ft.setTimeout(Me,n)},[n,Me,Z]),He=C.exports.useCallback(()=>{D&&r&&be()},[r,be,D]),Je=C.exports.useCallback(()=>{D&&a&&be()},[a,be,D]),tt=C.exports.useCallback(ft=>{D&&ft.key==="Escape"&&be()},[D,be]);nh(()=>l5(X),"keydown",s?tt:void 0),nh(()=>l5(X),"scroll",()=>{D&&o&&Me()}),C.exports.useEffect(()=>{!_||(Z(),D&&$())},[_,D,$,Z]),C.exports.useEffect(()=>()=>{Z(),me()},[Z,me]),nh(()=>X.current,"pointerleave",be);const ht=C.exports.useCallback((ft={},vt=null)=>({...ft,ref:Vn(X,vt,W),onPointerEnter:Qg(ft.onPointerEnter,nt=>{nt.pointerType!=="touch"&&Se()}),onClick:Qg(ft.onClick,He),onPointerDown:Qg(ft.onPointerDown,Je),onFocus:Qg(ft.onFocus,Se),onBlur:Qg(ft.onBlur,be),"aria-describedby":D?J:void 0}),[Se,be,Je,D,J,He,W]),_t=C.exports.useCallback((ft={},vt=null)=>j({...ft,style:{...ft.style,[Gr.arrowSize.var]:S?`${S}px`:void 0,[Gr.arrowShadowColor.var]:w}},vt),[j,S,w]),gt=C.exports.useCallback((ft={},vt=null)=>{const Pe={...ft.style,position:"relative",transformOrigin:Gr.transformOrigin.varRef};return{ref:vt,...O,...ft,id:J,role:"tooltip",style:Pe}},[O,J]);return{isOpen:D,show:Se,hide:be,getTriggerProps:ht,getTooltipProps:gt,getTooltipPositionerProps:_t,getArrowProps:H,getArrowInnerProps:ne}}var yw="chakra-ui:close-tooltip";function Ive(e,t){return C.exports.useEffect(()=>{const n=l5(e);return n.addEventListener(yw,t),()=>n.removeEventListener(yw,t)},[t,e]),()=>{const n=l5(e),r=t7(e);n.dispatchEvent(new r.CustomEvent(yw))}}var Ove=xe($l.div),vi=Ee((e,t)=>{var $,W;const n=uo("Tooltip",e),r=Sn(e),i=p1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:g,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=(W=($=m!=null?m:v)!=null?$:h)!=null?W:S;if(P){n.bg=P;const j=KQ(i,"colors",P);n[Gr.arrowBg.var]=j}const _=Rve({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=se.createElement(xe.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const j=C.exports.Children.only(o);M=C.exports.cloneElement(j,_.getTriggerProps(j.props,j.ref))}const I=!!l,O=_.getTooltipProps({},t),D=I?Lve(O,["role","id"]):O,B=Ave(O,["role","id"]);return a?ee(Rn,{children:[M,b(Cd,{children:_.isOpen&&se.createElement(Ch,{...g},se.createElement(xe.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ee(Ove,{variants:Mve,initial:"exit",animate:"enter",exit:"exit",...w,...D,__css:n,children:[a,I&&se.createElement(xe.span,{srOnly:!0,...B},l),u&&se.createElement(xe.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},se.createElement(xe.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):b(Rn,{children:o})});vi.displayName="Tooltip";var Dve=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=b(kz,{environment:a,children:t});return b(Fae,{theme:o,cssVarsRoot:s,children:ee(mD,{colorModeManager:n,options:o.config,children:[i?b(ahe,{}):b(ohe,{}),b(Hae,{}),r?b(Gz,{zIndex:r,children:l}):l]})})};function Nve({children:e,theme:t=Aae,toastOptions:n,...r}){return ee(Dve,{theme:t,...r,children:[e,b(Tve,{...n})]})}function _s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:P_(e)?2:T_(e)?3:0}function B0(e,t){return w1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bve(e,t){return w1(e)===2?e.get(t):e[t]}function v$(e,t,n){var r=w1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function y$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function P_(e){return Vve&&e instanceof Map}function T_(e){return Uve&&e instanceof Set}function Mf(e){return e.o||e.t}function L_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=b$(e);delete t[rr];for(var n=z0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=zve),Object.freeze(e),t&&ph(e,function(n,r){return A_(r,!0)},!0)),e}function zve(){_s(2)}function M_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Al(e){var t=o7[e];return t||_s(18,e),t}function Fve(e,t){o7[e]||(o7[e]=t)}function n7(){return Vv}function Sw(e,t){t&&(Al("Patches"),e.u=[],e.s=[],e.v=t)}function u5(e){r7(e),e.p.forEach($ve),e.p=null}function r7(e){e===Vv&&(Vv=e.l)}function IA(e){return Vv={p:[],l:Vv,h:e,m:!0,_:0}}function $ve(e){var t=e[rr];t.i===0||t.i===1?t.j():t.O=!0}function bw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Al("ES5").S(t,e,r),r?(n[rr].P&&(u5(t),_s(4)),Lu(e)&&(e=c5(t,e),t.l||d5(t,e)),t.u&&Al("Patches").M(n[rr].t,e,t.u,t.s)):e=c5(t,n,[]),u5(t),t.u&&t.v(t.u,t.s),e!==S$?e:void 0}function c5(e,t,n){if(M_(t))return t;var r=t[rr];if(!r)return ph(t,function(o,a){return OA(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return d5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=L_(r.k):r.o;ph(r.i===3?new Set(i):i,function(o,a){return OA(e,r,i,o,a,n)}),d5(e,i,!1),n&&e.u&&Al("Patches").R(r,n,e.u,e.s)}return r.o}function OA(e,t,n,r,i,o){if(md(i)){var a=c5(e,i,o&&t&&t.i!==3&&!B0(t.D,r)?o.concat(r):void 0);if(v$(n,r,a),!md(a))return;e.m=!1}if(Lu(i)&&!M_(i)){if(!e.h.F&&e._<1)return;c5(e,i),t&&t.A.l||d5(e,i)}}function d5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&A_(t,n)}function xw(e,t){var n=e[rr];return(n?Mf(n):e)[t]}function DA(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 Wc(e){e.P||(e.P=!0,e.l&&Wc(e.l))}function ww(e){e.o||(e.o=L_(e.t))}function i7(e,t,n){var r=P_(t)?Al("MapSet").N(t,n):T_(t)?Al("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:n7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Uv;a&&(l=[s],u=vm);var h=Proxy.revocable(l,u),g=h.revoke,m=h.proxy;return s.k=m,s.j=g,m}(t,n):Al("ES5").J(t,n);return(n?n.A:n7()).p.push(r),r}function Hve(e){return md(e)||_s(22,e),function t(n){if(!Lu(n))return n;var r,i=n[rr],o=w1(n);if(i){if(!i.P&&(i.i<4||!Al("ES5").K(i)))return i.t;i.I=!0,r=NA(n,o),i.I=!1}else r=NA(n,o);return ph(r,function(a,s){i&&Bve(i.t,a)===s||v$(r,a,t(s))}),o===3?new Set(r):r}(e)}function NA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return L_(e)}function Wve(){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[rr];return Uv.get(l,o)},set:function(l){var u=this[rr];Uv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][rr];if(!s.P)switch(s.i){case 5:r(s)&&Wc(s);break;case 4:n(s)&&Wc(s)}}}function n(o){for(var a=o.t,s=o.k,l=z0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==rr){var g=a[h];if(g===void 0&&!B0(a,h))return!0;var m=s[h],v=m&&m[rr];if(v?v.t!==g:!y$(m,g))return!0}}var S=!!a[rr];return l.length!==z0(a).length+(S?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;l1?P-1:0),T=1;T1?h-1:0),m=1;m=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=Al("Patches").$;return md(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),va=new jve,x$=va.produce;va.produceWithPatches.bind(va);va.setAutoFreeze.bind(va);va.setUseProxies.bind(va);va.applyPatches.bind(va);va.createDraft.bind(va);va.finishDraft.bind(va);function $A(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 HA(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hi(1));return n(I_)(e,t)}if(typeof e!="function")throw new Error(Hi(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(Hi(3));return o}function g(w){if(typeof w!="function")throw new Error(Hi(4));if(l)throw new Error(Hi(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error(Hi(6));E=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!Yve(w))throw new Error(Hi(7));if(typeof w.type>"u")throw new Error(Hi(8));if(l)throw new Error(Hi(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error(Hi(12));if(typeof n(void 0,{type:f5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hi(13))})}function w$(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hi(14));g[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?g:l}}function h5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return p5}function i(s,l){r(s)===p5&&(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 Qve=function(t,n){return t===n};function Jve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?D2e:O2e;P$.useSyncExternalStore=o1.useSyncExternalStore!==void 0?o1.useSyncExternalStore:N2e;(function(e){e.exports=P$})(E$);var T$={exports:{}},L$={};/** * @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 VS=C.exports,B2e=E$.exports;function z2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var F2e=typeof Object.is=="function"?Object.is:z2e,$2e=B2e.useSyncExternalStore,H2e=VS.useRef,W2e=VS.useEffect,V2e=VS.useMemo,U2e=VS.useDebugValue;L$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=H2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=V2e(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return g=S}return g=v}if(S=g,F2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,g=w)}var u=!1,h,g,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=$2e(e,o[0],o[1]);return W2e(function(){a.hasValue=!0,a.value=s},[s]),U2e(s),s};(function(e){e.exports=L$})(T$);function G2e(e){e()}let A$=G2e;const j2e=e=>A$=e,Y2e=()=>A$,vd=C.exports.createContext(null);function M$(){return C.exports.useContext(vd)}const q2e=()=>{throw new Error("uSES not initialized!")};let R$=q2e;const K2e=e=>{R$=e},X2e=(e,t)=>e===t;function Z2e(e=vd){const t=e===vd?M$:()=>C.exports.useContext(e);return function(r,i=X2e){const{store:o,subscription:a,getServerState:s}=t(),l=R$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const Q2e=Z2e();var J2e={exports:{}},Dn={};/** * @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 D_=Symbol.for("react.element"),N_=Symbol.for("react.portal"),US=Symbol.for("react.fragment"),GS=Symbol.for("react.strict_mode"),jS=Symbol.for("react.profiler"),YS=Symbol.for("react.provider"),qS=Symbol.for("react.context"),eye=Symbol.for("react.server_context"),KS=Symbol.for("react.forward_ref"),XS=Symbol.for("react.suspense"),ZS=Symbol.for("react.suspense_list"),QS=Symbol.for("react.memo"),JS=Symbol.for("react.lazy"),tye=Symbol.for("react.offscreen"),I$;I$=Symbol.for("react.module.reference");function Xa(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case D_:switch(e=e.type,e){case US:case jS:case GS:case XS:case ZS:return e;default:switch(e=e&&e.$$typeof,e){case eye:case qS:case KS:case JS:case QS:case YS:return e;default:return t}}case N_:return t}}}Dn.ContextConsumer=qS;Dn.ContextProvider=YS;Dn.Element=D_;Dn.ForwardRef=KS;Dn.Fragment=US;Dn.Lazy=JS;Dn.Memo=QS;Dn.Portal=N_;Dn.Profiler=jS;Dn.StrictMode=GS;Dn.Suspense=XS;Dn.SuspenseList=ZS;Dn.isAsyncMode=function(){return!1};Dn.isConcurrentMode=function(){return!1};Dn.isContextConsumer=function(e){return Xa(e)===qS};Dn.isContextProvider=function(e){return Xa(e)===YS};Dn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===D_};Dn.isForwardRef=function(e){return Xa(e)===KS};Dn.isFragment=function(e){return Xa(e)===US};Dn.isLazy=function(e){return Xa(e)===JS};Dn.isMemo=function(e){return Xa(e)===QS};Dn.isPortal=function(e){return Xa(e)===N_};Dn.isProfiler=function(e){return Xa(e)===jS};Dn.isStrictMode=function(e){return Xa(e)===GS};Dn.isSuspense=function(e){return Xa(e)===XS};Dn.isSuspenseList=function(e){return Xa(e)===ZS};Dn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===US||e===jS||e===GS||e===XS||e===ZS||e===tye||typeof e=="object"&&e!==null&&(e.$$typeof===JS||e.$$typeof===QS||e.$$typeof===YS||e.$$typeof===qS||e.$$typeof===KS||e.$$typeof===I$||e.getModuleId!==void 0)};Dn.typeOf=Xa;(function(e){e.exports=Dn})(J2e);function nye(){const e=Y2e();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 qA={notify(){},get:()=>[]};function rye(e,t){let n,r=qA;function i(g){return l(),r.subscribe(g)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=nye())}function u(){n&&(n(),n=void 0,r.clear(),r=qA)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const iye=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oye=iye?C.exports.useLayoutEffect:C.exports.useEffect;function aye({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=rye(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return oye(()=>{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||vd).Provider,{value:i,children:n})}function O$(e=vd){const t=e===vd?M$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const sye=O$();function lye(e=vd){const t=e===vd?sye:O$(e);return function(){return t().dispatch}}const uye=lye();K2e(T$.exports.useSyncExternalStoreWithSelector);j2e(Fl.exports.unstable_batchedUpdates);var B_="persist:",D$="persist/FLUSH",z_="persist/REHYDRATE",N$="persist/PAUSE",B$="persist/PERSIST",z$="persist/PURGE",F$="persist/REGISTER",cye=-1;function J3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J3=function(n){return typeof n}:J3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},J3(e)}function KA(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 dye(e){for(var t=1;t{Object.keys(O).forEach(function(D){!T(D)||h[D]!==O[D]&&m.indexOf(D)===-1&&m.push(D)}),Object.keys(h).forEach(function(D){O[D]===void 0&&T(D)&&m.indexOf(D)===-1&&h[D]!==void 0&&m.push(D)}),v===null&&(v=setInterval(P,i)),h=O},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var O=m.shift(),D=r.reduce(function(B,$){return $.in(B,O,h)},h[O]);if(D!==void 0)try{g[O]=l(D)}catch(B){console.error("redux-persist/createPersistoid: error serializing state",B)}else delete g[O];m.length===0&&_()}function _(){Object.keys(g).forEach(function(O){h[O]===void 0&&delete g[O]}),S=s.setItem(a,l(g)).catch(M)}function T(O){return!(n&&n.indexOf(O)===-1&&O!=="_persist"||t&&t.indexOf(O)!==-1)}function M(O){u&&u(O)}var I=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:I}}function gye(e){return JSON.stringify(e)}function mye(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:B_).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=vye,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,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function vye(e){return JSON.parse(e)}function yye(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:B_).concat(e.key);return t.removeItem(n,Sye)}function Sye(e){}function XA(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 du(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function wye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Cye=5e3;function _ye(e,t){var n=e.version!==void 0?e.version:cye;e.debug;var r=e.stateReconciler===void 0?hye:e.stateReconciler,i=e.getStoredState||mye,o=e.timeout!==void 0?e.timeout:Cye,a=null,s=!1,l=!0,u=function(g){return g._persist.rehydrated&&a&&!l&&a.update(g),g};return function(h,g){var m=h||{},v=m._persist,S=xye(m,["_persist"]),w=S;if(g.type===B$){var E=!1,P=function(B,$){E||(g.rehydrate(e.key,B,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=pye(e)),v)return du({},t(w,g),{_persist:v});if(typeof g.rehydrate!="function"||typeof g.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 g.register(e.key),i(e).then(function(D){var B=e.migrate||function($,W){return Promise.resolve($)};B(D,n).then(function($){P($)},function($){P(void 0,$)})},function(D){P(void 0,D)}),du({},t(w,g),{_persist:{version:n,rehydrated:!1}})}else{if(g.type===z$)return s=!0,g.result(yye(e)),du({},t(w,g),{_persist:v});if(g.type===D$)return g.result(a&&a.flush()),du({},t(w,g),{_persist:v});if(g.type===N$)l=!0;else if(g.type===z_){if(s)return du({},w,{_persist:du({},v,{rehydrated:!0})});if(g.key===e.key){var _=t(w,g),T=g.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=du({},M,{_persist:du({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,g);var O=t(w,g);return O===w?h:u(du({},O,{_persist:v}))}}function ZA(e){return Pye(e)||Eye(e)||kye()}function kye(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Eye(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Pye(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:$$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case F$:return s7({},t,{registry:[].concat(ZA(t.registry),[n.key])});case z_:var r=t.registry.indexOf(n.key),i=ZA(t.registry);return i.splice(r,1),s7({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function Aye(e,t,n){var r=n||!1,i=I_(Lye,$$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:F$,key:u})},a=function(u,h,g){var m={type:z_,payload:h,err:g,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=s7({},i,{purge:function(){var u=[];return e.dispatch({type:z$,result:function(g){u.push(g)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:D$,result:function(g){u.push(g)}}),Promise.all(u)},pause:function(){e.dispatch({type:N$})},persist:function(){e.dispatch({type:B$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var F_={},$_={};$_.__esModule=!0;$_.default=Iye;function e4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e4=function(n){return typeof n}:e4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e4(e)}function Pw(){}var Mye={getItem:Pw,setItem:Pw,removeItem:Pw};function Rye(e){if((typeof self>"u"?"undefined":e4(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 Iye(e){var t="".concat(e,"Storage");return Rye(t)?self[t]:Mye}F_.__esModule=!0;F_.default=Nye;var Oye=Dye($_);function Dye(e){return e&&e.__esModule?e:{default:e}}function Nye(e){var t=(0,Oye.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 H$=void 0,Bye=zye(F_);function zye(e){return e&&e.__esModule?e:{default:e}}var Fye=(0,Bye.default)("local");H$=Fye;var W$={},V$={},gh={};Object.defineProperty(gh,"__esModule",{value:!0});gh.PLACEHOLDER_UNDEFINED=gh.PACKAGE_NAME=void 0;gh.PACKAGE_NAME="redux-deep-persist";gh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var H_={};(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={}))})(H_);(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=gh,n=H_,r=function(H){return typeof H=="object"&&H!==null};e.isObjectLike=r;const i=function(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(H){return(0,e.isLength)(H&&H.length)&&Object.prototype.toString.call(H)==="[object Array]"};const o=function(H){return!!H&&typeof H=="object"&&!(0,e.isArray)(H)};e.isPlainObject=o;const a=function(H){return String(~~H)===H&&Number(H)>=0};e.isIntegerString=a;const s=function(H){return Object.prototype.toString.call(H)==="[object String]"};e.isString=s;const l=function(H){return Object.prototype.toString.call(H)==="[object Date]"};e.isDate=l;const u=function(H){return Object.keys(H).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,g=function(H,K,te){te||(te=new Set([H])),K||(K="");for(const J in H){const X=K?`${K}.${J}`:J,G=H[J];if((0,e.isObjectLike)(G))return te.has(G)?`${K}.${J}:`:(te.add(G),(0,e.getCircularPath)(G,X,te))}return null};e.getCircularPath=g;const m=function(H){if(!(0,e.isObjectLike)(H))return H;if((0,e.isDate)(H))return new Date(+H);const K=(0,e.isArray)(H)?[]:{};for(const te in H){const J=H[te];K[te]=(0,e._cloneDeep)(J)}return K};e._cloneDeep=m;const v=function(H){const K=(0,e.getCircularPath)(H);if(K)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${K}' of object you're trying to persist: ${H}`);return(0,e._cloneDeep)(H)};e.cloneDeep=v;const S=function(H,K){if(H===K)return{};if(!(0,e.isObjectLike)(H)||!(0,e.isObjectLike)(K))return K;const te=(0,e.cloneDeep)(H),J=(0,e.cloneDeep)(K),X=Object.keys(te).reduce((Z,le)=>(h.call(J,le)||(Z[le]=void 0),Z),{});if((0,e.isDate)(te)||(0,e.isDate)(J))return te.valueOf()===J.valueOf()?{}:J;const G=Object.keys(J).reduce((Z,le)=>{if(!h.call(te,le))return Z[le]=J[le],Z;const me=(0,e.difference)(te[le],J[le]);return(0,e.isObjectLike)(me)&&(0,e.isEmpty)(me)&&!(0,e.isDate)(me)?(0,e.isArray)(te)&&!(0,e.isArray)(J)||!(0,e.isArray)(te)&&(0,e.isArray)(J)?J:Z:(Z[le]=me,Z)},X);return delete G._persist,G};e.difference=S;const w=function(H,K){return K.reduce((te,J)=>{if(te){const X=parseInt(J,10),G=(0,e.isIntegerString)(J)&&X<0?te.length+X:J;return(0,e.isString)(te)?te.charAt(G):te[G]}},H)};e.path=w;const E=function(H,K){return[...H].reverse().reduce((X,G,Z)=>{const le=(0,e.isIntegerString)(G)?[]:{};return le[G]=Z===0?K:X,le},{})};e.assocPath=E;const P=function(H,K){const te=(0,e.cloneDeep)(H);return K.reduce((J,X,G)=>(G===K.length-1&&J&&(0,e.isObjectLike)(J)&&delete J[X],J&&J[X]),te),te};e.dissocPath=P;const _=function(H,K,...te){if(!te||!te.length)return K;const J=te.shift(),{preservePlaceholder:X,preserveUndefined:G}=H;if((0,e.isObjectLike)(K)&&(0,e.isObjectLike)(J))for(const Z in J)if((0,e.isObjectLike)(J[Z])&&(0,e.isObjectLike)(K[Z]))K[Z]||(K[Z]={}),_(H,K[Z],J[Z]);else if((0,e.isArray)(K)){let le=J[Z];const me=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(le=typeof le<"u"?le:K[parseInt(Z,10)]),le=le!==t.PLACEHOLDER_UNDEFINED?le:me,K[parseInt(Z,10)]=le}else{const le=J[Z]!==t.PLACEHOLDER_UNDEFINED?J[Z]:void 0;K[Z]=le}return _(H,K,...te)},T=function(H,K,te){return _({preservePlaceholder:te==null?void 0:te.preservePlaceholder,preserveUndefined:te==null?void 0:te.preserveUndefined},(0,e.cloneDeep)(H),(0,e.cloneDeep)(K))};e.mergeDeep=T;const M=function(H,K=[],te,J,X){if(!(0,e.isObjectLike)(H))return H;for(const G in H){const Z=H[G],le=(0,e.isArray)(H),me=J?J+"."+G:G;Z===null&&(te===n.ConfigType.WHITELIST&&K.indexOf(me)===-1||te===n.ConfigType.BLACKLIST&&K.indexOf(me)!==-1)&&le&&(H[parseInt(G,10)]=void 0),Z===void 0&&X&&te===n.ConfigType.BLACKLIST&&K.indexOf(me)===-1&&le&&(H[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,K,te,me,X)}},I=function(H,K,te,J){const X=(0,e.cloneDeep)(H);return M(X,K,te,"",J),X};e.preserveUndefined=I;const O=function(H,K,te){return te.indexOf(H)===K};e.unique=O;const D=function(H){return H.reduce((K,te)=>{const J=H.filter(Me=>Me===te),X=H.filter(Me=>(te+".").indexOf(Me+".")===0),{duplicates:G,subsets:Z}=K,le=J.length>1&&G.indexOf(te)===-1,me=X.length>1;return{duplicates:[...G,...le?J:[]],subsets:[...Z,...me?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=D;const B=function(H,K,te){const J=te===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${J} configuration.`,G=`Check your create${te===n.ConfigType.WHITELIST?"White":"Black"}list arguments. `;if(!(0,e.isString)(K)||K.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!H||!H.length)return;const{duplicates:Z,subsets:le}=(0,e.findDuplicatesAndSubsets)(H);if(Z.length>1)throw new Error(`${X} Duplicated paths. ${JSON.stringify(Z)} ${G}`);if(le.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. ${JSON.stringify(le)} ${G}`)};e.singleTransformValidator=B;const $=function(H){if(!(0,e.isArray)(H))return;const K=(H==null?void 0:H.map(te=>te.deepPersistKey).filter(te=>te))||[];if(K.length){const te=K.filter((J,X)=>K.indexOf(J)!==X);if(te.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(te)}`)}};e.transformsValidator=$;const W=function({whitelist:H,blacklist:K}){if(H&&H.length&&K&&K.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(H){const{duplicates:te,subsets:J}=(0,e.findDuplicatesAndSubsets)(H);(0,e.throwError)({duplicates:te,subsets:J},"whitelist")}if(K){const{duplicates:te,subsets:J}=(0,e.findDuplicatesAndSubsets)(K);(0,e.throwError)({duplicates:te,subsets:J},"blacklist")}};e.configValidator=W;const j=function({duplicates:H,subsets:K},te){if(H.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${te}. ${JSON.stringify(H)}`);if(K.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${te}. You must decide if you want to persist an entire path or its specific subset. ${JSON.stringify(K)}`)};e.throwError=j;const ne=function(H){return(0,e.isArray)(H)?H.filter(e.unique).reduce((K,te)=>{const J=te.split("."),X=J[0],G=J.slice(1).join(".")||void 0,Z=K.filter(me=>Object.keys(me)[0]===X)[0],le=Z?Object.values(Z)[0]:void 0;return Z||K.push({[X]:G?[G]:void 0}),Z&&!le&&G&&(Z[X]=[G]),Z&&le&&G&&le.push(G),K},[]):[]};e.getRootKeysGroup=ne})(V$);(function(e){var t=ws&&ws.__rest||function(g,m){var v={};for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&m.indexOf(S)<0&&(v[S]=g[S]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(g);w!E(_)&&g?g(P,_,T):P,out:(P,_,T)=>!E(_)&&m?m(P,_,T):P,deepPersistKey:S&&S[0]}},a=(g,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||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)(P);const _=(0,n.cloneDeep)(v);let T=g;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(g,M,{preserveUndefined:!0}),S&&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(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(_[I])){_[I]=(0,n.mergeDeep)(_[I],T[I]);return}_[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),_};e.autoMergeDeep=a;const s=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(P,w),T=(0,n.isArray)(_)?[]:{};S=(0,n.mergeDeep)(S||T,_,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[g]}));e.createWhitelist=s;const l=(g,m)=>((0,n.singleTransformValidator)(m,g,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[g]}));e.createBlacklist=l;const u=function(g,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return g===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=g=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=g,_=t(g,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(P(void 0,{type:""})),O=T.map(ne=>Object.keys(ne)[0]),D=M.map(ne=>Object.keys(ne)[0]),B=I.filter(ne=>O.indexOf(ne)===-1&&D.indexOf(ne)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?B.map(ne=>(0,e.createBlacklist)(ne)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...$,...W,...j,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(W$);const t4=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),$ye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return W_(r)?r:!1},W_=e=>Boolean(typeof e=="string"?$ye(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)})),m5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),Hye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var ni={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * 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,h="__lodash_placeholder__",g=1,m=2,v=4,S=1,w=2,E=1,P=2,_=4,T=8,M=16,I=32,O=64,D=128,B=256,$=512,W=30,j="...",ne=800,H=16,K=1,te=2,J=3,X=1/0,G=9007199254740991,Z=17976931348623157e292,le=0/0,me=4294967295,Me=me-1,we=me>>>1,Se=[["ary",D],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",O],["rearg",B]],be="[object Arguments]",He="[object Array]",Je="[object AsyncFunction]",tt="[object Boolean]",ht="[object Date]",_t="[object DOMException]",gt="[object Error]",ft="[object Function]",vt="[object GeneratorFunction]",Pe="[object Map]",nt="[object Number]",At="[object Null]",Xe="[object Object]",mt="[object Promise]",ln="[object Proxy]",kt="[object RegExp]",Gt="[object Set]",un="[object String]",bn="[object Symbol]",Ie="[object Undefined]",Ze="[object WeakMap]",Zt="[object WeakSet]",qt="[object ArrayBuffer]",ke="[object DataView]",bt="[object Float32Array]",Ht="[object Float64Array]",Be="[object Int8Array]",ot="[object Int16Array]",cn="[object Int32Array]",De="[object Uint8Array]",lt="[object Uint8ClampedArray]",Qe="[object Uint16Array]",Dt="[object Uint32Array]",on=/\b__p \+= '';/g,vr=/\b(__p \+=) '' \+/g,or=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zr=/&(?:amp|lt|gt|quot|#39);/g,zo=/[&<>"']/g,A1=RegExp(zr.source),wa=RegExp(zo.source),Oh=/<%-([\s\S]+?)%>/g,M1=/<%([\s\S]+?)%>/g,Wu=/<%=([\s\S]+?)%>/g,Dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nh=/^\w*$/,Fo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dd=/[\\^$.*+?()[\]{}|]/g,R1=RegExp(Dd.source),Vu=/^\s+/,Nd=/\s/,I1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ns=/\{\n\/\* \[wrapped with (.+)\] \*/,Uu=/,? & /,O1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,D1=/[()=,{}\[\]\/\s]/,N1=/\\(\\)?/g,B1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qa=/\w*$/,z1=/^[-+]0x[0-9a-f]+$/i,F1=/^0b[01]+$/i,$1=/^\[object .+?Constructor\]$/,H1=/^0o[0-7]+$/i,W1=/^(?:0|[1-9]\d*)$/,V1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bs=/($^)/,U1=/['\n\r\u2028\u2029\\]/g,Ja="\\ud800-\\udfff",Vl="\\u0300-\\u036f",Ul="\\ufe20-\\ufe2f",zs="\\u20d0-\\u20ff",Gl=Vl+Ul+zs,Bh="\\u2700-\\u27bf",Gu="a-z\\xdf-\\xf6\\xf8-\\xff",Fs="\\xac\\xb1\\xd7\\xf7",$o="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ln="\\u2000-\\u206f",xn=" \\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",Ho="A-Z\\xc0-\\xd6\\xd8-\\xde",Pr="\\ufe0e\\ufe0f",qr=Fs+$o+Ln+xn,Wo="['\u2019]",$s="["+Ja+"]",Kr="["+qr+"]",es="["+Gl+"]",Bd="\\d+",jl="["+Bh+"]",ts="["+Gu+"]",zd="[^"+Ja+qr+Bd+Bh+Gu+Ho+"]",Si="\\ud83c[\\udffb-\\udfff]",zh="(?:"+es+"|"+Si+")",Fh="[^"+Ja+"]",Fd="(?:\\ud83c[\\udde6-\\uddff]){2}",Hs="[\\ud800-\\udbff][\\udc00-\\udfff]",co="["+Ho+"]",Ws="\\u200d",Yl="(?:"+ts+"|"+zd+")",G1="(?:"+co+"|"+zd+")",ju="(?:"+Wo+"(?:d|ll|m|re|s|t|ve))?",Yu="(?:"+Wo+"(?:D|LL|M|RE|S|T|VE))?",$d=zh+"?",qu="["+Pr+"]?",Ca="(?:"+Ws+"(?:"+[Fh,Fd,Hs].join("|")+")"+qu+$d+")*",Hd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ql="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wt=qu+$d+Ca,$h="(?:"+[jl,Fd,Hs].join("|")+")"+Wt,Ku="(?:"+[Fh+es+"?",es,Fd,Hs,$s].join("|")+")",Xu=RegExp(Wo,"g"),Hh=RegExp(es,"g"),Vo=RegExp(Si+"(?="+Si+")|"+Ku+Wt,"g"),Gn=RegExp([co+"?"+ts+"+"+ju+"(?="+[Kr,co,"$"].join("|")+")",G1+"+"+Yu+"(?="+[Kr,co+Yl,"$"].join("|")+")",co+"?"+Yl+"+"+ju,co+"+"+Yu,ql,Hd,Bd,$h].join("|"),"g"),Wd=RegExp("["+Ws+Ja+Gl+Pr+"]"),Wh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vd=["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"],Vh=-1,dn={};dn[bt]=dn[Ht]=dn[Be]=dn[ot]=dn[cn]=dn[De]=dn[lt]=dn[Qe]=dn[Dt]=!0,dn[be]=dn[He]=dn[qt]=dn[tt]=dn[ke]=dn[ht]=dn[gt]=dn[ft]=dn[Pe]=dn[nt]=dn[Xe]=dn[kt]=dn[Gt]=dn[un]=dn[Ze]=!1;var Vt={};Vt[be]=Vt[He]=Vt[qt]=Vt[ke]=Vt[tt]=Vt[ht]=Vt[bt]=Vt[Ht]=Vt[Be]=Vt[ot]=Vt[cn]=Vt[Pe]=Vt[nt]=Vt[Xe]=Vt[kt]=Vt[Gt]=Vt[un]=Vt[bn]=Vt[De]=Vt[lt]=Vt[Qe]=Vt[Dt]=!0,Vt[gt]=Vt[ft]=Vt[Ze]=!1;var Uh={\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"},j1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},re={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,Ye=parseInt,Bt=typeof ws=="object"&&ws&&ws.Object===Object&&ws,pn=typeof self=="object"&&self&&self.Object===Object&&self,yt=Bt||pn||Function("return this")(),Lt=t&&!t.nodeType&&t,Ut=Lt&&!0&&e&&!e.nodeType&&e,Fr=Ut&&Ut.exports===Lt,yr=Fr&&Bt.process,gn=function(){try{var ie=Ut&&Ut.require&&Ut.require("util").types;return ie||yr&&yr.binding&&yr.binding("util")}catch(ye){}}(),Xr=gn&&gn.isArrayBuffer,fo=gn&&gn.isDate,ji=gn&&gn.isMap,_a=gn&&gn.isRegExp,Vs=gn&&gn.isSet,Y1=gn&&gn.isTypedArray;function bi(ie,ye,ge){switch(ge.length){case 0:return ie.call(ye);case 1:return ie.call(ye,ge[0]);case 2:return ie.call(ye,ge[0],ge[1]);case 3:return ie.call(ye,ge[0],ge[1],ge[2])}return ie.apply(ye,ge)}function q1(ie,ye,ge,Ge){for(var Pt=-1,Qt=ie==null?0:ie.length;++Pt-1}function Gh(ie,ye,ge){for(var Ge=-1,Pt=ie==null?0:ie.length;++Ge-1;);return ge}function ns(ie,ye){for(var ge=ie.length;ge--&&Ju(ye,ie[ge],0)>-1;);return ge}function X1(ie,ye){for(var ge=ie.length,Ge=0;ge--;)ie[ge]===ye&&++Ge;return Ge}var L2=Yd(Uh),rs=Yd(j1);function Gs(ie){return"\\"+re[ie]}function Yh(ie,ye){return ie==null?n:ie[ye]}function Xl(ie){return Wd.test(ie)}function qh(ie){return Wh.test(ie)}function A2(ie){for(var ye,ge=[];!(ye=ie.next()).done;)ge.push(ye.value);return ge}function Kh(ie){var ye=-1,ge=Array(ie.size);return ie.forEach(function(Ge,Pt){ge[++ye]=[Pt,Ge]}),ge}function Xh(ie,ye){return function(ge){return ie(ye(ge))}}function jo(ie,ye){for(var ge=-1,Ge=ie.length,Pt=0,Qt=[];++ge-1}function K2(c,p){var x=this.__data__,A=Lr(x,c);return A<0?(++this.size,x.push([c,p])):x[A][1]=p,this}Yo.prototype.clear=Y2,Yo.prototype.delete=q2,Yo.prototype.get=dg,Yo.prototype.has=fg,Yo.prototype.set=K2;function qo(c){var p=-1,x=c==null?0:c.length;for(this.clear();++p=p?c:p)),c}function ui(c,p,x,A,N,F){var Y,Q=p&g,ce=p&m,Ce=p&v;if(x&&(Y=N?x(c,A,N,F):x(c)),Y!==n)return Y;if(!ur(c))return c;var _e=Ot(c);if(_e){if(Y=RU(c),!Q)return Ei(c,Y)}else{var Ae=fi(c),Ue=Ae==ft||Ae==vt;if(Pc(c))return nl(c,Q);if(Ae==Xe||Ae==be||Ue&&!N){if(Y=ce||Ue?{}:Hk(c),!Q)return ce?Ag(c,vc(Y,c)):So(c,Ke(Y,c))}else{if(!Vt[Ae])return N?c:{};Y=IU(c,Ae,Q)}}F||(F=new br);var dt=F.get(c);if(dt)return dt;F.set(c,Y),mE(c)?c.forEach(function(wt){Y.add(ui(wt,p,x,wt,c,F))}):pE(c)&&c.forEach(function(wt,Yt){Y.set(Yt,ui(wt,p,x,Yt,c,F))});var xt=Ce?ce?pe:Jo:ce?xo:hi,$t=_e?n:xt(c);return jn($t||c,function(wt,Yt){$t&&(Yt=wt,wt=c[Yt]),qs(Y,Yt,ui(wt,p,x,Yt,c,F))}),Y}function ip(c){var p=hi(c);return function(x){return op(x,c,p)}}function op(c,p,x){var A=x.length;if(c==null)return!A;for(c=fn(c);A--;){var N=x[A],F=p[N],Y=c[N];if(Y===n&&!(N in c)||!F(Y))return!1}return!0}function mg(c,p,x){if(typeof c!="function")throw new xi(a);return Dg(function(){c.apply(n,x)},p)}function yc(c,p,x,A){var N=-1,F=Di,Y=!0,Q=c.length,ce=[],Ce=p.length;if(!Q)return ce;x&&(p=Hn(p,Tr(x))),A?(F=Gh,Y=!1):p.length>=i&&(F=tc,Y=!1,p=new Ta(p));e:for(;++NN?0:N+x),A=A===n||A>N?N:Nt(A),A<0&&(A+=N),A=x>A?0:yE(A);x0&&x(Q)?p>1?Ar(Q,p-1,x,A,N):ka(N,Q):A||(N[N.length]=Q)}return N}var sp=rl(),mo=rl(!0);function Qo(c,p){return c&&sp(c,p,hi)}function vo(c,p){return c&&mo(c,p,hi)}function lp(c,p){return po(p,function(x){return ou(c[x])})}function Ks(c,p){p=tl(p,c);for(var x=0,A=p.length;c!=null&&xp}function cp(c,p){return c!=null&&tn.call(c,p)}function dp(c,p){return c!=null&&p in fn(c)}function fp(c,p,x){return c>=Qr(p,x)&&c=120&&_e.length>=120)?new Ta(Y&&_e):n}_e=c[0];var Ae=-1,Ue=Q[0];e:for(;++Ae-1;)Q!==c&&tf.call(Q,ce,1),tf.call(c,ce,1);return c}function df(c,p){for(var x=c?p.length:0,A=x-1;x--;){var N=p[x];if(x==A||N!==F){var F=N;iu(N)?tf.call(c,N,1):wp(c,N)}}return c}function ff(c,p){return c+Ql(og()*(p-c+1))}function Js(c,p,x,A){for(var N=-1,F=Sr(of((p-c)/(x||1)),0),Y=ge(F);F--;)Y[A?F:++N]=c,c+=x;return Y}function _c(c,p){var x="";if(!c||p<1||p>G)return x;do p%2&&(x+=c),p=Ql(p/2),p&&(c+=c);while(p);return x}function Et(c,p){return Fb(Uk(c,p,wo),c+"")}function vp(c){return mc(Lp(c))}function hf(c,p){var x=Lp(c);return ry(x,eu(p,0,x.length))}function nu(c,p,x,A){if(!ur(c))return c;p=tl(p,c);for(var N=-1,F=p.length,Y=F-1,Q=c;Q!=null&&++NN?0:N+p),x=x>N?N:x,x<0&&(x+=N),N=p>x?0:x-p>>>0,p>>>=0;for(var F=ge(N);++A>>1,Y=c[F];Y!==null&&!ea(Y)&&(x?Y<=p:Y=i){var Ce=p?null:V(c);if(Ce)return Zd(Ce);Y=!1,N=tc,ce=new Ta}else ce=p?[]:Q;e:for(;++A=A?c:Rr(c,p,x)}var Eg=D2||function(c){return yt.clearTimeout(c)};function nl(c,p){if(p)return c.slice();var x=c.length,A=ac?ac(x):new c.constructor(x);return c.copy(A),A}function Pg(c){var p=new c.constructor(c.byteLength);return new wi(p).set(new wi(c)),p}function ru(c,p){var x=p?Pg(c.buffer):c.buffer;return new c.constructor(x,c.byteOffset,c.byteLength)}function J2(c){var p=new c.constructor(c.source,Qa.exec(c));return p.lastIndex=c.lastIndex,p}function Yn(c){return sf?fn(sf.call(c)):{}}function ey(c,p){var x=p?Pg(c.buffer):c.buffer;return new c.constructor(x,c.byteOffset,c.length)}function Tg(c,p){if(c!==p){var x=c!==n,A=c===null,N=c===c,F=ea(c),Y=p!==n,Q=p===null,ce=p===p,Ce=ea(p);if(!Q&&!Ce&&!F&&c>p||F&&Y&&ce&&!Q&&!Ce||A&&Y&&ce||!x&&ce||!N)return 1;if(!A&&!F&&!Ce&&c=Q)return ce;var Ce=x[A];return ce*(Ce=="desc"?-1:1)}}return c.index-p.index}function ty(c,p,x,A){for(var N=-1,F=c.length,Y=x.length,Q=-1,ce=p.length,Ce=Sr(F-Y,0),_e=ge(ce+Ce),Ae=!A;++Q1?x[N-1]:n,Y=N>2?x[2]:n;for(F=c.length>3&&typeof F=="function"?(N--,F):n,Y&&Qi(x[0],x[1],Y)&&(F=N<3?n:F,N=1),p=fn(p);++A-1?N[F?p[Y]:Y]:n}}function Rg(c){return nr(function(p){var x=p.length,A=x,N=qi.prototype.thru;for(c&&p.reverse();A--;){var F=p[A];if(typeof F!="function")throw new xi(a);if(N&&!Y&&ve(F)=="wrapper")var Y=new qi([],!0)}for(A=Y?A:x;++A1&&Jt.reverse(),_e&&ceQ))return!1;var Ce=F.get(c),_e=F.get(p);if(Ce&&_e)return Ce==p&&_e==c;var Ae=-1,Ue=!0,dt=x&w?new Ta:n;for(F.set(c,p),F.set(p,c);++Ae1?"& ":"")+p[A],p=p.join(x>2?", ":" "),c.replace(I1,`{ /* [wrapped with `+p+`] */ `)}function DU(c){return Ot(c)||xf(c)||!!(rg&&c&&c[rg])}function iu(c,p){var x=typeof c;return p=p==null?G:p,!!p&&(x=="number"||x!="symbol"&&W1.test(c))&&c>-1&&c%1==0&&c0){if(++p>=ne)return arguments[0]}else p=0;return c.apply(n,arguments)}}function ry(c,p){var x=-1,A=c.length,N=A-1;for(p=p===n?A:p;++x1?c[p-1]:n;return x=typeof x=="function"?(c.pop(),x):n,nE(c,x)});function rE(c){var p=z(c);return p.__chain__=!0,p}function jG(c,p){return p(c),c}function iy(c,p){return p(c)}var YG=nr(function(c){var p=c.length,x=p?c[0]:0,A=this.__wrapped__,N=function(F){return rp(F,c)};return p>1||this.__actions__.length||!(A instanceof jt)||!iu(x)?this.thru(N):(A=A.slice(x,+x+(p?1:0)),A.__actions__.push({func:iy,args:[N],thisArg:n}),new qi(A,this.__chain__).thru(function(F){return p&&!F.length&&F.push(n),F}))});function qG(){return rE(this)}function KG(){return new qi(this.value(),this.__chain__)}function XG(){this.__values__===n&&(this.__values__=vE(this.value()));var c=this.__index__>=this.__values__.length,p=c?n:this.__values__[this.__index__++];return{done:c,value:p}}function ZG(){return this}function QG(c){for(var p,x=this;x instanceof lf;){var A=Xk(x);A.__index__=0,A.__values__=n,p?N.__wrapped__=A:p=A;var N=A;x=x.__wrapped__}return N.__wrapped__=c,p}function JG(){var c=this.__wrapped__;if(c instanceof jt){var p=c;return this.__actions__.length&&(p=new jt(this)),p=p.reverse(),p.__actions__.push({func:iy,args:[$b],thisArg:n}),new qi(p,this.__chain__)}return this.thru($b)}function ej(){return el(this.__wrapped__,this.__actions__)}var tj=_p(function(c,p,x){tn.call(c,x)?++c[x]:Ko(c,x,1)});function nj(c,p,x){var A=Ot(c)?$n:vg;return x&&Qi(c,p,x)&&(p=n),A(c,Te(p,3))}function rj(c,p){var x=Ot(c)?po:Zo;return x(c,Te(p,3))}var ij=Mg(Zk),oj=Mg(Qk);function aj(c,p){return Ar(oy(c,p),1)}function sj(c,p){return Ar(oy(c,p),X)}function lj(c,p,x){return x=x===n?1:Nt(x),Ar(oy(c,p),x)}function iE(c,p){var x=Ot(c)?jn:as;return x(c,Te(p,3))}function oE(c,p){var x=Ot(c)?ho:ap;return x(c,Te(p,3))}var uj=_p(function(c,p,x){tn.call(c,x)?c[x].push(p):Ko(c,x,[p])});function cj(c,p,x,A){c=bo(c)?c:Lp(c),x=x&&!A?Nt(x):0;var N=c.length;return x<0&&(x=Sr(N+x,0)),cy(c)?x<=N&&c.indexOf(p,x)>-1:!!N&&Ju(c,p,x)>-1}var dj=Et(function(c,p,x){var A=-1,N=typeof p=="function",F=bo(c)?ge(c.length):[];return as(c,function(Y){F[++A]=N?bi(p,Y,x):ss(Y,p,x)}),F}),fj=_p(function(c,p,x){Ko(c,x,p)});function oy(c,p){var x=Ot(c)?Hn:wr;return x(c,Te(p,3))}function hj(c,p,x,A){return c==null?[]:(Ot(p)||(p=p==null?[]:[p]),x=A?n:x,Ot(x)||(x=x==null?[]:[x]),_i(c,p,x))}var pj=_p(function(c,p,x){c[x?0:1].push(p)},function(){return[[],[]]});function gj(c,p,x){var A=Ot(c)?Ud:jh,N=arguments.length<3;return A(c,Te(p,4),x,N,as)}function mj(c,p,x){var A=Ot(c)?k2:jh,N=arguments.length<3;return A(c,Te(p,4),x,N,ap)}function vj(c,p){var x=Ot(c)?po:Zo;return x(c,ly(Te(p,3)))}function yj(c){var p=Ot(c)?mc:vp;return p(c)}function Sj(c,p,x){(x?Qi(c,p,x):p===n)?p=1:p=Nt(p);var A=Ot(c)?li:hf;return A(c,p)}function bj(c){var p=Ot(c)?Mb:di;return p(c)}function xj(c){if(c==null)return 0;if(bo(c))return cy(c)?Ea(c):c.length;var p=fi(c);return p==Pe||p==Gt?c.size:Mr(c).length}function wj(c,p,x){var A=Ot(c)?Zu:yo;return x&&Qi(c,p,x)&&(p=n),A(c,Te(p,3))}var Cj=Et(function(c,p){if(c==null)return[];var x=p.length;return x>1&&Qi(c,p[0],p[1])?p=[]:x>2&&Qi(p[0],p[1],p[2])&&(p=[p[0]]),_i(c,Ar(p,1),[])}),ay=N2||function(){return yt.Date.now()};function _j(c,p){if(typeof p!="function")throw new xi(a);return c=Nt(c),function(){if(--c<1)return p.apply(this,arguments)}}function aE(c,p,x){return p=x?n:p,p=c&&p==null?c.length:p,fe(c,D,n,n,n,n,p)}function sE(c,p){var x;if(typeof p!="function")throw new xi(a);return c=Nt(c),function(){return--c>0&&(x=p.apply(this,arguments)),c<=1&&(p=n),x}}var Wb=Et(function(c,p,x){var A=E;if(x.length){var N=jo(x,Ve(Wb));A|=I}return fe(c,A,p,x,N)}),lE=Et(function(c,p,x){var A=E|P;if(x.length){var N=jo(x,Ve(lE));A|=I}return fe(p,A,c,x,N)});function uE(c,p,x){p=x?n:p;var A=fe(c,T,n,n,n,n,n,p);return A.placeholder=uE.placeholder,A}function cE(c,p,x){p=x?n:p;var A=fe(c,M,n,n,n,n,n,p);return A.placeholder=cE.placeholder,A}function dE(c,p,x){var A,N,F,Y,Q,ce,Ce=0,_e=!1,Ae=!1,Ue=!0;if(typeof c!="function")throw new xi(a);p=Ma(p)||0,ur(x)&&(_e=!!x.leading,Ae="maxWait"in x,F=Ae?Sr(Ma(x.maxWait)||0,p):F,Ue="trailing"in x?!!x.trailing:Ue);function dt(Or){var fs=A,su=N;return A=N=n,Ce=Or,Y=c.apply(su,fs),Y}function xt(Or){return Ce=Or,Q=Dg(Yt,p),_e?dt(Or):Y}function $t(Or){var fs=Or-ce,su=Or-Ce,AE=p-fs;return Ae?Qr(AE,F-su):AE}function wt(Or){var fs=Or-ce,su=Or-Ce;return ce===n||fs>=p||fs<0||Ae&&su>=F}function Yt(){var Or=ay();if(wt(Or))return Jt(Or);Q=Dg(Yt,$t(Or))}function Jt(Or){return Q=n,Ue&&A?dt(Or):(A=N=n,Y)}function ta(){Q!==n&&Eg(Q),Ce=0,A=ce=N=Q=n}function Ji(){return Q===n?Y:Jt(ay())}function na(){var Or=ay(),fs=wt(Or);if(A=arguments,N=this,ce=Or,fs){if(Q===n)return xt(ce);if(Ae)return Eg(Q),Q=Dg(Yt,p),dt(ce)}return Q===n&&(Q=Dg(Yt,p)),Y}return na.cancel=ta,na.flush=Ji,na}var kj=Et(function(c,p){return mg(c,1,p)}),Ej=Et(function(c,p,x){return mg(c,Ma(p)||0,x)});function Pj(c){return fe(c,$)}function sy(c,p){if(typeof c!="function"||p!=null&&typeof p!="function")throw new xi(a);var x=function(){var A=arguments,N=p?p.apply(this,A):A[0],F=x.cache;if(F.has(N))return F.get(N);var Y=c.apply(this,A);return x.cache=F.set(N,Y)||F,Y};return x.cache=new(sy.Cache||qo),x}sy.Cache=qo;function ly(c){if(typeof c!="function")throw new xi(a);return function(){var p=arguments;switch(p.length){case 0:return!c.call(this);case 1:return!c.call(this,p[0]);case 2:return!c.call(this,p[0],p[1]);case 3:return!c.call(this,p[0],p[1],p[2])}return!c.apply(this,p)}}function Tj(c){return sE(2,c)}var Lj=Ob(function(c,p){p=p.length==1&&Ot(p[0])?Hn(p[0],Tr(Te())):Hn(Ar(p,1),Tr(Te()));var x=p.length;return Et(function(A){for(var N=-1,F=Qr(A.length,x);++N=p}),xf=pp(function(){return arguments}())?pp:function(c){return Cr(c)&&tn.call(c,"callee")&&!ng.call(c,"callee")},Ot=ge.isArray,Uj=Xr?Tr(Xr):Sg;function bo(c){return c!=null&&uy(c.length)&&!ou(c)}function Ir(c){return Cr(c)&&bo(c)}function Gj(c){return c===!0||c===!1||Cr(c)&&ci(c)==tt}var Pc=B2||ex,jj=fo?Tr(fo):bg;function Yj(c){return Cr(c)&&c.nodeType===1&&!Ng(c)}function qj(c){if(c==null)return!0;if(bo(c)&&(Ot(c)||typeof c=="string"||typeof c.splice=="function"||Pc(c)||Tp(c)||xf(c)))return!c.length;var p=fi(c);if(p==Pe||p==Gt)return!c.size;if(Og(c))return!Mr(c).length;for(var x in c)if(tn.call(c,x))return!1;return!0}function Kj(c,p){return bc(c,p)}function Xj(c,p,x){x=typeof x=="function"?x:n;var A=x?x(c,p):n;return A===n?bc(c,p,n,x):!!A}function Ub(c){if(!Cr(c))return!1;var p=ci(c);return p==gt||p==_t||typeof c.message=="string"&&typeof c.name=="string"&&!Ng(c)}function Zj(c){return typeof c=="number"&&Jh(c)}function ou(c){if(!ur(c))return!1;var p=ci(c);return p==ft||p==vt||p==Je||p==ln}function hE(c){return typeof c=="number"&&c==Nt(c)}function uy(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function ur(c){var p=typeof c;return c!=null&&(p=="object"||p=="function")}function Cr(c){return c!=null&&typeof c=="object"}var pE=ji?Tr(ji):Ib;function Qj(c,p){return c===p||xc(c,p,Tt(p))}function Jj(c,p,x){return x=typeof x=="function"?x:n,xc(c,p,Tt(p),x)}function eY(c){return gE(c)&&c!=+c}function tY(c){if(zU(c))throw new Pt(o);return gp(c)}function nY(c){return c===null}function rY(c){return c==null}function gE(c){return typeof c=="number"||Cr(c)&&ci(c)==nt}function Ng(c){if(!Cr(c)||ci(c)!=Xe)return!1;var p=sc(c);if(p===null)return!0;var x=tn.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&ar.call(x)==si}var Gb=_a?Tr(_a):sr;function iY(c){return hE(c)&&c>=-G&&c<=G}var mE=Vs?Tr(Vs):zt;function cy(c){return typeof c=="string"||!Ot(c)&&Cr(c)&&ci(c)==un}function ea(c){return typeof c=="symbol"||Cr(c)&&ci(c)==bn}var Tp=Y1?Tr(Y1):$r;function oY(c){return c===n}function aY(c){return Cr(c)&&fi(c)==Ze}function sY(c){return Cr(c)&&ci(c)==Zt}var lY=k(Xs),uY=k(function(c,p){return c<=p});function vE(c){if(!c)return[];if(bo(c))return cy(c)?Ni(c):Ei(c);if(lc&&c[lc])return A2(c[lc]());var p=fi(c),x=p==Pe?Kh:p==Gt?Zd:Lp;return x(c)}function au(c){if(!c)return c===0?c:0;if(c=Ma(c),c===X||c===-X){var p=c<0?-1:1;return p*Z}return c===c?c:0}function Nt(c){var p=au(c),x=p%1;return p===p?x?p-x:p:0}function yE(c){return c?eu(Nt(c),0,me):0}function Ma(c){if(typeof c=="number")return c;if(ea(c))return le;if(ur(c)){var p=typeof c.valueOf=="function"?c.valueOf():c;c=ur(p)?p+"":p}if(typeof c!="string")return c===0?c:+c;c=Yi(c);var x=F1.test(c);return x||H1.test(c)?Ye(c.slice(2),x?2:8):z1.test(c)?le:+c}function SE(c){return La(c,xo(c))}function cY(c){return c?eu(Nt(c),-G,G):c===0?c:0}function Cn(c){return c==null?"":Xi(c)}var dY=Zi(function(c,p){if(Og(p)||bo(p)){La(p,hi(p),c);return}for(var x in p)tn.call(p,x)&&qs(c,x,p[x])}),bE=Zi(function(c,p){La(p,xo(p),c)}),dy=Zi(function(c,p,x,A){La(p,xo(p),c,A)}),fY=Zi(function(c,p,x,A){La(p,hi(p),c,A)}),hY=nr(rp);function pY(c,p){var x=Jl(c);return p==null?x:Ke(x,p)}var gY=Et(function(c,p){c=fn(c);var x=-1,A=p.length,N=A>2?p[2]:n;for(N&&Qi(p[0],p[1],N)&&(A=1);++x1),F}),La(c,pe(c),x),A&&(x=ui(x,g|m|v,Mt));for(var N=p.length;N--;)wp(x,p[N]);return x});function IY(c,p){return wE(c,ly(Te(p)))}var OY=nr(function(c,p){return c==null?{}:Cg(c,p)});function wE(c,p){if(c==null)return{};var x=Hn(pe(c),function(A){return[A]});return p=Te(p),mp(c,x,function(A,N){return p(A,N[0])})}function DY(c,p,x){p=tl(p,c);var A=-1,N=p.length;for(N||(N=1,c=n);++Ap){var A=c;c=p,p=A}if(x||c%1||p%1){var N=og();return Qr(c+N*(p-c+he("1e-"+((N+"").length-1))),p)}return ff(c,p)}var jY=il(function(c,p,x){return p=p.toLowerCase(),c+(x?kE(p):p)});function kE(c){return qb(Cn(c).toLowerCase())}function EE(c){return c=Cn(c),c&&c.replace(V1,L2).replace(Hh,"")}function YY(c,p,x){c=Cn(c),p=Xi(p);var A=c.length;x=x===n?A:eu(Nt(x),0,A);var N=x;return x-=p.length,x>=0&&c.slice(x,N)==p}function qY(c){return c=Cn(c),c&&wa.test(c)?c.replace(zo,rs):c}function KY(c){return c=Cn(c),c&&R1.test(c)?c.replace(Dd,"\\$&"):c}var XY=il(function(c,p,x){return c+(x?"-":"")+p.toLowerCase()}),ZY=il(function(c,p,x){return c+(x?" ":"")+p.toLowerCase()}),QY=Ep("toLowerCase");function JY(c,p,x){c=Cn(c),p=Nt(p);var A=p?Ea(c):0;if(!p||A>=p)return c;var N=(p-A)/2;return d(Ql(N),x)+c+d(of(N),x)}function eq(c,p,x){c=Cn(c),p=Nt(p);var A=p?Ea(c):0;return p&&A>>0,x?(c=Cn(c),c&&(typeof p=="string"||p!=null&&!Gb(p))&&(p=Xi(p),!p&&Xl(c))?us(Ni(c),0,x):c.split(p,x)):[]}var sq=il(function(c,p,x){return c+(x?" ":"")+qb(p)});function lq(c,p,x){return c=Cn(c),x=x==null?0:eu(Nt(x),0,c.length),p=Xi(p),c.slice(x,x+p.length)==p}function uq(c,p,x){var A=z.templateSettings;x&&Qi(c,p,x)&&(p=n),c=Cn(c),p=dy({},p,A,Ne);var N=dy({},p.imports,A.imports,Ne),F=hi(N),Y=Xd(N,F),Q,ce,Ce=0,_e=p.interpolate||Bs,Ae="__p += '",Ue=Jd((p.escape||Bs).source+"|"+_e.source+"|"+(_e===Wu?B1:Bs).source+"|"+(p.evaluate||Bs).source+"|$","g"),dt="//# sourceURL="+(tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Vh+"]")+` `;c.replace(Ue,function(wt,Yt,Jt,ta,Ji,na){return Jt||(Jt=ta),Ae+=c.slice(Ce,na).replace(U1,Gs),Yt&&(Q=!0,Ae+=`' + __e(`+Yt+`) + '`),Ji&&(ce=!0,Ae+=`'; `+Ji+`; __p += '`),Jt&&(Ae+=`' + ((__t = (`+Jt+`)) == null ? '' : __t) + '`),Ce=na+wt.length,wt}),Ae+=`'; `;var xt=tn.call(p,"variable")&&p.variable;if(!xt)Ae=`with (obj) { `+Ae+` } `;else if(D1.test(xt))throw new Pt(s);Ae=(ce?Ae.replace(on,""):Ae).replace(vr,"$1").replace(or,"$1;"),Ae="function("+(xt||"obj")+`) { `+(xt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Q?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Ae+`return __p }`;var $t=TE(function(){return Qt(F,dt+"return "+Ae).apply(n,Y)});if($t.source=Ae,Ub($t))throw $t;return $t}function cq(c){return Cn(c).toLowerCase()}function dq(c){return Cn(c).toUpperCase()}function fq(c,p,x){if(c=Cn(c),c&&(x||p===n))return Yi(c);if(!c||!(p=Xi(p)))return c;var A=Ni(c),N=Ni(p),F=Go(A,N),Y=ns(A,N)+1;return us(A,F,Y).join("")}function hq(c,p,x){if(c=Cn(c),c&&(x||p===n))return c.slice(0,Q1(c)+1);if(!c||!(p=Xi(p)))return c;var A=Ni(c),N=ns(A,Ni(p))+1;return us(A,0,N).join("")}function pq(c,p,x){if(c=Cn(c),c&&(x||p===n))return c.replace(Vu,"");if(!c||!(p=Xi(p)))return c;var A=Ni(c),N=Go(A,Ni(p));return us(A,N).join("")}function gq(c,p){var x=W,A=j;if(ur(p)){var N="separator"in p?p.separator:N;x="length"in p?Nt(p.length):x,A="omission"in p?Xi(p.omission):A}c=Cn(c);var F=c.length;if(Xl(c)){var Y=Ni(c);F=Y.length}if(x>=F)return c;var Q=x-Ea(A);if(Q<1)return A;var ce=Y?us(Y,0,Q).join(""):c.slice(0,Q);if(N===n)return ce+A;if(Y&&(Q+=ce.length-Q),Gb(N)){if(c.slice(Q).search(N)){var Ce,_e=ce;for(N.global||(N=Jd(N.source,Cn(Qa.exec(N))+"g")),N.lastIndex=0;Ce=N.exec(_e);)var Ae=Ce.index;ce=ce.slice(0,Ae===n?Q:Ae)}}else if(c.indexOf(Xi(N),Q)!=Q){var Ue=ce.lastIndexOf(N);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+A}function mq(c){return c=Cn(c),c&&A1.test(c)?c.replace(zr,I2):c}var vq=il(function(c,p,x){return c+(x?" ":"")+p.toUpperCase()}),qb=Ep("toUpperCase");function PE(c,p,x){return c=Cn(c),p=x?n:p,p===n?qh(c)?Qd(c):K1(c):c.match(p)||[]}var TE=Et(function(c,p){try{return bi(c,n,p)}catch(x){return Ub(x)?x:new Pt(x)}}),yq=nr(function(c,p){return jn(p,function(x){x=ol(x),Ko(c,x,Wb(c[x],c))}),c});function Sq(c){var p=c==null?0:c.length,x=Te();return c=p?Hn(c,function(A){if(typeof A[1]!="function")throw new xi(a);return[x(A[0]),A[1]]}):[],Et(function(A){for(var N=-1;++NG)return[];var x=me,A=Qr(c,me);p=Te(p),c-=me;for(var N=Kd(A,p);++x0||p<0)?new jt(x):(c<0?x=x.takeRight(-c):c&&(x=x.drop(c)),p!==n&&(p=Nt(p),x=p<0?x.dropRight(-p):x.take(p-c)),x)},jt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},jt.prototype.toArray=function(){return this.take(me)},Qo(jt.prototype,function(c,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),A=/^(?:head|last)$/.test(p),N=z[A?"take"+(p=="last"?"Right":""):p],F=A||/^find/.test(p);!N||(z.prototype[p]=function(){var Y=this.__wrapped__,Q=A?[1]:arguments,ce=Y instanceof jt,Ce=Q[0],_e=ce||Ot(Y),Ae=function(Yt){var Jt=N.apply(z,ka([Yt],Q));return A&&Ue?Jt[0]:Jt};_e&&x&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,xt=F&&!Ue,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new jt(this);var wt=c.apply(Y,Q);return wt.__actions__.push({func:iy,args:[Ae],thisArg:n}),new qi(wt,Ue)}return xt&&$t?c.apply(this,Q):(wt=this.thru(Ae),xt?A?wt.value()[0]:wt.value():wt)})}),jn(["pop","push","shift","sort","splice","unshift"],function(c){var p=rc[c],x=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);z.prototype[c]=function(){var N=arguments;if(A&&!this.__chain__){var F=this.value();return p.apply(Ot(F)?F:[],N)}return this[x](function(Y){return p.apply(Ot(Y)?Y:[],N)})}}),Qo(jt.prototype,function(c,p){var x=z[p];if(x){var A=x.name+"";tn.call(is,A)||(is[A]=[]),is[A].push({name:p,func:x})}}),is[yf(n,P).name]=[{name:"wrapper",func:n}],jt.prototype.clone=Bi,jt.prototype.reverse=Ci,jt.prototype.value=W2,z.prototype.at=YG,z.prototype.chain=qG,z.prototype.commit=KG,z.prototype.next=XG,z.prototype.plant=QG,z.prototype.reverse=JG,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=ej,z.prototype.first=z.prototype.head,lc&&(z.prototype[lc]=ZG),z},Pa=go();Ut?((Ut.exports=Pa)._=Pa,Lt._=Pa):yt._=Pa}).call(ws)})(ni,ni.exports);const We=ni.exports;var Wye=Object.create,U$=Object.defineProperty,Vye=Object.getOwnPropertyDescriptor,Uye=Object.getOwnPropertyNames,Gye=Object.getPrototypeOf,jye=Object.prototype.hasOwnProperty,ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uye(t))!jye.call(e,i)&&i!==n&&U$(e,i,{get:()=>t[i],enumerable:!(r=Vye(t,i))||r.enumerable});return e},G$=(e,t,n)=>(n=e!=null?Wye(Gye(e)):{},Yye(t||!e||!e.__esModule?U$(n,"default",{value:e,enumerable:!0}):n,e)),qye=ze((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),j$=ze((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),eb=ze((e,t)=>{var n=j$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),Kye=ze((e,t)=>{var n=eb(),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}),Xye=ze((e,t)=>{var n=eb();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),Zye=ze((e,t)=>{var n=eb();function r(i){return n(this.__data__,i)>-1}t.exports=r}),Qye=ze((e,t)=>{var n=eb();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}),tb=ze((e,t)=>{var n=qye(),r=Kye(),i=Xye(),o=Zye(),a=Qye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tb();function r(){this.__data__=new n,this.size=0}t.exports=r}),e3e=ze((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),t3e=ze((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),n3e=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Y$=ze((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Nu=ze((e,t)=>{var n=Y$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),V_=ze((e,t)=>{var n=Nu(),r=n.Symbol;t.exports=r}),r3e=ze((e,t)=>{var n=V_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var g=!0}catch(v){}var m=o.call(l);return g&&(u?l[a]=h:delete l[a]),m}t.exports=s}),i3e=ze((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),nb=ze((e,t)=>{var n=V_(),r=r3e(),i=i3e(),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}),q$=ze((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),K$=ze((e,t)=>{var n=nb(),r=q$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),o3e=ze((e,t)=>{var n=Nu(),r=n["__core-js_shared__"];t.exports=r}),a3e=ze((e,t)=>{var n=o3e(),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}),X$=ze((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}),s3e=ze((e,t)=>{var n=K$(),r=a3e(),i=q$(),o=X$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,g=u.hasOwnProperty,m=RegExp("^"+h.call(g).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),l3e=ze((e,t)=>{function n(r,i){return r==null?void 0:r[i]}t.exports=n}),C1=ze((e,t)=>{var n=s3e(),r=l3e();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),U_=ze((e,t)=>{var n=C1(),r=Nu(),i=n(r,"Map");t.exports=i}),rb=ze((e,t)=>{var n=C1(),r=n(Object,"create");t.exports=r}),u3e=ze((e,t)=>{var n=rb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),c3e=ze((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),d3e=ze((e,t)=>{var n=rb(),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}),f3e=ze((e,t)=>{var n=rb(),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}),h3e=ze((e,t)=>{var n=rb(),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}),p3e=ze((e,t)=>{var n=u3e(),r=c3e(),i=d3e(),o=f3e(),a=h3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=p3e(),r=tb(),i=U_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),m3e=ze((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}),ib=ze((e,t)=>{var n=m3e();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),v3e=ze((e,t)=>{var n=ib();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),y3e=ze((e,t)=>{var n=ib();function r(i){return n(this,i).get(i)}t.exports=r}),S3e=ze((e,t)=>{var n=ib();function r(i){return n(this,i).has(i)}t.exports=r}),b3e=ze((e,t)=>{var n=ib();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}),Z$=ze((e,t)=>{var n=g3e(),r=v3e(),i=y3e(),o=S3e(),a=b3e();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=tb(),r=U_(),i=Z$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=tb(),r=Jye(),i=e3e(),o=t3e(),a=n3e(),s=x3e();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),C3e=ze((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),_3e=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),k3e=ze((e,t)=>{var n=Z$(),r=C3e(),i=_3e();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),Q$=ze((e,t)=>{var n=k3e(),r=E3e(),i=P3e(),o=1,a=2;function s(l,u,h,g,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),_=v.get(u);if(P&&_)return P==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Nu(),r=n.Uint8Array;t.exports=r}),L3e=ze((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}),A3e=ze((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),M3e=ze((e,t)=>{var n=V_(),r=T3e(),i=j$(),o=Q$(),a=L3e(),s=A3e(),l=1,u=2,h="[object Boolean]",g="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,O=I?I.valueOf:void 0;function D(B,$,W,j,ne,H,K){switch(W){case M:if(B.byteLength!=$.byteLength||B.byteOffset!=$.byteOffset)return!1;B=B.buffer,$=$.buffer;case T:return!(B.byteLength!=$.byteLength||!H(new r(B),new r($)));case h:case g:case S:return i(+B,+$);case m:return B.name==$.name&&B.message==$.message;case w:case P:return B==$+"";case v:var te=a;case E:var J=j&l;if(te||(te=s),B.size!=$.size&&!J)return!1;var X=K.get(B);if(X)return X==$;j|=u,K.set(B,$);var G=o(te(B),te($),j,ne,H,K);return K.delete(B),G;case _:if(O)return O.call(B)==O.call($)}return!1}t.exports=D}),R3e=ze((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),I3e=ze((e,t)=>{var n=R3e(),r=G_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),O3e=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),N3e=ze((e,t)=>{var n=O3e(),r=D3e(),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}),B3e=ze((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),z3e=ze((e,t)=>{var n=nb(),r=ob(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),F3e=ze((e,t)=>{var n=z3e(),r=ob(),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}),$3e=ze((e,t)=>{function n(){return!1}t.exports=n}),J$=ze((e,t)=>{var n=Nu(),r=$3e(),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}),H3e=ze((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{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),W3e=ze((e,t)=>{var n=nb(),r=eH(),i=ob(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",g="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",O="[object Int8Array]",D="[object Int16Array]",B="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",j="[object Uint16Array]",ne="[object Uint32Array]",H={};H[M]=H[I]=H[O]=H[D]=H[B]=H[$]=H[W]=H[j]=H[ne]=!0,H[o]=H[a]=H[_]=H[s]=H[T]=H[l]=H[u]=H[h]=H[g]=H[m]=H[v]=H[S]=H[w]=H[E]=H[P]=!1;function K(te){return i(te)&&r(te.length)&&!!H[n(te)]}t.exports=K}),V3e=ze((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),U3e=ze((e,t)=>{var n=Y$(),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}),tH=ze((e,t)=>{var n=W3e(),r=V3e(),i=U3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),G3e=ze((e,t)=>{var n=B3e(),r=F3e(),i=G_(),o=J$(),a=H3e(),s=tH(),l=Object.prototype,u=l.hasOwnProperty;function h(g,m){var v=i(g),S=!v&&r(g),w=!v&&!S&&o(g),E=!v&&!S&&!w&&s(g),P=v||S||w||E,_=P?n(g.length,String):[],T=_.length;for(var M in g)(m||u.call(g,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),j3e=ze((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}),Y3e=ze((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),q3e=ze((e,t)=>{var n=Y3e(),r=n(Object.keys,Object);t.exports=r}),K3e=ze((e,t)=>{var n=j3e(),r=q3e(),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}),X3e=ze((e,t)=>{var n=K$(),r=eH();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),Z3e=ze((e,t)=>{var n=G3e(),r=K3e(),i=X3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),Q3e=ze((e,t)=>{var n=I3e(),r=N3e(),i=Z3e();function o(a){return n(a,i,r)}t.exports=o}),J3e=ze((e,t)=>{var n=Q3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,g,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var _=w;_--;){var T=S[_];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var O=!0;m.set(s,l),m.set(l,s);for(var D=v;++_{var n=C1(),r=Nu(),i=n(r,"DataView");t.exports=i}),t4e=ze((e,t)=>{var n=C1(),r=Nu(),i=n(r,"Promise");t.exports=i}),n4e=ze((e,t)=>{var n=C1(),r=Nu(),i=n(r,"Set");t.exports=i}),r4e=ze((e,t)=>{var n=C1(),r=Nu(),i=n(r,"WeakMap");t.exports=i}),i4e=ze((e,t)=>{var n=e4e(),r=U_(),i=t4e(),o=n4e(),a=r4e(),s=nb(),l=X$(),u="[object Map]",h="[object Object]",g="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),_=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=g||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var O=s(I),D=O==h?I.constructor:void 0,B=D?l(D):"";if(B)switch(B){case w:return S;case E:return u;case P:return g;case _:return m;case T:return v}return O}),t.exports=M}),o4e=ze((e,t)=>{var n=w3e(),r=Q$(),i=M3e(),o=J3e(),a=i4e(),s=G_(),l=J$(),u=tH(),h=1,g="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,_,T,M,I,O){var D=s(P),B=s(_),$=D?m:a(P),W=B?m:a(_);$=$==g?v:$,W=W==g?v:W;var j=$==v,ne=W==v,H=$==W;if(H&&l(P)){if(!l(_))return!1;D=!0,j=!1}if(H&&!j)return O||(O=new n),D||u(P)?r(P,_,T,M,I,O):i(P,_,$,T,M,I,O);if(!(T&h)){var K=j&&w.call(P,"__wrapped__"),te=ne&&w.call(_,"__wrapped__");if(K||te){var J=K?P.value():P,X=te?_.value():_;return O||(O=new n),I(J,X,T,M,O)}}return H?(O||(O=new n),o(P,_,T,M,I,O)):!1}t.exports=E}),a4e=ze((e,t)=>{var n=o4e(),r=ob();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}),nH=ze((e,t)=>{var n=a4e();function r(i,o){return n(i,o)}t.exports=r}),s4e=["ctrl","shift","alt","meta","mod"],l4e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function Tw(e,t=","){return typeof e=="string"?e.split(t):e}function Qm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>l4e[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=>!s4e.includes(o));return{...r,keys:i}}function u4e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function c4e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function d4e(e){return rH(e,["input","textarea","select"])}function rH({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 f4e(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 '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var h4e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:g,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!g&&!h)return!1}else if(g!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},p4e=C.exports.createContext(void 0),g4e=()=>C.exports.useContext(p4e),m4e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),v4e=()=>C.exports.useContext(m4e),y4e=G$(nH());function S4e(e){let t=C.exports.useRef(void 0);return(0,y4e.default)(t.current,e)||(t.current=e),t.current}var JA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function st(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.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=C.exports.useCallback(t,[...s]),u=S4e(a),{enabledScopes:h}=v4e(),g=g4e();return C.exports.useLayoutEffect(()=>{if((u==null?void 0:u.enabled)===!1||!f4e(h,u==null?void 0:u.scopes))return;let m=w=>{var E;if(!(d4e(w)&&!rH(w,u==null?void 0:u.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){JA(w);return}((E=w.target)==null?void 0:E.isContentEditable)&&!(u!=null&&u.enableOnContentEditable)||Tw(e,u==null?void 0:u.splitKey).forEach(P=>{var T;let _=Qm(P,u==null?void 0:u.combinationKey);if(h4e(w,_,o)||((T=_.keys)==null?void 0:T.includes("*"))){if(u4e(w,_,u==null?void 0:u.preventDefault),!c4e(w,_,u==null?void 0:u.enabled)){JA(w);return}l(w,_)}})}},v=w=>{o.add(w.key.toLowerCase()),((u==null?void 0:u.keydown)===void 0&&(u==null?void 0:u.keyup)!==!0||(u==null?void 0:u.keydown))&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u!=null&&u.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),g&&Tw(e,u==null?void 0:u.splitKey).forEach(w=>g.addHotkey(Qm(w,u==null?void 0:u.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),g&&Tw(e,u==null?void 0:u.splitKey).forEach(w=>g.removeHotkey(Qm(w,u==null?void 0:u.combinationKey)))}},[e,l,u,h]),i}G$(nH());var l7=new Set;function b4e(e){(Array.isArray(e)?e:[e]).forEach(t=>l7.add(Qm(t)))}function x4e(e){(Array.isArray(e)?e:[e]).forEach(t=>{var r;let n=Qm(t);for(let i of l7)(r=i.keys)!=null&&r.every(o=>{var a;return(a=n.keys)==null?void 0:a.includes(o)})&&l7.delete(i)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{b4e(e.key)}),document.addEventListener("keyup",e=>{x4e(e.key)})});function w4e(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[b("h1",{children:"Nodes"}),b("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const C4e=()=>ee("div",{className:"work-in-progress post-processing-work-in-progress",children:[b("h1",{children:"Post Processing"}),b("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer."}),b("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),b("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),_4e=at({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"})})}),k4e=at({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"})}),E4e=at({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"})}),P4e=at({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 Vi=(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))(Vi||{});const T4e={[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"}},eM=/^-?(0\.)?\.?$/,Is=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:g,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(eM)&&u!==Number(M)&&I(String(u))},[u,M]);const O=B=>{I(B),B.match(eM)||h(v?Math.floor(Number(B)):Number(B))},D=B=>{const $=We.clamp(v?Math.floor(Number(B.target.value)):Number(B.target.value),g,m);I(String($)),h($)};return b(vi,{..._,children:ee(_d,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&b(xh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ee(m_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:O,onBlur:D,width:a,...T,children:[b(v_,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ee("div",{className:"invokeai__number-input-stepper",children:[b(S_,{...P,className:"invokeai__number-input-stepper-button"}),b(y_,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},Dl=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return ee(_d,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&b(xh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),b(vi,{label:i,...o,children:b(YF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?b("option",{value:h,className:"invokeai__select-option",children:h},h):b("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},L4e=["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"],A4e=[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],M4e=[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],R4e=[{key:"2x",value:2},{key:"4x",value:4}],j_=0,Y_=4294967295,I4e=["gfpgan","codeformer"],O4e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],D4e=ut(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),N4e=ut(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),q_=()=>{const e=qe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Le(D4e),{isGFPGANAvailable:i}=Le(N4e),o=l=>e(a4(l)),a=l=>e(FV(l)),s=l=>e(s4(l.target.value));return ee(rn,{direction:"column",gap:2,children:[b(Dl,{label:"Type",validValues:I4e.concat(),value:n,onChange:s}),b(Is,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&b(Is,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})},Ms=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return b(_d,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ee(xh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,b(E_,{className:"invokeai__switch-root",...s})]})})};function iH(){const e=Le(i=>i.system.isGFPGANAvailable),t=Le(i=>i.options.shouldRunFacetool),n=qe();return b(Ms,{isDisabled:!e,isChecked:t,onChange:i=>n(aEe(i.target.checked))})}function B4e(){const e=qe(),t=Le(r=>r.options.shouldFitToWidthHeight);return b(Ms,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(qV(r.target.checked))})}var oH={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},tM=se.createContext&&se.createContext(oH),ad=globalThis&&globalThis.__assign||function(){return ad=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return b(vi,{label:n,hasArrow:!0,...i,...i!=null&&i.placement?{placement:i.placement}:{placement:"top"},children:b(Ga,{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 ca(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:g=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:O,styleClass:D,sliderFormControlProps:B,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:j,sliderThumbProps:ne,sliderNumberInputProps:H,sliderNumberInputFieldProps:K,sliderNumberInputStepperProps:te,sliderTooltipProps:J,sliderIAIIconButtonProps:X,...G}=e,[Z,le]=C.exports.useState(String(i)),me=C.exports.useMemo(()=>H!=null&&H.max?H.max:a,[a,H==null?void 0:H.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&le(String(i))},[i,Z,le]);const Me=be=>{const He=We.clamp(S?Math.floor(Number(be.target.value)):Number(be.target.value),o,me);le(String(He)),l(He)},we=be=>{le(be),l(Number(be))},Se=()=>{!T||T()};return ee(_d,{className:D?`invokeai__slider-component ${D}`:"invokeai__slider-component","data-markers":h,...B,children:[b(xh,{className:"invokeai__slider-component-label",...$,children:r}),ee(Sz,{w:"100%",gap:2,children:[ee(k_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:we,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ee(Rn,{children:[b(QC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:g,...W,children:o}),b(QC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),b(i$,{className:"invokeai__slider_track",...j,children:b(o$,{className:"invokeai__slider_track-filled"})}),b(vi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...J,children:b(r$,{className:"invokeai__slider-thumb",...ne})})]}),v&&ee(m_,{min:o,max:me,step:s,value:Z,onChange:we,onBlur:Me,className:"invokeai__slider-number-field",isDisabled:O,...H,children:[b(v_,{className:"invokeai__slider-number-input",width:w,readOnly:E,...K}),ee($F,{...te,children:[b(S_,{className:"invokeai__slider-number-stepper"}),b(y_,{className:"invokeai__slider-number-stepper"})]})]}),P&&b(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:b(K_,{}),onClick:Se,isDisabled:M,...X})]})]})}function sH(e){const{label:t="Strength",styleClass:n}=e,r=Le(s=>s.options.img2imgStrength),i=qe();return b(ca,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(z7(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(z7(.75))}})}const G4e=()=>{const e=qe(),t=Le(r=>r.options.hiresFix);return b(rn,{gap:2,direction:"column",children:b(Ms,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(HV(r.target.checked))})})},j4e=()=>{const e=qe(),t=Le(r=>r.options.seamless);return b(rn,{gap:2,direction:"column",children:b(Ms,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(jV(r.target.checked))})})},lH=()=>ee(rn,{gap:2,direction:"column",children:[b(j4e,{}),b(G4e,{})]});function Y4e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return b(Ms,{label:"Randomize Seed",isChecked:t,onChange:r=>e(iEe(r.target.checked))})}function q4e(){const e=Le(o=>o.options.seed),t=Le(o=>o.options.shouldRandomizeSeed),n=Le(o=>o.options.shouldGenerateVariations),r=qe(),i=o=>r(C2(o));return b(Is,{label:"Seed",step:1,precision:0,flexGrow:1,min:j_,max:Y_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const uH=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function K4e(){const e=qe(),t=Le(r=>r.options.shouldRandomizeSeed);return b(Ua,{size:"sm",isDisabled:t,onClick:()=>e(C2(uH(j_,Y_))),children:b("p",{children:"Shuffle"})})}function X4e(){const e=qe(),t=Le(r=>r.options.threshold);return b(Is,{label:"Noise Threshold",min:0,max:1e3,step:.1,onChange:r=>e(ZV(r)),value:t,isInteger:!1})}function Z4e(){const e=qe(),t=Le(r=>r.options.perlin);return b(Is,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(UV(r)),value:t,isInteger:!1})}const X_=()=>ee(rn,{gap:2,direction:"column",children:[b(Y4e,{}),ee(rn,{gap:2,children:[b(q4e,{}),b(K4e,{})]}),b(rn,{gap:2,children:b(X4e,{})}),b(rn,{gap:2,children:b(Z4e,{})})]}),Q4e=ut(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),J4e=ut(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),Z_=()=>{const e=qe(),{upscalingLevel:t,upscalingStrength:n}=Le(Q4e),{isESRGANAvailable:r}=Le(J4e);return ee("div",{className:"upscale-options",children:[b(Dl,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(F7(Number(a.target.value))),validValues:R4e}),b(Is,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e($7(a)),value:n,isInteger:!1})]})};function cH(){const e=Le(i=>i.system.isESRGANAvailable),t=Le(i=>i.options.shouldRunESRGAN),n=qe();return b(Ms,{isDisabled:!e,isChecked:t,onChange:i=>n(oEe(i.target.checked))})}function Q_(){const e=Le(r=>r.options.shouldGenerateVariations),t=qe();return b(Ms,{isChecked:e,width:"auto",onChange:r=>t(eEe(r.target.checked))})}function e5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ee(_d,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[b(xh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),b(U8,{...s,className:"input-entry",size:"sm",width:o})]})}function t5e(){const e=Le(i=>i.options.seedWeights),t=Le(i=>i.options.shouldGenerateVariations),n=qe(),r=i=>n(YV(i.target.value));return b(e5e,{label:"Seed Weights",value:e,isInvalid:t&&!(W_(e)||e===""),isDisabled:!t,onChange:r})}function n5e(){const e=Le(i=>i.options.variationAmount),t=Le(i=>i.options.shouldGenerateVariations),n=qe();return b(Is,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(lEe(i)),isInteger:!1})}const J_=()=>ee(rn,{gap:2,direction:"column",children:[b(n5e,{}),b(t5e,{})]});function r5e(){const e=qe(),t=Le(r=>r.options.cfgScale);return b(Is,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(zV(r)),value:t,width:tk,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Er=ut(e=>e.options,e=>Cb[e.activeTab],{memoizeOptions:{equalityCheck:We.isEqual}});ut(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:We.isEqual}});const ek=e=>e.options;function i5e(){const e=Le(i=>i.options.height),t=Le(Er),n=qe();return b(Dl,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n($V(Number(i.target.value))),validValues:M4e,styleClass:"main-option-block"})}const o5e=ut([e=>e.options],e=>{const{iterations:t}=e;return{iterations:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function a5e(){const e=qe(),{iterations:t}=Le(o5e);return b(Is,{label:"Images",step:1,min:1,max:9999,onChange:r=>e(Qke(r)),value:t,width:tk,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function s5e(){const e=Le(r=>r.options.sampler),t=qe();return b(Dl,{label:"Sampler",value:e,onChange:r=>t(GV(r.target.value)),validValues:L4e,styleClass:"main-option-block"})}function l5e(){const e=qe(),t=Le(r=>r.options.steps);return b(Is,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(XV(r)),value:t,width:tk,styleClass:"main-option-block",textAlign:"center"})}function u5e(){const e=Le(i=>i.options.width),t=Le(Er),n=qe();return b(Dl,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(QV(Number(i.target.value))),validValues:A4e,styleClass:"main-option-block"})}const tk="auto";function nk(){return b("div",{className:"main-options",children:ee("div",{className:"main-options-list",children:[ee("div",{className:"main-options-row",children:[b(a5e,{}),b(l5e,{}),b(r5e,{})]}),ee("div",{className:"main-options-row",children:[b(u5e,{}),b(i5e,{}),b(s5e,{})]})]})})}const c5e={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:"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:[]},dH=WS({name:"system",initialState:c5e,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="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},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="Processing canceled"},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="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",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:d5e,setIsProcessing:bu,addLogEntry:_o,setShouldShowLogViewer:Lw,setIsConnected:nM,setSocketId:GTe,setShouldConfirmOnDelete:fH,setOpenAccordions:f5e,setSystemStatus:h5e,setCurrentStatus:n4,setSystemConfig:p5e,setShouldDisplayGuides:g5e,processingCanceled:m5e,errorOccurred:rM,errorSeen:hH,setModelList:iM,setIsCancelable:u0,modelChangeRequested:v5e,setSaveIntermediatesInterval:y5e,setEnableImageDebugging:S5e,generationRequested:b5e,addToast:ym,clearToastQueue:x5e,setProcessingIndeterminateTask:w5e}=dH.actions,C5e=dH.reducer;function _5e(e){return ct({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 k5e(e){return ct({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 pH(e){return ct({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 E5e(e){return ct({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 P5e(e){return ct({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 T5e=ut(e=>e.system,e=>e.shouldDisplayGuides),L5e=({children:e,feature:t})=>{const n=Le(T5e),{text:r}=T4e[t];return n?ee(b_,{trigger:"hover",children:[b(C_,{children:b(wh,{children:e})}),ee(w_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[b(x_,{className:"guide-popover-arrow"}),b("div",{className:"guide-popover-guide-content",children:r})]})]}):null},A5e=Ee(({feature:e,icon:t=_5e},n)=>b(L5e,{feature:e,children:b(wh,{ref:n,children:b(xa,{marginBottom:"-.15rem",as:t})})}));function M5e(e){const{header:t,feature:n,content:r,additionalHeaderComponents:i}=e;return ee(qf,{className:"advanced-settings-item",children:[b(jf,{className:"advanced-settings-header",children:ee(rn,{width:"100%",gap:"0.5rem",align:"center",children:[b(wh,{flexGrow:1,textAlign:"left",children:t}),i,n&&b(A5e,{feature:n}),b(Yf,{})]})}),b(Kf,{className:"advanced-settings-panel",children:r})]})}const rk=e=>{const{accordionInfo:t}=e,n=Le(a=>a.system.openAccordions),r=qe();return b(ES,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(f5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{const{header:l,feature:u,content:h,additionalHeaderComponents:g}=t[s];a.push(b(M5e,{header:l,feature:u,content:h,additionalHeaderComponents:g},s))}),a})()})};function R5e(e){return ct({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 I5e(e){return ct({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 O5e(e){return ct({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 gH(e){return ct({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 mH(e){return ct({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 D5e(e){return ct({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 N5e(e){return ct({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 B5e(e){return ct({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 z5e(e){return ct({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 F5e(e){return ct({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 ik(e){return ct({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 vH(e){return ct({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 ab(e){return ct({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 $5e(e){return ct({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 yH(e){return ct({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 H5e(e){return ct({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 W5e(e){return ct({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 V5e(e){return ct({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 U5e(e){return ct({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 G5e(e){return ct({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 j5e(e){return ct({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 Y5e(e){return ct({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 q5e(e){return ct({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 K5e(e){return ct({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 X5e(e){return ct({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 Z5e(e){return ct({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 Q5e(e){return ct({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 J5e(e){return ct({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 eSe(e){return ct({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 tSe(e){return ct({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 nSe(e){return ct({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 SH(e){return ct({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 rSe(e){return ct({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 iSe(e){return ct({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 oSe(e){return ct({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 bH(e){return ct({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 aSe(e){return ct({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 sSe(e){return ct({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 oM(e){return ct({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 xH(e){return ct({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 lSe(e){return ct({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 y2(e){return ct({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 uSe(e){return ct({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 ok(e){return ct({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 cSe(e){return ct({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 ak(e){return ct({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 Td=e=>e.system,dSe=e=>e.system.toastQueue,fSe=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],hSe=[{key:"Auto",value:"auto"},{key:"Manual",value:"manual"},{key:"None",value:"none"}],sk=e=>e.kind==="line"&&e.layer==="mask",pSe=e=>e.kind==="line"&&e.layer==="base",v5=e=>e.kind==="image"&&e.layer==="base",gSe=e=>e.kind==="fillRect"&&e.layer==="base",mSe=e=>e.kind==="eraseRect"&&e.layer==="base",vSe=e=>e.kind==="line",Pn=e=>e.canvas,Za=ut([Pn,Er,Td],(e,t,n)=>e.layerState.stagingArea.images.length>0||t==="unifiedCanvas"&&n.isProcessing),wH=e=>e.canvas.layerState.objects.find(v5),CH=ut([e=>e.options,e=>e.system,wH,Er],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let g=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(g=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(g=!1,m.push("No initial image selected")),u&&(g=!1,m.push("System Busy")),h||(g=!1,m.push("System Disconnected")),o&&(!(W_(a)||a==="")||l===-1)&&(g=!1,m.push("Seed-Weights badly formatted.")),{isReady:g,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:We.isEqual,resultEqualityCheck:We.isEqual}}),u7=ii("socketio/generateImage"),ySe=ii("socketio/runESRGAN"),SSe=ii("socketio/runFacetool"),bSe=ii("socketio/deleteImage"),c7=ii("socketio/requestImages"),aM=ii("socketio/requestNewImages"),xSe=ii("socketio/cancelProcessing"),wSe=ii("socketio/requestSystemConfig"),_H=ii("socketio/requestModelChange"),CSe=ii("socketio/saveStagingAreaImageToGallery"),_Se=ii("socketio/requestEmptyTempFolder"),sa=Ee((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return b(vi,{label:r,...i,children:b(Ua,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function kH(e){const{iconButton:t=!1,...n}=e,r=qe(),{isReady:i}=Le(CH),o=Le(Er),a=()=>{r(u7(o))};return st(["ctrl+enter","meta+enter"],()=>{r(u7(o))},{enabled:()=>i,preventDefault:!0,enableOnFormTags:["input","textarea","select"]},[i,o]),b("div",{style:{flexGrow:4},children:t?b(pt,{"aria-label":"Invoke",type:"submit",icon:b(nSe,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):b(sa,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const kSe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:We.isEqual}});function EH(e){const{...t}=e,n=qe(),{isProcessing:r,isConnected:i,isCancelable:o}=Le(kSe),a=()=>n(xSe());return st("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),b(pt,{icon:b(P5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const ESe=ut(e=>e.options,e=>e.shouldLoopback),PSe=()=>{const e=qe(),t=Le(ESe);return b(pt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:b(iSe,{}),onClick:()=>{e(nEe(!t))}})},lk=()=>{const e=Le(Er);return ee("div",{className:"process-buttons",children:[b(kH,{}),e==="img2img"&&b(PSe,{}),b(EH,{})]})},TSe=ut([e=>e.options,Er],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),uk=()=>{const e=qe(),{prompt:t,activeTabName:n}=Le(TSe),{isReady:r}=Le(CH),i=C.exports.useRef(null),o=s=>{e(_b(s.target.value))};st("alt+a",()=>{var s;(s=i.current)==null||s.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(u7(n)))};return b("div",{className:"prompt-bar",children:b(_d,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:b(h$,{id:"prompt",name:"prompt",placeholder:"Type prompt here. [negative tokens], (upweight)++, (downweight)--, swap and blend are available (see docs)",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function PH(e){return ct({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 TH(e){return ct({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 LSe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function ASe(e,t){e.classList?e.classList.add(t):LSe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function sM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function MSe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=sM(e.className,t):e.setAttribute("class",sM(e.className&&e.className.baseVal||"",t))}const lM={disabled:!1},LH=se.createContext(null);var AH=function(t){return t.scrollTop},Sm="unmounted",Rf="exited",If="entering",jp="entered",d7="exiting",Bu=function(e){o_(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=Rf,o.appearStatus=If):l=jp:r.unmountOnExit||r.mountOnEnter?l=Sm:l=Rf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Sm?{status:Rf}: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!==If&&a!==jp&&(o=If):(a===If||a===jp)&&(o=d7)}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===If){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ly.findDOMNode(this);a&&AH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Rf&&this.setState({status:Sm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ly.findDOMNode(this),s],u=l[0],h=l[1],g=this.getTimeouts(),m=s?g.appear:g.enter;if(!i&&!a||lM.disabled){this.safeSetState({status:jp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:If},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:jp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ly.findDOMNode(this);if(!o||lM.disabled){this.safeSetState({status:Rf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:d7},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Rf},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:Ly.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],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Sm)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=n_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return b(LH.Provider,{value:null,children:typeof a=="function"?a(i,s):se.cloneElement(se.Children.only(a),s)})},t}(se.Component);Bu.contextType=LH;Bu.propTypes={};function Fp(){}Bu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Fp,onEntering:Fp,onEntered:Fp,onExit:Fp,onExiting:Fp,onExited:Fp};Bu.UNMOUNTED=Sm;Bu.EXITED=Rf;Bu.ENTERING=If;Bu.ENTERED=jp;Bu.EXITING=d7;const RSe=Bu;var ISe=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return ASe(t,r)})},Aw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return MSe(t,r)})},ck=function(e){o_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Cl=(e,t)=>Math.round(e/t)*t,$p=(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}},Hp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},OSe=.999,DSe=.1,NSe=20,Jg=.95,uM=30,f7=10,cM=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),_f=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(;a1?(r.width=s,r.height=Cl(s/o,64)):o<1&&(r.height=s,r.width=Cl(s*o,64)),a=r.width*r.height;return r},BSe=e=>({width:Cl(e.width,64),height:Cl(e.height,64)}),bm={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},zSe={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:bm,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"},RH=WS({name:"canvas",initialState:zSe,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=>!sk(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:Kc(We.clamp(n.width,64,512),64),height:Kc(We.clamp(n.height,64,512),64)},o={x:Cl(n.width/2-i.width/2,64),y:Cl(n.height/2-i.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const l=_f(i);e.scaledBoundingBoxDimensions=l}e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(We.cloneDeep(e.layerState)),e.layerState={...bm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Hp(r.width,r.height,n.width,n.height,Jg),s=$p(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=BSe(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=_f(n);e.scaledBoundingBoxDimensions=r}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=cM(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={...bm.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(vSe);!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=bm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(v5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Hp(i.width,i.height,512,512,Jg),g=$p(i.width,i.height,0,0,512,512,h),m={width:512,height:512};if(e.stageScale=h,e.stageCoordinates=g,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=m,e.boundingBoxScaleMethod==="auto"){const v=_f(m);e.scaledBoundingBoxDimensions=v}return}const{width:o,height:a}=r,l=Hp(t,n,o,a,.95),u=$p(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=cM(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(v5)){const i=Hp(r.width,r.height,512,512,Jg),o=$p(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=_f(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=Hp(r,i,s,l,Jg),h=$p(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Hp(r,i,512,512,Jg),h=$p(r,i,0,0,512,512,u),g={width:512,height:512};if(e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=g,e.boundingBoxScaleMethod==="auto"){const m=_f(g);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={...bm.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:Kc(We.clamp(o,64,512),64),height:Kc(We.clamp(a,64,512),64)},l={x:Cl(o/2-s.width/2,64),y:Cl(a/2-s.height/2,64)};if(e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=_f(s);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=_f(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:FSe,addFillRect:$Se,addImageToStagingArea:HSe,addLine:WSe,addPointToCurrentLine:IH,clearCanvasHistory:OH,clearMask:VSe,commitColorPickerColor:USe,commitStagingAreaImage:GSe,discardStagedImages:jSe,fitBoundingBoxToStage:jTe,mouseLeftCanvas:YSe,nextStagingAreaImage:qSe,prevStagingAreaImage:KSe,redo:XSe,resetCanvas:DH,resetCanvasInteractionState:ZSe,resetCanvasView:QSe,resizeAndScaleCanvas:dk,resizeCanvas:JSe,setBoundingBoxCoordinates:Mw,setBoundingBoxDimensions:xm,setBoundingBoxPreviewFill:YTe,setBoundingBoxScaleMethod:ebe,setBrushColor:Rw,setBrushSize:Iw,setCanvasContainerDimensions:tbe,setColorPickerColor:nbe,setCursorPosition:rbe,setDoesCanvasNeedScaling:Ui,setInitialCanvasImage:sb,setInpaintReplace:dM,setIsDrawing:NH,setIsMaskEnabled:BH,setIsMouseOverBoundingBox:Jy,setIsMoveBoundingBoxKeyHeld:qTe,setIsMoveStageKeyHeld:KTe,setIsMovingBoundingBox:Ow,setIsMovingStage:y5,setIsTransformingBoundingBox:Dw,setLayer:zH,setMaskColor:ibe,setMergedCanvas:obe,setShouldAutoSave:abe,setShouldCropToBoundingBoxOnSave:sbe,setShouldDarkenOutsideBoundingBox:lbe,setShouldLockBoundingBox:XTe,setShouldPreserveMaskedArea:ube,setShouldShowBoundingBox:cbe,setShouldShowBrush:ZTe,setShouldShowBrushPreview:QTe,setShouldShowCanvasDebugInfo:dbe,setShouldShowCheckboardTransparency:JTe,setShouldShowGrid:fbe,setShouldShowIntermediates:hbe,setShouldShowStagingImage:pbe,setShouldShowStagingOutline:fM,setShouldSnapToGrid:hM,setShouldUseInpaintReplace:gbe,setStageCoordinates:FH,setStageScale:mbe,setTool:F0,toggleShouldLockBoundingBox:eLe,toggleTool:tLe,undo:vbe,setScaledBoundingBoxDimensions:e3,setShouldRestrictStrokesToBox:ybe}=RH.actions,Sbe=RH.reducer,$H=""+new URL("logo.13003d72.png",import.meta.url).href,bbe=ut(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}}),fk=e=>{const t=qe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Le(bbe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;st("o",()=>{t(cd(!n)),i&&setTimeout(()=>t(Ui(!0)),400)},[n,i]),st("esc",()=>{t(cd(!1))},{enabled:()=>!i,preventDefault:!0},[i]),st("shift+o",()=>{m(),t(Ui(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(Jke(a.current?a.current.scrollTop:0)),t(cd(!1)),t(tEe(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},g=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(rEe(!i)),t(Ui(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),b(MH,{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:g,onMouseOver:i?void 0:g,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?g():!i&&h()},children:[b(vi,{label:"Pin Options Panel",children:b("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?b(PH,{}):b(TH,{})})}),!i&&ee("div",{className:"invoke-ai-logo-wrapper",children:[b("img",{src:$H,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",b("strong",{children:"ai"})]})]}),l]})})})})};function xbe(){const e={seed:{header:"Seed",feature:Vi.SEED,content:b(X_,{})},variations:{header:"Variations",feature:Vi.VARIATIONS,content:b(J_,{}),additionalHeaderComponents:b(Q_,{})},face_restore:{header:"Face Restoration",feature:Vi.FACE_CORRECTION,content:b(q_,{}),additionalHeaderComponents:b(iH,{})},upscale:{header:"Upscaling",feature:Vi.UPSCALE,content:b(Z_,{}),additionalHeaderComponents:b(cH,{})},other:{header:"Other Options",feature:Vi.OTHER,content:b(lH,{})}};return ee(fk,{children:[b(uk,{}),b(lk,{}),b(nk,{}),b(sH,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),b(B4e,{}),b(rk,{accordionInfo:e})]})}const hk=C.exports.createContext(null),wbe=e=>{const{styleClass:t}=e,n=C.exports.useContext(hk),r=()=>{n&&n()};return b("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ee("div",{className:"image-upload-button",children:[b(ok,{}),b(rh,{size:"lg",children:"Click or Drag and Drop"})]})})},Cbe=ut(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),h7=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=Nv(),a=qe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Le(Cbe),h=C.exports.useRef(null),g=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(bSe(e)),o()};st("delete",()=>{s?i():m()},[e,s]);const v=S=>a(fH(!S.target.checked));return ee(Rn,{children:[C.exports.cloneElement(t,{onClick:e?g:void 0,ref:n}),b(BF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:b(i1,{children:ee(zF,{className:"modal",children:[b(BS,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),b(Hv,{children:ee(rn,{direction:"column",gap:5,children:[b(To,{children:"Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to."}),b(_d,{children:ee(rn,{alignItems:"center",children:[b(xh,{mb:0,children:"Don't ask me again"}),b(E_,{checked:!s,onChange:v})]})})]})}),ee(NS,{children:[b(Ua,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),b(Ua,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),sd=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ee(b_,{...o,children:[b(C_,{children:t}),ee(w_,{className:`invokeai__popover-content ${r}`,children:[i&&b(x_,{className:"invokeai__popover-arrow"}),n]})]})},_be=ut([e=>e.system,e=>e.options,e=>e.gallery,Er],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:g}=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:h,activeTabName:r,isLightBoxOpen:g}},{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),HH=()=>{var D,B,$,W,j,ne;const e=qe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:g}=Le(_be),m=v2(),v=()=>{!u||(h&&e(xu(!1)),e(T1(u)),e(Eo("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};st("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{var H,K;!u||(u.metadata&&e(Kke(u.metadata)),((H=u.metadata)==null?void 0:H.image.type)==="img2img"?e(Eo("img2img")):((K=u.metadata)==null?void 0:K.image.type)==="txt2img"&&e(Eo("txt2img")))};st("a",()=>{var H,K;["txt2img","img2img"].includes((K=(H=u==null?void 0:u.metadata)==null?void 0:H.image)==null?void 0:K.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u!=null&&u.metadata&&e(C2(u.metadata.image.seed))};st("s",()=>{var H,K;(K=(H=u==null?void 0:u.metadata)==null?void 0:H.image)!=null&&K.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>{var H,K;return((K=(H=u==null?void 0:u.metadata)==null?void 0:H.image)==null?void 0:K.prompt)&&e(_b(u.metadata.image.prompt))};st("p",()=>{var H,K;(K=(H=u==null?void 0:u.metadata)==null?void 0:H.image)!=null&&K.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const _=()=>{u&&e(ySe(u))};st("u",()=>{i&&!s&&n&&!t&&o?_():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(SSe(u))};st("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(KV(!l)),I=()=>{!u||(h&&e(xu(!1)),e(sb(u)),e(Ui(!0)),g!=="unifiedCanvas"&&e(Eo("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};st("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]);const O=()=>{e(xu(!h))};return ee("div",{className:"current-image-options",children:[ee(Ao,{isAttached:!0,children:[b(sd,{trigger:"hover",triggerComponent:b(pt,{"aria-label":"Send to...",icon:b(sSe,{})}),children:ee("div",{className:"current-image-send-to-popover",children:[b(sa,{size:"sm",onClick:v,leftIcon:b(oM,{}),children:"Send to Image to Image"}),b(sa,{size:"sm",onClick:I,leftIcon:b(oM,{}),children:"Send to Unified Canvas"}),b(sa,{size:"sm",onClick:S,leftIcon:b(ab,{}),children:"Copy Link to Image"}),b(sa,{leftIcon:b(yH,{}),size:"sm",children:b(ih,{download:!0,href:u==null?void 0:u.url,children:"Download Image"})})]})}),b(pt,{icon:b(V5e,{}),tooltip:h?"Close Viewer (Z)":"Open In Viewer (Z)","aria-label":h?"Close Viewer (Z)":"Open In Viewer (Z)","data-selected":h,onClick:O})]}),ee(Ao,{isAttached:!0,children:[b(pt,{icon:b(rSe,{}),tooltip:"Use Prompt (P)","aria-label":"Use Prompt (P)",isDisabled:!((B=(D=u==null?void 0:u.metadata)==null?void 0:D.image)!=null&&B.prompt),onClick:P}),b(pt,{icon:b(aSe,{}),tooltip:"Use Seed (S)","aria-label":"Use Seed (S)",isDisabled:!((W=($=u==null?void 0:u.metadata)==null?void 0:$.image)!=null&&W.seed),onClick:E}),b(pt,{icon:b(z5e,{}),tooltip:"Use All (A)","aria-label":"Use All (A)",isDisabled:!["txt2img","img2img"].includes((ne=(j=u==null?void 0:u.metadata)==null?void 0:j.image)==null?void 0:ne.type),onClick:w})]}),ee(Ao,{isAttached:!0,children:[b(sd,{trigger:"hover",triggerComponent:b(pt,{icon:b(q5e,{}),"aria-label":"Restore Faces"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[b(q_,{}),b(sa,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),b(sd,{trigger:"hover",triggerComponent:b(pt,{icon:b(W5e,{}),"aria-label":"Upscale"}),children:ee("div",{className:"current-image-postprocessing-popover",children:[b(Z_,{}),b(sa,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),b(Ao,{isAttached:!0,children:b(pt,{icon:b(vH,{}),tooltip:"Info (I)","aria-label":"Info (I)","data-selected":l,onClick:M})}),b(h7,{image:u,children:b(pt,{icon:b(y2,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},kbe={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},WH=WS({name:"gallery",initialState:kbe,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=ni.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{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:c0,clearIntermediateImage:Nw,removeImage:VH,setCurrentImage:pM,addGalleryImages:Ebe,setIntermediateImage:Pbe,selectNextImage:pk,selectPrevImage:gk,setShouldPinGallery:Tbe,setShouldShowGallery:ld,setGalleryScrollPosition:Lbe,setGalleryImageMinimumWidth:em,setGalleryImageObjectFit:Abe,setShouldHoldGalleryOpen:UH,setShouldAutoSwitchToNewImages:Mbe,setCurrentCategory:t3,setGalleryWidth:Rbe,setShouldUseSingleGalleryColumn:Ibe}=WH.actions,Obe=WH.reducer;at({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"});at({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"});at({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"});at({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"});at({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"})]})});at({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"});at({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"})});at({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"});at({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"});at({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"});at({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"});at({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"})]})});at({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"})]})});at({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"});at({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"})})});at({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"})]})});at({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"})]})});at({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"})]})});at({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});at({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});at({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});at({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});at({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});at({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});at({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});at({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"});at({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var GH=at({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"})]})});at({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"})]})});at({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"})]})});at({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"});at({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"});at({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"})]})});at({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"})]})});at({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"})]})});at({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"});at({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"});at({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"});at({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"});at({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"})]})});at({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"});at({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"});at({displayName:"SpinnerIcon",path:ee(Rn,{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"})]})]})});at({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"});at({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"})});at({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"});at({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"});at({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"});at({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"})]})});at({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"});at({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"});at({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"});at({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"})]})});at({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"});at({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"});at({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"})})});at({displayName:"MinusIcon",path:b("g",{fill:"currentColor",children:b("rect",{height:"4",width:"20",x:"2",y:"10"})})});at({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 Dbe(e){return ct({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 Nn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>ee(rn,{gap:2,children:[n&&b(vi,{label:`Recall ${e}`,children:b(Ga,{"aria-label":"Use this parameter",icon:b(Dbe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&b(vi,{label:`Copy ${e}`,children:b(Ga,{"aria-label":`Copy ${e}`,icon:b(ab,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),ee(rn,{direction:i?"column":"row",children:[ee(To,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ee(ih,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",b(GH,{mx:"2px"})]}):b(To,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),Nbe=(e,t)=>e.image.uuid===t.image.uuid,jH=C.exports.memo(({image:e,styleClass:t})=>{var W,j;const n=qe();st("esc",()=>{n(KV(!1))});const r=((W=e==null?void 0:e.metadata)==null?void 0:W.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:h,orig_path:g,perlin:m,postprocessing:v,prompt:S,sampler:w,scale:E,seamless:P,seed:_,steps:T,strength:M,threshold:I,type:O,variations:D,width:B}=r,$=JSON.stringify(e.metadata,null,2);return b("div",{className:`image-metadata-viewer ${t}`,children:ee(rn,{gap:1,direction:"column",width:"100%",children:[ee(rn,{gap:2,children:[b(To,{fontWeight:"semibold",children:"File:"}),ee(ih,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,b(GH,{mx:"2px"})]})]}),Object.keys(r).length>0?ee(Rn,{children:[O&&b(Nn,{label:"Generation type",value:O}),((j=e.metadata)==null?void 0:j.model_weights)&&b(Nn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(O)&&b(Nn,{label:"Original image",value:g}),O==="gfpgan"&&M!==void 0&&b(Nn,{label:"Fix faces strength",value:M,onClick:()=>n(a4(M))}),O==="esrgan"&&E!==void 0&&b(Nn,{label:"Upscaling scale",value:E,onClick:()=>n(F7(E))}),O==="esrgan"&&M!==void 0&&b(Nn,{label:"Upscaling strength",value:M,onClick:()=>n($7(M))}),S&&b(Nn,{label:"Prompt",labelPosition:"top",value:t4(S),onClick:()=>n(_b(S))}),_!==void 0&&b(Nn,{label:"Seed",value:_,onClick:()=>n(C2(_))}),I!==void 0&&b(Nn,{label:"Noise Threshold",value:I,onClick:()=>n(ZV(I))}),m!==void 0&&b(Nn,{label:"Perlin Noise",value:m,onClick:()=>n(UV(m))}),w&&b(Nn,{label:"Sampler",value:w,onClick:()=>n(GV(w))}),T&&b(Nn,{label:"Steps",value:T,onClick:()=>n(XV(T))}),o!==void 0&&b(Nn,{label:"CFG scale",value:o,onClick:()=>n(zV(o))}),D&&D.length>0&&b(Nn,{label:"Seed-weight pairs",value:m5(D),onClick:()=>n(YV(m5(D)))}),P&&b(Nn,{label:"Seamless",value:P,onClick:()=>n(jV(P))}),l&&b(Nn,{label:"High Resolution Optimization",value:l,onClick:()=>n(HV(l))}),B&&b(Nn,{label:"Width",value:B,onClick:()=>n(QV(B))}),s&&b(Nn,{label:"Height",value:s,onClick:()=>n($V(s))}),u&&b(Nn,{label:"Initial image",value:u,isLink:!0,onClick:()=>n(T1(u))}),h&&b(Nn,{label:"Mask image",value:h,isLink:!0,onClick:()=>n(VV(h))}),O==="img2img"&&M&&b(Nn,{label:"Image to image strength",value:M,onClick:()=>n(z7(M))}),a&&b(Nn,{label:"Image to image fit",value:a,onClick:()=>n(qV(a))}),v&&v.length>0&&ee(Rn,{children:[b(rh,{size:"sm",children:"Postprocessing"}),v.map((ne,H)=>{if(ne.type==="esrgan"){const{scale:K,strength:te}=ne;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[b(To,{size:"md",children:`${H+1}: Upscale (ESRGAN)`}),b(Nn,{label:"Scale",value:K,onClick:()=>n(F7(K))}),b(Nn,{label:"Strength",value:te,onClick:()=>n($7(te))})]},H)}else if(ne.type==="gfpgan"){const{strength:K}=ne;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[b(To,{size:"md",children:`${H+1}: Face restoration (GFPGAN)`}),b(Nn,{label:"Strength",value:K,onClick:()=>{n(a4(K)),n(s4("gfpgan"))}})]},H)}else if(ne.type==="codeformer"){const{strength:K,fidelity:te}=ne;return ee(rn,{pl:"2rem",gap:1,direction:"column",children:[b(To,{size:"md",children:`${H+1}: Face restoration (Codeformer)`}),b(Nn,{label:"Strength",value:K,onClick:()=>{n(a4(K)),n(s4("codeformer"))}}),te&&b(Nn,{label:"Fidelity",value:te,onClick:()=>{n(FV(te)),n(s4("codeformer"))}})]},H)}})]}),i&&b(Nn,{withCopy:!0,label:"Dream Prompt",value:i}),ee(rn,{gap:2,direction:"column",children:[ee(rn,{gap:2,children:[b(vi,{label:"Copy metadata JSON",children:b(Ga,{"aria-label":"Copy metadata JSON",icon:b(ab,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText($)})}),b(To,{fontWeight:"semibold",children:"Metadata JSON:"})]}),b("div",{className:"image-json-viewer",children:b("pre",{children:$})})]})]}):b(pz,{width:"100%",pt:10,children:b(To,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},Nbe),YH=ut([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 h;return u.uuid===((h=e==null?void 0:e.currentImage)==null?void 0:h.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 Bbe(){const e=qe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Le(YH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(gk())},g=()=>{e(pk())};return ee("div",{className:"current-image-preview",children:[i&&b(TS,{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(Ga,{"aria-label":"Previous image",icon:b(gH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),b("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&b(Ga,{"aria-label":"Next image",icon:b(mH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),r&&i&&b(jH,{image:i,styleClass:"current-image-metadata"})]})}const zbe=ut([e=>e.gallery,e=>e.options,Er],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),qH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Le(zbe);return b("div",{className:"current-image-area","data-tab-name":t,children:e?ee(Rn,{children:[b(HH,{}),b(Bbe,{})]}):b("div",{className:"current-image-display-placeholder",children:b(E5e,{})})})},Fbe=()=>{const e=C.exports.useContext(hk);return b(pt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:b(ok,{}),onClick:e||void 0})};function $be(){const e=Le(i=>i.options.initialImage),t=qe(),n=v2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(BV())};return ee(Rn,{children:[ee("div",{className:"init-image-preview-header",children:[b("h2",{children:"Initial Image"}),b(Fbe,{})]}),e&&b("div",{className:"init-image-preview",children:b(TS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const Hbe=()=>{const e=Le(r=>r.options.initialImage),{currentImage:t}=Le(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($be,{})}):b(wbe,{})}),t&&b("div",{className:"workarea-split-view-right",children:b(qH,{})})]})};function Wbe(e){return ct({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var Vbe=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)}}(),Wr=globalThis&&globalThis.__assign||function(){return Wr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"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)}},Xbe=["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"],SM="__resizable_base__",KH=function(e){jbe(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(SM):o.className+=SM,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||Ybe},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","")),h=u/l[s]*100;return h+"%"}return Bw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Bw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Bw(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&&Wp("left",o),s=i&&Wp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.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"u"?10:o.width,g=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,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(g-w)/this.ratio+S,M=Math.max(h,E),I=Math.min(g,P),O=Math.max(m,_),D=Math.min(v,T);n=r3(n,M,I),r=r3(r,O,D)}else n=r3(n,h,g),r=r3(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&&qbe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&i3(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 h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var g={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:hl(hl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(g)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&i3(n))try{n.preventDefault(),n.stopPropagation()}catch(te){}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=i3(n)?n.touches[0].clientX:n.clientX,h=i3(n)?n.touches[0].clientY:n.clientY,g=this.state,m=g.direction,v=g.original,S=g.width,w=g.height,E=this.getParentSize(),P=Kbe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=yM(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=yM(T,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=O.newWidth,T=O.newHeight,this.props.grid){var D=vM(M,this.props.grid[0]),B=vM(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(D-M)<=$?D:M,T=$===0||Math.abs(B-T)<=$?B:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/E.width*100;M=j+"%"}else if(S.endsWith("vw")){var ne=M/this.window.innerWidth*100;M=ne+"vw"}else if(S.endsWith("vh")){var H=M/this.window.innerHeight*100;M=H+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/E.height*100;T=j+"%"}else if(w.endsWith("vw")){var ne=T/this.window.innerWidth*100;T=ne+"vw"}else if(w.endsWith("vh")){var H=T/this.window.innerHeight*100;T=H+"vh"}}var K={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?K.flexBasis=K.width:this.flexDir==="column"&&(K.flexBasis=K.height),Fl.exports.flushSync(function(){r.setState(K)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},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:hl(hl({},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 h=Object.keys(i).map(function(g){return i[g]!==!1?b(Gbe,{direction:g,onResizeStart:n.onResizeStart,replaceStyles:o&&o[g],className:a&&a[g],children:u&&u[g]?u[g]:null},g):null});return b("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return Xbe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=hl(hl(hl({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,{...hl({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}(C.exports.PureComponent);function Xn(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 S2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(g){const{scope:m,children:v,...S}=g,w=(m==null?void 0:m[e][l])||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(g,m){const v=(m==null?void 0:m[e][l])||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Zbe(i,...t)]}function Zbe(...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 g=l(o)[`__scope${u}`];return{...s,...g}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Qbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function XH(...e){return t=>e.forEach(n=>Qbe(n,t))}function qa(...e){return C.exports.useCallback(XH(...e),e)}const Gv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(exe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(p7,In({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(p7,In({},r,{ref:t}),n)});Gv.displayName="Slot";const p7=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...txe(r,n.props),ref:XH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});p7.displayName="SlotClone";const Jbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function exe(e){return C.exports.isValidElement(e)&&e.type===Jbe}function txe(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 nxe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Au=nxe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Gv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,In({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZH(e,t){e&&Fl.exports.flushSync(()=>e.dispatchEvent(t))}function QH(e){const t=e+"CollectionProvider",[n,r]=S2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=se.useRef(null),P=se.useRef(new Map).current;return se.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=se.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),_=qa(S,P.collectionRef);return se.createElement(Gv,{ref:_},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",g=se.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,_=se.useRef(null),T=qa(S,_),M=o(u,w);return se.useEffect(()=>(M.itemMap.set(_,{ref:_,...P}),()=>void M.itemMap.delete(_))),se.createElement(Gv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return se.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>P.indexOf(M.ref.current)-P.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:g},m,r]}const rxe=C.exports.createContext(void 0);function JH(e){const t=C.exports.useContext(rxe);return e||t||"ltr"}function Nl(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ixe(e,t=globalThis==null?void 0:globalThis.document){const n=Nl(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const g7="dismissableLayer.update",oxe="dismissableLayer.pointerDownOutside",axe="dismissableLayer.focusOutside";let bM;const sxe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lxe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(sxe),[g,m]=C.exports.useState(null),v=(n=g==null?void 0:g.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,S]=C.exports.useState({}),w=qa(t,B=>m(B)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=E.indexOf(P),T=g?E.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,O=uxe(B=>{const $=B.target,W=[...h.branches].some(j=>j.contains($));!I||W||(o==null||o(B),s==null||s(B),B.defaultPrevented||l==null||l())},v),D=cxe(B=>{const $=B.target;[...h.branches].some(j=>j.contains($))||(a==null||a(B),s==null||s(B),B.defaultPrevented||l==null||l())},v);return ixe(B=>{T===h.layers.size-1&&(i==null||i(B),!B.defaultPrevented&&l&&(B.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(bM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),xM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=bM)}},[g,v,r,h]),C.exports.useEffect(()=>()=>{!g||(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),xM())},[g,h]),C.exports.useEffect(()=>{const B=()=>S({});return document.addEventListener(g7,B),()=>document.removeEventListener(g7,B)},[]),C.exports.createElement(Au.div,In({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:Xn(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Xn(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Xn(e.onPointerDownCapture,O.onPointerDownCapture)}))});function uxe(e,t=globalThis==null?void 0:globalThis.document){const n=Nl(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){eW(oxe,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 cxe(e,t=globalThis==null?void 0:globalThis.document){const n=Nl(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&eW(axe,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 xM(){const e=new CustomEvent(g7);document.dispatchEvent(e)}function eW(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?ZH(i,o):i.dispatchEvent(o)}let zw=0;function dxe(){C.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:wM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:wM()),zw++,()=>{zw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),zw--}},[])}function wM(){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 Fw="focusScope.autoFocusOnMount",$w="focusScope.autoFocusOnUnmount",CM={bubbles:!1,cancelable:!0},fxe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Nl(i),h=Nl(o),g=C.exports.useRef(null),m=qa(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const _=P.target;s.contains(_)?g.current=_:Of(g.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||Of(g.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){kM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(Fw,CM);s.addEventListener(Fw,u),s.dispatchEvent(P),P.defaultPrevented||(hxe(yxe(tW(s)),{select:!0}),document.activeElement===w&&Of(s))}return()=>{s.removeEventListener(Fw,u),setTimeout(()=>{const P=new CustomEvent($w,CM);s.addEventListener($w,h),s.dispatchEvent(P),P.defaultPrevented||Of(w!=null?w:document.body,{select:!0}),s.removeEventListener($w,h),kM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const _=w.currentTarget,[T,M]=pxe(_);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&Of(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&Of(M,{select:!0})):P===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Au.div,In({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function hxe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Of(r,{select:t}),document.activeElement!==n)return}function pxe(e){const t=tW(e),n=_M(t,e),r=_M(t.reverse(),e);return[n,r]}function tW(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 _M(e,t){for(const n of e)if(!gxe(n,{upTo:t}))return n}function gxe(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 mxe(e){return e instanceof HTMLInputElement&&"select"in e}function Of(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mxe(e)&&t&&e.select()}}const kM=vxe();function vxe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=EM(e,t),e.unshift(t)},remove(t){var n;e=EM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function EM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yxe(e){return e.filter(t=>t.tagName!=="A")}const a1=Boolean(globalThis==null?void 0:globalThis.document)?C.exports.useLayoutEffect:()=>{},Sxe=t6["useId".toString()]||(()=>{});let bxe=0;function xxe(e){const[t,n]=C.exports.useState(Sxe());return a1(()=>{e||n(r=>r!=null?r:String(bxe++))},[e]),e||(t?`radix-${t}`:"")}function _1(e){return e.split("-")[0]}function lb(e){return e.split("-")[1]}function k1(e){return["top","bottom"].includes(_1(e))?"x":"y"}function mk(e){return e==="y"?"height":"width"}function PM(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=k1(t),l=mk(s),u=r[l]/2-i[l]/2,h=_1(t),g=s==="x";let m;switch(h){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(lb(t)){case"start":m[s]-=u*(n&&g?-1:1);break;case"end":m[s]+=u*(n&&g?-1:1);break}return m}const wxe=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:h}=PM(l,r,s),g=r,m={},v=0;for(let S=0;S({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=nW(r),h={x:i,y:o},g=k1(a),m=lb(a),v=mk(g),S=await l.getDimensions(n),w=g==="y"?"top":"left",E=g==="y"?"bottom":"right",P=s.reference[v]+s.reference[g]-h[g]-s.floating[v],_=h[g]-s.reference[g],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?g==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=P/2-_/2,O=u[w],D=M-S[v]-u[E],B=M/2-S[v]/2+I,$=m7(O,B,D),ne=(m==="start"?u[w]:u[E])>0&&B!==$&&s.reference[v]<=s.floating[v]?BExe[t])}function Pxe(e,t,n){n===void 0&&(n=!1);const r=lb(e),i=k1(e),o=mk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=x5(a)),{main:a,cross:x5(a)}}const Txe={start:"end",end:"start"};function LM(e){return e.replace(/start|end/g,t=>Txe[t])}const Lxe=["top","right","bottom","left"];function Axe(e){const t=x5(e);return[LM(e),t,LM(t)]}const Mxe=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:h=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=_1(r),P=g||(w===a||!v?[x5(a)]:Axe(a)),_=[a,...P],T=await b5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=Pxe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var O,D;const $=((O=(D=i.flip)==null?void 0:D.index)!=null?O:0)+1,W=_[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let j="bottom";switch(m){case"bestFit":{var B;const ne=(B=I.map(H=>[H,H.overflows.filter(K=>K>0).reduce((K,te)=>K+te,0)]).sort((H,K)=>H[1]-K[1])[0])==null?void 0:B[0].placement;ne&&(j=ne);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function AM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MM(e){return Lxe.some(t=>e[t]>=0)}const Rxe=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 b5(r,{...n,elementContext:"reference"}),a=AM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:MM(a)}}}case"escaped":{const o=await b5(r,{...n,altBoundary:!0}),a=AM(o,i.floating);return{data:{escapedOffsets:a,escaped:MM(a)}}}default:return{}}}}};async function Ixe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=_1(n),s=lb(n),l=k1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,g=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Oxe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ixe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function rW(e){return e==="x"?"y":"x"}const Dxe=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:P,y:_}=E;return{x:P,y:_}}},...l}=e,u={x:n,y:r},h=await b5(t,l),g=k1(_1(i)),m=rW(g);let v=u[g],S=u[m];if(o){const E=g==="y"?"top":"left",P=g==="y"?"bottom":"right",_=v+h[E],T=v-h[P];v=m7(_,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",_=S+h[E],T=S-h[P];S=m7(_,S,T)}const w=s.fn({...t,[g]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Nxe=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,h={x:n,y:r},g=k1(i),m=rW(g);let v=h[g],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=g==="y"?"height":"width",O=o.reference[g]-o.floating[I]+E.mainAxis,D=o.reference[g]+o.reference[I]-E.mainAxis;vD&&(v=D)}if(u){var P,_,T,M;const I=g==="y"?"width":"height",O=["top","left"].includes(_1(i)),D=o.reference[m]-o.floating[I]+(O&&(P=(_=a.offset)==null?void 0:_[m])!=null?P:0)+(O?0:E.crossAxis),B=o.reference[m]+o.reference[I]+(O?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(O?E.crossAxis:0);SB&&(S=B)}return{[g]:v,[m]:S}}}};function iW(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function zu(e){if(e==null)return window;if(!iW(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function b2(e){return zu(e).getComputedStyle(e)}function Mu(e){return iW(e)?"":e?(e.nodeName||"").toLowerCase():""}function oW(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Bl(e){return e instanceof zu(e).HTMLElement}function yd(e){return e instanceof zu(e).Element}function Bxe(e){return e instanceof zu(e).Node}function vk(e){if(typeof ShadowRoot>"u")return!1;const t=zu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ub(e){const{overflow:t,overflowX:n,overflowY:r}=b2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function zxe(e){return["table","td","th"].includes(Mu(e))}function aW(e){const t=/firefox/i.test(oW()),n=b2(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 sW(){return!/^((?!chrome|android).)*safari/i.test(oW())}const RM=Math.min,Jm=Math.max,w5=Math.round;function Ru(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&&Bl(e)&&(l=e.offsetWidth>0&&w5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&w5(s.height)/e.offsetHeight||1);const h=yd(e)?zu(e):window,g=!sW()&&n,m=(s.left+(g&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(g&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Ld(e){return((Bxe(e)?e.ownerDocument:e.document)||window.document).documentElement}function cb(e){return yd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lW(e){return Ru(Ld(e)).left+cb(e).scrollLeft}function Fxe(e){const t=Ru(e);return w5(t.width)!==e.offsetWidth||w5(t.height)!==e.offsetHeight}function $xe(e,t,n){const r=Bl(t),i=Ld(t),o=Ru(e,r&&Fxe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Mu(t)!=="body"||ub(i))&&(a=cb(t)),Bl(t)){const l=Ru(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=lW(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function uW(e){return Mu(e)==="html"?e:e.assignedSlot||e.parentNode||(vk(e)?e.host:null)||Ld(e)}function IM(e){return!Bl(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Hxe(e){let t=uW(e);for(vk(t)&&(t=t.host);Bl(t)&&!["html","body"].includes(Mu(t));){if(aW(t))return t;t=t.parentNode}return null}function v7(e){const t=zu(e);let n=IM(e);for(;n&&zxe(n)&&getComputedStyle(n).position==="static";)n=IM(n);return n&&(Mu(n)==="html"||Mu(n)==="body"&&getComputedStyle(n).position==="static"&&!aW(n))?t:n||Hxe(e)||t}function OM(e){if(Bl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Ru(e);return{width:t.width,height:t.height}}function Wxe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Bl(n),o=Ld(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Mu(n)!=="body"||ub(o))&&(a=cb(n)),Bl(n))){const l=Ru(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 Vxe(e,t){const n=zu(e),r=Ld(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=sW();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Uxe(e){var t;const n=Ld(e),r=cb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Jm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Jm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+lW(e);const l=-r.scrollTop;return b2(i||n).direction==="rtl"&&(s+=Jm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function cW(e){const t=uW(e);return["html","body","#document"].includes(Mu(t))?e.ownerDocument.body:Bl(t)&&ub(t)?t:cW(t)}function C5(e,t){var n;t===void 0&&(t=[]);const r=cW(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=zu(r),a=i?[o].concat(o.visualViewport||[],ub(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(C5(a))}function Gxe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&vk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function jxe(e,t){const n=Ru(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 DM(e,t,n){return t==="viewport"?S5(Vxe(e,n)):yd(t)?jxe(t,n):S5(Uxe(Ld(e)))}function Yxe(e){const t=C5(e),r=["absolute","fixed"].includes(b2(e).position)&&Bl(e)?v7(e):e;return yd(r)?t.filter(i=>yd(i)&&Gxe(i,r)&&Mu(i)!=="body"):[]}function qxe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Yxe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const g=DM(t,h,i);return u.top=Jm(g.top,u.top),u.right=RM(g.right,u.right),u.bottom=RM(g.bottom,u.bottom),u.left=Jm(g.left,u.left),u},DM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Kxe={getClippingRect:qxe,convertOffsetParentRelativeRectToViewportRelativeRect:Wxe,isElement:yd,getDimensions:OM,getOffsetParent:v7,getDocumentElement:Ld,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:$xe(t,v7(n),r),floating:{...OM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>b2(e).direction==="rtl"};function Xxe(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,h=l||u?[...yd(e)?C5(e):[],...C5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let g=null;if(a){let w=!0;g=new ResizeObserver(()=>{w||n(),w=!1}),yd(e)&&!s&&g.observe(e),g.observe(t)}let m,v=s?Ru(e):null;s&&S();function S(){const w=Ru(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=g)==null||w.disconnect(),g=null,s&&cancelAnimationFrame(m)}}const Zxe=(e,t,n)=>wxe(e,t,{platform:Kxe,...n});var y7=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function S7(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(!S7(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)&&!S7(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Qxe(e){const t=C.exports.useRef(e);return y7(()=>{t.current=e}),t}function Jxe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Qxe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[g,m]=C.exports.useState(t);S7(g==null?void 0:g.map(T=>{let{options:M}=T;return M}),t==null?void 0:t.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Zxe(o.current,a.current,{middleware:g,placement:n,strategy:r}).then(T=>{S.current&&Fl.exports.flushSync(()=>{h(T)})})},[g,n,r]);y7(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);y7(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.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=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),_=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:_,reference:E,floating:P}),[u,v,_,E,P])}const ewe=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?TM({element:t.current,padding:n}).fn(i):{}:t?TM({element:t,padding:n}).fn(i):{}}}};function twe(e){const[t,n]=C.exports.useState(void 0);return a1(()=>{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 dW="Popper",[yk,fW]=S2(dW),[nwe,hW]=yk(dW),rwe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(nwe,{scope:t,anchor:r,onAnchorChange:i},n)},iwe="PopperAnchor",owe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=hW(iwe,n),a=C.exports.useRef(null),s=qa(t,a);return C.exports.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:C.exports.createElement(Au.div,In({},i,{ref:s}))}),_5="PopperContent",[awe,nLe]=yk(_5),[swe,lwe]=yk(_5,{hasParent:!1,positionUpdateFns:new Set}),uwe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,O=hW(_5,h),[D,B]=C.exports.useState(null),$=qa(t,kt=>B(kt)),[W,j]=C.exports.useState(null),ne=twe(W),H=(n=ne==null?void 0:ne.width)!==null&&n!==void 0?n:0,K=(r=ne==null?void 0:ne.height)!==null&&r!==void 0?r:0,te=g+(v!=="center"?"-"+v:""),J=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Z={padding:J,boundary:X.filter(dwe),altBoundary:G},{reference:le,floating:me,strategy:Me,x:we,y:Se,placement:be,middlewareData:He,update:Je}=Jxe({strategy:"fixed",placement:te,whileElementsMounted:Xxe,middleware:[Oxe({mainAxis:m+K,alignmentAxis:S}),M?Dxe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Nxe():void 0,...Z}):void 0,W?ewe({element:W,padding:w}):void 0,M?Mxe({...Z}):void 0,fwe({arrowWidth:H,arrowHeight:K}),T?Rxe({strategy:"referenceHidden"}):void 0].filter(cwe)});a1(()=>{le(O.anchor)},[le,O.anchor]);const tt=we!==null&&Se!==null,[ht,_t]=pW(be),gt=(i=He.arrow)===null||i===void 0?void 0:i.x,ft=(o=He.arrow)===null||o===void 0?void 0:o.y,vt=((a=He.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Pe,nt]=C.exports.useState();a1(()=>{D&&nt(window.getComputedStyle(D).zIndex)},[D]);const{hasParent:At,positionUpdateFns:Xe}=lwe(_5,h),mt=!At;C.exports.useLayoutEffect(()=>{if(!mt)return Xe.add(Je),()=>{Xe.delete(Je)}},[mt,Xe,Je]),C.exports.useLayoutEffect(()=>{mt&&tt&&Array.from(Xe).reverse().forEach(kt=>requestAnimationFrame(kt))},[mt,tt,Xe]);const ln={"data-side":ht,"data-align":_t,...I,ref:$,style:{...I.style,animation:tt?void 0:"none",opacity:(s=He.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:me,"data-radix-popper-content-wrapper":"",style:{position:Me,left:0,top:0,transform:tt?`translate3d(${Math.round(we)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Pe,["--radix-popper-transform-origin"]:[(l=He.transformOrigin)===null||l===void 0?void 0:l.x,(u=He.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(awe,{scope:h,placedSide:ht,onArrowChange:j,arrowX:gt,arrowY:ft,shouldHideArrow:vt},mt?C.exports.createElement(swe,{scope:h,hasParent:!0,positionUpdateFns:Xe},C.exports.createElement(Au.div,ln)):C.exports.createElement(Au.div,ln)))});function cwe(e){return e!==void 0}function dwe(e){return e!==null}const fwe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,g=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[S,w]=pW(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=g?E:`${P}px`,M=`${-v}px`):S==="top"?(T=g?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=g?E:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=g?E:`${_}px`),{data:{x:T,y:M}}}});function pW(e){const[t,n="center"]=e.split("-");return[t,n]}const hwe=rwe,pwe=owe,gwe=uwe;function mwe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i!=null?i:n},e)}const gW=e=>{const{present:t,children:n}=e,r=vwe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=qa(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};gW.displayName="Presence";function vwe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=mwe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=a3(r.current);o.current=s==="mounted"?u:"none"},[s]),a1(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=a3(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),a1(()=>{if(t){const u=g=>{const v=a3(r.current).includes(g.animationName);g.target===t&&v&&Fl.exports.flushSync(()=>l("ANIMATION_END"))},h=g=>{g.target===t&&(o.current=a3(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function a3(e){return(e==null?void 0:e.animationName)||"none"}function ywe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Swe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Nl(n),l=C.exports.useCallback(u=>{if(o){const g=typeof u=="function"?u(e):u;g!==e&&s(g)}else i(u)},[o,e,i,s]);return[a,l]}function Swe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Nl(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Hw="rovingFocusGroup.onEntryFocus",bwe={bubbles:!1,cancelable:!0},Sk="RovingFocusGroup",[b7,mW,xwe]=QH(Sk),[wwe,vW]=S2(Sk,[xwe]),[Cwe,_we]=wwe(Sk),kwe=C.exports.forwardRef((e,t)=>C.exports.createElement(b7.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(b7.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Ewe,In({},e,{ref:t}))))),Ewe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,g=C.exports.useRef(null),m=qa(t,g),v=JH(o),[S=null,w]=ywe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),_=Nl(u),T=mW(n),M=C.exports.useRef(!1),[I,O]=C.exports.useState(0);return C.exports.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(Hw,_),()=>D.removeEventListener(Hw,_)},[_]),C.exports.createElement(Cwe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(D=>w(D),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>O(D=>D+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>O(D=>D-1),[])},C.exports.createElement(Au.div,In({tabIndex:E||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Xn(e.onMouseDown,()=>{M.current=!0}),onFocus:Xn(e.onFocus,D=>{const B=!M.current;if(D.target===D.currentTarget&&B&&!E){const $=new CustomEvent(Hw,bwe);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(te=>te.focusable),j=W.find(te=>te.active),ne=W.find(te=>te.id===S),K=[j,ne,...W].filter(Boolean).map(te=>te.ref.current);yW(K)}}M.current=!1}),onBlur:Xn(e.onBlur,()=>P(!1))})))}),Pwe="RovingFocusGroupItem",Twe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=xxe(),s=_we(Pwe,n),l=s.currentTabStopId===a,u=mW(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),C.exports.createElement(b7.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Au.span,In({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Xn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Xn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Xn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Mwe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Rwe(w,E+1):w.slice(E+1)}setTimeout(()=>yW(w))}})})))}),Lwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Awe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Mwe(e,t,n){const r=Awe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Lwe[r]}function yW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Rwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Iwe=kwe,Owe=Twe,Dwe=["Enter"," "],Nwe=["ArrowDown","PageUp","Home"],SW=["ArrowUp","PageDown","End"],Bwe=[...Nwe,...SW],db="Menu",[x7,zwe,Fwe]=QH(db),[Ph,bW]=S2(db,[Fwe,fW,vW]),bk=fW(),xW=vW(),[$we,fb]=Ph(db),[Hwe,xk]=Ph(db),Wwe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=bk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),g=Nl(o),m=JH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(hwe,s,C.exports.createElement($we,{scope:t,open:n,onOpenChange:g,content:l,onContentChange:u},C.exports.createElement(Hwe,{scope:t,onClose:C.exports.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Vwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=bk(n);return C.exports.createElement(pwe,In({},i,r,{ref:t}))}),Uwe="MenuPortal",[rLe,Gwe]=Ph(Uwe,{forceMount:void 0}),ud="MenuContent",[jwe,wW]=Ph(ud),Ywe=C.exports.forwardRef((e,t)=>{const n=Gwe(ud,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=fb(ud,e.__scopeMenu),a=xk(ud,e.__scopeMenu);return C.exports.createElement(x7.Provider,{scope:e.__scopeMenu},C.exports.createElement(gW,{present:r||o.open},C.exports.createElement(x7.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(qwe,In({},i,{ref:t})):C.exports.createElement(Kwe,In({},i,{ref:t})))))}),qwe=C.exports.forwardRef((e,t)=>{const n=fb(ud,e.__scopeMenu),r=C.exports.useRef(null),i=qa(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return qz(o)},[]),C.exports.createElement(CW,In({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Xn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Kwe=C.exports.forwardRef((e,t)=>{const n=fb(ud,e.__scopeMenu);return C.exports.createElement(CW,In({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),CW=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...S}=e,w=fb(ud,n),E=xk(ud,n),P=bk(n),_=xW(n),T=zwe(n),[M,I]=C.exports.useState(null),O=C.exports.useRef(null),D=qa(t,O,w.onContentChange),B=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),j=C.exports.useRef(null),ne=C.exports.useRef("right"),H=C.exports.useRef(0),K=v?OF:C.exports.Fragment,te=v?{as:Gv,allowPinchZoom:!0}:void 0,J=G=>{var Z,le;const me=$.current+G,Me=T().filter(tt=>!tt.disabled),we=document.activeElement,Se=(Z=Me.find(tt=>tt.ref.current===we))===null||Z===void 0?void 0:Z.textValue,be=Me.map(tt=>tt.textValue),He=i6e(be,me,Se),Je=(le=Me.find(tt=>tt.textValue===He))===null||le===void 0?void 0:le.ref.current;(function tt(ht){$.current=ht,window.clearTimeout(B.current),ht!==""&&(B.current=window.setTimeout(()=>tt(""),1e3))})(me),Je&&setTimeout(()=>Je.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(B.current),[]),dxe();const X=C.exports.useCallback(G=>{var Z,le;return ne.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&a6e(G,(le=j.current)===null||le===void 0?void 0:le.area)},[]);return C.exports.createElement(jwe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Z;X(G)||((Z=O.current)===null||Z===void 0||Z.focus(),I(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(K,te,C.exports.createElement(fxe,{asChild:!0,trapped:i,onMountAutoFocus:Xn(o,G=>{var Z;G.preventDefault(),(Z=O.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(lxe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:g,onDismiss:m},C.exports.createElement(Iwe,In({asChild:!0},_,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(gwe,In({role:"menu","aria-orientation":"vertical","data-state":t6e(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:D,style:{outline:"none",...S.style},onKeyDown:Xn(S.onKeyDown,G=>{const le=G.target.closest("[data-radix-menu-content]")===G.currentTarget,me=G.ctrlKey||G.altKey||G.metaKey,Me=G.key.length===1;le&&(G.key==="Tab"&&G.preventDefault(),!me&&Me&&J(G.key));const we=O.current;if(G.target!==we||!Bwe.includes(G.key))return;G.preventDefault();const be=T().filter(He=>!He.disabled).map(He=>He.ref.current);SW.includes(G.key)&&be.reverse(),n6e(be)}),onBlur:Xn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(B.current),$.current="")}),onPointerMove:Xn(e.onPointerMove,C7(G=>{const Z=G.target,le=H.current!==G.clientX;if(G.currentTarget.contains(Z)&&le){const me=G.clientX>H.current?"right":"left";ne.current=me,H.current=G.clientX}}))})))))))}),w7="MenuItem",NM="menu.itemSelect",Xwe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=xk(w7,e.__scopeMenu),s=wW(w7,e.__scopeMenu),l=qa(t,o),u=C.exports.useRef(!1),h=()=>{const g=o.current;if(!n&&g){const m=new CustomEvent(NM,{bubbles:!0,cancelable:!0});g.addEventListener(NM,v=>r==null?void 0:r(v),{once:!0}),ZH(g,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Zwe,In({},i,{ref:l,disabled:n,onClick:Xn(e.onClick,h),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),u.current=!0},onPointerUp:Xn(e.onPointerUp,g=>{var m;u.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Xn(e.onKeyDown,g=>{const m=s.searchRef.current!=="";n||m&&g.key===" "||Dwe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),Zwe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=wW(w7,n),s=xW(n),l=C.exports.useRef(null),u=qa(t,l),[h,g]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(x7.ItemSlot,{scope:n,disabled:r,textValue:i!=null?i:m},C.exports.createElement(Owe,In({asChild:!0},s,{focusable:!r}),C.exports.createElement(Au.div,In({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Xn(e.onPointerMove,C7(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Xn(e.onPointerLeave,C7(S=>a.onItemLeave(S))),onFocus:Xn(e.onFocus,()=>g(!0)),onBlur:Xn(e.onBlur,()=>g(!1))}))))}),Qwe="MenuRadioGroup";Ph(Qwe,{value:void 0,onValueChange:()=>{}});const Jwe="MenuItemIndicator";Ph(Jwe,{checked:!1});const e6e="MenuSub";Ph(e6e);function t6e(e){return e?"open":"closed"}function n6e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function r6e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function i6e(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=r6e(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 o6e(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function a6e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return o6e(n,t)}function C7(e){return t=>t.pointerType==="mouse"?e(t):void 0}const s6e=Wwe,l6e=Vwe,u6e=Ywe,c6e=Xwe,_W="ContextMenu",[d6e,iLe]=S2(_W,[bW]),hb=bW(),[f6e,kW]=d6e(_W),h6e=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=hb(t),u=Nl(r),h=C.exports.useCallback(g=>{s(g),u(g)},[u]);return C.exports.createElement(f6e,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(s6e,In({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},p6e="ContextMenuTrigger",g6e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=kW(p6e,n),o=hb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=g=>{a.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(l6e,In({},o,{virtualRef:s})),C.exports.createElement(Au.span,In({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Xn(e.onContextMenu,g=>{u(),h(g),g.preventDefault()}),onPointerDown:Xn(e.onPointerDown,s3(g=>{u(),l.current=window.setTimeout(()=>h(g),700)})),onPointerMove:Xn(e.onPointerMove,s3(u)),onPointerCancel:Xn(e.onPointerCancel,s3(u)),onPointerUp:Xn(e.onPointerUp,s3(u))})))}),m6e="ContextMenuContent",v6e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=kW(m6e,n),o=hb(n),a=C.exports.useRef(!1);return C.exports.createElement(u6e,In({},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)"}}))}),y6e=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=hb(n);return C.exports.createElement(c6e,In({},i,r,{ref:t}))});function s3(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const S6e=h6e,b6e=g6e,x6e=v6e,Rc=y6e,w6e=ut([e=>e.gallery,e=>e.options,Za,Er],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S,shouldUseSingleGalleryColumn:w}=e,{isLightBoxOpen:E}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:g,galleryGridTemplateColumns:w?"auto":`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:E,isStaging:n,shouldEnableResize:!(E||r==="unifiedCanvas"&&s),shouldUseSingleGalleryColumn:w}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),C6e=ut([e=>e.options,e=>e.gallery,e=>e.system,Er],(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}}),_6e=e=>e.gallery,k6e=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,E6e=C.exports.memo(e=>{var ne,H,K,te,J,X,G,Z;const t=qe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a,shouldUseSingleGalleryColumn:s}=Le(C6e),{image:l,isSelected:u}=e,{url:h,thumbnail:g,uuid:m,metadata:v}=l,[S,w]=C.exports.useState(!1),E=v2(),P=()=>w(!0),_=()=>w(!1),T=()=>{l.metadata&&t(_b(l.metadata.image.prompt)),E({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},M=()=>{l.metadata&&t(C2(l.metadata.image.seed)),E({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(xu(!1)),t(T1(l)),n!=="img2img"&&t(Eo("img2img")),E({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},O=()=>{a&&t(xu(!1)),t(sb(l)),t(dk()),n!=="unifiedCanvas"&&t(Eo("unifiedCanvas")),E({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},D=()=>{v&&t(Xke(v)),E({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},B=async()=>{var le;if((le=v==null?void 0:v.image)!=null&&le.init_image_path&&(await fetch(v.image.init_image_path)).ok){t(Eo("img2img")),t(qke(v)),E({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}E({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})},$=()=>t(pM(l)),W=le=>{le.dataTransfer.setData("invokeai/imageUuid",m),le.dataTransfer.effectAllowed="move"},j=()=>{t(xu(!0)),t(pM(l))};return ee(S6e,{onOpenChange:le=>{t(UH(le))},children:[b(b6e,{children:ee(wh,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:_,userSelect:"none",draggable:!0,onDragStart:W,children:[b(TS,{className:"hoverable-image-image",objectFit:s?"contain":r,rounded:"md",src:g||h,loading:"lazy"}),b("div",{className:"hoverable-image-content",onClick:$,children:u&&b(xa,{width:"50%",height:"50%",as:ik,className:"hoverable-image-check"})}),S&&i>=64&&b("div",{className:"hoverable-image-delete-button",children:b(vi,{label:"Delete image",hasArrow:!0,children:b(h7,{image:l,children:b(Ga,{"aria-label":"Delete image",icon:b(lSe,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},m)}),ee(x6e,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:le=>{le.detail.originalEvent.preventDefault()},children:[b(Rc,{onClickCapture:j,children:"Open In Viewer"}),b(Rc,{onClickCapture:T,disabled:((H=(ne=l==null?void 0:l.metadata)==null?void 0:ne.image)==null?void 0:H.prompt)===void 0,children:"Use Prompt"}),b(Rc,{onClickCapture:M,disabled:((te=(K=l==null?void 0:l.metadata)==null?void 0:K.image)==null?void 0:te.seed)===void 0,children:"Use Seed"}),b(Rc,{onClickCapture:D,disabled:!["txt2img","img2img"].includes((X=(J=l==null?void 0:l.metadata)==null?void 0:J.image)==null?void 0:X.type),children:"Use All Parameters"}),b(vi,{label:"Load initial image used for this generation",children:b(Rc,{onClickCapture:B,disabled:((Z=(G=l==null?void 0:l.metadata)==null?void 0:G.image)==null?void 0:Z.type)!=="img2img",children:"Use Initial Image"})}),b(Rc,{onClickCapture:I,children:"Send to Image To Image"}),b(Rc,{onClickCapture:O,children:"Send to Unified Canvas"}),b(h7,{image:l,children:b(Rc,{"data-warning":!0,children:"Delete Image"})})]})]})},k6e),aa=e=>{const{label:t,styleClass:n,...r}=e;return b(rz,{className:`invokeai__checkbox ${n}`,...r,children:t})},l3=320,BM=40,P6e={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}},zM=400;function EW(){const e=qe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:g,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:E,shouldEnableResize:P,shouldUseSingleGalleryColumn:_}=Le(w6e),{galleryMinWidth:T,galleryMaxWidth:M}=w?{galleryMinWidth:zM,galleryMaxWidth:zM}:P6e[u],[I,O]=C.exports.useState(S>=l3),[D,B]=C.exports.useState(!1),[$,W]=C.exports.useState(0),j=C.exports.useRef(null),ne=C.exports.useRef(null),H=C.exports.useRef(null);C.exports.useEffect(()=>{S>=l3&&O(!1)},[S]);const K=()=>{e(Tbe(!i)),e(Ui(!0))},te=()=>{o?X():J()},J=()=>{e(ld(!0)),i&&e(Ui(!0))},X=C.exports.useCallback(()=>{e(ld(!1)),e(UH(!1)),e(Lbe(ne.current?ne.current.scrollTop:0)),setTimeout(()=>i&&e(Ui(!0)),400)},[e,i]),G=()=>{e(c7(n))},Z=we=>{e(em(we))},le=()=>{g||(H.current=window.setTimeout(()=>X(),500))},me=()=>{H.current&&window.clearTimeout(H.current)};st("g",()=>{te()},[o,i]),st("left",()=>{e(gk())},{enabled:!E||u!=="unifiedCanvas"},[E]),st("right",()=>{e(pk())},{enabled:!E||u!=="unifiedCanvas"},[E]),st("shift+g",()=>{K()},[i]),st("esc",()=>{e(ld(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const Me=32;return st("shift+up",()=>{if(s<256){const we=We.clamp(s+Me,32,256);e(em(we))}},[s]),st("shift+down",()=>{if(s>32){const we=We.clamp(s-Me,32,256);e(em(we))}},[s]),C.exports.useEffect(()=>{!ne.current||(ne.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function we(Se){!i&&j.current&&!j.current.contains(Se.target)&&X()}return document.addEventListener("mousedown",we),()=>{document.removeEventListener("mousedown",we)}},[X,i]),b(MH,{nodeRef:j,in:o||g,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:ee("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:j,onMouseLeave:i?void 0:le,onMouseEnter:i?void 0:me,onMouseOver:i?void 0:me,children:[ee(KH,{minWidth:T,maxWidth:i?M:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:P},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(we,Se,be)=>{W(be.clientHeight),be.style.height=`${be.clientHeight}px`,i&&(be.style.position="fixed",be.style.right="1rem",B(!0))},onResizeStop:(we,Se,be,He)=>{const Je=i?We.clamp(Number(S)+He.width,T,Number(M)):Number(S)+He.width;e(Rbe(Je)),be.removeAttribute("data-resize-alert"),i&&(be.style.position="relative",be.style.removeProperty("right"),be.style.setProperty("height",i?"100%":"100vh"),B(!1),e(Ui(!0)))},onResize:(we,Se,be,He)=>{const Je=We.clamp(Number(S)+He.width,T,Number(i?M:.95*window.innerWidth));Je>=l3&&!I?O(!0):JeJe-BM&&e(em(Je-BM)),i&&(Je>=M?be.setAttribute("data-resize-alert","true"):be.removeAttribute("data-resize-alert")),be.style.height=`${$}px`},children:[ee("div",{className:"image-gallery-header",children:[b(Ao,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?ee(Rn,{children:[b(sa,{size:"sm","data-selected":n==="result",onClick:()=>e(t3("result")),children:"Generations"}),b(sa,{size:"sm","data-selected":n==="user",onClick:()=>e(t3("user")),children:"Uploads"})]}):ee(Rn,{children:[b(pt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:b(K5e,{}),onClick:()=>e(t3("result"))}),b(pt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:b(cSe,{}),onClick:()=>e(t3("user"))})]})}),ee("div",{className:"image-gallery-header-right-icons",children:[b(sd,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:b(pt,{size:"sm","aria-label":"Gallery Settings",icon:b(ak,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ee("div",{className:"image-gallery-settings-popover",children:[ee("div",{children:[b(ca,{value:s,onChange:Z,min:32,max:256,hideTooltip:!0,label:"Image Size"}),b(pt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(em(64)),icon:b(K_,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),b("div",{children:b(aa,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(Abe(h==="contain"?"cover":"contain"))})}),b("div",{children:b(aa,{label:"Auto-Switch to New Images",isChecked:m,onChange:we=>e(Mbe(we.target.checked))})}),b("div",{children:b(aa,{label:"Single Column Layout",isChecked:_,onChange:we=>e(Ibe(we.target.checked))})})]})}),b(pt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:K,icon:i?b(PH,{}):b(TH,{})})]})]}),b("div",{className:"image-gallery-container",ref:ne,children:t.length||v?ee(Rn,{children:[b("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(we=>{const{uuid:Se}=we;return b(E6e,{image:we,isSelected:r===Se},Se)})}),b(Ua,{onClick:G,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):ee("div",{className:"image-gallery-container-placeholder",children:[b(pH,{}),b("p",{children:"No Images In Gallery"})]})})]}),D&&b("div",{style:{width:S+"px",height:"100%"}})]})})}const T6e=ut(_6e,e=>({resultImages:e.categories.result.images,userImages:e.categories.user.images})),L6e=()=>{const{resultImages:e,userImages:t}=Le(T6e);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}},A6e=ut([e=>e.options,Er],(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}}),wk=e=>{const t=qe(),{optionsPanel:n,children:r,styleClass:i}=e,{activeTabName:o,showDualDisplay:a,isLightBoxOpen:s,shouldShowDualDisplayButton:l}=Le(A6e),u=L6e(),h=()=>{t(sEe(!a)),t(Ui(!0))},g=m=>{const v=m.dataTransfer.getData("invokeai/imageUuid"),S=u(v);!S||(o==="img2img"?t(T1(S)):o==="unifiedCanvas"&&t(sb(S)))};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:g,children:[r,l&&b(vi,{label:"Toggle Split View",children:b("div",{className:"workarea-split-button","data-selected":a,onClick:h,children:b(Wbe,{})})})]}),!s&&b(EW,{})]})})};function M6e(){return b(wk,{optionsPanel:b(xbe,{}),children:b(Hbe,{})})}function R6e(){const e={seed:{header:"Seed",feature:Vi.SEED,content:b(X_,{})},variations:{header:"Variations",feature:Vi.VARIATIONS,content:b(J_,{}),additionalHeaderComponents:b(Q_,{})},face_restore:{header:"Face Restoration",feature:Vi.FACE_CORRECTION,content:b(q_,{}),additionalHeaderComponents:b(iH,{})},upscale:{header:"Upscaling",feature:Vi.UPSCALE,content:b(Z_,{}),additionalHeaderComponents:b(cH,{})},other:{header:"Other Options",feature:Vi.OTHER,content:b(lH,{})}};return ee(fk,{children:[b(uk,{}),b(lk,{}),b(nk,{}),b(rk,{accordionInfo:e})]})}const I6e=()=>b("div",{className:"workarea-single-view",children:b("div",{className:"text-to-image-area",children:b(qH,{})})});function O6e(){return b(wk,{optionsPanel:b(R6e,{}),children:b(I6e,{})})}var _7=function(e,t){return _7=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])},_7(e,t)};function D6e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ml=function(){return Ml=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function Ad(e,t,n,r){var i=Z6e(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,g=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):LW(e,r,n,function(v){var S=s+h*v,w=l+g*v,E=u+m*v;o(S,w,E)})}}function Z6e(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Q6e(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,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var J6e=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,h=s,g=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:g,maxPositionY:m}},Ck=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=Q6e(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,g=o.newDiffHeight,m=J6e(a,l,u,s,h,g,Boolean(i));return m},s1=function(e,t){var n=Ck(e,t);return e.bounds=n,n};function pb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,g=0,m=0;a&&(g=i,m=o);var v=k7(e,s-g,u+g,r),S=k7(t,l-m,h+m,r);return{x:v,y:S}}var k7=function(e,t,n,r){return r?en?Fa(n,2):Fa(e,2):Fa(e,2)};function gb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=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 g=l-t*h,m=u-n*h,v=pb(g,m,i,o,0,0,null);return v}function x2(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 $M=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=mb(o,n);return!l},HM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},eCe=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}},tCe=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 nCe(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 h=e.bounds,g=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>g||nv||rg?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=gb(e,P,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:E?I:r}}}function rCe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,g=l.positionY,m=t!==h,v=n!==g,S=!m||!v;if(!(!a||S||!s)){var w=pb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var iCe=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 h=t-r.x,g=n-r.y,m=a?l:h,v=s?u:g;return{x:m,y:v}},k5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},oCe=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},aCe=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 sCe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function WM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:k7(e,o,a,i)}function lCe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function uCe(e,t){var n=oCe(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=lCe(a,s),h=t.x-r.x,g=t.y-r.y,m=h/u,v=g/u,S=l-i,w=h*h+g*g,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function cCe(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=aCe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,g=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,_=E.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,O=S.velocityAlignmentTime,D=O,B=sCe(e,l),$=Math.max(B,D),W=k5(e,M),j=k5(e,I),ne=W*i.offsetWidth/100,H=j*i.offsetHeight/100,K=u+ne,te=h-ne,J=g+H,X=m-H,G=e.transformState,Z=new Date().getTime();LW(e,T,$,function(le){var me=e.transformState,Me=me.scale,we=me.positionX,Se=me.positionY,be=new Date().getTime()-Z,He=be/D,Je=PW[S.animationType],tt=1-Je(Math.min(1,He)),ht=1-le,_t=we+a*ht,gt=Se+s*ht,ft=WM(_t,G.positionX,we,_,v,h,u,te,K,tt),vt=WM(gt,G.positionY,Se,P,v,m,g,X,J,tt);(we!==_t||Se!==gt)&&e.setTransformState(Me,ft,vt)})}}function VM(e,t){var n=e.transformState.scale;bl(e),s1(e,n),t.touches?tCe(e,t):eCe(e,t)}function UM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=iCe(e,t,n),u=l.x,h=l.y,g=k5(e,a),m=k5(e,s);uCe(e,{x:u,y:h}),rCe(e,u,h,g,m)}}function dCe(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,h=(a==null?void 0:a.height)||0,g=s.1&&g;m?cCe(e):AW(e)}}function AW(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,h=o||t=a;if((r>=1||s)&&AW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=_k(e,a,v,S);w&&Ad(e,w,h,g)}}function _k(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=x2(Fa(t,2),o,a,0,!1),u=s1(e,l),h=gb(e,n,r,l,u,s),g=h.x,m=h.y;return{scale:l,positionX:g,positionY:m}}var d0={previousScale:1,scale:1,positionX:0,positionY:0},fCe=Ml(Ml({},d0),{setComponents:function(){},contextInstance:null}),tm={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}},RW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:d0.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:d0.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:d0.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:d0.positionY}},GM=function(e){var t=Ml({},tm);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof tm[n]<"u";if(i&&r){var o=Object.prototype.toString.call(tm[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Ml(Ml({},tm[n]),e[n]):s?t[n]=FM(FM([],tm[n]),e[n]):t[n]=e[n]}}),t},IW=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 h=r*Math.exp(t*n),g=x2(Fa(h,3),s,a,u,!1);return g};function OW(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 h=o.offsetWidth,g=o.offsetHeight,m=(h/2-l)/s,v=(g/2-u)/s,S=IW(e,t,n),w=_k(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");Ad(e,w,r,i)}function DW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=RW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var g=Ck(e,a.scale),m=pb(a.positionX,a.positionY,g,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||Ad(e,v,t,n)}}function hCe(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return d0;var l=r.getBoundingClientRect(),u=pCe(t),h=u.x,g=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=x2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,_=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-g)*E+_,I=Ck(e,E),O=pb(T,M,I,o,0,0,r),D=O.x,B=O.y;return{positionX:D,positionY:B,scale:E}}function pCe(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 gCe(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 mCe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),OW(e,1,t,n,r)}},vCe=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),OW(e,-1,t,n,r)}},yCe=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,h=e.wrapperComponent,g=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!g)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};Ad(e,v,i,o)}}},SCe=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),DW(e,t,n)}},bCe=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=NW(t||i.scale,o,a);Ad(e,s,n,r)}}},xCe=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),bl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&gCe(a)&&a&&o.contains(a)){var s=hCe(e,a,n);Ad(e,s,r,i)}}},Vr=function(e){return{instance:e,state:e.transformState,zoomIn:mCe(e),zoomOut:vCe(e),setTransform:yCe(e),resetTransform:SCe(e),centerView:bCe(e),zoomToElement:xCe(e)}},Ww=!1;function Vw(){try{var e={get passive(){return Ww=!0,!1}};return e}catch(t){return Ww=!1,Ww}}var mb=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},jM=function(e){e&&clearTimeout(e)},wCe=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},NW=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}},CCe=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,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var g=mb(u,a);return!g};function _Ce(e,t){var n=e?e.deltaY<0?1:-1:0,r=N6e(t,n);return r}function BW(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 kCe=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,g=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=x2(Fa(v,3),u,l,g,S);return w},ECe=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},PCe=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=mb(a,i);return!l},TCe=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},LCe=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Fa(i[0].clientX-r.left,5),a=Fa(i[0].clientY-r.top,5),s=Fa(i[1].clientX-r.left,5),l=Fa(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},zW=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))},ACe=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 h=t/r,g=h*n;return x2(Fa(g,2),a,o,l,!u)},MCe=160,RCe=100,ICe=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(bl(e),pi(Vr(e),t,r),pi(Vr(e),t,i))},OCe=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,h=a.centerZoomedOut,g=a.zoomAnimation,m=a.wheel,v=g.size,S=g.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=_Ce(t,null),P=kCe(e,E,w,!t.ctrlKey);if(l!==P){var _=s1(e,P),T=BW(t,o,l),M=S||v===0||h,I=u&&M,O=gb(e,T.x,T.y,P,_,I),D=O.x,B=O.y;e.previousWheelEvent=t,e.setTransformState(P,D,B),pi(Vr(e),t,r),pi(Vr(e),t,i)}},DCe=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;jM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(MW(e,t.x,t.y),e.wheelAnimationTimer=null)},RCe);var o=ECe(e,t);o&&(jM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,pi(Vr(e),t,r),pi(Vr(e),t,i))},MCe))},NCe=function(e,t){var n=zW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,bl(e)},BCe=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,h=l.size;if(!(r===null||!n)){var g=LCe(t,i,n);if(!(!isFinite(g.x)||!isFinite(g.y))){var m=zW(t),v=ACe(e,m);if(v!==i){var S=s1(e,v),w=u||h===0||s,E=a&&w,P=gb(e,g.x,g.y,v,S,E),_=P.x,T=P.y;e.pinchMidpoint=g,e.lastDistance=m,e.setTransformState(v,_,T)}}}},zCe=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,MW(e,t==null?void 0:t.x,t==null?void 0:t.y)};function FCe(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 DW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,g=IW(e,h,o),m=BW(t,u,l),v=_k(e,g,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");Ad(e,v,a,s)}}var $Ce=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),h=n&&l&&u&&!a;if(!h)return!1;var g=mb(l,s);return!(g||!h)},FW=se.createContext(fCe),HCe=function(e){D6e(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=RW(n.props),n.setup=GM(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=Vw();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=CCe(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(ICe(n,r),OCe(n,r),DCe(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=$M(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),bl(n),VM(n,r),pi(Vr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=HM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),UM(n,r.clientX,r.clientY),pi(Vr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(dCe(n),pi(Vr(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=PCe(n,r);!l||(NCe(n,r),bl(n),pi(Vr(n),r,a),pi(Vr(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=TCe(n);!l||(r.preventDefault(),r.stopPropagation(),BCe(n,r),pi(Vr(n),r,a),pi(Vr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(zCe(n),pi(Vr(n),r,o),pi(Vr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=$M(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,bl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(bl(n),VM(n,r),pi(Vr(n),r,o)),h&&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=HM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];UM(n,s.clientX,s.clientY),pi(Vr(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=$Ce(n,r);!o||FCe(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,s1(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,pi(Vr(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=NW(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=wCe(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Vr(n))},n}return t.prototype.componentDidMount=function(){var n=Vw();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=Vw();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),bl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(s1(this,this.transformState.scale),this.setup=GM(this.props))},t.prototype.render=function(){var n=Vr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return b(FW.Provider,{value:Ml(Ml({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),WCe=se.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),b(HCe,{...Ml({},e,{setRef:i})})});function VCe(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 UCe=`.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; } `,YM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};VCe(UCe);var GCe=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=C.exports.useContext(FW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var g=u.current,m=h.current;g!==null&&m!==null&&l&&l(g,m)},[]),b("div",{ref:u,className:"react-transform-wrapper "+YM.wrapper+" "+r,style:a,children:b("div",{ref:h,className:"react-transform-component "+YM.content+" "+o,style:s,children:t})})};function jCe({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return b(WCe,{centerOnInit:!0,minScale:.1,initialPositionX:50,initialPositionY:50,children:({zoomIn:g,zoomOut:m,resetTransform:v,centerView:S})=>ee(Rn,{children:[ee("div",{className:"lightbox-image-options",children:[b(pt,{icon:b(V4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>g(),fontSize:20}),b(pt,{icon:b(U4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),b(pt,{icon:b(H4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),b(pt,{icon:b(W4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),b(pt,{icon:b(k5e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),b(pt,{icon:b(K_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),b(GCe,{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:()=>S(1,0,"easeOut")})})]})})}function YCe(){const e=qe(),t=Le(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Le(YH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(gk())},g=()=>{e(pk())};return st("Esc",()=>{t&&e(xu(!1))},[t]),ee("div",{className:"lightbox-container",children:[b(pt,{icon:b($4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(xu(!1))},fontSize:20}),ee("div",{className:"lightbox-display-container",children:[ee("div",{className:"lightbox-preview-wrapper",children:[b(HH,{}),!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(Ga,{"aria-label":"Previous image",icon:b(gH,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),b("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&b(Ga,{"aria-label":"Next image",icon:b(mH,{className:"next-prev-button"}),variant:"unstyled",onClick:g})})]}),n&&ee(Rn,{children:[b(jCe,{image:n.url,styleClass:"lightbox-image"}),r&&b(jH,{image:n})]})]}),b(EW,{})]})]})}const qCe=ut([ek],e=>{const{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=e;return{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),KCe=()=>{const e=qe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i}=Le(qCe);return ee(rn,{direction:"column",gap:"1rem",children:[b(ca,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:o=>{e(AR(o))},handleReset:()=>e(AR(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),b(ca,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:o=>{e(LR(o))},handleReset:()=>{e(LR(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),b(ca,{sliderMarkRightOffset:-2,label:"Seam Strength",min:.01,max:.99,step:.01,value:r,onChange:o=>{e(RR(o))},handleReset:()=>{e(RR(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),b(ca,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:o=>{e(MR(o))},handleReset:()=>{e(MR(10))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},XCe=ut(Pn,e=>{const{boundingBoxDimensions:t,boundingBoxScaleMethod:n}=e;return{boundingBoxDimensions:t,boundingBoxScale:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),ZCe=()=>{const e=qe(),{boundingBoxDimensions:t}=Le(XCe),n=a=>{e(xm({...t,width:Math.floor(a)}))},r=a=>{e(xm({...t,height:Math.floor(a)}))},i=()=>{e(xm({...t,width:Math.floor(512)}))},o=()=>{e(xm({...t,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[b(ca,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),b(ca,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},QCe=ut(Pn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function JCe(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Le(QCe),n=qe();return ee(rn,{alignItems:"center",columnGap:"1rem",children:[b(ca,{label:"Inpaint Replace",value:e,onChange:r=>{n(dM(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(dM(1)),isResetDisabled:!t}),b(Ms,{isChecked:t,onChange:r=>n(gbe(r.target.checked))})]})}const e7e=ut([ek,Td,Pn],(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}}),t7e=()=>{const e=qe(),{tileSize:t,infillMethod:n,availableInfillMethods:r,boundingBoxScale:i,isManual:o,scaledBoundingBoxDimensions:a}=Le(e7e),s=m=>{e(e3({...a,width:Math.floor(m)}))},l=m=>{e(e3({...a,height:Math.floor(m)}))},u=()=>{e(e3({...a,width:Math.floor(512)}))},h=()=>{e(e3({...a,height:Math.floor(512)}))};return ee(rn,{direction:"column",gap:"1rem",children:[b(Dl,{label:"Scale Before Processing",validValues:hSe,value:i,onChange:m=>{e(ebe(m.target.value))}}),b(ca,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:"Scaled W",min:64,max:1024,step:64,value:a.width,onChange:s,handleReset:u,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),b(ca,{isInputDisabled:!o,isResetDisabled:!o,isSliderDisabled:!o,label:"Scaled H",min:64,max:1024,step:64,value:a.height,onChange:l,handleReset:h,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),b(JCe,{}),b(Dl,{label:"Infill Method",value:n,validValues:r,onChange:m=>e(WV(m.target.value))}),b(ca,{isInputDisabled:n!=="tile",isResetDisabled:n!=="tile",isSliderDisabled:n!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:t,onChange:m=>{e(IR(m))},handleReset:()=>{e(IR(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})};function n7e(){const e={boundingBox:{header:"Bounding Box",feature:Vi.BOUNDING_BOX,content:b(ZCe,{})},seamCorrection:{header:"Seam Correction",feature:Vi.SEAM_CORRECTION,content:b(KCe,{})},infillAndScaling:{header:"Infill and Scaling",feature:Vi.INFILL_AND_SCALING,content:b(t7e,{})},seed:{header:"Seed",feature:Vi.SEED,content:b(X_,{})},variations:{header:"Variations",feature:Vi.VARIATIONS,content:b(J_,{}),additionalHeaderComponents:b(Q_,{})}};return ee(fk,{children:[b(uk,{}),b(lk,{}),b(nk,{}),b(sH,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),b(rk,{accordionInfo:e})]})}const r7e=ut(Pn,wH,Er,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),i7e=()=>{const e=qe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Le(r7e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(tbe({width:a,height:s})),e(i?JSe():dk()),e(Ui(!1))},0)},[e,r,t,n,i]),b("div",{ref:o,className:"inpainting-canvas-area",children:b(c2,{thickness:"2px",speed:"1s",size:"xl"})})};var o7e=Math.PI/180;function a7e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const $0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},it={_global:$0,version:"8.3.14",isBrowser:a7e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return it.angleDeg?e*o7e: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 it.DD.isDragging},isDragReady(){return!!it.DD.node},releaseCanvasOnDestroy:!0,document:$0.document,_injectGlobal(e){$0.Konva=e}},mr=e=>{it[e.prototype.getClassName()]=e};it._injectGlobal(it);class la{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 la(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 h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=de._getRotation(l.rotation),l}}var s7e="[object Array]",l7e="[object Number]",u7e="[object String]",c7e="[object Boolean]",d7e=Math.PI/180,f7e=180/Math.PI,Uw="#",h7e="",p7e="0",g7e="Konva warning: ",qM="Konva error: ",m7e="rgb(",Gw={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]},v7e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,u3=[];const y7e=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)===s7e},_isNumber(e){return Object.prototype.toString.call(e)===l7e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===u7e},_isBoolean(e){return Object.prototype.toString.call(e)===c7e},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){u3.push(e),u3.length===1&&y7e(function(){const t=u3;u3=[],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(Uw,h7e);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=p7e+e;return Uw+e},getRGB(e){var t;return e in Gw?(t=Gw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Uw?this._hexToRgb(e.substring(1)):e.substr(0,4)===m7e?(t=v7e.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=Gw[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,h=[0,0,0];for(let g=0;g<3;g++)s=r+1/3*-(g-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,h[g]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(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],h=l[1],g=l[2];gt.length){var a=t;t=e,e=a}for(r=0;r{t.width=0,t.height=0})}};function Md(e){return de._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||de._isBoolean(e)?e:Object.prototype.toString.call(e)}function $W(e){return e>255?255:e<0?0:Math.round(e)}function Fe(){if(it.isUnminified)return function(e,t){return de._isNumber(e)||de.warn(Md(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function HW(e){if(it.isUnminified)return function(t,n){let r=de._isNumber(t),i=de._isArray(t)&&t.length==e;return!r&&!i&&de.warn(Md(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function kk(){if(it.isUnminified)return function(e,t){var n=de._isNumber(e),r=e==="auto";return n||r||de.warn(Md(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function E1(){if(it.isUnminified)return function(e,t){return de._isString(e)||de.warn(Md(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function WW(){if(it.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(Md(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function S7e(){if(it.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(Md(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Os(){if(it.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||de.warn(Md(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function b7e(e){if(it.isUnminified)return function(t,n){return t==null||de.isObject(t)||de.warn(Md(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var nm="get",rm="set";const q={addGetterSetter(e,t,n,r,i){q.addGetter(e,t,n),q.addSetter(e,t,r,i),q.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=nm+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=rm+de._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=rm+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=nm+a(t),l=rm+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},q.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=de._capitalize(t),r=rm+n,i=nm+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=nm+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},q.addSetter(e,t,r,function(){de.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){de.each(t,function(n,r){var i=e.prototype[r],o=nm+de._capitalize(n),a=rm+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 x7e(e){var t=[],n=e.length,r=de,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=w7e+u.join(KM)+C7e)):(o+=s.property,t||(o+=T7e+s.val)),o+=E7e;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=A7e&&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 h=arguments,g=this._context;h.length===3?g.drawImage(t,n,r):h.length===5?g.drawImage(t,n,r,i,o):h.length===9&&g.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=XM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=x7e(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return hn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];hn._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{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];hn._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")&&(hn.justDragged=!0,it._mouseListenClick=!1,it._touchListenClick=!1,it._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof it.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){hn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&hn._dragElements.delete(n)})}};it.isBrowser&&(window.addEventListener("mouseup",hn._endDragBefore,!0),window.addEventListener("touchend",hn._endDragBefore,!0),window.addEventListener("mousemove",hn._drag),window.addEventListener("touchmove",hn._drag),window.addEventListener("mouseup",hn._endDragAfter,!1),window.addEventListener("touchend",hn._endDragAfter,!1));var r4="absoluteOpacity",d3="allEventListeners",fu="absoluteTransform",ZM="absoluteScale",kf="canvas",O7e="Change",D7e="children",N7e="konva",E7="listening",QM="mouseenter",JM="mouseleave",eR="set",tR="Shape",i4=" ",nR="stage",Dc="transform",B7e="Stage",P7="visible",z7e=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(i4);let F7e=1;class $e{constructor(t){this._id=F7e++,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===Dc||t===fu)&&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===Dc||t===fu,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(i4);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(kf)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===fu&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(kf)){const{scene:t,filter:n,hit:r}=this._cache.get(kf);de.releaseCanvas(t,n,r),this._cache.delete(kf)}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,h=n.drawBorder||!1,g=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 H0({pixelRatio:a,width:i,height:o}),v=new H0({pixelRatio:a,width:0,height:0}),S=new Ek({pixelRatio:g,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(kf),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(r4),this._clearSelfAndDescendantCache(ZM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(kf,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(kf)}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 h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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 h=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()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==D7e&&(r=eR+de._capitalize(n),de._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(E7,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(P7,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;hn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!it.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;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==B7e&&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(Dc),this._clearSelfAndDescendantCache(fu)),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 la,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(Dc);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(Dc),this._clearSelfAndDescendantCache(fu),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;a0?(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(r4,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{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():it.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;hn._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=hn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&hn._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=$e.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),it[r]||(de.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=it[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}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;n0?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=$e.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=$e.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 h=r===this;if(u){o.save();var g=this.getAbsoluteTransform(r),m=g.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(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=g.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&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},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,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 g=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Vp=e=>{const t=km(e);if(t==="pointer")return it.pointerEventsEnabled&&Yw.pointer;if(t==="touch")return Yw.touch;if(t==="mouse")return Yw.mouse};function iR(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&de.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const j7e="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);",o4=[];class Sb extends pa{constructor(t){super(iR(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),o4.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{iR(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===H7e){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-1&&o4.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(j7e),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 H0({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+rR,this.content.style.height=n+rR),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;rU7e&&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(),it.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return UW(t,this)}setPointerCapture(t){GW(t,this)}releaseCapture(t){ev(t)}getLayers(){return this.children}_bindContentEvents(){!it.isBrowser||G7e.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Vp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Vp(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=Vp(t.type),r=km(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!hn.isDragging||it.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=Vp(t.type),r=km(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(hn.justDragged=!1,it["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;it.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=Vp(t.type),r=km(t.type);if(!n)return;hn.isDragging&&hn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!hn.isDragging||it.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=jw(l.id)||this.getIntersection(l),h=l.id,g={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},g),u),s._fireAndBubble(n.pointerleave,Object.assign({},g),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},g),s),u._fireAndBubble(n.pointerenter,Object.assign({},g),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},g))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Vp(t.type),r=km(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=jw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,g={evt:t,pointerId:h};let m=!1;it["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):hn.justDragged||(it["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){it["_"+r+"InDblClickWindow"]=!1},it.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},g)),it["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},g)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},g)))):(this[r+"ClickEndShape"]=null,it["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),it["_"+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(T7,{evt:t}):this._fire(T7,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(L7,{evt:t}):this._fire(L7,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=jw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(f0,Pk(t)),ev(t.pointerId)}_lostpointercapture(t){ev(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 H0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new Ek({pixelRatio:1,width:this.width(),height:this.height()}),!!it.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}}Sb.prototype.nodeType=$7e;mr(Sb);q.addGetterSetter(Sb,"container");var nV="hasShadow",rV="shadowRGBA",iV="patternImage",oV="linearGradient",aV="radialGradient";let m3;function qw(){return m3||(m3=de.createCanvasElement().getContext("2d"),m3)}const tv={};function Y7e(e){e.fill()}function q7e(e){e.stroke()}function K7e(e){e.fill()}function X7e(e){e.stroke()}function Z7e(){this._clearCache(nV)}function Q7e(){this._clearCache(rV)}function J7e(){this._clearCache(iV)}function e9e(){this._clearCache(oV)}function t9e(){this._clearCache(aV)}class Re extends $e{constructor(t){super(t);let n;for(;n=de.getRandomColor(),!(n&&!(n in tv)););this.colorKey=n,tv[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(nV,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(iV,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=qw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new la;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(it.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(oV,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=qw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.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 $e.prototype.destroy.call(this),delete tv[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(),h=u?this.shadowOffsetX():0,g=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(g),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(g,0)+i.y};return n?P:this._transformedRect(P,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,h,g,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,g=h.getContext(),g.clear(),g.save(),g._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();g.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,g,this),g.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[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 h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[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,h,g,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,g=de._hexToRgb(this.colorKey),m=0;mt?(u[m]=g.r,u[m+1]=g.g,u[m+2]=g.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){de.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return UW(t,this)}setPointerCapture(t){GW(t,this)}releaseCapture(t){ev(t)}}Re.prototype._fillFunc=Y7e;Re.prototype._strokeFunc=q7e;Re.prototype._fillFuncHit=K7e;Re.prototype._strokeFuncHit=X7e;Re.prototype._centroid=!1;Re.prototype.nodeType="Shape";mr(Re);Re.prototype.eventListeners={};Re.prototype.on.call(Re.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Z7e);Re.prototype.on.call(Re.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Q7e);Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",J7e);Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",e9e);Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",t9e);q.addGetterSetter(Re,"stroke",void 0,WW());q.addGetterSetter(Re,"strokeWidth",2,Fe());q.addGetterSetter(Re,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Re,"hitStrokeWidth","auto",kk());q.addGetterSetter(Re,"strokeHitEnabled",!0,Os());q.addGetterSetter(Re,"perfectDrawEnabled",!0,Os());q.addGetterSetter(Re,"shadowForStrokeEnabled",!0,Os());q.addGetterSetter(Re,"lineJoin");q.addGetterSetter(Re,"lineCap");q.addGetterSetter(Re,"sceneFunc");q.addGetterSetter(Re,"hitFunc");q.addGetterSetter(Re,"dash");q.addGetterSetter(Re,"dashOffset",0,Fe());q.addGetterSetter(Re,"shadowColor",void 0,E1());q.addGetterSetter(Re,"shadowBlur",0,Fe());q.addGetterSetter(Re,"shadowOpacity",1,Fe());q.addComponentsGetterSetter(Re,"shadowOffset",["x","y"]);q.addGetterSetter(Re,"shadowOffsetX",0,Fe());q.addGetterSetter(Re,"shadowOffsetY",0,Fe());q.addGetterSetter(Re,"fillPatternImage");q.addGetterSetter(Re,"fill",void 0,WW());q.addGetterSetter(Re,"fillPatternX",0,Fe());q.addGetterSetter(Re,"fillPatternY",0,Fe());q.addGetterSetter(Re,"fillLinearGradientColorStops");q.addGetterSetter(Re,"strokeLinearGradientColorStops");q.addGetterSetter(Re,"fillRadialGradientStartRadius",0);q.addGetterSetter(Re,"fillRadialGradientEndRadius",0);q.addGetterSetter(Re,"fillRadialGradientColorStops");q.addGetterSetter(Re,"fillPatternRepeat","repeat");q.addGetterSetter(Re,"fillEnabled",!0);q.addGetterSetter(Re,"strokeEnabled",!0);q.addGetterSetter(Re,"shadowEnabled",!0);q.addGetterSetter(Re,"dashEnabled",!0);q.addGetterSetter(Re,"strokeScaleEnabled",!0);q.addGetterSetter(Re,"fillPriority","color");q.addComponentsGetterSetter(Re,"fillPatternOffset",["x","y"]);q.addGetterSetter(Re,"fillPatternOffsetX",0,Fe());q.addGetterSetter(Re,"fillPatternOffsetY",0,Fe());q.addComponentsGetterSetter(Re,"fillPatternScale",["x","y"]);q.addGetterSetter(Re,"fillPatternScaleX",1,Fe());q.addGetterSetter(Re,"fillPatternScaleY",1,Fe());q.addComponentsGetterSetter(Re,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Re,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Re,"fillLinearGradientStartPointX",0);q.addGetterSetter(Re,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Re,"fillLinearGradientStartPointY",0);q.addGetterSetter(Re,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Re,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Re,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Re,"fillLinearGradientEndPointX",0);q.addGetterSetter(Re,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Re,"fillLinearGradientEndPointY",0);q.addGetterSetter(Re,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Re,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Re,"fillRadialGradientStartPointX",0);q.addGetterSetter(Re,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Re,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Re,"fillRadialGradientEndPointX",0);q.addGetterSetter(Re,"fillRadialGradientEndPointY",0);q.addGetterSetter(Re,"fillPatternRotation",0);q.backCompat(Re,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var n9e="#",r9e="beforeDraw",i9e="draw",sV=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],o9e=sV.length;class Th extends pa{constructor(t){super(t),this.canvas=new H0,this.hitCanvas=new Ek({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{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;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(r9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),pa.prototype.drawScene.call(this,i,n),this._fire(i9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),pa.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()}}Th.prototype.nodeType="Layer";mr(Th);q.addGetterSetter(Th,"imageSmoothingEnabled",!0);q.addGetterSetter(Th,"clearBeforeDraw",!0);q.addGetterSetter(Th,"hitGraphEnabled",!0,Os());class Tk extends Th{constructor(t){super(t),this.listening(!1),de.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Tk.prototype.nodeType="FastLayer";mr(Tk);class l1 extends pa{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&de.throw("You may only add groups and shapes to groups.")}}l1.prototype.nodeType="Group";mr(l1);var Kw=function(){return $0.performance&&$0.performance.now?function(){return $0.performance.now()}:function(){return new Date().getTime()}}();class Ba{constructor(t,n){this.id=Ba.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Kw(),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;ithis.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=oR,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=aR,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===oR?this.setTime(t):this.state===aR&&this.setTime(this.duration-t)}pause(){this.state=s9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Dr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||nv.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=l9e++;var u=r.getLayer()||(r instanceof it.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 Ba(function(){n.tween.onEnterFrame()},u),this.tween=new u9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Dr.attrs[i]||(Dr.attrs[i]={}),Dr.attrs[i][this._id]||(Dr.attrs[i][this._id]={}),Dr.tweens[i]||(Dr.tweens[i]={});for(l in t)a9e[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,h,g,m;if(s=Dr.tweens[i][t],s&&delete Dr.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?(g=o,o=de._prepareArrayForTween(o,n,r.closed())):(h=n,n=de._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Dr.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=Dr.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=Dr.tweens[t],i;this.pause();for(i in r)delete Dr.tweens[t][i];delete Dr.attrs[t][n]}}Dr.attrs={};Dr.tweens={};$e.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Dr(e);n.play()};const nv={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||i0?t:n),h=a*n,g=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:g,width:h-u,height:m-g}}}Fu.prototype._centroid=!0;Fu.prototype.className="Arc";Fu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];mr(Fu);q.addGetterSetter(Fu,"innerRadius",0,Fe());q.addGetterSetter(Fu,"outerRadius",0,Fe());q.addGetterSetter(Fu,"angle",0,Fe());q.addGetterSetter(Fu,"clockwise",!1,Os());function A7(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),h=a*l/(s+l),g=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[g,m,v,S]}function lR(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,g,g+m,1-S),t.scale(1/E,1/P),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 h=u.points[4],g=u.points[5],m=u.points[4]+g,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=zn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.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 zn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return zn.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 zn.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],h=a[3],g=a[4],m=a[5],v=a[6];return g+=m*t/o.pathLength,zn.getPointOnEllipticalArc(s,l,u,h,g,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));i0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,O,D,B,$,W,j,ne,H,K,te;switch(v){case"l":l+=S.shift(),u+=S.shift(),_="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var J=S.shift(),X=S.shift();if(l+=J,u+=X,_="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+J,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),_="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),_="L",T.push(l,u);break;case"H":l=S.shift(),_="L",T.push(l,u);break;case"v":u+=S.shift(),_="L",T.push(l,u);break;case"V":u=S.shift(),_="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"S":D=l,B=u,O=a[a.length-1],O.command==="C"&&(D=l+(l-O.points[2]),B=u+(u-O.points[3])),T.push(D,B,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":D=l,B=u,O=a[a.length-1],O.command==="C"&&(D=l+(l-O.points[2]),B=u+(u-O.points[3])),T.push(D,B,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),_="Q",T.push(l,u);break;case"T":D=l,B=u,O=a[a.length-1],O.command==="Q"&&(D=l+(l-O.points[0]),B=u+(u-O.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(D,B,l,u);break;case"t":D=l,B=u,O=a[a.length-1],O.command==="Q"&&(D=l+(l-O.points[0]),B=u+(u-O.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(D,B,l,u);break;case"A":$=S.shift(),W=S.shift(),j=S.shift(),ne=S.shift(),H=S.shift(),K=l,te=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(K,te,l,u,ne,H,$,W,j);break;case"a":$=S.shift(),W=S.shift(),j=S.shift(),ne=S.shift(),H=S.shift(),K=l,te=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(K,te,l,u,ne,H,$,W,j);break}a.push({command:_||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,_||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=zn;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 h=i[4],g=i[5],m=i[4]+g,v=Math.PI/180;if(Math.abs(h-m)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=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(g*g))/(s*s*(m*m)+l*l*(g*g)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*g/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,j){return(W[0]*j[0]+W[1]*j[1])/(T(W)*T(j))},I=function(W,j){return(W[0]*j[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,_,s,l,O,$,h,a]}}zn.prototype.className="Path";zn.prototype._attrsAffectingSize=["data"];mr(zn);q.addGetterSetter(zn,"data");class Lh extends $u{_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=zn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=zn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,g/2),t.lineTo(-a,-g/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,g/2),t.lineTo(-a,-g/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}}}Lh.prototype.className="Arrow";mr(Lh);q.addGetterSetter(Lh,"pointerLength",10,Fe());q.addGetterSetter(Lh,"pointerWidth",10,Fe());q.addGetterSetter(Lh,"pointerAtBeginning",!1);q.addGetterSetter(Lh,"pointerAtEnding",!0);class P1 extends Re{_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)}}P1.prototype._centroid=!0;P1.prototype.className="Circle";P1.prototype._attrsAffectingSize=["radius"];mr(P1);q.addGetterSetter(P1,"radius",0,Fe());class Rd extends Re{_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)}}Rd.prototype.className="Ellipse";Rd.prototype._centroid=!0;Rd.prototype._attrsAffectingSize=["radiusX","radiusY"];mr(Rd);q.addComponentsGetterSetter(Rd,"radius",["x","y"]);q.addGetterSetter(Rd,"radiusX",0,Fe());q.addGetterSetter(Rd,"radiusY",0,Fe());class Ds extends Re{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 Ds({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ds.prototype.className="Image";mr(Ds);q.addGetterSetter(Ds,"image");q.addComponentsGetterSetter(Ds,"crop",["x","y","width","height"]);q.addGetterSetter(Ds,"cropX",0,Fe());q.addGetterSetter(Ds,"cropY",0,Fe());q.addGetterSetter(Ds,"cropWidth",0,Fe());q.addGetterSetter(Ds,"cropHeight",0,Fe());var lV=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],c9e="Change.konva",d9e="none",M7="up",R7="right",I7="down",O7="left",f9e=lV.length;class Lk extends l1{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{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)}}Mh.prototype.className="RegularPolygon";Mh.prototype._centroid=!0;Mh.prototype._attrsAffectingSize=["radius"];mr(Mh);q.addGetterSetter(Mh,"radius",0,Fe());q.addGetterSetter(Mh,"sides",0,Fe());var uR=Math.PI*2;class Rh extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,uR,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),uR,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)}}Rh.prototype.className="Ring";Rh.prototype._centroid=!0;Rh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];mr(Rh);q.addGetterSetter(Rh,"innerRadius",0,Fe());q.addGetterSetter(Rh,"outerRadius",0,Fe());class Wl extends Re{constructor(t){super(t),this._updated=!0,this.anim=new Ba(()=>{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],h=o[i+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),g)if(a){var m=a[n],v=r*2;t.drawImage(g,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(g,s,l,u,h,0,0,u,h)}_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],h=r*2;t.rect(u[h+0],u[h+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{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var y3;function Zw(){return y3||(y3=de.createCanvasElement().getContext(g9e),y3)}function E9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function P9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function T9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class gr extends Re{constructor(t){super(T9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<_9e;n++)this.on(fV[n]+p9e,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(),h=this.getWidth(),g=this.letterSpacing(),m=this.fill(),v=this.textDecoration(),S=v.indexOf("underline")!==-1,w=v.indexOf("line-through")!==-1,E,P=0,P=a/2,_=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",dR),t.setAttr("textAlign",cV),s===dR?l=(this.getHeight()-r*a-i*2)/2:s===S9e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),E=0;E1&&(P+=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(m9e,n),this}getWidth(){var t=this.attrs.width===Up||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Up||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=Zw(),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()+v3+this.fontVariant()+v3+(this.fontSize()+b9e)+k9e(this.fontFamily())}_addTextLine(t){this.align()===im&&(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 Zw().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!==Up&&o!==void 0,l=a!==Up&&a!==void 0,u=this.padding(),h=o-u*2,g=a-u*2,m=0,v=this.wrap(),S=v!==fR,w=v!==C9e&&S,E=this.ellipsis();this.textArr=[],Zw().font=this._getContextFont();for(var P=E?this._getTextWidth(Xw):0,_=0,T=t.length;_h)for(;M.length>0;){for(var O=0,D=M.length,B="",$=0;O>>1,j=M.slice(0,W+1),ne=this._getTextWidth(j)+P;ne<=h?(O=W+1,B=j,$=ne):D=W}if(B){if(w){var H,K=M[B.length],te=K===v3||K===cR;te&&$<=h?H=B.length:H=Math.max(B.lastIndexOf(v3),B.lastIndexOf(cR))+1,H>0&&(O=H,B=B.slice(0,O),$=this._getTextWidth(B))}B=B.trimRight(),this._addTextLine(B),r=Math.max(r,$),m+=i;var J=this._shouldHandleEllipsis(m);if(J){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(O),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&_g)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!==Up&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==fR;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Up&&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+Xw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(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 h=uV(this.text()),g=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var ne=t.dataArray,H=w+1;H0)return w=H,ne[H];ne[H].command==="M"&&(m={x:ne[H].points[0],y:ne[H].points[1]})}return{}},_=function(ne){var H=t._getTextSize(ne).width+r;ne===" "&&i==="justify"&&(H+=(s-a)/g);var K=0,te=0;for(v=void 0;Math.abs(H-K)/H>.01&&te<20;){te++;for(var J=K;S===void 0;)S=P(),S&&J+S.pathLengthH?v=zn.getPointOnLine(H,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Z=S.points[5],le=S.points[4]+Z;E===0?E=G+1e-8:H>K?E+=Math.PI/180*Z/Math.abs(Z):E-=Math.PI/360*Z/Math.abs(Z),(Z<0&&E=0&&E>le)&&(E=le,X=!0),v=zn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?H>S.pathLength?E=1e-8:E=H/S.pathLength:H>K?E+=(H-K)/S.pathLength/2:E=Math.max(E-(K-H)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=zn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=H/S.pathLength:H>K?E+=(H-K)/S.pathLength:E-=(K-H)/S.pathLength,E>1&&(E=1,X=!0),v=zn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(K=zn.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,O=0;Oe+`.${mV}`).join(" "),hR="nodesRect",M9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],R9e={"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 I9e="ontouchstart"in it._global;function O9e(e,t){if(e==="rotater")return"crosshair";t+=de.degToRad(R9e[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 E5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],pR=1e8;function D9e(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 vV(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 N9e(e,t){const n=D9e(e);return vV(e,t,n)}function B9e(e,t,n){let r=t;for(let i=0;i{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(M9e.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(hR),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(hR,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=(it.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={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 vV(h,-it.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-pR,y:-pR,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();g.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new la;r.rotate(-it.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.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:it.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(),E5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new w2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:I9e?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=it.getAngle(this.rotation()),o=O9e(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 Re({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 h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=o.x()-g.width/2,r=-o.y()+g.height/2;let ne=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(ne-=Math.PI);var m=it.getAngle(this.rotation());const H=m+ne,K=it.getAngle(this.rotationSnapTolerance()),J=B9e(this.rotationSnaps(),H,K)-g.rotation,X=N9e(g,J);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,_=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=_?{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(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=_?{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()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.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 S=_?{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(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{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 la;if(a.rotate(it.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=a.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=a.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:de.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new la;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new la;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(g=>{var m;const v=g.getParent().getAbsoluteTransform(),S=g.getTransform().copy();S.translate(g.offsetX(),g.offsetY());const w=new la;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(m=g.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=""),l1.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $e.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function z9e(e){return e instanceof Array||de.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){E5.indexOf(t)===-1&&de.warn("Unknown anchor name: "+t+". Available names are: "+E5.join(", "))}),e||[]}Tn.prototype.className="Transformer";mr(Tn);q.addGetterSetter(Tn,"enabledAnchors",E5,z9e);q.addGetterSetter(Tn,"flipEnabled",!0,Os());q.addGetterSetter(Tn,"resizeEnabled",!0);q.addGetterSetter(Tn,"anchorSize",10,Fe());q.addGetterSetter(Tn,"rotateEnabled",!0);q.addGetterSetter(Tn,"rotationSnaps",[]);q.addGetterSetter(Tn,"rotateAnchorOffset",50,Fe());q.addGetterSetter(Tn,"rotationSnapTolerance",5,Fe());q.addGetterSetter(Tn,"borderEnabled",!0);q.addGetterSetter(Tn,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(Tn,"anchorStrokeWidth",1,Fe());q.addGetterSetter(Tn,"anchorFill","white");q.addGetterSetter(Tn,"anchorCornerRadius",0,Fe());q.addGetterSetter(Tn,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(Tn,"borderStrokeWidth",1,Fe());q.addGetterSetter(Tn,"borderDash");q.addGetterSetter(Tn,"keepRatio",!0);q.addGetterSetter(Tn,"centeredScaling",!1);q.addGetterSetter(Tn,"ignoreStroke",!1);q.addGetterSetter(Tn,"padding",0,Fe());q.addGetterSetter(Tn,"node");q.addGetterSetter(Tn,"nodes");q.addGetterSetter(Tn,"boundBoxFunc");q.addGetterSetter(Tn,"anchorDragBoundFunc");q.addGetterSetter(Tn,"shouldOverdrawWholeArea",!1);q.addGetterSetter(Tn,"useSingleNodeRotation",!0);q.backCompat(Tn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Hu extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,it.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)}}Hu.prototype.className="Wedge";Hu.prototype._centroid=!0;Hu.prototype._attrsAffectingSize=["radius"];mr(Hu);q.addGetterSetter(Hu,"radius",0,Fe());q.addGetterSetter(Hu,"angle",0,Fe());q.addGetterSetter(Hu,"clockwise",!1);q.backCompat(Hu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function gR(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var F9e=[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],$9e=[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 H9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,g,m,v,S,w,E,P,_,T,M,I,O,D,B,$,W,j,ne,H=t+t+1,K=r-1,te=i-1,J=t+1,X=J*(J+1)/2,G=new gR,Z=null,le=G,me=null,Me=null,we=F9e[t],Se=$9e[t];for(s=1;s>Se,j!==0?(j=255/j,n[h]=(m*we>>Se)*j,n[h+1]=(v*we>>Se)*j,n[h+2]=(S*we>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=_,w-=T,E-=me.r,P-=me.g,_-=me.b,T-=me.a,l=g+((l=o+t+1)>Se,j>0?(j=255/j,n[l]=(m*we>>Se)*j,n[l+1]=(v*we>>Se)*j,n[l+2]=(S*we>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=_,w-=T,E-=me.r,P-=me.g,_-=me.b,T-=me.a,l=o+((l=a+J)0&&H9e(t,n)};q.addGetterSetter($e,"blurRadius",0,Fe(),q.afterSetFilter);const V9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?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};q.addGetterSetter($e,"contrast",0,Fe(),q.afterSetFilter);const G9e=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,h=l*4,g=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=(g-1)*h,v=o;g+v<1&&(v=0),g+v>u&&(v=0);var S=(g-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var _=S+(w-1+P)*4,T=s[E]-s[_],M=s[E+1]-s[_+1],I=s[E+2]-s[_+2],O=T,D=O>0?O:-O,B=M>0?M:-M,$=I>0?I:-I;if(B>D&&(O=M),$>D&&(O=I),O*=t,i){var W=s[E]+O,j=s[E+1]+O,ne=s[E+2]+O;s[E]=W>255?255:W<0?0:W,s[E+1]=j>255?255:j<0?0:j,s[E+2]=ne>255?255:ne<0?0:ne}else{var H=n-O;H<0?H=0:H>255&&(H=255),s[E]=s[E+1]=s[E+2]=H}}while(--w)}while(--g)};q.addGetterSetter($e,"embossStrength",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossWhiteLevel",.5,Fe(),q.afterSetFilter);q.addGetterSetter($e,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter($e,"embossBlend",!1,null,q.afterSetFilter);function Qw(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 j9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,g,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),g=t[m+2],gh&&(h=g);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,_,T,M,I,O;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),O=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,_=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,I=h+v*(h-M),O=u+v*(u-M)),m=0;mP?E:P;var _=a,T=o,M,I,O=360/T*Math.PI/180,D,B;for(I=0;IT?_:T;var M=a,I=o,O,D,B=n.polarRotation||0,$,W;for(h=0;ht&&(M=T,I=0,O=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function o8e(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=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};q.addGetterSetter($e,"pixelSize",8,Fe(),q.afterSetFilter);const u8e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,$W,q.afterSetFilter);const d8e=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;s255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter($e,"blue",0,$W,q.afterSetFilter);q.addGetterSetter($e,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const f8e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),g>127&&(g=255-g),t[l]=u,t[l+1]=h,t[l+2]=g}while(--s)}while(--o)},p8e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;iae||L[V]!==R[ae]){var fe=` `+L[V].replace(" at new "," at ");return d.displayName&&fe.includes("")&&(fe=fe.replace("",d.displayName)),fe}while(1<=V&&0<=ae);break}}}finally{zs=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Ul(d):""}var Bh=Object.prototype.hasOwnProperty,Gu=[],Fs=-1;function $o(d){return{current:d}}function Ln(d){0>Fs||(d.current=Gu[Fs],Gu[Fs]=null,Fs--)}function xn(d,f){Fs++,Gu[Fs]=d.current,d.current=f}var Ho={},Pr=$o(Ho),qr=$o(!1),Wo=Ho;function $s(d,f){var y=d.type.contextTypes;if(!y)return Ho;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var L={},R;for(R in y)L[R]=f[R];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=L),L}function Kr(d){return d=d.childContextTypes,d!=null}function es(){Ln(qr),Ln(Pr)}function Bd(d,f,y){if(Pr.current!==Ho)throw Error(a(168));xn(Pr,f),xn(qr,y)}function jl(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var L in k)if(!(L in f))throw Error(a(108,B(d)||"Unknown",L));return o({},y,k)}function ts(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ho,Wo=Pr.current,xn(Pr,d),xn(qr,qr.current),!0}function zd(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=jl(d,f,Wo),k.__reactInternalMemoizedMergedChildContext=d,Ln(qr),Ln(Pr),xn(Pr,d)):Ln(qr),xn(qr,y)}var Si=Math.clz32?Math.clz32:Fd,zh=Math.log,Fh=Math.LN2;function Fd(d){return d>>>=0,d===0?32:31-(zh(d)/Fh|0)|0}var Hs=64,co=4194304;function Ws(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 Yl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,L=d.suspendedLanes,R=d.pingedLanes,V=y&268435455;if(V!==0){var ae=V&~L;ae!==0?k=Ws(ae):(R&=V,R!==0&&(k=Ws(R)))}else V=y&~L,V!==0?k=Ws(V):R!==0&&(k=Ws(R));if(k===0)return 0;if(f!==0&&f!==k&&(f&L)===0&&(L=k&-k,R=f&-f,L>=R||L===16&&(R&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0y;y++)f.push(d);return f}function Ca(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-Si(f),d[f]=y}function Hd(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var k=d.eventTimes;for(d=d.expirationTimes;0>=V,L-=V,ji=1<<32-Si(f)+L|y<Ft?(Hr=Tt,Tt=null):Hr=Tt.sibling;var Kt=je(pe,Tt,ve[Ft],Ve);if(Kt===null){Tt===null&&(Tt=Hr);break}d&&Tt&&Kt.alternate===null&&f(pe,Tt),ue=R(Kt,ue,Ft),Rt===null?Te=Kt:Rt.sibling=Kt,Rt=Kt,Tt=Hr}if(Ft===ve.length)return y(pe,Tt),$n&&Vs(pe,Ft),Te;if(Tt===null){for(;FtFt?(Hr=Tt,Tt=null):Hr=Tt.sibling;var cs=je(pe,Tt,Kt.value,Ve);if(cs===null){Tt===null&&(Tt=Hr);break}d&&Tt&&cs.alternate===null&&f(pe,Tt),ue=R(cs,ue,Ft),Rt===null?Te=cs:Rt.sibling=cs,Rt=cs,Tt=Hr}if(Kt.done)return y(pe,Tt),$n&&Vs(pe,Ft),Te;if(Tt===null){for(;!Kt.done;Ft++,Kt=ve.next())Kt=Mt(pe,Kt.value,Ve),Kt!==null&&(ue=R(Kt,ue,Ft),Rt===null?Te=Kt:Rt.sibling=Kt,Rt=Kt);return $n&&Vs(pe,Ft),Te}for(Tt=k(pe,Tt);!Kt.done;Ft++,Kt=ve.next())Kt=Wn(Tt,pe,Ft,Kt.value,Ve),Kt!==null&&(d&&Kt.alternate!==null&&Tt.delete(Kt.key===null?Ft:Kt.key),ue=R(Kt,ue,Ft),Rt===null?Te=Kt:Rt.sibling=Kt,Rt=Kt);return d&&Tt.forEach(function(fi){return f(pe,fi)}),$n&&Vs(pe,Ft),Te}function Jo(pe,ue,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===h&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case l:e:{for(var Te=ve.key,Rt=ue;Rt!==null;){if(Rt.key===Te){if(Te=ve.type,Te===h){if(Rt.tag===7){y(pe,Rt.sibling),ue=L(Rt,ve.props.children),ue.return=pe,pe=ue;break e}}else if(Rt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&Q1(Te)===Rt.type){y(pe,Rt.sibling),ue=L(Rt,ve.props),ue.ref=Ea(pe,Rt,ve),ue.return=pe,pe=ue;break e}y(pe,Rt);break}else f(pe,Rt);Rt=Rt.sibling}ve.type===h?(ue=rl(ve.props.children,pe.mode,Ve,ve.key),ue.return=pe,pe=ue):(Ve=mf(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=Ea(pe,ue,ve),Ve.return=pe,pe=Ve)}return V(pe);case u:e:{for(Rt=ve.key;ue!==null;){if(ue.key===Rt)if(ue.tag===4&&ue.stateNode.containerInfo===ve.containerInfo&&ue.stateNode.implementation===ve.implementation){y(pe,ue.sibling),ue=L(ue,ve.children||[]),ue.return=pe,pe=ue;break e}else{y(pe,ue);break}else f(pe,ue);ue=ue.sibling}ue=il(ve,pe.mode,Ve),ue.return=pe,pe=ue}return V(pe);case T:return Rt=ve._init,Jo(pe,ue,Rt(ve._payload),Ve)}if(te(ve))return An(pe,ue,ve,Ve);if(O(ve))return nr(pe,ue,ve,Ve);Ni(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,ue!==null&&ue.tag===6?(y(pe,ue.sibling),ue=L(ue,ve),ue.return=pe,pe=ue):(y(pe,ue),ue=Ep(ve,pe.mode,Ve),ue.return=pe,pe=ue),V(pe)):y(pe,ue)}return Jo}var nc=I2(!0),O2=I2(!1),Qd={},go=$o(Qd),Pa=$o(Qd),ie=$o(Qd);function ye(d){if(d===Qd)throw Error(a(174));return d}function ge(d,f){xn(ie,f),xn(Pa,d),xn(go,Qd),d=X(f),Ln(go),xn(go,d)}function Ge(){Ln(go),Ln(Pa),Ln(ie)}function Pt(d){var f=ye(ie.current),y=ye(go.current);f=G(y,d.type,f),y!==f&&(xn(Pa,d),xn(go,f))}function Qt(d){Pa.current===d&&(Ln(go),Ln(Pa))}var It=$o(0);function fn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Vu(y)||Nd(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Jd=[];function J1(){for(var d=0;dy?y:4,d(!0);var k=rc.transition;rc.transition={};try{d(!1),f()}finally{Wt=y,rc.transition=k}}function cc(){return wi().memoizedState}function sg(d,f,y){var k=Rr(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},fc(d))hc(f,y);else if(y=tc(d,f,y,k),y!==null){var L=di();yo(y,d,k,L),af(y,f,k)}}function dc(d,f,y){var k=Rr(d),L={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(fc(d))hc(f,L);else{var R=d.alternate;if(d.lanes===0&&(R===null||R.lanes===0)&&(R=f.lastRenderedReducer,R!==null))try{var V=f.lastRenderedState,ae=R(V,y);if(L.hasEagerState=!0,L.eagerState=ae,U(ae,V)){var fe=f.interleaved;fe===null?(L.next=L,Xd(f)):(L.next=fe.next,fe.next=L),f.interleaved=L;return}}catch(Ne){}finally{}y=tc(d,f,L,k),y!==null&&(L=di(),yo(y,d,k,L),af(y,f,k))}}function fc(d){var f=d.alternate;return d===wn||f!==null&&f===wn}function hc(d,f){ef=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function af(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,ql(d,y)}}var is={readContext:Yi,useCallback:si,useContext:si,useEffect:si,useImperativeHandle:si,useInsertionEffect:si,useLayoutEffect:si,useMemo:si,useReducer:si,useRef:si,useState:si,useDebugValue:si,useDeferredValue:si,useTransition:si,useMutableSource:si,useSyncExternalStore:si,useId:si,unstable_isNewReconciler:!1},Eb={readContext:Yi,useCallback:function(d,f){return Zr().memoizedState=[d,f===void 0?null:f],d},useContext:Yi,useEffect:B2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Ql(4194308,4,Sr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Ql(4194308,4,d,f)},useInsertionEffect:function(d,f){return Ql(4,2,d,f)},useMemo:function(d,f){var y=Zr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Zr();return f=y!==void 0?y(f):f,k.memoizedState=k.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},k.queue=d,d=d.dispatch=sg.bind(null,wn,d),[k.memoizedState,d]},useRef:function(d){var f=Zr();return d={current:d},f.memoizedState=d},useState:N2,useDebugValue:ig,useDeferredValue:function(d){return Zr().memoizedState=d},useTransition:function(){var d=N2(!1),f=d[0];return d=ag.bind(null,d[1]),Zr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=wn,L=Zr();if($n){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),$r===null)throw Error(a(349));(Zl&30)!==0||rg(k,f,y)}L.memoizedState=y;var R={value:y,getSnapshot:f};return L.queue=R,B2(js.bind(null,k,R,d),[d]),k.flags|=2048,rf(9,lc.bind(null,k,R,y,f),void 0,null),y},useId:function(){var d=Zr(),f=$r.identifierPrefix;if($n){var y=_a,k=ji;y=(k&~(1<<32-Si(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=ic++,0mp&&(f.flags|=128,k=!0,mc(L,!1),f.lanes=4194304)}else{if(!k)if(d=fn(R),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),mc(L,!0),L.tail===null&&L.tailMode==="hidden"&&!R.alternate&&!$n)return li(f),null}else 2*Gn()-L.renderingStartTime>mp&&y!==1073741824&&(f.flags|=128,k=!0,mc(L,!1),f.lanes=4194304);L.isBackwards?(R.sibling=f.child,f.child=R):(d=L.last,d!==null?d.sibling=R:f.child=R,L.last=R)}return L.tail!==null?(f=L.tail,L.rendering=f,L.tail=f.sibling,L.renderingStartTime=Gn(),f.sibling=null,d=It.current,xn(It,k?d&1|2:d&1),f):(li(f),null);case 22:case 23:return kc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Ki&1073741824)!==0&&(li(f),gt&&f.subtreeFlags&6&&(f.flags|=8192)):li(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function gg(d,f){switch(q1(f),f.tag){case 1:return Kr(f.type)&&es(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),Ln(qr),Ln(Pr),J1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(Ln(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Qu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Ln(It),null;case 4:return Ge(),null;case 10:return qd(f.type._context),null;case 22:case 23:return kc(),null;case 24:return null;default:return null}}var qs=!1,Lr=!1,Rb=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function vc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Yn(d,f,k)}else y.current=null}function Ko(d,f,y){try{y()}catch(k){Yn(d,f,k)}}var rp=!1;function eu(d,f){for(Z(d.containerInfo),Ke=f;Ke!==null;)if(d=Ke,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Ke=f;else for(;Ke!==null;){d=Ke;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,L=y.memoizedState,R=d.stateNode,V=R.getSnapshotBeforeUpdate(d.elementType===d.type?k:Uo(d.type,k),L);R.__reactInternalSnapshotBeforeUpdate=V}break;case 3:gt&&zo(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(ae){Yn(d,d.return,ae)}if(f=d.sibling,f!==null){f.return=d.return,Ke=f;break}Ke=d.return}return y=rp,rp=!1,y}function ui(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var L=k=k.next;do{if((L.tag&d)===d){var R=L.destroy;L.destroy=void 0,R!==void 0&&Ko(f,y,R)}L=L.next}while(L!==k)}}function ip(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var k=y.create;y.destroy=k()}y=y.next}while(y!==f)}}function op(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=J(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function mg(d){var f=d.alternate;f!==null&&(d.alternate=null,mg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&Xe(f)),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 yc(d){return d.tag===5||d.tag===3||d.tag===4}function as(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||yc(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 ap(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?De(y,d,f):bt(y,d);else if(k!==4&&(d=d.child,d!==null))for(ap(d,f,y),d=d.sibling;d!==null;)ap(d,f,y),d=d.sibling}function vg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?cn(y,d,f):ke(y,d);else if(k!==4&&(d=d.child,d!==null))for(vg(d,f,y),d=d.sibling;d!==null;)vg(d,f,y),d=d.sibling}var xr=null,Xo=!1;function Zo(d,f,y){for(y=y.child;y!==null;)Ar(d,f,y),y=y.sibling}function Ar(d,f,y){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(dn,y)}catch(ae){}switch(y.tag){case 5:Lr||vc(y,f);case 6:if(gt){var k=xr,L=Xo;xr=null,Zo(d,f,y),xr=k,Xo=L,xr!==null&&(Xo?Qe(xr,y.stateNode):lt(xr,y.stateNode))}else Zo(d,f,y);break;case 18:gt&&xr!==null&&(Xo?V1(xr,y.stateNode):W1(xr,y.stateNode));break;case 4:gt?(k=xr,L=Xo,xr=y.stateNode.containerInfo,Xo=!0,Zo(d,f,y),xr=k,Xo=L):(ft&&(k=y.stateNode.containerInfo,L=wa(k),Wu(k,L)),Zo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Lr&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){L=k=k.next;do{var R=L,V=R.destroy;R=R.tag,V!==void 0&&((R&2)!==0||(R&4)!==0)&&Ko(y,f,V),L=L.next}while(L!==k)}Zo(d,f,y);break;case 1:if(!Lr&&(vc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(ae){Yn(y,f,ae)}Zo(d,f,y);break;case 21:Zo(d,f,y);break;case 22:y.mode&1?(Lr=(k=Lr)||y.memoizedState!==null,Zo(d,f,y),Lr=k):Zo(d,f,y);break;default:Zo(d,f,y)}}function sp(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Rb),f.forEach(function(k){var L=ty.bind(null,d,k);y.has(k)||(y.add(k),k.then(L,L))})}}function mo(d,f){var y=f.deletions;if(y!==null)for(var k=0;k";case dp:return":has("+(bg(d)||"")+")";case fp:return'[role="'+d.value+'"]';case hp:return'"'+d.value+'"';case Sc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function bc(d,f){var y=[];d=[d,0];for(var k=0;kL&&(L=V),k&=~R}if(k=L,k=Gn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*Ib(k/1960))-k,10d?16:d,Et===null)var k=!1;else{if(d=Et,Et=null,vp=0,(zt&6)!==0)throw Error(a(331));var L=zt;for(zt|=4,Ke=d.current;Ke!==null;){var R=Ke,V=R.child;if((Ke.flags&16)!==0){var ae=R.deletions;if(ae!==null){for(var fe=0;feGn()-Cg?el(d,0):wg|=y),Jr(d,f)}function Tg(d,f){f===0&&((d.mode&1)===0?f=1:(f=co,co<<=1,(co&130023424)===0&&(co=4194304)));var y=di();d=Go(d,f),d!==null&&(Ca(d,f,y),Jr(d,y))}function Db(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),Tg(d,y)}function ty(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,L=d.memoizedState;L!==null&&(y=L.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),Tg(d,y)}var Lg;Lg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||qr.current)Bi=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Bi=!1,Ab(d,f,y);Bi=(d.flags&131072)!==0}else Bi=!1,$n&&(f.flags&1048576)!==0&&Y1(f,yr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;Ta(d,f),d=f.pendingProps;var L=$s(f,Pr.current);ec(f,y),L=tg(null,f,k,d,L,y);var R=oc();return f.flags|=1,typeof L=="object"&&L!==null&&typeof L.render=="function"&&L.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Kr(k)?(R=!0,ts(f)):R=!1,f.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,X1(f),L.updater=jo,f.stateNode=L,L._reactInternals=f,Z1(f,k,d,y),f=Yo(null,f,k,!0,R,y)):(f.tag=0,$n&&R&&bi(f),Ci(null,f,L,y),f=f.child),f;case 16:k=f.elementType;e:{switch(Ta(d,f),d=f.pendingProps,L=k._init,k=L(k._payload),f.type=k,L=f.tag=_p(k),d=Uo(k,d),L){case 0:f=cg(null,f,k,d,y);break e;case 1:f=j2(null,f,k,d,y);break e;case 11:f=W2(null,f,k,d,y);break e;case 14:f=Ys(null,f,k,Uo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,L=f.pendingProps,L=f.elementType===k?L:Uo(k,L),cg(d,f,k,L,y);case 1:return k=f.type,L=f.pendingProps,L=f.elementType===k?L:Uo(k,L),j2(d,f,k,L,y);case 3:e:{if(Y2(f),d===null)throw Error(a(387));k=f.pendingProps,R=f.memoizedState,L=R.element,L2(d,f),qh(f,k,null,y);var V=f.memoizedState;if(k=V.element,vt&&R.isDehydrated)if(R={element:k,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},f.updateQueue.baseState=R,f.memoizedState=R,f.flags&256){L=pc(Error(a(423)),f),f=q2(d,f,k,y,L);break e}else if(k!==L){L=pc(Error(a(424)),f),f=q2(d,f,k,y,L);break e}else for(vt&&(ho=D1(f.stateNode.containerInfo),jn=f,$n=!0,Di=null,po=!1),y=O2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Qu(),k===L){f=os(d,f,y);break e}Ci(d,f,k,y)}f=f.child}return f;case 5:return Pt(f),d===null&&Ud(f),k=f.type,L=f.pendingProps,R=d!==null?d.memoizedProps:null,V=L.children,be(k,L)?V=null:R!==null&&be(k,R)&&(f.flags|=32),G2(d,f),Ci(d,f,V,y),f.child;case 6:return d===null&&Ud(f),null;case 13:return K2(d,f,y);case 4:return ge(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=nc(f,null,k,y):Ci(d,f,k,y),f.child;case 11:return k=f.type,L=f.pendingProps,L=f.elementType===k?L:Uo(k,L),W2(d,f,k,L,y);case 7:return Ci(d,f,f.pendingProps,y),f.child;case 8:return Ci(d,f,f.pendingProps.children,y),f.child;case 12:return Ci(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,L=f.pendingProps,R=f.memoizedProps,V=L.value,T2(f,k,V),R!==null)if(U(R.value,V)){if(R.children===L.children&&!qr.current){f=os(d,f,y);break e}}else for(R=f.child,R!==null&&(R.return=f);R!==null;){var ae=R.dependencies;if(ae!==null){V=R.child;for(var fe=ae.firstContext;fe!==null;){if(fe.context===k){if(R.tag===1){fe=rs(-1,y&-y),fe.tag=2;var Ne=R.updateQueue;if(Ne!==null){Ne=Ne.shared;var et=Ne.pending;et===null?fe.next=fe:(fe.next=et.next,et.next=fe),Ne.pending=fe}}R.lanes|=y,fe=R.alternate,fe!==null&&(fe.lanes|=y),Kd(R.return,y,f),ae.lanes|=y;break}fe=fe.next}}else if(R.tag===10)V=R.type===f.type?null:R.child;else if(R.tag===18){if(V=R.return,V===null)throw Error(a(341));V.lanes|=y,ae=V.alternate,ae!==null&&(ae.lanes|=y),Kd(V,y,f),V=R.sibling}else V=R.child;if(V!==null)V.return=R;else for(V=R;V!==null;){if(V===f){V=null;break}if(R=V.sibling,R!==null){R.return=V.return,V=R;break}V=V.return}R=V}Ci(d,f,L.children,y),f=f.child}return f;case 9:return L=f.type,k=f.pendingProps.children,ec(f,y),L=Yi(L),k=k(L),f.flags|=1,Ci(d,f,k,y),f.child;case 14:return k=f.type,L=Uo(k,f.pendingProps),L=Uo(k.type,L),Ys(d,f,k,L,y);case 15:return V2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,L=f.pendingProps,L=f.elementType===k?L:Uo(k,L),Ta(d,f),f.tag=1,Kr(k)?(d=!0,ts(f)):d=!1,ec(f,y),M2(f,k,L),Z1(f,k,L,y),Yo(null,f,k,!0,d,y);case 19:return Z2(d,f,y);case 22:return U2(d,f,y)}throw Error(a(156,f.tag))};function Ei(d,f){return Ku(d,f)}function La(d,f,y,k){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function So(d,f,y,k){return new La(d,f,y,k)}function Ag(d){return d=d.prototype,!(!d||!d.isReactComponent)}function _p(d){if(typeof d=="function")return Ag(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Zi(d,f){var y=d.alternate;return y===null?(y=So(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function mf(d,f,y,k,L,R){var V=2;if(k=d,typeof d=="function")Ag(d)&&(V=1);else if(typeof d=="string")V=5;else e:switch(d){case h:return rl(y.children,L,R,f);case g:V=8,L|=8;break;case m:return d=So(12,y,f,L|2),d.elementType=m,d.lanes=R,d;case E:return d=So(13,y,f,L),d.elementType=E,d.lanes=R,d;case P:return d=So(19,y,f,L),d.elementType=P,d.lanes=R,d;case M:return kp(y,L,R,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:V=10;break e;case S:V=9;break e;case w:V=11;break e;case _:V=14;break e;case T:V=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=So(V,y,f,L),f.elementType=d,f.type=k,f.lanes=R,f}function rl(d,f,y,k){return d=So(7,d,k,f),d.lanes=y,d}function kp(d,f,y,k){return d=So(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function Ep(d,f,y){return d=So(6,d,null,f),d.lanes=y,d}function il(d,f,y){return f=So(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function vf(d,f,y,k,L){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ht,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qu(0),this.expirationTimes=qu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qu(0),this.identifierPrefix=k,this.onRecoverableError=L,vt&&(this.mutableSourceEagerHydrationData=null)}function ny(d,f,y,k,L,R,V,ae,fe){return d=new vf(d,f,y,ae,fe),f===1?(f=1,R===!0&&(f|=8)):f=0,R=So(3,null,null,f),d.current=R,R.stateNode=d,R.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},X1(R),d}function Mg(d){if(!d)return Ho;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Kr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Kr(y))return jl(d,y,f)}return f}function Rg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=ne(f),d===null?null:d.stateNode}function yf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ne&&R>=Mt&&L<=et&&V<=je){d.splice(f,1);break}else if(k!==Ne||y.width!==fe.width||jeV){if(!(R!==Mt||y.height!==fe.height||etL)){Ne>k&&(fe.width+=Ne-k,fe.x=k),etR&&(fe.height+=Mt-R,fe.y=R),jey&&(y=V)),V ")+` 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 J(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:Pp,findFiberByHostInstance:d.findFiberByHostInstance||Ig,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{dn=f.inject(d),Vt=f}catch(y){}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!kt)throw Error(a(363));d=xg(d,f);var L=qt(d,y,k).disconnect;return{disconnect:function(){L()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Wt;try{return Wt=d,f()}finally{Wt=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var L=f.current,R=di(),V=Rr(L);return y=Mg(y),f.context===null?f.context=y:f.pendingContext=y,f=rs(R,V),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Gs(L,f,V),d!==null&&(yo(d,L,V,R),Yh(d,L,V)),V},n};(function(e){e.exports=g8e})(yV);const m8e=J7(yV.exports);var Ak={exports:{}},Ih={};/** * @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. */Ih.ConcurrentRoot=1;Ih.ContinuousEventPriority=4;Ih.DefaultEventPriority=16;Ih.DiscreteEventPriority=1;Ih.IdleEventPriority=536870912;Ih.LegacyRoot=0;(function(e){e.exports=Ih})(Ak);const mR={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let vR=!1,yR=!1;const Mk=".react-konva-event",v8e=`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 `,y8e=`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 `,S8e={};function bb(e,t,n=S8e){if(!vR&&"zIndex"in t&&(console.warn(y8e),vR=!0),!yR&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(v8e),yR=!0)}for(var o in n)if(!mR[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 h=t._useStrictMode,g={},m=!1;const v={};for(var o in t)if(!mR[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)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,g[o]=t[o])}m&&(e.setAttrs(g),Od(e));for(var l in v)e.on(l+Mk,v[l])}function Od(e){if(!it.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const SV={},b8e={};mh.Node.prototype._applyProps=bb;function x8e(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),Od(e)}function w8e(e,t,n){let r=mh[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=mh.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 bb(l,o),l}function C8e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function _8e(e,t,n){return!1}function k8e(e){return e}function E8e(){return null}function P8e(){return null}function T8e(e,t,n,r){return b8e}function L8e(){}function A8e(e){}function M8e(e,t){return!1}function R8e(){return SV}function I8e(){return SV}const O8e=setTimeout,D8e=clearTimeout,N8e=-1;function B8e(e,t){return!1}const z8e=!1,F8e=!0,$8e=!0;function H8e(e,t){t.parent===e?t.moveToTop():e.add(t),Od(e)}function W8e(e,t){t.parent===e?t.moveToTop():e.add(t),Od(e)}function bV(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Od(e)}function V8e(e,t,n){bV(e,t,n)}function U8e(e,t){t.destroy(),t.off(Mk),Od(e)}function G8e(e,t){t.destroy(),t.off(Mk),Od(e)}function j8e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Y8e(e,t,n){}function q8e(e,t,n,r,i){bb(e,i,r)}function K8e(e){e.hide(),Od(e)}function X8e(e){}function Z8e(e,t){(t.visible==null||t.visible)&&e.show()}function Q8e(e,t){}function J8e(e){}function e_e(){}const t_e=()=>Ak.exports.DefaultEventPriority,n_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:x8e,createInstance:w8e,createTextInstance:C8e,finalizeInitialChildren:_8e,getPublicInstance:k8e,prepareForCommit:E8e,preparePortalMount:P8e,prepareUpdate:T8e,resetAfterCommit:L8e,resetTextContent:A8e,shouldDeprioritizeSubtree:M8e,getRootHostContext:R8e,getChildHostContext:I8e,scheduleTimeout:O8e,cancelTimeout:D8e,noTimeout:N8e,shouldSetTextContent:B8e,isPrimaryRenderer:z8e,warnsIfNotActing:F8e,supportsMutation:$8e,appendChild:H8e,appendChildToContainer:W8e,insertBefore:bV,insertInContainerBefore:V8e,removeChild:U8e,removeChildFromContainer:G8e,commitTextUpdate:j8e,commitMount:Y8e,commitUpdate:q8e,hideInstance:K8e,hideTextInstance:X8e,unhideInstance:Z8e,unhideTextInstance:Q8e,clearContainer:J8e,detachDeletedInstance:e_e,getCurrentEventPriority:t_e,now:g0.exports.unstable_now,idlePriority:g0.exports.unstable_IdlePriority,run:g0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var r_e=Object.defineProperty,i_e=Object.defineProperties,o_e=Object.getOwnPropertyDescriptors,SR=Object.getOwnPropertySymbols,a_e=Object.prototype.hasOwnProperty,s_e=Object.prototype.propertyIsEnumerable,bR=(e,t,n)=>t in e?r_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xR=(e,t)=>{for(var n in t||(t={}))a_e.call(t,n)&&bR(e,n,t[n]);if(SR)for(var n of SR(t))s_e.call(t,n)&&bR(e,n,t[n]);return e},l_e=(e,t)=>i_e(e,o_e(t));function Rk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=Rk(r,t,n);if(i)return i;r=t?null:r.sibling}}function xV(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch(t){return e}}const Ik=xV(C.exports.createContext(null));class wV extends C.exports.Component{render(){return b(Ik.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:u_e,ReactCurrentDispatcher:c_e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d_e(){const e=C.exports.useContext(Ik);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=u_e.current)!=null?r:Rk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const am=[],wR=new WeakMap;function f_e(){var e;const t=d_e();am.splice(0,am.length),Rk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==Ik&&am.push(xV(i))});for(const n of am){const r=(e=c_e.current)==null?void 0:e.readContext(n);wR.set(n,r)}return C.exports.useMemo(()=>am.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,l_e(xR({},i),{value:wR.get(r)}))),n=>b(wV,{...xR({},n)})),[])}function h_e(e){const t=se.useRef();return se.useLayoutEffect(()=>{t.current=e}),t.current}const p_e=e=>{const t=se.useRef(),n=se.useRef(),r=se.useRef(),i=h_e(e),o=f_e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return se.useLayoutEffect(()=>(n.current=new mh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=Em.createContainer(n.current,Ak.exports.LegacyRoot,!1,null),Em.updateContainer(b(o,{children:e.children}),r.current),()=>{!mh.isBrowser||(a(null),Em.updateContainer(null,r.current,null),n.current.destroy())}),[]),se.useLayoutEffect(()=>{a(n.current),bb(n.current,e,i),Em.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})},sm="Layer",Iu="Group",Ou="Rect",Ef="Circle",P5="Line",CV="Image",g_e="Transformer",Em=m8e(n_e);Em.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:se.version,rendererPackageName:"react-konva"});const m_e=se.forwardRef((e,t)=>b(wV,{children:b(p_e,{...e,forwardedRef:t})})),v_e=ut([Pn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:We.isEqual}}),y_e=e=>{const{...t}=e,{objects:n}=Le(v_e);return b(Iu,{listening:!1,...t,children:n.filter(sk).map((r,i)=>b(P5,{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))})},ah=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},S_e=ut(Pn,e=>{const{cursorPosition:t,brushSize:n,colorPickerColor:r,maskColor:i,brushColor:o,tool:a,layer:s,shouldShowBrush:l,isMovingBoundingBox:u,isTransformingBoundingBox:h,stageScale:g,stageDimensions:m,boundingBoxCoordinates:v,boundingBoxDimensions:S,shouldRestrictStrokesToBox:w}=e,E=w?{clipX:v.x,clipY:v.y,clipWidth:S.width,clipHeight:S.height}:{};return{cursorPosition:t,brushX:t?t.x:m.width/2,brushY:t?t.y:m.height/2,radius:n/2,colorPickerOuterRadius:uM/g,colorPickerInnerRadius:(uM-f7+1)/g,maskColorString:ah({...i,a:.5}),brushColorString:ah(o),colorPickerColorString:ah(r),tool:a,layer:s,shouldShowBrush:l,shouldDrawBrushPreview:!(u||h||!t)&&l,strokeWidth:1.5/g,dotRadius:1.5/g,clip:E}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),b_e=e=>{const{...t}=e,{brushX:n,brushY:r,radius:i,maskColorString:o,tool:a,layer:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h,brushColorString:g,colorPickerColorString:m,colorPickerInnerRadius:v,colorPickerOuterRadius:S,clip:w}=Le(S_e);return l?ee(Iu,{listening:!1,...w,...t,children:[a==="colorPicker"?ee(Rn,{children:[b(Ef,{x:n,y:r,radius:S,stroke:g,strokeWidth:f7,strokeScaleEnabled:!1}),b(Ef,{x:n,y:r,radius:v,stroke:m,strokeWidth:f7,strokeScaleEnabled:!1})]}):ee(Rn,{children:[b(Ef,{x:n,y:r,radius:i,fill:s==="mask"?o:g,globalCompositeOperation:a==="eraser"?"destination-out":"source-out"}),b(Ef,{x:n,y:r,radius:i,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),b(Ef,{x:n,y:r,radius:i,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1})]}),b(Ef,{x:n,y:r,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),b(Ef,{x:n,y:r,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},x_e=ut(Pn,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}}),w_e=e=>{const{...t}=e,n=qe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMovingBoundingBox:a,isTransformingBoundingBox:s,stageScale:l,shouldSnapToGrid:u,tool:h,hitStrokeWidth:g}=Le(x_e),m=C.exports.useRef(null),v=C.exports.useRef(null),[S,w]=C.exports.useState(!1);C.exports.useEffect(()=>{var ne;!m.current||!v.current||(m.current.nodes([v.current]),(ne=m.current.getLayer())==null||ne.batchDraw())},[]);const E=64*l,P=C.exports.useCallback(ne=>{if(!u){n(Mw({x:Math.floor(ne.target.x()),y:Math.floor(ne.target.y())}));return}const H=ne.target.x(),K=ne.target.y(),te=Cl(H,64),J=Cl(K,64);ne.target.x(te),ne.target.y(J),n(Mw({x:te,y:J}))},[n,u]),_=C.exports.useCallback(()=>{if(!v.current)return;const ne=v.current,H=ne.scaleX(),K=ne.scaleY(),te=Math.round(ne.width()*H),J=Math.round(ne.height()*K),X=Math.round(ne.x()),G=Math.round(ne.y());n(xm({width:te,height:J})),n(Mw({x:u?Kc(X,64):X,y:u?Kc(G,64):G})),ne.scaleX(1),ne.scaleY(1)},[n,u]),T=C.exports.useCallback((ne,H,K)=>{const te=ne.x%E,J=ne.y%E;return{x:Kc(H.x,E)+te,y:Kc(H.y,E)+J}},[E]),M=()=>{n(Dw(!0))},I=()=>{n(Dw(!1)),n(Ow(!1)),n(Jy(!1)),w(!1)},O=()=>{n(Ow(!0))},D=()=>{n(Dw(!1)),n(Ow(!1)),n(Jy(!1)),w(!1)},B=()=>{w(!0)},$=()=>{!s&&!a&&w(!1)},W=()=>{n(Jy(!0))},j=()=>{n(Jy(!1))};return ee(Iu,{...t,children:[b(Ou,{height:i.height,width:i.width,x:r.x,y:r.y,onMouseEnter:W,onMouseOver:W,onMouseLeave:j,onMouseOut:j}),b(Ou,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:g,listening:!o&&h==="move",onDragStart:O,onDragEnd:D,onDragMove:P,onMouseDown:O,onMouseOut:$,onMouseOver:B,onMouseEnter:B,onMouseUp:D,onTransform:_,onTransformEnd:I,ref:v,stroke:S?"rgba(255,255,255,0.7)":"white",strokeWidth:(S?8:1)/l,width:i.width,x:r.x,y:r.y}),b(g_e,{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:h==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&h==="move",onDragStart:O,onDragEnd:D,onMouseDown:M,onMouseUp:I,onTransformEnd:I,ref:m,rotateEnabled:!1})]})};let _V=null,kV=null;const C_e=e=>{_V=e},Yv=()=>_V,__e=e=>{kV=e},EV=()=>kV,k_e=ut([Pn,Er,Za],(e,t,n)=>{const{cursorPosition:r,shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(r),shouldLockBoundingBox:i,shouldShowBoundingBox:o,tool:a,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),E_e=()=>{const e=qe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r,isStaging:i}=Le(k_e),o=C.exports.useRef(null),a=EV();st("esc",()=>{e(ZSe())},{enabled:()=>!0,preventDefault:!0}),st("shift+h",()=>{e(cbe(!n))},{enabled:()=>!i,preventDefault:!0},[t,n]),st(["space"],s=>{s.repeat||(a==null||a.container().focus(),r!=="move"&&(o.current=r,e(F0("move"))),r==="move"&&o.current&&o.current!=="move"&&(e(F0(o.current)),o.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,o])},P_e=ut(Pn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:ah(t)}}),CR=e=>`data:image/svg+xml;utf8, `.replaceAll("black",e),T_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(P_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),g=C.exports.useCallback(()=>{u(l+1),setTimeout(g,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=CR(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=CR(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!ni.exports.isNumber(r.x)||!ni.exports.isNumber(r.y)||!ni.exports.isNumber(o)||!ni.exports.isNumber(i.width)||!ni.exports.isNumber(i.height)?null:b(Ou,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:ni.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},L_e=ut([Pn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),A_e=e=>{const t=qe(),{isMoveStageKeyHeld:n,stageScale:r}=Le(L_e);return C.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*OSe**s,DSe,NSe),u={x:o.x-a.x*l,y:o.y-a.y*l};t(mbe(l)),t(FH(u))},[e,n,r,t])},Ok=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}},PV=()=>{const e=qe(),t=Yv(),n=EV();return{updateColorUnderCursor:()=>{if(!n||!t)return;const r=n.getPointerPosition();if(!r)return;const i=Yp.pixelRatio,[o,a,s,l]=t.getContext().getImageData(r.x*i,r.y*i,1,1).data;e(nbe({r:o,g:a,b:s,a:l}))},commitColorUnderCursor:()=>{e(USe())}}},M_e=ut([Er,Pn,Za],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),R_e=e=>{const t=qe(),{tool:n,isStaging:r}=Le(M_e),{commitColorUnderCursor:i}=PV();return C.exports.useCallback(o=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(y5(!0));return}if(n==="colorPicker"){i();return}const a=Ok(e.current);!a||(o.evt.preventDefault(),t(NH(!0)),t(WSe([a.x,a.y])))},[e,n,r,t,i])},I_e=ut([Er,Pn,Za],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),O_e=(e,t)=>{const n=qe(),{tool:r,isDrawing:i,isStaging:o}=Le(I_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(y5(!1));return}if(!t.current&&i&&e.current){const a=Ok(e.current);if(!a)return;n(IH([a.x,a.y]))}else t.current=!1;n(NH(!1))},[t,n,i,o,e,r])},D_e=ut([Er,Pn,Za],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),N_e=(e,t,n)=>{const r=qe(),{isDrawing:i,tool:o,isStaging:a}=Le(D_e),{updateColorUnderCursor:s}=PV();return C.exports.useCallback(()=>{if(!e.current)return;const l=Ok(e.current);if(!!l){if(r(rbe(l)),n.current=l,o==="colorPicker"){s();return}!i||o==="move"||a||(t.current=!0,r(IH([l.x,l.y])))}},[t,r,i,a,n,e,o,s])},B_e=()=>{const e=qe();return C.exports.useCallback(()=>{e(YSe())},[e])},z_e=ut([Pn,Za],(e,t)=>{const{tool:n,isMovingBoundingBox:r}=e;return{tool:n,isStaging:t,isMovingBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),F_e=()=>{const e=qe(),{tool:t,isStaging:n,isMovingBoundingBox:r}=Le(z_e);return{handleDragStart:C.exports.useCallback(()=>{!((t==="move"||n)&&!r)||e(y5(!0))},[e,r,n,t]),handleDragMove:C.exports.useCallback(i=>{if(!((t==="move"||n)&&!r))return;const o={x:i.target.x(),y:i.target.y()};e(FH(o))},[e,r,n,t]),handleDragEnd:C.exports.useCallback(()=>{!((t==="move"||n)&&!r)||e(y5(!1))},[e,r,n,t])}};var Pf=C.exports,$_e=function(t,n,r){const i=Pf.useRef("loading"),o=Pf.useRef(),[a,s]=Pf.useState(0),l=Pf.useRef(),u=Pf.useRef(),h=Pf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),Pf.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function m(){i.current="loaded",o.current=g,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return g.addEventListener("load",m),g.addEventListener("error",v),n&&(g.crossOrigin=n),r&&(g.referrerpolicy=r),g.src=t,function(){g.removeEventListener("load",m),g.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const TV=e=>{const{url:t,x:n,y:r}=e,[i]=$_e(t);return b(CV,{x:n,y:r,image:i,listening:!1})},H_e=ut([Pn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),W_e=()=>{const{objects:e}=Le(H_e);return e?b(Iu,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(v5(t))return b(TV,{x:t.x,y:t.y,url:t.image.url},n);if(pSe(t)){const r=b(P5,{points:t.points,stroke:t.color?ah(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(Iu,{clipX:t.clip.x,clipY:t.clip.y,clipWidth:t.clip.width,clipHeight:t.clip.height,children:r},n):r}else{if(gSe(t))return b(Ou,{x:t.x,y:t.y,width:t.width,height:t.height,fill:ah(t.color)},n);if(mSe(t))return b(Ou,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"rgb(255, 255, 255)",globalCompositeOperation:"destination-out"},n)}})}):null},V_e=ut([Pn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),U_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},G_e=()=>{const{colorMode:e}=e2(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Le(V_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=U_e[e],{width:l,height:u}=r,{x:h,y:g}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(g)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(g)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,_=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(_/64)+1,I=We.range(0,T).map(D=>b(P5,{x:E.x1+D*64,y:E.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${D}`)),O=We.range(0,M).map(D=>b(P5,{x:E.x1,y:E.y1+D*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${D}`));o(I.concat(O))},[t,n,r,e,a]),b(Iu,{children:i})},j_e=ut([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:We.isEqual}}),Y_e=e=>{const{...t}=e,n=Le(j_e),[r,i]=C.exports.useState(null);if(C.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(CV,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},h0=e=>Math.round(e*100)/100,q_e=ut([Pn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${h0(n)}, ${h0(r)})`}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function K_e(){const{cursorCoordinatesString:e}=Le(q_e);return b("div",{children:`Cursor Position: ${e}`})}const X_e=ut([Pn],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:h},stageScale:g,shouldShowCanvasDebugInfo:m,layer:v,boundingBoxScaleMethod:S}=e;let w="inherit";return(S==="none"&&(o<512||a<512)||S==="manual"&&s*l<512*512)&&(w="var(--status-working-color)"),{activeLayerColor:v==="mask"?"var(--status-working-color)":"inherit",activeLayerString:v.charAt(0).toUpperCase()+v.slice(1),boundingBoxColor:w,boundingBoxCoordinatesString:`(${h0(u)}, ${h0(h)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,scaledBoundingBoxDimensionsString:`${s}\xD7${l}`,canvasCoordinatesString:`${h0(r)}\xD7${h0(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(g*100),shouldShowCanvasDebugInfo:m,shouldShowBoundingBox:S!=="auto",shouldShowScaledBoundingBox:S!=="none"}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),Z_e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,scaledBoundingBoxDimensionsString:o,shouldShowScaledBoundingBox:a,canvasCoordinatesString:s,canvasDimensionsString:l,canvasScaleString:u,shouldShowCanvasDebugInfo:h,shouldShowBoundingBox:g}=Le(X_e);return ee("div",{className:"canvas-status-text",children:[b("div",{style:{color:e},children:`Active Layer: ${t}`}),b("div",{children:`Canvas Scale: ${u}%`}),g&&b("div",{style:{color:n},children:`Bounding Box: ${i}`}),a&&b("div",{style:{color:n},children:`Scaled Bounding Box: ${o}`}),h&&ee(Rn,{children:[b("div",{children:`Bounding Box Position: ${r}`}),b("div",{children:`Canvas Dimensions: ${l}`}),b("div",{children:`Canvas Position: ${s}`}),b(K_e,{})]})]})},Q_e=ut([Pn],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}}),J_e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i,x:o,y:a,width:s,height:l}=Le(Q_e);return ee(Iu,{...t,children:[r&&n&&b(TV,{url:n.image.url,x:o,y:a}),i&&ee(Iu,{children:[b(Ou,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"white",strokeScaleEnabled:!1}),b(Ou,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"black",strokeScaleEnabled:!1})]})]})},eke=ut([Pn],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}}),tke=()=>{const e=qe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Le(eke),o=C.exports.useCallback(()=>{e(fM(!0))},[e]),a=C.exports.useCallback(()=>{e(fM(!1))},[e]);st(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),st(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),st(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(KSe()),l=()=>e(qSe()),u=()=>e(GSe());return r?b(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ee(Ao,{isAttached:!0,children:[b(pt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:b(D5e,{}),onClick:s,"data-selected":!0,isDisabled:t}),b(pt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:b(N5e,{}),onClick:l,"data-selected":!0,isDisabled:n}),b(pt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:b(ik,{}),onClick:u,"data-selected":!0}),b(pt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?b(j5e,{}):b(G5e,{}),onClick:()=>e(pbe(!i)),"data-selected":!0}),b(pt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:b(bH,{}),onClick:()=>e(CSe(r.image.url)),"data-selected":!0}),b(pt,{tooltip:"Discard All","aria-label":"Discard All",icon:b(SH,{style:{transform:"rotate(45deg)"}}),onClick:()=>e(jSe()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"},fontSize:20})]})}):null},nke=ut(Pn,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}}),rke=()=>{const{boundingBoxCoordinates:e,boundingBoxDimensions:t,shouldDarkenOutsideBoundingBox:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Le(nke);return ee(Iu,{children:[b(Ou,{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(Ou,{x:e.x,y:e.y,width:t.width,height:t.height,fill:"rgb(255,255,255)",listening:!1,visible:n,globalCompositeOperation:"destination-out"})]})},ike=ut([Pn,Za],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:g,shouldShowIntermediates:m,shouldShowGrid:v,shouldRestrictStrokesToBox:S}=e;let w="none";return h==="move"||t?g?w="grabbing":w="grab":o?w=void 0:S&&!a&&(w="default"),{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:w,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),oke=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Le(ike);E_e();const g=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{__e($),g.current=$},[]),S=C.exports.useCallback($=>{C_e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=A_e(g),_=R_e(g),T=O_e(g,E),M=N_e(g,E,w),I=B_e(),{handleDragStart:O,handleDragMove:D,handleDragEnd:B}=F_e();return b("div",{className:"inpainting-canvas-container",children:ee("div",{className:"inpainting-canvas-wrapper",children:[ee(m_e,{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:_,onTouchMove:M,onTouchEnd:T,onMouseDown:_,onMouseLeave:I,onMouseMove:M,onMouseUp:T,onDragStart:O,onDragMove:D,onDragEnd:B,onContextMenu:$=>$.evt.preventDefault(),onWheel:P,draggable:(l==="move"||u)&&!t,children:[b(sm,{id:"grid",visible:r,children:b(G_e,{})}),b(sm,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:b(W_e,{})}),ee(sm,{id:"mask",visible:e,listening:!1,children:[b(y_e,{visible:!0,listening:!1}),b(T_e,{listening:!1})]}),b(sm,{children:b(rke,{})}),ee(sm,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&b(b_e,{visible:l!=="move",listening:!1}),b(J_e,{visible:u}),h&&b(Y_e,{}),b(w_e,{visible:n&&!u})]})]}),b(Z_e,{}),b(tke,{})]})})},ake=ut([Pn,Er,Td],(e,t,n)=>{const{pastLayerStates:r}=e;return{canUndo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function ske(){const e=qe(),{canUndo:t,activeTabName:n}=Le(ake),r=()=>{e(vbe())};return st(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),b(pt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:b(uSe,{}),onClick:r,isDisabled:!t})}const lke=ut([Pn,Er,Td],(e,t,n)=>{const{futureLayerStates:r}=e;return{canRedo:r.length>0&&!n.isProcessing,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}});function uke(){const e=qe(),{canRedo:t,activeTabName:n}=Le(lke),r=()=>{e(XSe())};return st(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),b(pt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:b(oSe,{}),onClick:r,isDisabled:!t})}const LV=Ee((e,t)=>{const{acceptButtonText:n="Accept",acceptCallback:r,cancelButtonText:i="Cancel",cancelCallback:o,children:a,title:s,triggerComponent:l}=e,{isOpen:u,onOpen:h,onClose:g}=Nv(),m=C.exports.useRef(null),v=()=>{r(),g()},S=()=>{o&&o(),g()};return ee(Rn,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),b(BF,{isOpen:u,leastDestructiveRef:m,onClose:g,children:b(i1,{children:ee(zF,{className:"modal",children:[b(BS,{fontSize:"lg",fontWeight:"bold",children:s}),b(Hv,{children:a}),ee(NS,{children:[b(Ua,{ref:m,onClick:S,className:"modal-close-btn",children:i}),b(Ua,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),cke=()=>{const e=Le(Za),t=qe();return ee(LV,{title:"Empty Temp Image Folder",acceptCallback:()=>{t(_Se()),t(DH()),t(OH())},acceptButtonText:"Empty Folder",triggerComponent:b(sa,{leftIcon:b(y2,{}),size:"sm",isDisabled:e,children:"Empty Temp Image Folder"}),children:[b("p",{children:"Emptying the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),b("br",{}),b("p",{children:"Are you sure you want to empty the temp folder?"})]})},dke=()=>{const e=Le(Za),t=qe();return ee(LV,{title:"Clear Canvas History",acceptCallback:()=>t(OH()),acceptButtonText:"Clear History",triggerComponent:b(sa,{size:"sm",leftIcon:b(y2,{}),isDisabled:e,children:"Clear Canvas History"}),children:[b("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),b("br",{}),b("p",{children:"Are you sure you want to clear the canvas history?"})]})},fke=ut([Pn],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}}),hke=()=>{const e=qe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s,shouldRestrictStrokesToBox:l}=Le(fke);return st(["n"],()=>{e(hM(!s))},{enabled:!0,preventDefault:!0},[s]),b(sd,{trigger:"hover",triggerComponent:b(pt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:b(ak,{})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[b(aa,{label:"Show Intermediates",isChecked:a,onChange:h=>e(hbe(h.target.checked))}),b(aa,{label:"Show Grid",isChecked:o,onChange:h=>e(fbe(h.target.checked))}),b(aa,{label:"Snap to Grid",isChecked:s,onChange:h=>e(hM(h.target.checked))}),b(aa,{label:"Darken Outside Selection",isChecked:r,onChange:h=>e(lbe(h.target.checked))}),b(aa,{label:"Auto Save to Gallery",isChecked:t,onChange:h=>e(abe(h.target.checked))}),b(aa,{label:"Save Box Region Only",isChecked:n,onChange:h=>e(sbe(h.target.checked))}),b(aa,{label:"Limit Strokes to Box",isChecked:l,onChange:h=>e(ybe(h.target.checked))}),b(aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:h=>e(dbe(h.target.checked))}),b(dke,{}),b(cke,{})]})})};function xb(){return(xb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function D7(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var u1=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(_R(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,_=N7(i.current),T=E?_.addEventListener:_.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,_=i.current;if(_&&(kR(P),!function(M,I){return I&&!rv(M)}(P,l.current)&&_)){if(rv(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(_R(_,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],g=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),b("div",{...xb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:g,tabIndex:0,role:"slider"})})}),wb=function(e){return e.filter(Boolean).join(" ")},Nk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=wb(["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}})})},io=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},MV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:io(e.h),s:io(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:io(i/2),a:io(r,2)}},B7=function(e){var t=MV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Jw=function(e){var t=MV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},pke=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:io(255*[r,s,a,a,l,r][u]),g:io(255*[l,r,r,s,a,a][u]),b:io(255*[a,a,l,r,r,s][u]),a:io(i,2)}},gke=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:io(60*(s<0?s+6:s)),s:io(o?a/o*100:0),v:io(o/255*100),a:i}},mke=se.memo(function(e){var t=e.hue,n=e.onChange,r=wb(["react-colorful__hue",e.className]);return se.createElement("div",{className:r},se.createElement(Dk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:u1(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":io(t),"aria-valuemax":"360","aria-valuemin":"0"},se.createElement(Nk,{className:"react-colorful__hue-pointer",left:t/360,color:B7({h:t,s:100,v:100,a:1})})))}),vke=se.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:B7({h:t.h,s:100,v:100,a:1})};return se.createElement("div",{className:"react-colorful__saturation",style:r},se.createElement(Dk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:u1(t.s+100*i.left,0,100),v:u1(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+io(t.s)+"%, Brightness "+io(t.v)+"%"},se.createElement(Nk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:B7(t)})))}),RV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function yke(e,t,n){var r=D7(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.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]),C.exports.useEffect(function(){var u;RV(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=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var Ske=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,bke=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},ER=new Map,xke=function(e){Ske(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!ER.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,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,ER.set(t,n);var r=bke();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},wke=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Jw(Object.assign({},n,{a:0}))+", "+Jw(Object.assign({},n,{a:1}))+")"},o=wb(["react-colorful__alpha",t]),a=io(100*n.a);return se.createElement("div",{className:o},b("div",{className:"react-colorful__alpha-gradient",style:i}),se.createElement(Dk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:u1(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},se.createElement(Nk,{className:"react-colorful__alpha-pointer",left:n.a,color:Jw(n)})))},Cke=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=AV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);xke(s);var l=yke(n,i,o),u=l[0],h=l[1],g=wb(["react-colorful",t]);return se.createElement("div",xb({},a,{ref:s,className:g}),b(vke,{hsva:u,onChange:h}),b(mke,{hue:u.h,onChange:h}),se.createElement(wke,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},_ke={defaultColor:{r:0,g:0,b:0,a:1},toHsva:gke,fromHsva:pke,equal:RV},kke=function(e){return se.createElement(Cke,xb({},e,{colorModel:_ke}))};const IV=e=>{const{styleClass:t,...n}=e;return b(kke,{className:`invokeai__color-picker ${t}`,...n})},Eke=ut([Pn,Za],(e,t)=>{const{maskColor:n,layer:r,isMaskEnabled:i,shouldPreserveMaskedArea:o}=e;return{layer:r,maskColor:n,maskColorString:ah(n),isMaskEnabled:i,shouldPreserveMaskedArea:o,isStaging:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),Pke=()=>{const e=qe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i,isStaging:o}=Le(Eke);st(["q"],()=>{a()},{enabled:()=>!o,preventDefault:!0},[t]),st(["shift+c"],()=>{s()},{enabled:()=>!o,preventDefault:!0},[]),st(["h"],()=>{l()},{enabled:()=>!o,preventDefault:!0},[r]);const a=()=>{e(zH(t==="mask"?"base":"mask"))},s=()=>e(VSe()),l=()=>e(BH(!r));return b(sd,{trigger:"hover",triggerComponent:b(Ao,{children:b(pt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:b(Q5e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"},isDisabled:o})}),children:ee(rn,{direction:"column",gap:"0.5rem",children:[b(aa,{label:"Enable Mask (H)",isChecked:r,onChange:l}),b(aa,{label:"Preserve Masked Area",isChecked:i,onChange:u=>e(ube(u.target.checked))}),b(IV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:u=>e(ibe(u))}),b(sa,{size:"sm",leftIcon:b(y2,{}),onClick:s,children:"Clear Mask (Shift+C)"})]})})};let b3;const Tke=new Uint8Array(16);function Lke(){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(Tke)}const Ti=[];for(let e=0;e<256;++e)Ti.push((e+256).toString(16).slice(1));function Ake(e,t=0){return(Ti[e[t+0]]+Ti[e[t+1]]+Ti[e[t+2]]+Ti[e[t+3]]+"-"+Ti[e[t+4]]+Ti[e[t+5]]+"-"+Ti[e[t+6]]+Ti[e[t+7]]+"-"+Ti[e[t+8]]+Ti[e[t+9]]+"-"+Ti[e[t+10]]+Ti[e[t+11]]+Ti[e[t+12]]+Ti[e[t+13]]+Ti[e[t+14]]+Ti[e[t+15]]).toLowerCase()}const Mke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PR={randomUUID:Mke};function p0(e,t,n){if(PR.randomUUID&&!t&&!e)return PR.randomUUID();e=e||{};const r=e.random||(e.rng||Lke)();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 Ake(r)}const Rke=(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(),h=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)},g=e.toDataURL(h);return e.scale(i),{dataURL:g,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},Ike=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},Oke=(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},Dke={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},x3=(e=Dke)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(w5e("Exporting Image")),t(u0(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:g,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=Yv();if(!S){t(bu(!1)),t(u0(!0));return}const{dataURL:w,boundingBox:E}=Rke(S,h,v,i?{...g,...m}:void 0);if(!w){t(bu(!1)),t(u0(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:I,height:O}=T,D={uuid:p0(),category:o?"result":"user",...T};a&&(Ike(M),t(ym({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(Oke(M,I,O),t(ym({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(c0({image:D,category:"result"})),t(ym({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(obe({kind:"image",layer:"base",...E,image:D})),t(ym({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(bu(!1)),t(n4("Connected")),t(u0(!0))},Nke=ut([Pn,Za,Td],(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}}),Bke=()=>{const e=qe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Le(Nke);st(["b"],()=>{o()},{enabled:()=>!i,preventDefault:!0},[]),st(["e"],()=>{a()},{enabled:()=>!i,preventDefault:!0},[t]),st(["c"],()=>{s()},{enabled:()=>!i,preventDefault:!0},[t]),st(["shift+f"],()=>{l()},{enabled:()=>!i,preventDefault:!0}),st(["delete","backspace"],()=>{u()},{enabled:()=>!i,preventDefault:!0}),st(["BracketLeft"],()=>{e(Iw(Math.max(r-5,5)))},{enabled:()=>!i,preventDefault:!0},[r]),st(["BracketRight"],()=>{e(Iw(Math.min(r+5,500)))},{enabled:()=>!i,preventDefault:!0},[r]),st(["shift+BracketLeft"],()=>{e(Rw({...n,a:We.clamp(n.a-.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]),st(["shift+BracketRight"],()=>{e(Rw({...n,a:We.clamp(n.a+.05,.05,1)}))},{enabled:()=>!i,preventDefault:!0},[n]);const o=()=>e(F0("brush")),a=()=>e(F0("eraser")),s=()=>e(F0("colorPicker")),l=()=>e($Se()),u=()=>e(FSe());return ee(Ao,{isAttached:!0,children:[b(pt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:b(eSe,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),b(pt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:b(H5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:a}),b(pt,{"aria-label":"Fill Bounding Box (Shift+F)",tooltip:"Fill Bounding Box (Shift+F)",icon:b(Y5e,{}),isDisabled:i,onClick:l}),b(pt,{"aria-label":"Erase Bounding Box Area (Delete/Backspace)",tooltip:"Erase Bounding Box Area (Delete/Backspace)",icon:b(SH,{style:{transform:"rotate(45deg)"}}),isDisabled:i,onClick:u}),b(pt,{"aria-label":"Color Picker (C)",tooltip:"Color Picker (C)",icon:b(U5e,{}),"data-selected":t==="colorPicker"&&!i,isDisabled:i,onClick:s}),b(sd,{trigger:"hover",triggerComponent:b(pt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:b(xH,{})}),children:ee(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[b(rn,{gap:"1rem",justifyContent:"space-between",children:b(ca,{label:"Size",value:r,withInput:!0,onChange:h=>e(Iw(h)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),b(IV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:h=>e(Rw(h))})]})})]})};let TR;const OV=()=>({setOpenUploader:e=>{e&&(TR=e)},openUploader:TR}),zke=ut([Td,Pn,Za],(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}}),Fke=()=>{const e=qe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Le(zke),s=Yv(),{openUploader:l}=OV();st(["v"],()=>{u()},{enabled:()=>!n,preventDefault:!0},[]),st(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),st(["shift+m"],()=>{m()},{enabled:()=>!n,preventDefault:!0},[s,t]),st(["shift+s"],()=>{v()},{enabled:()=>!n,preventDefault:!0},[s,t]),st(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!n,preventDefault:!0},[s,t]),st(["shift+d"],()=>{w()},{enabled:()=>!n,preventDefault:!0},[s,t]);const u=()=>e(F0("move")),h=()=>{const P=Yv();if(!P)return;const _=P.getClientRect({skipTransform:!0});e(QSe({contentRect:_}))},g=()=>{e(DH()),e(dk())},m=()=>{e(x3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(x3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(x3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(x3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return ee("div",{className:"inpainting-settings",children:[b(Dl,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:fSe,onChange:P=>{const _=P.target.value;e(zH(_)),_==="mask"&&!r&&e(BH(!0))},isDisabled:n}),b(Pke,{}),b(Bke,{}),ee(Ao,{isAttached:!0,children:[b(pt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:b(B5e,{}),"data-selected":o==="move"||n,onClick:u}),b(pt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:b($5e,{}),onClick:h})]}),ee(Ao,{isAttached:!0,children:[b(pt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:b(Z5e,{}),onClick:m,isDisabled:n}),b(pt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:b(bH,{}),onClick:v,isDisabled:n}),b(pt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:b(ab,{}),onClick:S,isDisabled:n}),b(pt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:b(yH,{}),onClick:w,isDisabled:n})]}),ee(Ao,{isAttached:!0,children:[b(ske,{}),b(uke,{})]}),ee(Ao,{isAttached:!0,children:[b(pt,{"aria-label":"Upload",tooltip:"Upload",icon:b(ok,{}),onClick:l,isDisabled:n}),b(pt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:b(y2,{}),onClick:g,style:{backgroundColor:"var(--btn-delete-image)"},isDisabled:n})]}),b(Ao,{isAttached:!0,children:b(hke,{})})]})},$ke=ut([Pn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),Hke=()=>{const e=qe(),{doesCanvasNeedScaling:t}=Le($ke);return C.exports.useLayoutEffect(()=>{e(Ui(!0));const n=We.debounce(()=>{e(Ui(!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(Fke,{}),b("div",{className:"inpainting-canvas-area",children:t?b(i7e,{}):b(oke,{})})]})})})};function Wke(){return b(wk,{optionsPanel:b(n7e,{}),styleClass:"inpainting-workarea-overrides",children:b(Hke,{})})}const Vke=at({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 Uke(){return ee("div",{className:"work-in-progress nodes-work-in-progress",children:[b("h1",{children:"Training"}),ee("p",{children:["A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface. ",b("br",{}),b("br",{}),"InvokeAI already supports training custom embeddings using Textual Inversion using the main script."]})]})}const Gke=at({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"})}),Bf={txt2img:{title:b(P4e,{fill:"black",boxSize:"2.5rem"}),workarea:b(O6e,{}),tooltip:"Text To Image"},img2img:{title:b(_4e,{fill:"black",boxSize:"2.5rem"}),workarea:b(M6e,{}),tooltip:"Image To Image"},unifiedCanvas:{title:b(Vke,{fill:"black",boxSize:"2.5rem"}),workarea:b(Wke,{}),tooltip:"Unified Canvas"},nodes:{title:b(k4e,{fill:"black",boxSize:"2.5rem"}),workarea:b(w4e,{}),tooltip:"Nodes"},postprocess:{title:b(E4e,{fill:"black",boxSize:"2.5rem"}),workarea:b(C4e,{}),tooltip:"Post Processing"},training:{title:b(Gke,{fill:"black",boxSize:"2.5rem"}),workarea:b(Uke,{}),tooltip:"Training"}},Cb=We.map(Bf,(e,t)=>t);[...Cb];function jke(){const e=Le(o=>o.options.activeTab),t=Le(o=>o.options.isLightBoxOpen),n=qe();st("1",()=>{n(Eo(0))}),st("2",()=>{n(Eo(1))}),st("3",()=>{n(Eo(2))}),st("4",()=>{n(Eo(3))}),st("5",()=>{n(Eo(4))}),st("6",()=>{n(Eo(5))}),st("z",()=>{n(xu(!t))},[t]);const r=()=>{const o=[];return Object.keys(Bf).forEach(a=>{o.push(b(vi,{hasArrow:!0,label:Bf[a].tooltip,placement:"right",children:b(f$,{children:Bf[a].title})},a))}),o},i=()=>{const o=[];return Object.keys(Bf).forEach(a=>{o.push(b(c$,{className:"app-tabs-panel",children:Bf[a].workarea},a))}),o};return ee(u$,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:o=>{n(Eo(o))},children:[b("div",{className:"app-tabs-list",children:r()}),b(d$,{className:"app-tabs-panels",children:t?b(YCe,{}):i()})]})}const DV={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},Yke=DV,NV=WS({name:"options",initialState:Yke,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=t4(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:h,hires_fix:g,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=m5(o),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=t4(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof g=="boolean"&&(e.hiresFix=g),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:h,seamless:g,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:_}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=m5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=t4(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof g=="boolean"&&(e.seamless=g),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S),e.shouldRunESRGAN=!1,e.shouldRunFacetool=!1},resetOptionsState:e=>({...e,...DV}),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=Cb.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}}}),{clearInitialImage:BV,resetOptionsState:oLe,resetSeed:aLe,setActiveTab:Eo,setAllImageToImageParameters:qke,setAllParameters:Kke,setAllTextToImageParameters:Xke,setCfgScale:zV,setCodeformerFidelity:FV,setCurrentTheme:Zke,setFacetoolStrength:a4,setFacetoolType:s4,setHeight:$V,setHiresFix:HV,setImg2imgStrength:z7,setInfillMethod:WV,setInitialImage:T1,setIsLightBoxOpen:xu,setIterations:Qke,setMaskPath:VV,setOptionsPanelScrollPosition:Jke,setParameter:sLe,setPerlin:UV,setPrompt:_b,setSampler:GV,setSeamBlur:LR,setSeamless:jV,setSeamSize:AR,setSeamSteps:MR,setSeamStrength:RR,setSeed:C2,setSeedWeights:YV,setShouldFitToWidthHeight:qV,setShouldGenerateVariations:eEe,setShouldHoldOptionsPanelOpen:tEe,setShouldLoopback:nEe,setShouldPinOptionsPanel:rEe,setShouldRandomizeSeed:iEe,setShouldRunESRGAN:oEe,setShouldRunFacetool:aEe,setShouldShowImageDetails:KV,setShouldShowOptionsPanel:cd,setShowAdvancedOptions:lLe,setShowDualDisplay:sEe,setSteps:XV,setThreshold:ZV,setTileSize:IR,setUpscalingLevel:F7,setUpscalingStrength:$7,setVariationAmount:lEe,setWidth:QV}=NV.actions,uEe=NV.reducer,zl=Object.create(null);zl.open="0";zl.close="1";zl.ping="2";zl.pong="3";zl.message="4";zl.upgrade="5";zl.noop="6";const l4=Object.create(null);Object.keys(zl).forEach(e=>{l4[zl[e]]=e});const cEe={type:"error",data:"parser error"},dEe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fEe=typeof ArrayBuffer=="function",hEe=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,JV=({type:e,data:t},n,r)=>dEe&&t instanceof Blob?n?r(t):OR(t,r):fEe&&(t instanceof ArrayBuffer||hEe(t))?n?r(t):OR(new Blob([t]),r):r(zl[e]+(t||"")),OR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},DR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;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),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},gEe=typeof ArrayBuffer=="function",eU=(e,t)=>{if(typeof e!="string")return{type:"message",data:tU(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:mEe(e.substring(1),t)}:l4[n]?e.length>1?{type:l4[n],data:e.substring(1)}:{type:l4[n]}:cEe},mEe=(e,t)=>{if(gEe){const n=pEe(e);return tU(n,t)}else return{base64:!0,data:e}},tU=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},nU=String.fromCharCode(30),vEe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{JV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(nU))})})},yEe=(e,t)=>{const n=e.split(nU),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function iU(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const bEe=setTimeout,xEe=clearTimeout;function kb(e,t){t.useNativeTimers?(e.setTimeoutFn=bEe.bind(Xc),e.clearTimeoutFn=xEe.bind(Xc)):(e.setTimeoutFn=setTimeout.bind(Xc),e.clearTimeoutFn=clearTimeout.bind(Xc))}const wEe=1.33;function CEe(e){return typeof e=="string"?_Ee(e):Math.ceil((e.byteLength||e.size)*wEe)}function _Ee(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class kEe extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class oU extends Yr{constructor(t){super(),this.writable=!1,kb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new kEe(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=eU(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const aU="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),H7=64,EEe={};let NR=0,w3=0,BR;function zR(e){let t="";do t=aU[e%H7]+t,e=Math.floor(e/H7);while(e>0);return t}function sU(){const e=zR(+new Date);return e!==BR?(NR=0,BR=e):e+"."+zR(NR++)}for(;w3{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)};yEe(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,vEe(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]=sU()),!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=lU(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 Rl(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 Rl extends Yr{constructor(t,n){super(),kb(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=iU(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 cU(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=Rl.requestsCount++,Rl.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=LEe,t)try{this.xhr.abort()}catch(n){}typeof document<"u"&&delete Rl.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()}}Rl.requestsCount=0;Rl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",FR);else if(typeof addEventListener=="function"){const e="onpagehide"in Xc?"pagehide":"unload";addEventListener(e,FR,!1)}}function FR(){for(let e in Rl.requests)Rl.requests.hasOwnProperty(e)&&Rl.requests[e].abort()}const dU=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),C3=Xc.WebSocket||Xc.MozWebSocket,$R=!0,REe="arraybuffer",HR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class IEe extends oU{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=HR?{}:iU(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=$R&&!HR?n?new C3(t,n):new C3(t):new C3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||REe,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{const a={};try{$R&&this.ws.send(o)}catch(s){}i&&dU(()=>{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]=sU()),this.supportsBinary||(t.b64=1);const i=lU(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!!C3}}const OEe={websocket:IEe,polling:MEe},DEe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,NEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function W7(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=DEe.exec(e||""),o={},a=14;for(;a--;)o[NEe[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=BEe(o,o.path),o.queryKey=zEe(o,o.query),o}function BEe(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 zEe(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Vc extends Yr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=W7(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=W7(n.host).host),kb(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=PEe(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=rU,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 OEe[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Vc.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;Vc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Vc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),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,h(),n.close(),n=null)}const a=g=>{const m=new Error("probe error: "+g);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(g){n&&g.name!==n.name&&o()}const h=()=>{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",Vc.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{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;r0&&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){Vc.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(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,fU=Object.prototype.toString,WEe=typeof Blob=="function"||typeof Blob<"u"&&fU.call(Blob)==="[object BlobConstructor]",VEe=typeof File=="function"||typeof File<"u"&&fU.call(File)==="[object FileConstructor]";function Bk(e){return $Ee&&(e instanceof ArrayBuffer||HEe(e))||WEe&&e instanceof Blob||VEe&&e instanceof File}function u4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class qEe{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=GEe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const KEe=Object.freeze(Object.defineProperty({__proto__:null,protocol:jEe,get PacketType(){return nn},Encoder:YEe,Decoder:zk},Symbol.toStringTag,{value:"Module"}));function bs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const XEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class hU extends Yr{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=[bs(t,"open",this.onopen.bind(this)),bs(t,"packet",this.onpacket.bind(this)),bs(t,"error",this.onerror.bind(this)),bs(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(XEe.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:nn.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.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:nn.CONNECT,data:t})}):this.packet({type:nn.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 nn.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 nn.EVENT:case nn.BINARY_EVENT:this.onevent(t);break;case nn.ACK:case nn.BINARY_ACK:this.onack(t);break;case nn.DISCONNECT:this.ondisconnect();break;case nn.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:nn.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:nn.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;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}L1.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};L1.prototype.reset=function(){this.attempts=0};L1.prototype.setMin=function(e){this.ms=e};L1.prototype.setMax=function(e){this.max=e};L1.prototype.setJitter=function(e){this.jitter=e};class G7 extends Yr{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,kb(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 L1({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||KEe;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 Vc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=bs(n,"open",function(){r.onopen(),t&&t()}),o=bs(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(bs(t,"ping",this.onping.bind(this)),bs(t,"data",this.ondata.bind(this)),bs(t,"error",this.onerror.bind(this)),bs(t,"close",this.onclose.bind(this)),bs(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){dU(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new hU(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;rt()),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 lm={};function c4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=FEe(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=lm[i]&&o in lm[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new G7(r,t):(lm[i]||(lm[i]=new G7(r,t)),l=lm[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(c4,{Manager:G7,Socket:hU,io:c4,connect:c4});var ZEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,QEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,JEe=/[^-+\dA-Z]/g;function ko(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(WR[t]||t||WR.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"]()},h=function(){return e[o()+"Hours"]()},g=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return ePe(e)},E=function(){return tPe(e)},P={d:function(){return a()},dd:function(){return ra(a())},ddd:function(){return Co.dayNames[s()]},DDD:function(){return VR({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()],short:!0})},dddd:function(){return Co.dayNames[s()+7]},DDDD:function(){return VR({y:u(),m:l(),d:a(),_:o(),dayName:Co.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return ra(l()+1)},mmm:function(){return Co.monthNames[l()]},mmmm:function(){return Co.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return ra(u(),4)},h:function(){return h()%12||12},hh:function(){return ra(h()%12||12)},H:function(){return h()},HH:function(){return ra(h())},M:function(){return g()},MM:function(){return ra(g())},s:function(){return m()},ss:function(){return ra(m())},l:function(){return ra(v(),3)},L:function(){return ra(Math.floor(v()/10))},t:function(){return h()<12?Co.timeNames[0]:Co.timeNames[1]},tt:function(){return h()<12?Co.timeNames[2]:Co.timeNames[3]},T:function(){return h()<12?Co.timeNames[4]:Co.timeNames[5]},TT:function(){return h()<12?Co.timeNames[6]:Co.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":nPe(e)},o:function(){return(S()>0?"-":"+")+ra(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+ra(Math.floor(Math.abs(S())/60),2)+":"+ra(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return ra(w())},N:function(){return E()}};return t.replace(ZEe,function(_){return _ in P?P[_]():_.slice(1,_.length-1)})}var WR={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"},Co={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"]},ra=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},VR=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,h=new Date;h.setDate(h[o+"Date"]()-1);var g=new Date;g.setDate(g[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},_=function(){return g[o+"Date"]()},T=function(){return g[o+"Month"]()},M=function(){return g[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},ePe=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)},tPe=function(t){var n=t.getDay();return n===0&&(n=7),n},nPe=function(t){return(String(t).match(QEe)||[""]).pop().replace(JEe,"").replace(/GMT\+0000/g,"UTC")};const rPe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(nM(!0)),t(n4("Connected")),t(wSe());const r=n().gallery;r.categories.result.latest_mtime?t(aM("result")):t(c7("result")),r.categories.user.latest_mtime?t(aM("user")):t(c7("user"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(nM(!1)),t(n4("Disconnected")),t(_o({timestamp:ko(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,h={uuid:p0(),...u};if(["txt2img","img2img"].includes(l)&&t(c0({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:g}=r;t(HSe({image:{...h,category:"temp"},boundingBox:g})),i.canvas.shouldAutoSave&&t(c0({image:{...h,category:"result"},category:"result"}))}if(o)switch(Cb[a]){case"img2img":{t(T1(h));break}}t(Nw()),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(Pbe({uuid:p0(),...r,category:"result"})),r.isBase64||t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(c0({category:"result",image:{uuid:p0(),...r,category:"result"}})),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(bu(!0)),t(h5e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(rM()),t(Nw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:p0(),...l}));t(Ebe({images:s,areMoreImagesAvailable:o,category:a})),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(m5e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(c0({category:"result",image:r})),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(Nw())),t(_o({timestamp:ko(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(VH(r));const{initialImage:o,maskPath:a}=n().options;((o==null?void 0:o.url)===i||o===i)&&t(BV()),a===i&&t(VV("")),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(p5e(r)),r.infill_methods.includes("patchmatch")||t(WV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(iM(o)),t(n4("Model Changed")),t(bu(!1)),t(u0(!0)),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(iM(o)),t(bu(!1)),t(u0(!0)),t(rM()),t(_o({timestamp:ko(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(ym({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},iPe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yp.Stage({container:i,width:n,height:r}),a=new Yp.Layer,s=new Yp.Layer;a.add(new Yp.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yp.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},oPe=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("
"),t.document.write(r.outerHTML),t.document.write("

")})},aPe=e=>{const t=Yv(),{generationMode:n,optionsState:r,canvasState:i,systemState:o}=e,{cfgScale:a,codeformerFidelity:s,facetoolStrength:l,facetoolType:u,height:h,hiresFix:g,img2imgStrength:m,infillMethod:v,initialImage:S,iterations:w,perlin:E,prompt:P,sampler:_,seamBlur:T,seamless:M,seamSize:I,seamSteps:O,seamStrength:D,seed:B,seedWeights:$,shouldFitToWidthHeight:W,shouldGenerateVariations:j,shouldRandomizeSeed:ne,shouldRunESRGAN:H,shouldRunFacetool:K,steps:te,threshold:J,tileSize:X,upscalingLevel:G,upscalingStrength:Z,variationAmount:le,width:me}=r,{shouldDisplayInProgressType:Me,saveIntermediatesInterval:we,enableImageDebugging:Se}=o,be={prompt:P,iterations:w,steps:te,cfg_scale:a,threshold:J,perlin:E,height:h,width:me,sampler_name:_,seed:B,progress_images:Me==="full-res",progress_latents:Me==="latents",save_intermediates:we,generation_mode:n,init_mask:""};let He=!1,Je=!1;if(be.seed=ne?uH(j_,Y_):B,["txt2img","img2img"].includes(n)&&(be.seamless=M,be.hires_fix=g,H&&(He={level:G,strength:Z}),K&&(Je={type:u,strength:l},u==="codeformer"&&(Je.codeformer_fidelity=s))),n==="img2img"&&S&&(be.init_img=typeof S=="string"?S:S.url,be.strength=m,be.fit=W),n==="unifiedCanvas"&&t){const{layerState:{objects:tt},boundingBoxCoordinates:ht,boundingBoxDimensions:_t,inpaintReplace:gt,shouldUseInpaintReplace:ft,stageScale:vt,isMaskEnabled:Pe,shouldPreserveMaskedArea:nt,boundingBoxScaleMethod:At,scaledBoundingBoxDimensions:Xe}=i,mt={...ht,..._t},ln=iPe(Pe?tt.filter(sk):[],mt);be.init_mask=ln,be.fit=!1,be.strength=m,be.invert_mask=nt,ft&&(be.inpaint_replace=gt),be.bounding_box=mt;const kt=t.scale();t.scale({x:1/vt,y:1/vt});const Gt=t.getAbsolutePosition(),un=t.toDataURL({x:mt.x+Gt.x,y:mt.y+Gt.y,width:mt.width,height:mt.height});Se&&oPe([{base64:ln,caption:"mask sent as init_mask"},{base64:un,caption:"image sent as init_img"}]),t.scale(kt),be.init_img=un,be.progress_images=!1,At!=="none"&&(be.inpaint_width=Xe.width,be.inpaint_height=Xe.height),be.seam_size=I,be.seam_blur=T,be.seam_strength=D,be.seam_steps=O,be.tile_size=X,be.infill_method=v,be.force_outpaint=!1}return j?(be.variation_amount=le,$&&(be.with_variations=Hye($))):be.variation_amount=0,Se&&(be.enable_image_debugging=Se),{generationParameters:be,esrganParameters:He,facetoolParameters:Je}},sPe=(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(b5e());const{generationParameters:h,esrganParameters:g,facetoolParameters:m}=aPe(u);t.emit("generateImage",h,g,m),h.init_mask&&(h.init_mask=h.init_mask.substr(0,64).concat("...")),h.init_img&&(h.init_img=h.init_img.substr(0,64).concat("...")),n(_o({timestamp:ko(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...h,...g,...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(_o({timestamp:ko(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(_o({timestamp:ko(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(VH(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(v5e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},lPe=()=>{const{origin:e}=new URL(window.location.href),t=c4(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:g,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=rPe(i),{emitGenerateImage:I,emitRunESRGAN:O,emitRunFacetool:D,emitDeleteImage:B,emitRequestImages:$,emitRequestNewImages:W,emitCancelProcessing:j,emitRequestSystemConfig:ne,emitRequestModelChange:H,emitSaveStagingAreaImageToGallery:K,emitRequestEmptyTempFolder:te}=sPe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",J=>u(J)),t.on("generationResult",J=>g(J)),t.on("postprocessingResult",J=>h(J)),t.on("intermediateResult",J=>m(J)),t.on("progressUpdate",J=>v(J)),t.on("galleryImages",J=>S(J)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",J=>{E(J)}),t.on("systemConfig",J=>{P(J)}),t.on("modelChanged",J=>{_(J)}),t.on("modelChangeFailed",J=>{T(J)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{O(a.payload);break}case"socketio/runFacetool":{D(a.payload);break}case"socketio/deleteImage":{B(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{W(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{ne();break}case"socketio/requestModelChange":{H(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{K(a.payload);break}case"socketio/requestEmptyTempFolder":{te();break}}o(a)}},uPe=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"].map(e=>`canvas.${e}`),cPe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),dPe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),pU=w$({options:uEe,gallery:Obe,system:C5e,canvas:Sbe}),fPe=W$.getPersistConfig({key:"root",storage:H$,rootReducer:pU,blacklist:[...uPe,...cPe,...dPe],debounce:300}),hPe=_ye(fPe,pU),gU=y2e({reducer:hPe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(lPe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),qe=uye,Le=Q2e;function d4(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d4=function(n){return typeof n}:d4=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},d4(e)}function pPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UR(e,t){for(var n=0;nb(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:b(c2,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),SPe=ut(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),bPe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Le(SPe),i=t?Math.round(t*100/n):0;return b(GF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function xPe(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 wPe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=Nv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the canvas brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the canvas eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the canvas brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the canvas brush/eraser",hotkey:"]"},{title:"Decrease Brush Opacity",desc:"Decreases the opacity of the canvas brush",hotkey:"Shift + ["},{title:"Increase Brush Opacity",desc:"Increases the opacity of the canvas brush",hotkey:"Shift + ]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Fill Bounding Box",desc:"Fills the bounding box with brush color",hotkey:"Shift + F"},{title:"Erase Bounding Box",desc:"Erases the bounding box area",hotkey:"Delete / Backspace"},{title:"Select Color Picker",desc:"Selects the canvas color picker",hotkey:"C"},{title:"Toggle Snap",desc:"Toggles Snap to Grid",hotkey:"N"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Toggle Layer",desc:"Toggles mask/base layer selection",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((g,m)=>{h.push(b(xPe,{title:g.title,description:g.desc,hotkey:g.hotkey},m))}),b("div",{className:"hotkey-modal-category",children:h})};return ee(Rn,{children:[C.exports.cloneElement(e,{onClick:n}),ee(r1,{isOpen:t,onClose:r,children:[b(i1,{}),ee(Wv,{className:" modal hotkeys-modal",children:[b(p_,{className:"modal-close-btn"}),b("h1",{children:"Keyboard Shorcuts"}),b("div",{className:"hotkeys-modal-items",children:ee(ES,{allowMultiple:!0,children:[ee(qf,{children:[ee(jf,{className:"hotkeys-modal-button",children:[b("h2",{children:"App Hotkeys"}),b(Yf,{})]}),b(Kf,{children:l(i)})]}),ee(qf,{children:[ee(jf,{className:"hotkeys-modal-button",children:[b("h2",{children:"General Hotkeys"}),b(Yf,{})]}),b(Kf,{children:l(o)})]}),ee(qf,{children:[ee(jf,{className:"hotkeys-modal-button",children:[b("h2",{children:"Gallery Hotkeys"}),b(Yf,{})]}),b(Kf,{children:l(a)})]}),ee(qf,{children:[ee(jf,{className:"hotkeys-modal-button",children:[b("h2",{children:"Unified Canvas Hotkeys"}),b(Yf,{})]}),b(Kf,{children:l(s)})]})]})})]})]})]})}const CPe=e=>{const{isProcessing:t,isConnected:n}=Le(l=>l.system),r=qe(),{name:i,status:o,description:a}=e,s=()=>{r(_H(i))};return ee("div",{className:"model-list-item",children:[b(vi,{label:a,hasArrow:!0,placement:"bottom",children:b("div",{className:"model-list-item-name",children:i})}),b(vz,{}),b("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),b("div",{className:"model-list-item-load-btn",children:b(Ua,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},_Pe=ut(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}}),kPe=()=>{const{models:e}=Le(_Pe);return b(ES,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ee(qf,{children:[b(jf,{children:ee("div",{className:"model-list-button",children:[b("h2",{children:"Models"}),b(Yf,{})]})}),b(Kf,{children:b("div",{className:"model-list-list",children:e.map((t,n)=>b(CPe,{name:t.name,status:t.status,description:t.description},n))})})]})})},EPe=ut([Td,ek],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:We.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),PPe=({children:e})=>{const t=qe(),n=Le(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=Nv(),{isOpen:a,onOpen:s,onClose:l}=Nv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:g,saveIntermediatesInterval:m,enableImageDebugging:v}=Le(EPe),S=()=>{LU.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(y5e(E))};return ee(Rn,{children:[C.exports.cloneElement(e,{onClick:i}),ee(r1,{isOpen:r,onClose:o,children:[b(i1,{}),ee(Wv,{className:"modal settings-modal",children:[b(BS,{className:"settings-modal-header",children:"Settings"}),b(p_,{className:"modal-close-btn"}),ee(Hv,{className:"settings-modal-content",children:[ee("div",{className:"settings-modal-items",children:[b("div",{className:"settings-modal-item",children:b(kPe,{})}),ee("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[b(Dl,{label:"Display In-Progress Images",validValues:O4e,value:u,onChange:E=>t(d5e(E.target.value))}),u==="full-res"&&b(Is,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),b(Ms,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(fH(E.target.checked))}),b(Ms,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:g,onChange:E=>t(g5e(E.target.checked))})]}),ee("div",{className:"settings-modal-items",children:[b("h2",{style:{fontWeight:"bold"},children:"Developer"}),b(Ms,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(S5e(E.target.checked))})]}),ee("div",{className:"settings-modal-reset",children:[b(rh,{size:"md",children:"Reset Web UI"}),b(Ua,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),b(To,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),b(To,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),b(NS,{children:b(Ua,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ee(r1,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[b(i1,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),b(Wv,{children:b(Hv,{pb:6,pt:6,children:b(rn,{justifyContent:"center",children:b(To,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},TPe=ut(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:ni.exports.isEqual}}),LPe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Le(TPe),s=qe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),b(vi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:b(To,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(hH())},className:`status ${l}`,children:u})})},APe=["dark","light","green"];function MPe(){const{setColorMode:e}=e2(),t=qe(),n=Le(i=>i.options.currentTheme),r=i=>{e(i),t(Zke(i))};return b(sd,{trigger:"hover",triggerComponent:b(pt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:b(tSe,{})}),children:b(bz,{align:"stretch",children:APe.map(i=>b(sa,{style:{width:"6rem"},leftIcon:n===i?b(ik,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const RPe=ut([Td],e=>{const{isProcessing:t,model_list:n}=e,r=We.map(n,(o,a)=>a),i=We.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),IPe=()=>{const e=qe(),{models:t,activeModel:n,isProcessing:r}=Le(RPe);return b(rn,{style:{paddingLeft:"0.3rem"},children:b(Dl,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(_H(o.target.value))}})})},OPe=()=>ee("div",{className:"site-header",children:[ee("div",{className:"site-header-left-side",children:[b("img",{src:$H,alt:"invoke-ai-logo"}),ee("h1",{children:["invoke ",b("strong",{children:"ai"})]})]}),ee("div",{className:"site-header-right-side",children:[b(LPe,{}),b(IPe,{}),b(wPe,{children:b(pt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:b(X5e,{})})}),b(MPe,{}),b(pt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(ih,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:b(F5e,{})})}),b(pt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(ih,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:b(I5e,{})})}),b(pt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(ih,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:b(R5e,{})})}),b(PPe,{children:b(pt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:b(ak,{})})})]})]}),DPe=ut(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),NPe=ut(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:ni.exports.isEqual}}),BPe=()=>{const e=qe(),t=Le(DPe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Le(NPe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(hH()),e(Lw(!n))};return st("`",()=>{e(Lw(!n))},[n]),st("esc",()=>{e(Lw(!1))}),ee(Rn,{children:[n&&b(KH,{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{const{timestamp:m,message:v,level:S}=h;return ee("div",{className:`console-entry console-${S}-color`,children:[ee("p",{className:"console-timestamp",children:[m,":"]}),b("p",{className:"console-message",children:v})]},g)})})}),n&&b(vi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:b(Ga,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:b(O5e,{}),onClick:()=>a(!o)})}),b(vi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:b(Ga,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?b(J5e,{}):b(vH,{}),onClick:l})})]})};function zPe(){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)})}var FPe=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 _2(e,t){var n=$Pe(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 $Pe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=FPe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var HPe=[".DS_Store","Thumbs.db"];function WPe(e){return v1(this,void 0,void 0,function(){return y1(this,function(t){return T5(e)&&VPe(e.dataTransfer)?[2,YPe(e.dataTransfer,e.type)]:UPe(e)?[2,GPe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,jPe(e)]:[2,[]]})})}function VPe(e){return T5(e)}function UPe(e){return T5(e)&&T5(e.target)}function T5(e){return typeof e=="object"&&e!==null}function GPe(e){return q7(e.target.files).map(function(t){return _2(t)})}function jPe(e){return v1(this,void 0,void 0,function(){var t;return y1(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 _2(r)})]}})})}function YPe(e,t){return v1(this,void 0,void 0,function(){var n,r;return y1(this,function(i){switch(i.label){case 0:return e.items?(n=q7(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(qPe))]):[3,2];case 1:return r=i.sent(),[2,GR(vU(r))];case 2:return[2,GR(q7(e.files).map(function(o){return _2(o)}))]}})})}function GR(e){return e.filter(function(t){return HPe.indexOf(t.name)===-1})}function q7(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,XR(n)];if(e.sizen)return[!1,XR(n)]}return[!0,null]}function zf(e){return e!=null}function cTe(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=xU(l,n),h=qv(u,1),g=h[0],m=wU(l,r,i),v=qv(m,1),S=v[0],w=s?s(l):null;return g&&S&&!w})}function L5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function _3(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 QR(e){e.preventDefault()}function dTe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fTe(e){return e.indexOf("Edge/")!==-1}function hTe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return dTe(e)||fTe(e)}function cl(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function ATe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Fk=C.exports.forwardRef(function(e,t){var n=e.children,r=A5(e,STe),i=PU(r),o=i.open,a=A5(i,bTe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),b(C.exports.Fragment,{children:n(cr(cr({},a),{},{open:o}))})});Fk.displayName="Dropzone";var EU={disabled:!1,getFilesFromEvent:WPe,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};Fk.defaultProps=EU;Fk.propTypes={children:Bn.exports.func,accept:Bn.exports.objectOf(Bn.exports.arrayOf(Bn.exports.string)),multiple:Bn.exports.bool,preventDropOnDocument:Bn.exports.bool,noClick:Bn.exports.bool,noKeyboard:Bn.exports.bool,noDrag:Bn.exports.bool,noDragEventsBubbling:Bn.exports.bool,minSize:Bn.exports.number,maxSize:Bn.exports.number,maxFiles:Bn.exports.number,disabled:Bn.exports.bool,getFilesFromEvent:Bn.exports.func,onFileDialogCancel:Bn.exports.func,onFileDialogOpen:Bn.exports.func,useFsAccessApi:Bn.exports.bool,autoFocus:Bn.exports.bool,onDragEnter:Bn.exports.func,onDragLeave:Bn.exports.func,onDragOver:Bn.exports.func,onDrop:Bn.exports.func,onDropAccepted:Bn.exports.func,onDropRejected:Bn.exports.func,onError:Bn.exports.func,validator:Bn.exports.func};var Q7={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function PU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=cr(cr({},EU),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,h=t.onDragLeave,g=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,O=t.noDrag,D=t.noDragEventsBubbling,B=t.onError,$=t.validator,W=C.exports.useMemo(function(){return mTe(n)},[n]),j=C.exports.useMemo(function(){return gTe(n)},[n]),ne=C.exports.useMemo(function(){return typeof E=="function"?E:eI},[E]),H=C.exports.useMemo(function(){return typeof w=="function"?w:eI},[w]),K=C.exports.useRef(null),te=C.exports.useRef(null),J=C.exports.useReducer(MTe,Q7),X=e6(J,2),G=X[0],Z=X[1],le=G.isFocused,me=G.isFileDialogActive,Me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&pTe()),we=function(){!Me.current&&me&&setTimeout(function(){if(te.current){var Ze=te.current.files;Ze.length||(Z({type:"closeDialog"}),H())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",we,!1),function(){window.removeEventListener("focus",we,!1)}},[te,me,H,Me]);var Se=C.exports.useRef([]),be=function(Ze){K.current&&K.current.contains(Ze.target)||(Ze.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",QR,!1),document.addEventListener("drop",be,!1)),function(){T&&(document.removeEventListener("dragover",QR),document.removeEventListener("drop",be))}},[K,T]),C.exports.useEffect(function(){return!r&&_&&K.current&&K.current.focus(),function(){}},[K,_,r]);var He=C.exports.useCallback(function(Ie){B?B(Ie):console.error(Ie)},[B]),Je=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),kt(Ie),Se.current=[].concat(CTe(Se.current),[Ie.target]),_3(Ie)&&Promise.resolve(i(Ie)).then(function(Ze){if(!(L5(Ie)&&!D)){var Zt=Ze.length,qt=Zt>0&&cTe({files:Ze,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),ke=Zt>0&&!qt;Z({isDragAccept:qt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Ie)}}).catch(function(Ze){return He(Ze)})},[i,u,He,D,W,a,o,s,l,$]),tt=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),kt(Ie);var Ze=_3(Ie);if(Ze&&Ie.dataTransfer)try{Ie.dataTransfer.dropEffect="copy"}catch(Zt){}return Ze&&g&&g(Ie),!1},[g,D]),ht=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),kt(Ie);var Ze=Se.current.filter(function(qt){return K.current&&K.current.contains(qt)}),Zt=Ze.indexOf(Ie.target);Zt!==-1&&Ze.splice(Zt,1),Se.current=Ze,!(Ze.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_3(Ie)&&h&&h(Ie))},[K,h,D]),_t=C.exports.useCallback(function(Ie,Ze){var Zt=[],qt=[];Ie.forEach(function(ke){var bt=xU(ke,W),Ht=e6(bt,2),Be=Ht[0],ot=Ht[1],cn=wU(ke,a,o),De=e6(cn,2),lt=De[0],Qe=De[1],Dt=$?$(ke):null;if(Be&<&&!Dt)Zt.push(ke);else{var on=[ot,Qe];Dt&&(on=on.concat(Dt)),qt.push({file:ke,errors:on.filter(function(vr){return vr})})}}),(!s&&Zt.length>1||s&&l>=1&&Zt.length>l)&&(Zt.forEach(function(ke){qt.push({file:ke,errors:[uTe]})}),Zt.splice(0)),Z({acceptedFiles:Zt,fileRejections:qt,type:"setFiles"}),m&&m(Zt,qt,Ze),qt.length>0&&S&&S(qt,Ze),Zt.length>0&&v&&v(Zt,Ze)},[Z,s,W,a,o,l,m,v,S,$]),gt=C.exports.useCallback(function(Ie){Ie.preventDefault(),Ie.persist(),kt(Ie),Se.current=[],_3(Ie)&&Promise.resolve(i(Ie)).then(function(Ze){L5(Ie)&&!D||_t(Ze,Ie)}).catch(function(Ze){return He(Ze)}),Z({type:"reset"})},[i,_t,He,D]),ft=C.exports.useCallback(function(){if(Me.current){Z({type:"openDialog"}),ne();var Ie={multiple:s,types:j};window.showOpenFilePicker(Ie).then(function(Ze){return i(Ze)}).then(function(Ze){_t(Ze,null),Z({type:"closeDialog"})}).catch(function(Ze){vTe(Ze)?(H(Ze),Z({type:"closeDialog"})):yTe(Ze)?(Me.current=!1,te.current?(te.current.value=null,te.current.click()):He(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 was provided."))):He(Ze)});return}te.current&&(Z({type:"openDialog"}),ne(),te.current.value=null,te.current.click())},[Z,ne,H,P,_t,He,j,s]),vt=C.exports.useCallback(function(Ie){!K.current||!K.current.isEqualNode(Ie.target)||(Ie.key===" "||Ie.key==="Enter"||Ie.keyCode===32||Ie.keyCode===13)&&(Ie.preventDefault(),ft())},[K,ft]),Pe=C.exports.useCallback(function(){Z({type:"focus"})},[]),nt=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(hTe()?setTimeout(ft,0):ft())},[M,ft]),Xe=function(Ze){return r?null:Ze},mt=function(Ze){return I?null:Xe(Ze)},ln=function(Ze){return O?null:Xe(Ze)},kt=function(Ze){D&&Ze.stopPropagation()},Gt=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Ie.refKey,Zt=Ze===void 0?"ref":Ze,qt=Ie.role,ke=Ie.onKeyDown,bt=Ie.onFocus,Ht=Ie.onBlur,Be=Ie.onClick,ot=Ie.onDragEnter,cn=Ie.onDragOver,De=Ie.onDragLeave,lt=Ie.onDrop,Qe=A5(Ie,xTe);return cr(cr(Z7({onKeyDown:mt(cl(ke,vt)),onFocus:mt(cl(bt,Pe)),onBlur:mt(cl(Ht,nt)),onClick:Xe(cl(Be,At)),onDragEnter:ln(cl(ot,Je)),onDragOver:ln(cl(cn,tt)),onDragLeave:ln(cl(De,ht)),onDrop:ln(cl(lt,gt)),role:typeof qt=="string"&&qt!==""?qt:"presentation"},Zt,K),!r&&!I?{tabIndex:0}:{}),Qe)}},[K,vt,Pe,nt,At,Je,tt,ht,gt,I,O,r]),un=C.exports.useCallback(function(Ie){Ie.stopPropagation()},[]),bn=C.exports.useMemo(function(){return function(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ze=Ie.refKey,Zt=Ze===void 0?"ref":Ze,qt=Ie.onChange,ke=Ie.onClick,bt=A5(Ie,wTe),Ht=Z7({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:Xe(cl(qt,gt)),onClick:Xe(cl(ke,un)),tabIndex:-1},Zt,te);return cr(cr({},Ht),bt)}},[te,n,s,gt,r]);return cr(cr({},G),{},{isFocused:le&&!r,getRootProps:Gt,getInputProps:bn,rootRef:K,inputRef:te,open:Xe(ft)})}function MTe(e,t){switch(t.type){case"focus":return cr(cr({},e),{},{isFocused:!0});case"blur":return cr(cr({},e),{},{isFocused:!1});case"openDialog":return cr(cr({},Q7),{},{isFileDialogActive:!0});case"closeDialog":return cr(cr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return cr(cr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return cr(cr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return cr({},Q7);default:return e}}function eI(){}const RTe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return st("esc",()=>{i(!1)}),ee("div",{className:"dropzone-container",children:[t&&b("div",{className:"dropzone-overlay is-drag-accept",children:ee(rh,{size:"lg",children:["Upload Image",r]})}),n&&ee("div",{className:"dropzone-overlay is-drag-reject",children:[b(rh,{size:"lg",children:"Invalid Upload"}),b(rh,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},tI=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Er(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:p0(),category:"user",...l};t(c0({image:u,category:"user"})),o==="unifiedCanvas"?t(sb(u)):o==="img2img"&&t(T1(u))},ITe=e=>{const{children:t}=e,n=qe(),r=Le(Er),i=v2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=OV(),l=C.exports.useCallback(_=>{a(!0);const T=_.errors.reduce((M,I)=>M+` `+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async _=>{n(tI({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:g,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=PU({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const _=T=>{var D;const M=(D=T.clipboardData)==null?void 0:D.items;if(!M)return;const I=[];for(const B of M)B.kind==="file"&&["image/png","image/jpg"].includes(B.type)&&I.push(B);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const O=I[0].getAsFile();if(!O){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(tI({imageFile:O}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${Bf[r].tooltip}`:"";return b(hk.Provider,{value:E,children:ee("div",{...g({style:{}}),onKeyDown:_=>{_.key},children:[b("input",{...m()}),t,w&&o&&b(RTe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},OTe=()=>{const e=qe(),t=Le(dSe),n=v2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(x5e())},[e,n,t])},TU=ut([e=>e.options,e=>e.gallery,Er],(e,t,n)=>{const{shouldPinOptionsPanel:r,shouldShowOptionsPanel:i,shouldHoldOptionsPanelOpen:o}=e,{shouldShowGallery:a,shouldPinGallery:s,shouldHoldGalleryOpen:l}=t,u=!(i||o&&!r)&&["txt2img","img2img","unifiedCanvas"].includes(n),h=!(a||l&&!s)&&["txt2img","img2img","unifiedCanvas"].includes(n);return{shouldPinOptionsPanel:r,shouldShowProcessButtons:!r||!i,shouldShowOptionsPanelButton:u,shouldShowOptionsPanel:i,shouldShowGallery:a,shouldPinGallery:s,shouldShowGalleryButton:h}},{memoizeOptions:{resultEqualityCheck:We.isEqual}}),DTe=()=>{const e=qe(),{shouldShowOptionsPanel:t,shouldShowOptionsPanelButton:n,shouldShowProcessButtons:r,shouldPinOptionsPanel:i,shouldShowGallery:o,shouldPinGallery:a}=Le(TU),s=()=>{e(cd(!0)),i&&setTimeout(()=>e(Ui(!0)),400)};return st("f",()=>{o||t?(e(cd(!1)),e(ld(!1))):(e(cd(!0)),e(ld(!0))),(a||i)&&setTimeout(()=>e(Ui(!0)),400)},[o,t]),n?ee("div",{className:"show-hide-button-options",children:[b(pt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:s,children:b(xH,{})}),r&&ee(Rn,{children:[b(kH,{iconButton:!0}),b(EH,{})]})]}):null},NTe=()=>{const e=qe(),{shouldShowGallery:t,shouldShowGalleryButton:n,shouldPinGallery:r,shouldShowOptionsPanel:i,shouldPinOptionsPanel:o}=Le(TU),a=()=>{e(ld(!0)),r&&e(Ui(!0))};return st("f",()=>{t||i?(e(cd(!1)),e(ld(!1))):(e(cd(!0)),e(ld(!0))),(r||o)&&setTimeout(()=>e(Ui(!0)),400)},[t,i]),n?b(pt,{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(pH,{})}):null};zPe();const BTe=()=>(OTe(),ee("div",{className:"App",children:[ee(ITe,{children:[b(bPe,{}),ee("div",{className:"app-content",children:[b(OPe,{}),b(jke,{})]}),b("div",{className:"app-console",children:b(BPe,{})})]}),b(DTe,{}),b(NTe,{})]}));const LU=Aye(gU),zTe=OD({key:"invokeai-style-cache",prepend:!0});n6.createRoot(document.getElementById("root")).render(b(se.StrictMode,{children:b(aye,{store:gU,children:b(mU,{loading:b(yPe,{}),persistor:LU,children:b(FJ,{value:zTe,children:b(Nve,{children:b(BTe,{})})})})})}));export{$Te as __vite_legacy_guard};