mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
624 lines
1.3 MiB
624 lines
1.3 MiB
function Eq(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function R9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},Kt={};/**
|
|
* @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 Dv=Symbol.for("react.element"),Pq=Symbol.for("react.portal"),Tq=Symbol.for("react.fragment"),Aq=Symbol.for("react.strict_mode"),Lq=Symbol.for("react.profiler"),Mq=Symbol.for("react.provider"),Oq=Symbol.for("react.context"),Iq=Symbol.for("react.forward_ref"),Rq=Symbol.for("react.suspense"),Nq=Symbol.for("react.memo"),Dq=Symbol.for("react.lazy"),dE=Symbol.iterator;function zq(e){return e===null||typeof e!="object"?null:(e=dE&&e[dE]||e["@@iterator"],typeof e=="function"?e:null)}var IO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RO=Object.assign,NO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}Z0.prototype.isReactComponent={};Z0.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")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function DO(){}DO.prototype=Z0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=NO,this.updater=n||IO}var D9=N9.prototype=new DO;D9.constructor=N9;RO(D9,Z0.prototype);D9.isPureReactComponent=!0;var fE=Array.isArray,zO=Object.prototype.hasOwnProperty,z9={current:null},BO={key:!0,ref:!0,__self:!0,__source:!0};function FO(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)zO.call(t,r)&&!BO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Dv,type:e,key:o,ref:a,props:i,_owner:z9.current}}function Bq(e,t){return{$$typeof:Dv,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function B9(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dv}function Fq(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var hE=/\/+/g;function jb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Fq(""+e.key):t.toString(36)}function p3(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Dv:case Pq:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+jb(a,0):r,fE(i)?(n="",e!=null&&(n=e.replace(hE,"$&/")+"/"),p3(i,t,n,"",function(u){return u})):i!=null&&(B9(i)&&(i=Bq(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(hE,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",fE(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+jb(o,s);a+=p3(o,t,n,l,i)}else if(l=zq(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+jb(o,s++),a+=p3(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function ty(e,t,n){if(e==null)return e;var r=[],i=0;return p3(e,r,"","",function(o){return t.call(n,o,i++)}),r}function $q(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oo={current:null},g3={transition:null},Hq={ReactCurrentDispatcher:oo,ReactCurrentBatchConfig:g3,ReactCurrentOwner:z9};Kt.Children={map:ty,forEach:function(e,t,n){ty(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ty(e,function(){t++}),t},toArray:function(e){return ty(e,function(t){return t})||[]},only:function(e){if(!B9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Kt.Component=Z0;Kt.Fragment=Tq;Kt.Profiler=Lq;Kt.PureComponent=N9;Kt.StrictMode=Aq;Kt.Suspense=Rq;Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hq;Kt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=RO({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=z9.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)zO.call(t,l)&&!BO.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:Dv,type:e.type,key:i,ref:o,props:r,_owner:a}};Kt.createContext=function(e){return e={$$typeof:Oq,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Mq,_context:e},e.Consumer=e};Kt.createElement=FO;Kt.createFactory=function(e){var t=FO.bind(null,e);return t.type=e,t};Kt.createRef=function(){return{current:null}};Kt.forwardRef=function(e){return{$$typeof:Iq,render:e}};Kt.isValidElement=B9;Kt.lazy=function(e){return{$$typeof:Dq,_payload:{_status:-1,_result:e},_init:$q}};Kt.memo=function(e,t){return{$$typeof:Nq,type:e,compare:t===void 0?null:t}};Kt.startTransition=function(e){var t=g3.transition;g3.transition={};try{e()}finally{g3.transition=t}};Kt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Kt.useCallback=function(e,t){return oo.current.useCallback(e,t)};Kt.useContext=function(e){return oo.current.useContext(e)};Kt.useDebugValue=function(){};Kt.useDeferredValue=function(e){return oo.current.useDeferredValue(e)};Kt.useEffect=function(e,t){return oo.current.useEffect(e,t)};Kt.useId=function(){return oo.current.useId()};Kt.useImperativeHandle=function(e,t,n){return oo.current.useImperativeHandle(e,t,n)};Kt.useInsertionEffect=function(e,t){return oo.current.useInsertionEffect(e,t)};Kt.useLayoutEffect=function(e,t){return oo.current.useLayoutEffect(e,t)};Kt.useMemo=function(e,t){return oo.current.useMemo(e,t)};Kt.useReducer=function(e,t,n){return oo.current.useReducer(e,t,n)};Kt.useRef=function(e){return oo.current.useRef(e)};Kt.useState=function(e){return oo.current.useState(e)};Kt.useSyncExternalStore=function(e,t,n){return oo.current.useSyncExternalStore(e,t,n)};Kt.useTransition=function(){return oo.current.useTransition()};Kt.version="18.2.0";(function(e){e.exports=Kt})(C);const le=R9(C.exports),zw=Eq({__proto__:null,default:le},[C.exports]);var Bw={},Il={exports:{}},ha={},e0={exports:{}},$O={};/**
|
|
* @license React
|
|
* scheduler.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/(function(e){function t(G,Z){var te=G.length;G.push(Z);e:for(;0<te;){var X=te-1>>>1,he=G[X];if(0<i(he,Z))G[X]=Z,G[te]=he,te=X;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var Z=G[0],te=G.pop();if(te!==Z){G[0]=te;e:for(var X=0,he=G.length,ye=he>>>1;X<ye;){var Se=2*(X+1)-1,De=G[Se],$e=Se+1,He=G[$e];if(0>i(De,te))$e<he&&0>i(He,De)?(G[X]=He,G[$e]=te,X=$e):(G[X]=De,G[Se]=te,X=Se);else if($e<he&&0>i(He,te))G[X]=He,G[$e]=te,X=$e;else break e}}return Z}function i(G,Z){var te=G.sortIndex-Z.sortIndex;return te!==0?te: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,p=null,m=3,v=!1,S=!1,w=!1,P=typeof setTimeout=="function"?setTimeout:null,E=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,Q(I);else{var Z=n(u);Z!==null&&K(M,Z.startTime-G)}}function I(G,Z){S=!1,w&&(w=!1,E(z),z=-1),v=!0;var te=m;try{for(T(Z),p=n(l);p!==null&&(!(p.expirationTime>Z)||G&&!j());){var X=p.callback;if(typeof X=="function"){p.callback=null,m=p.priorityLevel;var he=X(p.expirationTime<=Z);Z=e.unstable_now(),typeof he=="function"?p.callback=he:p===n(l)&&r(l),T(Z)}else r(l);p=n(l)}if(p!==null)var ye=!0;else{var Se=n(u);Se!==null&&K(M,Se.startTime-Z),ye=!1}return ye}finally{p=null,m=te,v=!1}}var R=!1,N=null,z=-1,H=5,$=-1;function j(){return!(e.unstable_now()-$<H)}function de(){if(N!==null){var G=e.unstable_now();$=G;var Z=!0;try{Z=N(!0,G)}finally{Z?V():(R=!1,N=null)}}else R=!1}var V;if(typeof _=="function")V=function(){_(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){P(de,0)};function Q(G){N=G,R||(R=!0,V())}function K(G,Z){z=P(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,Q(I))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(G){switch(m){case 1:case 2:case 3:var Z=3;break;default:Z=m}var te=m;m=Z;try{return G()}finally{m=te}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var te=m;m=G;try{return Z()}finally{m=te}},e.unstable_scheduleCallback=function(G,Z,te){var X=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?X+te:X):te=X,G){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=te+he,G={id:h++,callback:Z,priorityLevel:G,startTime:te,expirationTime:he,sortIndex:-1},te>X?(G.sortIndex=te,t(u,G),n(l)===null&&G===n(u)&&(w?(E(z),z=-1):w=!0,K(M,te-X))):(G.sortIndex=he,t(l,G),S||v||(S=!0,Q(I))),G},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(G){var Z=m;return function(){var te=m;m=Z;try{return G.apply(this,arguments)}finally{m=te}}}})($O);(function(e){e.exports=$O})(e0);/**
|
|
* @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 HO=C.exports,ca=e0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var WO=new Set,jm={};function oh(e,t){A0(e,t),A0(e+"Capture",t)}function A0(e,t){for(jm[e]=t,e=0;e<t.length;e++)WO.add(t[e])}var mu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fw=Object.prototype.hasOwnProperty,Wq=/^[: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]*$/,pE={},gE={};function Vq(e){return Fw.call(gE,e)?!0:Fw.call(pE,e)?!1:Wq.test(e)?gE[e]=!0:(pE[e]=!0,!1)}function Uq(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 Gq(e,t,n,r){if(t===null||typeof t>"u"||Uq(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 ao(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 Oi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oi[e]=new ao(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){Oi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var F9=/[\-:]([a-z])/g;function $9(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(F9,$9);Oi[t]=new ao(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(F9,$9);Oi[t]=new ao(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(F9,$9);Oi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Oi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Oi.hasOwnProperty(t)?Oi[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gq(t,n,i,r)&&(n=null),r||i===null?Vq(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Pu=HO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ny=Symbol.for("react.element"),Rp=Symbol.for("react.portal"),Np=Symbol.for("react.fragment"),W9=Symbol.for("react.strict_mode"),$w=Symbol.for("react.profiler"),VO=Symbol.for("react.provider"),UO=Symbol.for("react.context"),V9=Symbol.for("react.forward_ref"),Hw=Symbol.for("react.suspense"),Ww=Symbol.for("react.suspense_list"),U9=Symbol.for("react.memo"),Ac=Symbol.for("react.lazy"),GO=Symbol.for("react.offscreen"),mE=Symbol.iterator;function Cg(e){return e===null||typeof e!="object"?null:(e=mE&&e[mE]||e["@@iterator"],typeof e=="function"?e:null)}var fr=Object.assign,Yb;function Zg(e){if(Yb===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yb=t&&t[1]||""}return`
|
|
`+Yb+e}var qb=!1;function Kb(e,t){if(!e||qb)return"";qb=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
`),o=r.stack.split(`
|
|
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
|
|
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zg(e):""}function jq(e){switch(e.tag){case 5:return Zg(e.type);case 16:return Zg("Lazy");case 13:return Zg("Suspense");case 19:return Zg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(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 Np:return"Fragment";case Rp:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UO:return(e.displayName||"Context")+".Consumer";case VO:return(e._context.displayName||"Context")+".Provider";case V9: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:Vw(e.type)||"Memo";case Ac:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function Yq(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 Vw(t);case 8:return t===W9?"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 nd(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qq(e){var t=jO(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 ry(e){e._valueTracker||(e._valueTracker=qq(e))}function YO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=jO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nd(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 qO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){qO(e,t);var n=nd(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")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,nd(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yE(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 jw(e,t,n){(t!=="number"||r4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+nd(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ie(91));return fr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function SE(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ie(92));if(Qg(n)){if(1<n.length)throw Error(Ie(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:nd(n)}}function KO(e,t){var n=nd(t.value),r=nd(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bE(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function XO(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function qw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?XO(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var iy,ZO=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(iy=iy||document.createElement("div"),iy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ym(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mm={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},Kq=["Webkit","ms","Moz","O"];Object.keys(mm).forEach(function(e){Kq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mm[t]=mm[e]})});function QO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mm.hasOwnProperty(e)&&mm[e]?(""+t).trim():t+"px"}function JO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xq=fr({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 Kw(e,t){if(t){if(Xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Xw(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 Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function xE(e){if(e=Fv(e)){if(typeof Qw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=_5(t),Qw(e.stateNode,e.type,t))}}function eI(e){n0?r0?r0.push(e):r0=[e]:n0=e}function tI(){if(n0){var e=n0,t=r0;if(r0=n0=null,xE(e),t)for(e=0;e<t.length;e++)xE(t[e])}}function nI(e,t){return e(t)}function rI(){}var Xb=!1;function iI(e,t,n){if(Xb)return e(t,n);Xb=!0;try{return nI(e,t,n)}finally{Xb=!1,(n0!==null||r0!==null)&&(rI(),tI())}}function qm(e,t){var n=e.stateNode;if(n===null)return null;var r=_5(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ie(231,t,typeof n));return n}var Jw=!1;if(mu)try{var _g={};Object.defineProperty(_g,"passive",{get:function(){Jw=!0}}),window.addEventListener("test",_g,_g),window.removeEventListener("test",_g,_g)}catch{Jw=!1}function Zq(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var vm=!1,i4=null,o4=!1,e6=null,Qq={onError:function(e){vm=!0,i4=e}};function Jq(e,t,n,r,i,o,a,s,l){vm=!1,i4=null,Zq.apply(Qq,arguments)}function eK(e,t,n,r,i,o,a,s,l){if(Jq.apply(this,arguments),vm){if(vm){var u=i4;vm=!1,i4=null}else throw Error(Ie(198));o4||(o4=!0,e6=u)}}function ah(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function oI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function wE(e){if(ah(e)!==e)throw Error(Ie(188))}function tK(e){var t=e.alternate;if(!t){if(t=ah(e),t===null)throw Error(Ie(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return wE(i),e;if(o===r)return wE(i),t;o=o.sibling}throw Error(Ie(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Ie(189))}}if(n.alternate!==r)throw Error(Ie(190))}if(n.tag!==3)throw Error(Ie(188));return n.stateNode.current===n?e:t}function aI(e){return e=tK(e),e!==null?sI(e):null}function sI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=sI(e);if(t!==null)return t;e=e.sibling}return null}var lI=ca.unstable_scheduleCallback,CE=ca.unstable_cancelCallback,nK=ca.unstable_shouldYield,rK=ca.unstable_requestPaint,Ir=ca.unstable_now,iK=ca.unstable_getCurrentPriorityLevel,j9=ca.unstable_ImmediatePriority,uI=ca.unstable_UserBlockingPriority,a4=ca.unstable_NormalPriority,oK=ca.unstable_LowPriority,cI=ca.unstable_IdlePriority,b5=null,bl=null;function aK(e){if(bl&&typeof bl.onCommitFiberRoot=="function")try{bl.onCommitFiberRoot(b5,e,void 0,(e.current.flags&128)===128)}catch{}}var xs=Math.clz32?Math.clz32:uK,sK=Math.log,lK=Math.LN2;function uK(e){return e>>>=0,e===0?32:31-(sK(e)/lK|0)|0}var oy=64,ay=4194304;function Jg(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 s4(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=Jg(s):(o&=a,o!==0&&(r=Jg(o)))}else a=n&~i,a!==0?r=Jg(a):o!==0&&(r=Jg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-xs(t),i=1<<n,r|=e[n],t&=~i;return r}function cK(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dK(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-xs(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=cK(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function t6(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dI(){var e=oy;return oy<<=1,(oy&4194240)===0&&(oy=64),e}function Zb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xs(t),e[t]=n}function fK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-xs(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Y9(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xs(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pn=0;function fI(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var hI,q9,pI,gI,mI,n6=!1,sy=[],Uc=null,Gc=null,jc=null,Km=new Map,Xm=new Map,Oc=[],hK="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _E(e,t){switch(e){case"focusin":case"focusout":Uc=null;break;case"dragenter":case"dragleave":Gc=null;break;case"mouseover":case"mouseout":jc=null;break;case"pointerover":case"pointerout":Km.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xm.delete(t.pointerId)}}function kg(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Fv(t),t!==null&&q9(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function pK(e,t,n,r,i){switch(t){case"focusin":return Uc=kg(Uc,e,t,n,r,i),!0;case"dragenter":return Gc=kg(Gc,e,t,n,r,i),!0;case"mouseover":return jc=kg(jc,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Km.set(o,kg(Km.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Xm.set(o,kg(Xm.get(o)||null,e,t,n,r,i)),!0}return!1}function vI(e){var t=Tf(e.target);if(t!==null){var n=ah(t);if(n!==null){if(t=n.tag,t===13){if(t=oI(n),t!==null){e.blockedOn=t,mI(e.priority,function(){pI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function m3(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=r6(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zw=r,n.target.dispatchEvent(r),Zw=null}else return t=Fv(n),t!==null&&q9(t),e.blockedOn=n,!1;t.shift()}return!0}function kE(e,t,n){m3(e)&&n.delete(t)}function gK(){n6=!1,Uc!==null&&m3(Uc)&&(Uc=null),Gc!==null&&m3(Gc)&&(Gc=null),jc!==null&&m3(jc)&&(jc=null),Km.forEach(kE),Xm.forEach(kE)}function Eg(e,t){e.blockedOn===t&&(e.blockedOn=null,n6||(n6=!0,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,gK)))}function Zm(e){function t(i){return Eg(i,e)}if(0<sy.length){Eg(sy[0],e);for(var n=1;n<sy.length;n++){var r=sy[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Uc!==null&&Eg(Uc,e),Gc!==null&&Eg(Gc,e),jc!==null&&Eg(jc,e),Km.forEach(t),Xm.forEach(t),n=0;n<Oc.length;n++)r=Oc[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Oc.length&&(n=Oc[0],n.blockedOn===null);)vI(n),n.blockedOn===null&&Oc.shift()}var i0=Pu.ReactCurrentBatchConfig,l4=!0;function mK(e,t,n,r){var i=Pn,o=i0.transition;i0.transition=null;try{Pn=1,K9(e,t,n,r)}finally{Pn=i,i0.transition=o}}function vK(e,t,n,r){var i=Pn,o=i0.transition;i0.transition=null;try{Pn=4,K9(e,t,n,r)}finally{Pn=i,i0.transition=o}}function K9(e,t,n,r){if(l4){var i=r6(e,t,n,r);if(i===null)sx(e,t,r,u4,n),_E(e,r);else if(pK(i,e,t,n,r))r.stopPropagation();else if(_E(e,r),t&4&&-1<hK.indexOf(e)){for(;i!==null;){var o=Fv(i);if(o!==null&&hI(o),o=r6(e,t,n,r),o===null&&sx(e,t,r,u4,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else sx(e,t,r,null,n)}}var u4=null;function r6(e,t,n,r){if(u4=null,e=G9(r),e=Tf(e),e!==null)if(t=ah(e),t===null)e=null;else if(n=t.tag,n===13){if(e=oI(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return u4=e,null}function yI(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(iK()){case j9:return 1;case uI:return 4;case a4:case oK:return 16;case cI:return 536870912;default:return 16}default:return 16}}var zc=null,X9=null,v3=null;function SI(){if(v3)return v3;var e,t=X9,n=t.length,r,i="value"in zc?zc.value:zc.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return v3=i.slice(e,1<r?1-r:void 0)}function y3(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ly(){return!0}function EE(){return!1}function pa(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ly:EE,this.isPropagationStopped=EE,this}return fr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ly)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ly)},persist:function(){},isPersistent:ly}),t}var Q0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Z9=pa(Q0),Bv=fr({},Q0,{view:0,detail:0}),yK=pa(Bv),Qb,Jb,Pg,x5=fr({},Bv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Q9,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Pg&&(Pg&&e.type==="mousemove"?(Qb=e.screenX-Pg.screenX,Jb=e.screenY-Pg.screenY):Jb=Qb=0,Pg=e),Qb)},movementY:function(e){return"movementY"in e?e.movementY:Jb}}),PE=pa(x5),SK=fr({},x5,{dataTransfer:0}),bK=pa(SK),xK=fr({},Bv,{relatedTarget:0}),ex=pa(xK),wK=fr({},Q0,{animationName:0,elapsedTime:0,pseudoElement:0}),CK=pa(wK),_K=fr({},Q0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kK=pa(_K),EK=fr({},Q0,{data:0}),TE=pa(EK),PK={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TK={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},AK={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LK(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=AK[e])?!!t[e]:!1}function Q9(){return LK}var MK=fr({},Bv,{key:function(e){if(e.key){var t=PK[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=y3(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TK[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Q9,charCode:function(e){return e.type==="keypress"?y3(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?y3(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),OK=pa(MK),IK=fr({},x5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AE=pa(IK),RK=fr({},Bv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Q9}),NK=pa(RK),DK=fr({},Q0,{propertyName:0,elapsedTime:0,pseudoElement:0}),zK=pa(DK),BK=fr({},x5,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),FK=pa(BK),$K=[9,13,27,32],J9=mu&&"CompositionEvent"in window,ym=null;mu&&"documentMode"in document&&(ym=document.documentMode);var HK=mu&&"TextEvent"in window&&!ym,bI=mu&&(!J9||ym&&8<ym&&11>=ym),LE=String.fromCharCode(32),ME=!1;function xI(e,t){switch(e){case"keyup":return $K.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function WK(e,t){switch(e){case"compositionend":return wI(t);case"keypress":return t.which!==32?null:(ME=!0,LE);case"textInput":return e=t.data,e===LE&&ME?null:e;default:return null}}function VK(e,t){if(Dp)return e==="compositionend"||!J9&&xI(e,t)?(e=SI(),v3=X9=zc=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bI&&t.locale!=="ko"?null:t.data;default:return null}}var UK={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function OE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UK[e.type]:t==="textarea"}function CI(e,t,n,r){eI(r),t=c4(t,"onChange"),0<t.length&&(n=new Z9("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Sm=null,Qm=null;function GK(e){RI(e,0)}function w5(e){var t=Fp(e);if(YO(t))return e}function jK(e,t){if(e==="change")return t}var _I=!1;if(mu){var tx;if(mu){var nx="oninput"in document;if(!nx){var IE=document.createElement("div");IE.setAttribute("oninput","return;"),nx=typeof IE.oninput=="function"}tx=nx}else tx=!1;_I=tx&&(!document.documentMode||9<document.documentMode)}function RE(){Sm&&(Sm.detachEvent("onpropertychange",kI),Qm=Sm=null)}function kI(e){if(e.propertyName==="value"&&w5(Qm)){var t=[];CI(t,Qm,e,G9(e)),iI(GK,t)}}function YK(e,t,n){e==="focusin"?(RE(),Sm=t,Qm=n,Sm.attachEvent("onpropertychange",kI)):e==="focusout"&&RE()}function qK(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return w5(Qm)}function KK(e,t){if(e==="click")return w5(t)}function XK(e,t){if(e==="input"||e==="change")return w5(t)}function ZK(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ts=typeof Object.is=="function"?Object.is:ZK;function Jm(e,t){if(Ts(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Fw.call(t,i)||!Ts(e[i],t[i]))return!1}return!0}function NE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function DE(e,t){var n=NE(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=NE(n)}}function EI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function PI(){for(var e=window,t=r4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r4(e.document)}return t}function e7(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 QK(e){var t=PI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&EI(n.ownerDocument.documentElement,n)){if(r!==null&&e7(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=DE(n,o);var a=DE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var JK=mu&&"documentMode"in document&&11>=document.documentMode,zp=null,i6=null,bm=null,o6=!1;function zE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r4(r)||(r=zp,"selectionStart"in r&&e7(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}),bm&&Jm(bm,r)||(bm=r,r=c4(i6,"onSelect"),0<r.length&&(t=new Z9("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=zp)))}function uy(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bp={animationend:uy("Animation","AnimationEnd"),animationiteration:uy("Animation","AnimationIteration"),animationstart:uy("Animation","AnimationStart"),transitionend:uy("Transition","TransitionEnd")},rx={},TI={};mu&&(TI=document.createElement("div").style,"AnimationEvent"in window||(delete Bp.animationend.animation,delete Bp.animationiteration.animation,delete Bp.animationstart.animation),"TransitionEvent"in window||delete Bp.transitionend.transition);function C5(e){if(rx[e])return rx[e];if(!Bp[e])return e;var t=Bp[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in TI)return rx[e]=t[n];return e}var AI=C5("animationend"),LI=C5("animationiteration"),MI=C5("animationstart"),OI=C5("transitionend"),II=new Map,BE="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function dd(e,t){II.set(e,t),oh(t,[e])}for(var ix=0;ix<BE.length;ix++){var ox=BE[ix],eX=ox.toLowerCase(),tX=ox[0].toUpperCase()+ox.slice(1);dd(eX,"on"+tX)}dd(AI,"onAnimationEnd");dd(LI,"onAnimationIteration");dd(MI,"onAnimationStart");dd("dblclick","onDoubleClick");dd("focusin","onFocus");dd("focusout","onBlur");dd(OI,"onTransitionEnd");A0("onMouseEnter",["mouseout","mouseover"]);A0("onMouseLeave",["mouseout","mouseover"]);A0("onPointerEnter",["pointerout","pointerover"]);A0("onPointerLeave",["pointerout","pointerover"]);oh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));oh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));oh("onBeforeInput",["compositionend","keypress","textInput","paste"]);oh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));oh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));oh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var em="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nX=new Set("cancel close invalid load scroll toggle".split(" ").concat(em));function FE(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,eK(r,t,void 0,e),e.currentTarget=null}function RI(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;FE(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;FE(i,s,u),o=l}}}if(o4)throw e=e6,o4=!1,e6=null,e}function Kn(e,t){var n=t[c6];n===void 0&&(n=t[c6]=new Set);var r=e+"__bubble";n.has(r)||(NI(t,e,2,!1),n.add(r))}function ax(e,t,n){var r=0;t&&(r|=4),NI(n,e,r,t)}var cy="_reactListening"+Math.random().toString(36).slice(2);function ev(e){if(!e[cy]){e[cy]=!0,WO.forEach(function(n){n!=="selectionchange"&&(nX.has(n)||ax(n,!1,e),ax(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cy]||(t[cy]=!0,ax("selectionchange",!1,t))}}function NI(e,t,n,r){switch(yI(t)){case 1:var i=mK;break;case 4:i=vK;break;default:i=K9}n=i.bind(null,t,n,e),i=void 0,!Jw||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function sx(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Tf(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}iI(function(){var u=o,h=G9(n),p=[];e:{var m=II.get(e);if(m!==void 0){var v=Z9,S=e;switch(e){case"keypress":if(y3(n)===0)break e;case"keydown":case"keyup":v=OK;break;case"focusin":S="focus",v=ex;break;case"focusout":S="blur",v=ex;break;case"beforeblur":case"afterblur":v=ex;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=PE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=bK;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=NK;break;case AI:case LI:case MI:v=CK;break;case OI:v=zK;break;case"scroll":v=yK;break;case"wheel":v=FK;break;case"copy":case"cut":case"paste":v=kK;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=AE}var w=(t&4)!==0,P=!w&&e==="scroll",E=w?m!==null?m+"Capture":null:m;w=[];for(var _=u,T;_!==null;){T=_;var M=T.stateNode;if(T.tag===5&&M!==null&&(T=M,E!==null&&(M=qm(_,E),M!=null&&w.push(tv(_,M,T)))),P)break;_=_.return}0<w.length&&(m=new v(m,S,null,n,h),p.push({event:m,listeners:w}))}}if((t&7)===0){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==Zw&&(S=n.relatedTarget||n.fromElement)&&(Tf(S)||S[vu]))break e;if((v||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,v?(S=n.relatedTarget||n.toElement,v=u,S=S?Tf(S):null,S!==null&&(P=ah(S),S!==P||S.tag!==5&&S.tag!==6)&&(S=null)):(v=null,S=u),v!==S)){if(w=PE,M="onMouseLeave",E="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(w=AE,M="onPointerLeave",E="onPointerEnter",_="pointer"),P=v==null?m:Fp(v),T=S==null?m:Fp(S),m=new w(M,_+"leave",v,n,h),m.target=P,m.relatedTarget=T,M=null,Tf(h)===u&&(w=new w(E,_+"enter",S,n,h),w.target=T,w.relatedTarget=P,M=w),P=M,v&&S)t:{for(w=v,E=S,_=0,T=w;T;T=vp(T))_++;for(T=0,M=E;M;M=vp(M))T++;for(;0<_-T;)w=vp(w),_--;for(;0<T-_;)E=vp(E),T--;for(;_--;){if(w===E||E!==null&&w===E.alternate)break t;w=vp(w),E=vp(E)}w=null}else w=null;v!==null&&$E(p,m,v,w,!1),S!==null&&P!==null&&$E(p,P,S,w,!0)}}e:{if(m=u?Fp(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var I=jK;else if(OE(m))if(_I)I=XK;else{I=qK;var R=YK}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(I=KK);if(I&&(I=I(e,u))){CI(p,I,n,h);break e}R&&R(e,m,u),e==="focusout"&&(R=m._wrapperState)&&R.controlled&&m.type==="number"&&jw(m,"number",m.value)}switch(R=u?Fp(u):window,e){case"focusin":(OE(R)||R.contentEditable==="true")&&(zp=R,i6=u,bm=null);break;case"focusout":bm=i6=zp=null;break;case"mousedown":o6=!0;break;case"contextmenu":case"mouseup":case"dragend":o6=!1,zE(p,n,h);break;case"selectionchange":if(JK)break;case"keydown":case"keyup":zE(p,n,h)}var N;if(J9)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Dp?xI(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(bI&&n.locale!=="ko"&&(Dp||z!=="onCompositionStart"?z==="onCompositionEnd"&&Dp&&(N=SI()):(zc=h,X9="value"in zc?zc.value:zc.textContent,Dp=!0)),R=c4(u,z),0<R.length&&(z=new TE(z,e,null,n,h),p.push({event:z,listeners:R}),N?z.data=N:(N=wI(n),N!==null&&(z.data=N)))),(N=HK?WK(e,n):VK(e,n))&&(u=c4(u,"onBeforeInput"),0<u.length&&(h=new TE("onBeforeInput","beforeinput",null,n,h),p.push({event:h,listeners:u}),h.data=N))}RI(p,t)})}function tv(e,t,n){return{instance:e,listener:t,currentTarget:n}}function c4(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=qm(e,n),o!=null&&r.unshift(tv(e,o,i)),o=qm(e,t),o!=null&&r.push(tv(e,o,i))),e=e.return}return r}function vp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $E(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=qm(n,o),l!=null&&a.unshift(tv(n,l,s))):i||(l=qm(n,o),l!=null&&a.push(tv(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var rX=/\r\n?/g,iX=/\u0000|\uFFFD/g;function HE(e){return(typeof e=="string"?e:""+e).replace(rX,`
|
|
`).replace(iX,"")}function dy(e,t,n){if(t=HE(t),HE(e)!==t&&n)throw Error(Ie(425))}function d4(){}var a6=null,s6=null;function l6(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var u6=typeof setTimeout=="function"?setTimeout:void 0,oX=typeof clearTimeout=="function"?clearTimeout:void 0,WE=typeof Promise=="function"?Promise:void 0,aX=typeof queueMicrotask=="function"?queueMicrotask:typeof WE<"u"?function(e){return WE.resolve(null).then(e).catch(sX)}:u6;function sX(e){setTimeout(function(){throw e})}function lx(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Zm(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Zm(t)}function Yc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function VE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var J0=Math.random().toString(36).slice(2),pl="__reactFiber$"+J0,nv="__reactProps$"+J0,vu="__reactContainer$"+J0,c6="__reactEvents$"+J0,lX="__reactListeners$"+J0,uX="__reactHandles$"+J0;function Tf(e){var t=e[pl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vu]||n[pl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=VE(e);e!==null;){if(n=e[pl])return n;e=VE(e)}return t}e=n,n=e.parentNode}return null}function Fv(e){return e=e[pl]||e[vu],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fp(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ie(33))}function _5(e){return e[nv]||null}var d6=[],$p=-1;function fd(e){return{current:e}}function Zn(e){0>$p||(e.current=d6[$p],d6[$p]=null,$p--)}function Yn(e,t){$p++,d6[$p]=e.current,e.current=t}var rd={},Vi=fd(rd),To=fd(!1),qf=rd;function L0(e,t){var n=e.type.contextTypes;if(!n)return rd;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 Ao(e){return e=e.childContextTypes,e!=null}function f4(){Zn(To),Zn(Vi)}function UE(e,t,n){if(Vi.current!==rd)throw Error(Ie(168));Yn(Vi,t),Yn(To,n)}function DI(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(Ie(108,Yq(e)||"Unknown",i));return fr({},n,r)}function h4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rd,qf=Vi.current,Yn(Vi,e),Yn(To,To.current),!0}function GE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=DI(e,t,qf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Vi),Yn(Vi,e)):Zn(To),Yn(To,n)}var uu=null,k5=!1,ux=!1;function zI(e){uu===null?uu=[e]:uu.push(e)}function cX(e){k5=!0,zI(e)}function hd(){if(!ux&&uu!==null){ux=!0;var e=0,t=Pn;try{var n=uu;for(Pn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}uu=null,k5=!1}catch(i){throw uu!==null&&(uu=uu.slice(e+1)),lI(j9,hd),i}finally{Pn=t,ux=!1}}return null}var Hp=[],Wp=0,p4=null,g4=0,Aa=[],La=0,Kf=null,du=1,fu="";function vf(e,t){Hp[Wp++]=g4,Hp[Wp++]=p4,p4=e,g4=t}function BI(e,t,n){Aa[La++]=du,Aa[La++]=fu,Aa[La++]=Kf,Kf=e;var r=du;e=fu;var i=32-xs(r)-1;r&=~(1<<i),n+=1;var o=32-xs(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,du=1<<32-xs(t)+i|n<<i|r,fu=o+e}else du=1<<o|n<<i|r,fu=e}function t7(e){e.return!==null&&(vf(e,1),BI(e,1,0))}function n7(e){for(;e===p4;)p4=Hp[--Wp],Hp[Wp]=null,g4=Hp[--Wp],Hp[Wp]=null;for(;e===Kf;)Kf=Aa[--La],Aa[La]=null,fu=Aa[--La],Aa[La]=null,du=Aa[--La],Aa[La]=null}var aa=null,oa=null,nr=!1,vs=null;function FI(e,t){var n=Ia(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jE(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,aa=e,oa=Yc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,aa=e,oa=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Kf!==null?{id:du,overflow:fu}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ia(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,aa=e,oa=null,!0):!1;default:return!1}}function f6(e){return(e.mode&1)!==0&&(e.flags&128)===0}function h6(e){if(nr){var t=oa;if(t){var n=t;if(!jE(e,t)){if(f6(e))throw Error(Ie(418));t=Yc(n.nextSibling);var r=aa;t&&jE(e,t)?FI(r,n):(e.flags=e.flags&-4097|2,nr=!1,aa=e)}}else{if(f6(e))throw Error(Ie(418));e.flags=e.flags&-4097|2,nr=!1,aa=e}}}function YE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;aa=e}function fy(e){if(e!==aa)return!1;if(!nr)return YE(e),nr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!l6(e.type,e.memoizedProps)),t&&(t=oa)){if(f6(e))throw $I(),Error(Ie(418));for(;t;)FI(e,t),t=Yc(t.nextSibling)}if(YE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){oa=Yc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}oa=null}}else oa=aa?Yc(e.stateNode.nextSibling):null;return!0}function $I(){for(var e=oa;e;)e=Yc(e.nextSibling)}function M0(){oa=aa=null,nr=!1}function r7(e){vs===null?vs=[e]:vs.push(e)}var dX=Pu.ReactCurrentBatchConfig;function hs(e,t){if(e&&e.defaultProps){t=fr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var m4=fd(null),v4=null,Vp=null,i7=null;function o7(){i7=Vp=v4=null}function a7(e){var t=m4.current;Zn(m4),e._currentValue=t}function p6(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function o0(e,t){v4=e,i7=Vp=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Po=!0),e.firstContext=null)}function Ba(e){var t=e._currentValue;if(i7!==e)if(e={context:e,memoizedValue:t,next:null},Vp===null){if(v4===null)throw Error(Ie(308));Vp=e,v4.dependencies={lanes:0,firstContext:e}}else Vp=Vp.next=e;return t}var Af=null;function s7(e){Af===null?Af=[e]:Af.push(e)}function HI(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,s7(t)):(n.next=i.next,i.next=n),t.interleaved=n,yu(e,r)}function yu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Lc=!1;function l7(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function WI(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(on&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,yu(e,n)}return i=r.interleaved,i===null?(t.next=t,s7(r)):(t.next=i.next,i.next=t),r.interleaved=t,yu(e,n)}function S3(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}function qE(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function y4(e,t,n,r){var i=e.updateQueue;Lc=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var h=e.alternate;h!==null&&(h=h.updateQueue,s=h.lastBaseUpdate,s!==a&&(s===null?h.firstBaseUpdate=u:s.next=u,h.lastBaseUpdate=l))}if(o!==null){var p=i.baseState;a=0,h=u=l=null,s=o;do{var m=s.lane,v=s.eventTime;if((r&m)===m){h!==null&&(h=h.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var S=e,w=s;switch(m=t,v=n,w.tag){case 1:if(S=w.payload,typeof S=="function"){p=S.call(v,p,m);break e}p=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=w.payload,m=typeof S=="function"?S.call(v,p,m):S,m==null)break e;p=fr({},p,m);break e;case 2:Lc=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[s]:m.push(s))}else v={eventTime:v,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},h===null?(u=h=v,l=p):h=h.next=v,a|=m;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);if(h===null&&(l=p),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Zf|=a,e.lanes=a,e.memoizedState=p}}function KE(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ie(191,i));i.call(r)}}}var VI=new HO.Component().refs;function g6(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var E5={isMounted:function(e){return(e=e._reactInternals)?ah(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=io(),i=Xc(e),o=pu(r,i);o.payload=t,n!=null&&(o.callback=n),t=qc(e,o,i),t!==null&&(ws(t,e,i,r),S3(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=io(),i=Xc(e),o=pu(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=qc(e,o,i),t!==null&&(ws(t,e,i,r),S3(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=io(),r=Xc(e),i=pu(n,r);i.tag=2,t!=null&&(i.callback=t),t=qc(e,i,r),t!==null&&(ws(t,e,r,n),S3(t,e,r))}};function XE(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Jm(n,r)||!Jm(i,o):!0}function UI(e,t,n){var r=!1,i=rd,o=t.contextType;return typeof o=="object"&&o!==null?o=Ba(o):(i=Ao(t)?qf:Vi.current,r=t.contextTypes,o=(r=r!=null)?L0(e,i):rd),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=E5,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ZE(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&E5.enqueueReplaceState(t,t.state,null)}function m6(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=VI,l7(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Ba(o):(o=Ao(t)?qf:Vi.current,i.context=L0(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(g6(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&E5.enqueueReplaceState(i,i.state,null),y4(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Tg(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ie(309));var r=n.stateNode}if(!r)throw Error(Ie(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===VI&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Ie(284));if(!n._owner)throw Error(Ie(290,e))}return e}function hy(e,t){throw e=Object.prototype.toString.call(t),Error(Ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function QE(e){var t=e._init;return t(e._payload)}function GI(e){function t(E,_){if(e){var T=E.deletions;T===null?(E.deletions=[_],E.flags|=16):T.push(_)}}function n(E,_){if(!e)return null;for(;_!==null;)t(E,_),_=_.sibling;return null}function r(E,_){for(E=new Map;_!==null;)_.key!==null?E.set(_.key,_):E.set(_.index,_),_=_.sibling;return E}function i(E,_){return E=Zc(E,_),E.index=0,E.sibling=null,E}function o(E,_,T){return E.index=T,e?(T=E.alternate,T!==null?(T=T.index,T<_?(E.flags|=2,_):T):(E.flags|=2,_)):(E.flags|=1048576,_)}function a(E){return e&&E.alternate===null&&(E.flags|=2),E}function s(E,_,T,M){return _===null||_.tag!==6?(_=mx(T,E.mode,M),_.return=E,_):(_=i(_,T),_.return=E,_)}function l(E,_,T,M){var I=T.type;return I===Np?h(E,_,T.props.children,M,T.key):_!==null&&(_.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ac&&QE(I)===_.type)?(M=i(_,T.props),M.ref=Tg(E,_,T),M.return=E,M):(M=k3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,M)}function u(E,_,T,M){return _===null||_.tag!==4||_.stateNode.containerInfo!==T.containerInfo||_.stateNode.implementation!==T.implementation?(_=vx(T,E.mode,M),_.return=E,_):(_=i(_,T.children||[]),_.return=E,_)}function h(E,_,T,M,I){return _===null||_.tag!==7?(_=$f(T,E.mode,M,I),_.return=E,_):(_=i(_,T),_.return=E,_)}function p(E,_,T){if(typeof _=="string"&&_!==""||typeof _=="number")return _=mx(""+_,E.mode,T),_.return=E,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ny:return T=k3(_.type,_.key,_.props,null,E.mode,T),T.ref=Tg(E,null,_),T.return=E,T;case Rp:return _=vx(_,E.mode,T),_.return=E,_;case Ac:var M=_._init;return p(E,M(_._payload),T)}if(Qg(_)||Cg(_))return _=$f(_,E.mode,T,null),_.return=E,_;hy(E,_)}return null}function m(E,_,T,M){var I=_!==null?_.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return I!==null?null:s(E,_,""+T,M);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:return T.key===I?l(E,_,T,M):null;case Rp:return T.key===I?u(E,_,T,M):null;case Ac:return I=T._init,m(E,_,I(T._payload),M)}if(Qg(T)||Cg(T))return I!==null?null:h(E,_,T,M,null);hy(E,T)}return null}function v(E,_,T,M,I){if(typeof M=="string"&&M!==""||typeof M=="number")return E=E.get(T)||null,s(_,E,""+M,I);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case ny:return E=E.get(M.key===null?T:M.key)||null,l(_,E,M,I);case Rp:return E=E.get(M.key===null?T:M.key)||null,u(_,E,M,I);case Ac:var R=M._init;return v(E,_,T,R(M._payload),I)}if(Qg(M)||Cg(M))return E=E.get(T)||null,h(_,E,M,I,null);hy(_,M)}return null}function S(E,_,T,M){for(var I=null,R=null,N=_,z=_=0,H=null;N!==null&&z<T.length;z++){N.index>z?(H=N,N=null):H=N.sibling;var $=m(E,N,T[z],M);if($===null){N===null&&(N=H);break}e&&N&&$.alternate===null&&t(E,N),_=o($,_,z),R===null?I=$:R.sibling=$,R=$,N=H}if(z===T.length)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;z<T.length;z++)N=p(E,T[z],M),N!==null&&(_=o(N,_,z),R===null?I=N:R.sibling=N,R=N);return nr&&vf(E,z),I}for(N=r(E,N);z<T.length;z++)H=v(N,E,z,T[z],M),H!==null&&(e&&H.alternate!==null&&N.delete(H.key===null?z:H.key),_=o(H,_,z),R===null?I=H:R.sibling=H,R=H);return e&&N.forEach(function(j){return t(E,j)}),nr&&vf(E,z),I}function w(E,_,T,M){var I=Cg(T);if(typeof I!="function")throw Error(Ie(150));if(T=I.call(T),T==null)throw Error(Ie(151));for(var R=I=null,N=_,z=_=0,H=null,$=T.next();N!==null&&!$.done;z++,$=T.next()){N.index>z?(H=N,N=null):H=N.sibling;var j=m(E,N,$.value,M);if(j===null){N===null&&(N=H);break}e&&N&&j.alternate===null&&t(E,N),_=o(j,_,z),R===null?I=j:R.sibling=j,R=j,N=H}if($.done)return n(E,N),nr&&vf(E,z),I;if(N===null){for(;!$.done;z++,$=T.next())$=p(E,$.value,M),$!==null&&(_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return nr&&vf(E,z),I}for(N=r(E,N);!$.done;z++,$=T.next())$=v(N,E,z,$.value,M),$!==null&&(e&&$.alternate!==null&&N.delete($.key===null?z:$.key),_=o($,_,z),R===null?I=$:R.sibling=$,R=$);return e&&N.forEach(function(de){return t(E,de)}),nr&&vf(E,z),I}function P(E,_,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var I=T.key,R=_;R!==null;){if(R.key===I){if(I=T.type,I===Np){if(R.tag===7){n(E,R.sibling),_=i(R,T.props.children),_.return=E,E=_;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ac&&QE(I)===R.type){n(E,R.sibling),_=i(R,T.props),_.ref=Tg(E,R,T),_.return=E,E=_;break e}n(E,R);break}else t(E,R);R=R.sibling}T.type===Np?(_=$f(T.props.children,E.mode,M,T.key),_.return=E,E=_):(M=k3(T.type,T.key,T.props,null,E.mode,M),M.ref=Tg(E,_,T),M.return=E,E=M)}return a(E);case Rp:e:{for(R=T.key;_!==null;){if(_.key===R)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(E,_.sibling),_=i(_,T.children||[]),_.return=E,E=_;break e}else{n(E,_);break}else t(E,_);_=_.sibling}_=vx(T,E.mode,M),_.return=E,E=_}return a(E);case Ac:return R=T._init,P(E,_,R(T._payload),M)}if(Qg(T))return S(E,_,T,M);if(Cg(T))return w(E,_,T,M);hy(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(E,_.sibling),_=i(_,T),_.return=E,E=_):(n(E,_),_=mx(T,E.mode,M),_.return=E,E=_),a(E)):n(E,_)}return P}var O0=GI(!0),jI=GI(!1),$v={},xl=fd($v),rv=fd($v),iv=fd($v);function Lf(e){if(e===$v)throw Error(Ie(174));return e}function u7(e,t){switch(Yn(iv,t),Yn(rv,e),Yn(xl,$v),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(xl),Yn(xl,t)}function I0(){Zn(xl),Zn(rv),Zn(iv)}function YI(e){Lf(iv.current);var t=Lf(xl.current),n=qw(t,e.type);t!==n&&(Yn(rv,e),Yn(xl,n))}function c7(e){rv.current===e&&(Zn(xl),Zn(rv))}var ur=fd(0);function S4(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 cx=[];function d7(){for(var e=0;e<cx.length;e++)cx[e]._workInProgressVersionPrimary=null;cx.length=0}var b3=Pu.ReactCurrentDispatcher,dx=Pu.ReactCurrentBatchConfig,Xf=0,dr=null,Xr=null,ci=null,b4=!1,xm=!1,ov=0,fX=0;function zi(){throw Error(Ie(321))}function f7(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ts(e[n],t[n]))return!1;return!0}function h7(e,t,n,r,i,o){if(Xf=o,dr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b3.current=e===null||e.memoizedState===null?mX:vX,e=n(r,i),xm){o=0;do{if(xm=!1,ov=0,25<=o)throw Error(Ie(301));o+=1,ci=Xr=null,t.updateQueue=null,b3.current=yX,e=n(r,i)}while(xm)}if(b3.current=x4,t=Xr!==null&&Xr.next!==null,Xf=0,ci=Xr=dr=null,b4=!1,t)throw Error(Ie(300));return e}function p7(){var e=ov!==0;return ov=0,e}function ll(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ci===null?dr.memoizedState=ci=e:ci=ci.next=e,ci}function Fa(){if(Xr===null){var e=dr.alternate;e=e!==null?e.memoizedState:null}else e=Xr.next;var t=ci===null?dr.memoizedState:ci.next;if(t!==null)ci=t,Xr=e;else{if(e===null)throw Error(Ie(310));Xr=e,e={memoizedState:Xr.memoizedState,baseState:Xr.baseState,baseQueue:Xr.baseQueue,queue:Xr.queue,next:null},ci===null?dr.memoizedState=ci=e:ci=ci.next=e}return ci}function av(e,t){return typeof t=="function"?t(e):t}function fx(e){var t=Fa(),n=t.queue;if(n===null)throw Error(Ie(311));n.lastRenderedReducer=e;var r=Xr,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var h=u.lane;if((Xf&h)===h)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var p={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=p,a=r):l=l.next=p,dr.lanes|=h,Zf|=h}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,Ts(r,t.memoizedState)||(Po=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,dr.lanes|=o,Zf|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function hx(e){var t=Fa(),n=t.queue;if(n===null)throw Error(Ie(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Ts(o,t.memoizedState)||(Po=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function qI(){}function KI(e,t){var n=dr,r=Fa(),i=t(),o=!Ts(r.memoizedState,i);if(o&&(r.memoizedState=i,Po=!0),r=r.queue,g7(QI.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ci!==null&&ci.memoizedState.tag&1){if(n.flags|=2048,sv(9,ZI.bind(null,n,r,i,t),void 0,null),di===null)throw Error(Ie(349));(Xf&30)!==0||XI(n,t,i)}return i}function XI(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=dr.updateQueue,t===null?(t={lastEffect:null,stores:null},dr.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ZI(e,t,n,r){t.value=n,t.getSnapshot=r,JI(t)&&eR(e)}function QI(e,t,n){return n(function(){JI(t)&&eR(e)})}function JI(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ts(e,n)}catch{return!0}}function eR(e){var t=yu(e,1);t!==null&&ws(t,e,1,-1)}function JE(e){var t=ll();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:av,lastRenderedState:e},t.queue=e,e=e.dispatch=gX.bind(null,dr,e),[t.memoizedState,e]}function sv(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=dr.updateQueue,t===null?(t={lastEffect:null,stores:null},dr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function tR(){return Fa().memoizedState}function x3(e,t,n,r){var i=ll();dr.flags|=e,i.memoizedState=sv(1|t,n,void 0,r===void 0?null:r)}function P5(e,t,n,r){var i=Fa();r=r===void 0?null:r;var o=void 0;if(Xr!==null){var a=Xr.memoizedState;if(o=a.destroy,r!==null&&f7(r,a.deps)){i.memoizedState=sv(t,n,o,r);return}}dr.flags|=e,i.memoizedState=sv(1|t,n,o,r)}function eP(e,t){return x3(8390656,8,e,t)}function g7(e,t){return P5(2048,8,e,t)}function nR(e,t){return P5(4,2,e,t)}function rR(e,t){return P5(4,4,e,t)}function iR(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function oR(e,t,n){return n=n!=null?n.concat([e]):null,P5(4,4,iR.bind(null,t,e),n)}function m7(){}function aR(e,t){var n=Fa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&f7(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sR(e,t){var n=Fa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&f7(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lR(e,t,n){return(Xf&21)===0?(e.baseState&&(e.baseState=!1,Po=!0),e.memoizedState=n):(Ts(n,t)||(n=dI(),dr.lanes|=n,Zf|=n,e.baseState=!0),t)}function hX(e,t){var n=Pn;Pn=n!==0&&4>n?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function uR(){return Fa().memoizedState}function pX(e,t,n){var r=Xc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cR(e))dR(t,n);else if(n=HI(e,t,n,r),n!==null){var i=io();ws(n,e,r,i),fR(n,t,r)}}function gX(e,t,n){var r=Xc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cR(e))dR(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,Ts(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=HI(e,t,i,r),n!==null&&(i=io(),ws(n,e,r,i),fR(n,t,r))}}function cR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function dR(e,t){xm=b4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x4={readContext:Ba,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},mX={readContext:Ba,useCallback:function(e,t){return ll().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:eP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,iR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=ll();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ll();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=pX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=ll();return e={current:e},t.memoizedState=e},useState:JE,useDebugValue:m7,useDeferredValue:function(e){return ll().memoizedState=e},useTransition:function(){var e=JE(!1),t=e[0];return e=hX.bind(null,e[1]),ll().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=ll();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),di===null)throw Error(Ie(349));(Xf&30)!==0||XI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,eP(QI.bind(null,r,o,e),[e]),r.flags|=2048,sv(9,ZI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ll(),t=di.identifierPrefix;if(nr){var n=fu,r=du;n=(r&~(1<<32-xs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ov++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=fX++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vX={readContext:Ba,useCallback:aR,useContext:Ba,useEffect:g7,useImperativeHandle:oR,useInsertionEffect:nR,useLayoutEffect:rR,useMemo:sR,useReducer:fx,useRef:tR,useState:function(){return fx(av)},useDebugValue:m7,useDeferredValue:function(e){var t=Fa();return lR(t,Xr.memoizedState,e)},useTransition:function(){var e=fx(av)[0],t=Fa().memoizedState;return[e,t]},useMutableSource:qI,useSyncExternalStore:KI,useId:uR,unstable_isNewReconciler:!1},yX={readContext:Ba,useCallback:aR,useContext:Ba,useEffect:g7,useImperativeHandle:oR,useInsertionEffect:nR,useLayoutEffect:rR,useMemo:sR,useReducer:hx,useRef:tR,useState:function(){return hx(av)},useDebugValue:m7,useDeferredValue:function(e){var t=Fa();return Xr===null?t.memoizedState=e:lR(t,Xr.memoizedState,e)},useTransition:function(){var e=hx(av)[0],t=Fa().memoizedState;return[e,t]},useMutableSource:qI,useSyncExternalStore:KI,useId:uR,unstable_isNewReconciler:!1};function R0(e,t){try{var n="",r=t;do n+=jq(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
Error generating stack: `+o.message+`
|
|
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function px(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function v6(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var SX=typeof WeakMap=="function"?WeakMap:Map;function hR(e,t,n){n=pu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){C4||(C4=!0,P6=r),v6(e,t)},n}function pR(e,t,n){n=pu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){v6(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){v6(e,t),typeof r!="function"&&(Kc===null?Kc=new Set([this]):Kc.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function tP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new SX;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=IX.bind(null,e,t,n),t.then(e,e))}function nP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function rP(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pu(-1,1),t.tag=2,qc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bX=Pu.ReactCurrentOwner,Po=!1;function to(e,t,n,r){t.child=e===null?jI(t,null,n,r):O0(t,e.child,n,r)}function iP(e,t,n,r,i){n=n.render;var o=t.ref;return o0(t,i),r=h7(e,t,n,r,o,i),n=p7(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Su(e,t,i)):(nr&&n&&t7(t),t.flags|=1,to(e,t,r,i),t.child)}function oP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!_7(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,gR(e,t,o,r,i)):(e=k3(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Jm,n(a,r)&&e.ref===t.ref)return Su(e,t,i)}return t.flags|=1,e=Zc(o,r),e.ref=t.ref,e.return=t,t.child=e}function gR(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Jm(o,r)&&e.ref===t.ref)if(Po=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Po=!0);else return t.lanes=e.lanes,Su(e,t,i)}return y6(e,t,n,r,i)}function mR(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yn(Gp,ea),ea|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Yn(Gp,ea),ea|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Yn(Gp,ea),ea|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Yn(Gp,ea),ea|=r;return to(e,t,i,n),t.child}function vR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function y6(e,t,n,r,i){var o=Ao(n)?qf:Vi.current;return o=L0(t,o),o0(t,i),n=h7(e,t,n,r,o,i),r=p7(),e!==null&&!Po?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Su(e,t,i)):(nr&&r&&t7(t),t.flags|=1,to(e,t,n,i),t.child)}function aP(e,t,n,r,i){if(Ao(n)){var o=!0;h4(t)}else o=!1;if(o0(t,i),t.stateNode===null)w3(e,t),UI(t,n,r),m6(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ba(u):(u=Ao(n)?qf:Vi.current,u=L0(t,u));var h=n.getDerivedStateFromProps,p=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&ZE(t,a,r,u),Lc=!1;var m=t.memoizedState;a.state=m,y4(t,r,a,i),l=t.memoizedState,s!==r||m!==l||To.current||Lc?(typeof h=="function"&&(g6(t,n,h,r),l=t.memoizedState),(s=Lc||XE(t,n,s,r,m,l,u))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,WI(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:hs(t.type,s),a.props=u,p=t.pendingProps,m=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ba(l):(l=Ao(n)?qf:Vi.current,l=L0(t,l));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==p||m!==l)&&ZE(t,a,r,l),Lc=!1,m=t.memoizedState,a.state=m,y4(t,r,a,i);var S=t.memoizedState;s!==p||m!==S||To.current||Lc?(typeof v=="function"&&(g6(t,n,v,r),S=t.memoizedState),(u=Lc||XE(t,n,u,r,m,S,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,S,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,S,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),a.props=r,a.state=S,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return S6(e,t,n,r,o,i)}function S6(e,t,n,r,i,o){vR(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&GE(t,n,!1),Su(e,t,o);r=t.stateNode,bX.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=O0(t,e.child,null,o),t.child=O0(t,null,s,o)):to(e,t,s,o),t.memoizedState=r.state,i&&GE(t,n,!0),t.child}function yR(e){var t=e.stateNode;t.pendingContext?UE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&UE(e,t.context,!1),u7(e,t.containerInfo)}function sP(e,t,n,r,i){return M0(),r7(i),t.flags|=256,to(e,t,n,r),t.child}var b6={dehydrated:null,treeContext:null,retryLane:0};function x6(e){return{baseLanes:e,cachePool:null,transitions:null}}function SR(e,t,n){var r=t.pendingProps,i=ur.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Yn(ur,i&1),e===null)return h6(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=L5(a,r,0,null),e=$f(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=x6(n),t.memoizedState=b6,e):v7(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return xX(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Zc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Zc(s,o):(o=$f(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?x6(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=b6,r}return o=e.child,e=o.sibling,r=Zc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function v7(e,t){return t=L5({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function py(e,t,n,r){return r!==null&&r7(r),O0(t,e.child,null,n),e=v7(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xX(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=px(Error(Ie(422))),py(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=L5({mode:"visible",children:r.children},i,0,null),o=$f(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&O0(t,e.child,null,a),t.child.memoizedState=x6(a),t.memoizedState=b6,o);if((t.mode&1)===0)return py(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Ie(419)),r=px(o,r,void 0),py(e,t,a,r)}if(s=(a&e.childLanes)!==0,Po||s){if(r=di,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,yu(e,i),ws(r,e,i,-1))}return C7(),r=px(Error(Ie(421))),py(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=RX.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,oa=Yc(i.nextSibling),aa=t,nr=!0,vs=null,e!==null&&(Aa[La++]=du,Aa[La++]=fu,Aa[La++]=Kf,du=e.id,fu=e.overflow,Kf=t),t=v7(t,r.children),t.flags|=4096,t)}function lP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),p6(e.return,t,n)}function gx(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function bR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(to(e,t,r.children,n),r=ur.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lP(e,n,t);else if(e.tag===19)lP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Yn(ur,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&S4(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),gx(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&S4(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}gx(t,!0,n,null,o);break;case"together":gx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function w3(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Su(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zf|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ie(153));if(t.child!==null){for(e=t.child,n=Zc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wX(e,t,n){switch(t.tag){case 3:yR(t),M0();break;case 5:YI(t);break;case 1:Ao(t.type)&&h4(t);break;case 4:u7(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Yn(m4,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Yn(ur,ur.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?SR(e,t,n):(Yn(ur,ur.current&1),e=Su(e,t,n),e!==null?e.sibling:null);Yn(ur,ur.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return bR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Yn(ur,ur.current),r)break;return null;case 22:case 23:return t.lanes=0,mR(e,t,n)}return Su(e,t,n)}var xR,w6,wR,CR;xR=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};w6=function(){};wR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Lf(xl.current);var o=null;switch(n){case"input":i=Uw(e,i),r=Uw(e,r),o=[];break;case"select":i=fr({},i,{value:void 0}),r=fr({},r,{value:void 0}),o=[];break;case"textarea":i=Yw(e,i),r=Yw(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=d4)}Kw(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(jm.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i?.[u],r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(jm.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Kn("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};CR=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ag(e,t){if(!nr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function CX(e,t,n){var r=t.pendingProps;switch(n7(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bi(t),null;case 1:return Ao(t.type)&&f4(),Bi(t),null;case 3:return r=t.stateNode,I0(),Zn(To),Zn(Vi),d7(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vs!==null&&(L6(vs),vs=null))),w6(e,t),Bi(t),null;case 5:c7(t);var i=Lf(iv.current);if(n=t.type,e!==null&&t.stateNode!=null)wR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ie(166));return Bi(t),null}if(e=Lf(xl.current),fy(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[pl]=t,r[nv]=o,e=(t.mode&1)!==0,n){case"dialog":Kn("cancel",r),Kn("close",r);break;case"iframe":case"object":case"embed":Kn("load",r);break;case"video":case"audio":for(i=0;i<em.length;i++)Kn(em[i],r);break;case"source":Kn("error",r);break;case"img":case"image":case"link":Kn("error",r),Kn("load",r);break;case"details":Kn("toggle",r);break;case"input":vE(r,o),Kn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Kn("invalid",r);break;case"textarea":SE(r,o),Kn("invalid",r)}Kw(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&dy(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&dy(r.textContent,s,e),i=["children",""+s]):jm.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Kn("scroll",r)}switch(n){case"input":ry(r),yE(r,o,!0);break;case"textarea":ry(r),bE(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=d4)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=XO(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[pl]=t,e[nv]=r,xR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;i<em.length;i++)Kn(em[i],e);i=r;break;case"source":Kn("error",e),i=r;break;case"img":case"image":case"link":Kn("error",e),Kn("load",e),i=r;break;case"details":Kn("toggle",e),i=r;break;case"input":vE(e,r),i=Uw(e,r),Kn("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fr({},r,{value:void 0}),Kn("invalid",e);break;case"textarea":SE(e,r),i=Yw(e,r),Kn("invalid",e);break;default:i=r}Kw(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?JO(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ZO(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ym(e,l):typeof l=="number"&&Ym(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(jm.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Kn("scroll",e):l!=null&&H9(e,o,l,a))}switch(n){case"input":ry(e),yE(e,r,!1);break;case"textarea":ry(e),bE(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nd(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?t0(e,!!r.multiple,o,!1):r.defaultValue!=null&&t0(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=d4)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Bi(t),null;case 6:if(e&&t.stateNode!=null)CR(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ie(166));if(n=Lf(iv.current),Lf(xl.current),fy(t)){if(r=t.stateNode,n=t.memoizedProps,r[pl]=t,(o=r.nodeValue!==n)&&(e=aa,e!==null))switch(e.tag){case 3:dy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&dy(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[pl]=t,t.stateNode=r}return Bi(t),null;case 13:if(Zn(ur),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(nr&&oa!==null&&(t.mode&1)!==0&&(t.flags&128)===0)$I(),M0(),t.flags|=98560,o=!1;else if(o=fy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Ie(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Ie(317));o[pl]=t}else M0(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Bi(t),o=!1}else vs!==null&&(L6(vs),vs=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ur.current&1)!==0?Qr===0&&(Qr=3):C7())),t.updateQueue!==null&&(t.flags|=4),Bi(t),null);case 4:return I0(),w6(e,t),e===null&&ev(t.stateNode.containerInfo),Bi(t),null;case 10:return a7(t.type._context),Bi(t),null;case 17:return Ao(t.type)&&f4(),Bi(t),null;case 19:if(Zn(ur),o=t.memoizedState,o===null)return Bi(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Ag(o,!1);else{if(Qr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=S4(e),a!==null){for(t.flags|=128,Ag(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Yn(ur,ur.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ir()>N0&&(t.flags|=128,r=!0,Ag(o,!1),t.lanes=4194304)}else{if(!r)if(e=S4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ag(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Ir()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Ag(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=Ir(),t.sibling=null,n=ur.current,Yn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function _X(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return I0(),Zn(To),Zn(Vi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return I0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,kX=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var uP=!1;function EX(e,t){if(a6=l4,e=PI(),e7(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{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s6={focusedElem:e,selectionRange:n},l4=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;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,P=S.memoizedState,E=t.stateNode,_=E.getSnapshotBeforeUpdate(t.elementType===t.type?w:hs(t.type,w),P);E.__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(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return S=uP,uP=!1,S}function wm(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&&C6(t,n,o)}i=i.next}while(i!==r)}}function T5(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 _6(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 _R(e){var t=e.alternate;t!==null&&(e.alternate=null,_R(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pl],delete t[nv],delete t[c6],delete t[lX],delete t[uX])),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 kR(e){return e.tag===5||e.tag===3||e.tag===4}function cP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kR(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 k6(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=d4));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(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(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Pi=null,ps=!1;function wc(e,t,n){for(n=n.child;n!==null;)ER(e,t,n),n=n.sibling}function ER(e,t,n){if(bl&&typeof bl.onCommitFiberUnmount=="function")try{bl.onCommitFiberUnmount(b5,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Pi,i=ps;Pi=null,wc(e,t,n),Pi=r,ps=i,Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pi.removeChild(n.stateNode));break;case 18:Pi!==null&&(ps?(e=Pi,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Zm(e)):lx(Pi,n.stateNode));break;case 4:r=Pi,i=ps,Pi=n.stateNode.containerInfo,ps=!0,wc(e,t,n),Pi=r,ps=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(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)&&C6(n,t,a),i=i.next}while(i!==r)}wc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}wc(e,t,n);break;case 21:wc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,wc(e,t,n),Hi=r):wc(e,t,n);break;default:wc(e,t,n)}}function dP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kX),t.forEach(function(r){var i=NX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ls(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Pi=s.stateNode,ps=!1;break e;case 3:Pi=s.stateNode.containerInfo,ps=!0;break e;case 4:Pi=s.stateNode.containerInfo,ps=!0;break e}s=s.return}if(Pi===null)throw Error(Ie(160));ER(o,a,i),Pi=null,ps=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){xr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)PR(t,e),t=t.sibling}function PR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ls(t,e),rl(e),r&4){try{wm(3,e,e.return),T5(3,e)}catch(w){xr(e,e.return,w)}try{wm(5,e,e.return)}catch(w){xr(e,e.return,w)}}break;case 1:ls(t,e),rl(e),r&512&&n!==null&&Up(n,n.return);break;case 5:if(ls(t,e),rl(e),r&512&&n!==null&&Up(n,n.return),e.flags&32){var i=e.stateNode;try{Ym(i,"")}catch(w){xr(e,e.return,w)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&qO(i,o),Xw(s,a);var u=Xw(s,o);for(a=0;a<l.length;a+=2){var h=l[a],p=l[a+1];h==="style"?JO(i,p):h==="dangerouslySetInnerHTML"?ZO(i,p):h==="children"?Ym(i,p):H9(i,h,p,u)}switch(s){case"input":Gw(i,o);break;case"textarea":KO(i,o);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?t0(i,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?t0(i,!!o.multiple,o.defaultValue,!0):t0(i,!!o.multiple,o.multiple?[]:"",!1))}i[nv]=o}catch(w){xr(e,e.return,w)}}break;case 6:if(ls(t,e),rl(e),r&4){if(e.stateNode===null)throw Error(Ie(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(w){xr(e,e.return,w)}}break;case 3:if(ls(t,e),rl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zm(t.containerInfo)}catch(w){xr(e,e.return,w)}break;case 4:ls(t,e),rl(e);break;case 13:ls(t,e),rl(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(b7=Ir())),r&4&&dP(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Hi=(u=Hi)||h,ls(t,e),Hi=u):ls(t,e),rl(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&(e.mode&1)!==0)for(ot=e,h=e.child;h!==null;){for(p=ot=h;ot!==null;){switch(m=ot,v=m.child,m.tag){case 0:case 11:case 14:case 15:wm(4,m,m.return);break;case 1:Up(m,m.return);var S=m.stateNode;if(typeof S.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(w){xr(r,n,w)}}break;case 5:Up(m,m.return);break;case 22:if(m.memoizedState!==null){hP(p);continue}}v!==null?(v.return=m,ot=v):hP(p)}h=h.sibling}e:for(h=null,p=e;;){if(p.tag===5){if(h===null){h=p;try{i=p.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=p.stateNode,l=p.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=QO("display",a))}catch(w){xr(e,e.return,w)}}}else if(p.tag===6){if(h===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(w){xr(e,e.return,w)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;h===p&&(h=null),p=p.return}h===p&&(h=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:ls(t,e),rl(e),r&4&&dP(e);break;case 21:break;default:ls(t,e),rl(e)}}function rl(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(kR(n)){var r=n;break e}n=n.return}throw Error(Ie(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ym(i,""),r.flags&=-33);var o=cP(e);E6(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=cP(e);k6(e,s,a);break;default:throw Error(Ie(161))}}catch(l){xr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function PX(e,t,n){ot=e,TR(e)}function TR(e,t,n){for(var r=(e.mode&1)!==0;ot!==null;){var i=ot,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||gy;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Hi;s=gy;var u=Hi;if(gy=a,(Hi=l)&&!u)for(ot=i;ot!==null;)a=ot,l=a.child,a.tag===22&&a.memoizedState!==null?pP(i):l!==null?(l.return=a,ot=l):pP(i);for(;o!==null;)ot=o,TR(o),o=o.sibling;ot=i,gy=s,Hi=u}fP(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,ot=o):fP(e)}}function fP(e){for(;ot!==null;){var t=ot;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Hi||T5(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Hi)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:hs(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&KE(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}KE(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var p=h.dehydrated;p!==null&&Zm(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ie(163))}Hi||t.flags&512&&_6(t)}catch(m){xr(t,t.return,m)}}if(t===e){ot=null;break}if(n=t.sibling,n!==null){n.return=t.return,ot=n;break}ot=t.return}}function hP(e){for(;ot!==null;){var t=ot;if(t===e){ot=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ot=n;break}ot=t.return}}function pP(e){for(;ot!==null;){var t=ot;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{T5(4,t)}catch(l){xr(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){xr(t,i,l)}}var o=t.return;try{_6(t)}catch(l){xr(t,o,l)}break;case 5:var a=t.return;try{_6(t)}catch(l){xr(t,a,l)}}}catch(l){xr(t,t.return,l)}if(t===e){ot=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ot=s;break}ot=t.return}}var TX=Math.ceil,w4=Pu.ReactCurrentDispatcher,y7=Pu.ReactCurrentOwner,Na=Pu.ReactCurrentBatchConfig,on=0,di=null,Wr=null,Li=0,ea=0,Gp=fd(0),Qr=0,lv=null,Zf=0,A5=0,S7=0,Cm=null,ko=null,b7=0,N0=1/0,lu=null,C4=!1,P6=null,Kc=null,my=!1,Bc=null,_4=0,_m=0,T6=null,C3=-1,_3=0;function io(){return(on&6)!==0?Ir():C3!==-1?C3:C3=Ir()}function Xc(e){return(e.mode&1)===0?1:(on&2)!==0&&Li!==0?Li&-Li:dX.transition!==null?(_3===0&&(_3=dI()),_3):(e=Pn,e!==0||(e=window.event,e=e===void 0?16:yI(e.type)),e)}function ws(e,t,n,r){if(50<_m)throw _m=0,T6=null,Error(Ie(185));zv(e,n,r),((on&2)===0||e!==di)&&(e===di&&((on&2)===0&&(A5|=n),Qr===4&&Ic(e,Li)),Lo(e,r),n===1&&on===0&&(t.mode&1)===0&&(N0=Ir()+500,k5&&hd()))}function Lo(e,t){var n=e.callbackNode;dK(e,t);var r=s4(e,e===di?Li:0);if(r===0)n!==null&&CE(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&CE(n),t===1)e.tag===0?cX(gP.bind(null,e)):zI(gP.bind(null,e)),aX(function(){(on&6)===0&&hd()}),n=null;else{switch(fI(r)){case 1:n=j9;break;case 4:n=uI;break;case 16:n=a4;break;case 536870912:n=cI;break;default:n=a4}n=DR(n,AR.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function AR(e,t){if(C3=-1,_3=0,(on&6)!==0)throw Error(Ie(327));var n=e.callbackNode;if(a0()&&e.callbackNode!==n)return null;var r=s4(e,e===di?Li:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=k4(e,r);else{t=r;var i=on;on|=2;var o=MR();(di!==e||Li!==t)&&(lu=null,N0=Ir()+500,Ff(e,t));do try{MX();break}catch(s){LR(e,s)}while(1);o7(),w4.current=o,on=i,Wr!==null?t=0:(di=null,Li=0,t=Qr)}if(t!==0){if(t===2&&(i=t6(e),i!==0&&(r=i,t=A6(e,i))),t===1)throw n=lv,Ff(e,0),Ic(e,r),Lo(e,Ir()),n;if(t===6)Ic(e,r);else{if(i=e.current.alternate,(r&30)===0&&!AX(i)&&(t=k4(e,r),t===2&&(o=t6(e),o!==0&&(r=o,t=A6(e,o))),t===1))throw n=lv,Ff(e,0),Ic(e,r),Lo(e,Ir()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ie(345));case 2:yf(e,ko,lu);break;case 3:if(Ic(e,r),(r&130023424)===r&&(t=b7+500-Ir(),10<t)){if(s4(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){io(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=u6(yf.bind(null,e,ko,lu),t);break}yf(e,ko,lu);break;case 4:if(Ic(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-xs(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Ir()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*TX(r/1960))-r,10<r){e.timeoutHandle=u6(yf.bind(null,e,ko,lu),r);break}yf(e,ko,lu);break;case 5:yf(e,ko,lu);break;default:throw Error(Ie(329))}}}return Lo(e,Ir()),e.callbackNode===n?AR.bind(null,e):null}function A6(e,t){var n=Cm;return e.current.memoizedState.isDehydrated&&(Ff(e,t).flags|=256),e=k4(e,t),e!==2&&(t=ko,ko=n,t!==null&&L6(t)),e}function L6(e){ko===null?ko=e:ko.push.apply(ko,e)}function AX(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Ts(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ic(e,t){for(t&=~S7,t&=~A5,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xs(t),r=1<<n;e[n]=-1,t&=~r}}function gP(e){if((on&6)!==0)throw Error(Ie(327));a0();var t=s4(e,0);if((t&1)===0)return Lo(e,Ir()),null;var n=k4(e,t);if(e.tag!==0&&n===2){var r=t6(e);r!==0&&(t=r,n=A6(e,r))}if(n===1)throw n=lv,Ff(e,0),Ic(e,t),Lo(e,Ir()),n;if(n===6)throw Error(Ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yf(e,ko,lu),Lo(e,Ir()),null}function x7(e,t){var n=on;on|=1;try{return e(t)}finally{on=n,on===0&&(N0=Ir()+500,k5&&hd())}}function Qf(e){Bc!==null&&Bc.tag===0&&(on&6)===0&&a0();var t=on;on|=1;var n=Na.transition,r=Pn;try{if(Na.transition=null,Pn=1,e)return e()}finally{Pn=r,Na.transition=n,on=t,(on&6)===0&&hd()}}function w7(){ea=Gp.current,Zn(Gp)}function Ff(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,oX(n)),Wr!==null)for(n=Wr.return;n!==null;){var r=n;switch(n7(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&f4();break;case 3:I0(),Zn(To),Zn(Vi),d7();break;case 5:c7(r);break;case 4:I0();break;case 13:Zn(ur);break;case 19:Zn(ur);break;case 10:a7(r.type._context);break;case 22:case 23:w7()}n=n.return}if(di=e,Wr=e=Zc(e.current,null),Li=ea=t,Qr=0,lv=null,S7=A5=Zf=0,ko=Cm=null,Af!==null){for(t=0;t<Af.length;t++)if(n=Af[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Af=null}return e}function LR(e,t){do{var n=Wr;try{if(o7(),b3.current=x4,b4){for(var r=dr.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}b4=!1}if(Xf=0,ci=Xr=dr=null,xm=!1,ov=0,y7.current=null,n===null||n.return===null){Qr=1,lv=t,Wr=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Li,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,h=s,p=h.tag;if((h.mode&1)===0&&(p===0||p===11||p===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var v=nP(a);if(v!==null){v.flags&=-257,rP(v,a,s,o,t),v.mode&1&&tP(o,u,t),t=v,l=u;var S=t.updateQueue;if(S===null){var w=new Set;w.add(l),t.updateQueue=w}else S.add(l);break e}else{if((t&1)===0){tP(o,u,t),C7();break e}l=Error(Ie(426))}}else if(nr&&s.mode&1){var P=nP(a);if(P!==null){(P.flags&65536)===0&&(P.flags|=256),rP(P,a,s,o,t),r7(R0(l,s));break e}}o=l=R0(l,s),Qr!==4&&(Qr=2),Cm===null?Cm=[o]:Cm.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var E=hR(o,l,t);qE(o,E);break e;case 1:s=l;var _=o.type,T=o.stateNode;if((o.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Kc===null||!Kc.has(T)))){o.flags|=65536,t&=-t,o.lanes|=t;var M=pR(o,s,t);qE(o,M);break e}}o=o.return}while(o!==null)}IR(n)}catch(I){t=I,Wr===n&&n!==null&&(Wr=n=n.return);continue}break}while(1)}function MR(){var e=w4.current;return w4.current=x4,e===null?x4:e}function C7(){(Qr===0||Qr===3||Qr===2)&&(Qr=4),di===null||(Zf&268435455)===0&&(A5&268435455)===0||Ic(di,Li)}function k4(e,t){var n=on;on|=2;var r=MR();(di!==e||Li!==t)&&(lu=null,Ff(e,t));do try{LX();break}catch(i){LR(e,i)}while(1);if(o7(),on=n,w4.current=r,Wr!==null)throw Error(Ie(261));return di=null,Li=0,Qr}function LX(){for(;Wr!==null;)OR(Wr)}function MX(){for(;Wr!==null&&!nK();)OR(Wr)}function OR(e){var t=NR(e.alternate,e,ea);e.memoizedProps=e.pendingProps,t===null?IR(e):Wr=t,y7.current=null}function IR(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=CX(n,t,ea),n!==null){Wr=n;return}}else{if(n=_X(n,t),n!==null){n.flags&=32767,Wr=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qr=6,Wr=null;return}}if(t=t.sibling,t!==null){Wr=t;return}Wr=t=e}while(t!==null);Qr===0&&(Qr=5)}function yf(e,t,n){var r=Pn,i=Na.transition;try{Na.transition=null,Pn=1,OX(e,t,n,r)}finally{Na.transition=i,Pn=r}return null}function OX(e,t,n,r){do a0();while(Bc!==null);if((on&6)!==0)throw Error(Ie(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ie(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(fK(e,o),e===di&&(Wr=di=null,Li=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||my||(my=!0,DR(a4,function(){return a0(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=Na.transition,Na.transition=null;var a=Pn;Pn=1;var s=on;on|=4,y7.current=null,EX(e,n),PR(n,e),QK(s6),l4=!!a6,s6=a6=null,e.current=n,PX(n),rK(),on=s,Pn=a,Na.transition=o}else e.current=n;if(my&&(my=!1,Bc=e,_4=i),o=e.pendingLanes,o===0&&(Kc=null),aK(n.stateNode),Lo(e,Ir()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(C4)throw C4=!1,e=P6,P6=null,e;return(_4&1)!==0&&e.tag!==0&&a0(),o=e.pendingLanes,(o&1)!==0?e===T6?_m++:(_m=0,T6=e):_m=0,hd(),null}function a0(){if(Bc!==null){var e=fI(_4),t=Na.transition,n=Pn;try{if(Na.transition=null,Pn=16>e?16:e,Bc===null)var r=!1;else{if(e=Bc,Bc=null,_4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,ot=e.current;ot!==null;){var o=ot,a=o.child;if((ot.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(ot=u;ot!==null;){var h=ot;switch(h.tag){case 0:case 11:case 15:wm(8,h,o)}var p=h.child;if(p!==null)p.return=h,ot=p;else for(;ot!==null;){h=ot;var m=h.sibling,v=h.return;if(_R(h),h===u){ot=null;break}if(m!==null){m.return=v,ot=m;break}ot=v}}}var S=o.alternate;if(S!==null){var w=S.child;if(w!==null){S.child=null;do{var P=w.sibling;w.sibling=null,w=P}while(w!==null)}}ot=o}}if((o.subtreeFlags&2064)!==0&&a!==null)a.return=o,ot=a;else e:for(;ot!==null;){if(o=ot,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:wm(9,o,o.return)}var E=o.sibling;if(E!==null){E.return=o.return,ot=E;break e}ot=o.return}}var _=e.current;for(ot=_;ot!==null;){a=ot;var T=a.child;if((a.subtreeFlags&2064)!==0&&T!==null)T.return=a,ot=T;else e:for(a=_;ot!==null;){if(s=ot,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:T5(9,s)}}catch(I){xr(s,s.return,I)}if(s===a){ot=null;break e}var M=s.sibling;if(M!==null){M.return=s.return,ot=M;break e}ot=s.return}}if(on=i,hd(),bl&&typeof bl.onPostCommitFiberRoot=="function")try{bl.onPostCommitFiberRoot(b5,e)}catch{}r=!0}return r}finally{Pn=n,Na.transition=t}}return!1}function mP(e,t,n){t=R0(n,t),t=hR(e,t,1),e=qc(e,t,1),t=io(),e!==null&&(zv(e,1,t),Lo(e,t))}function xr(e,t,n){if(e.tag===3)mP(e,e,n);else for(;t!==null;){if(t.tag===3){mP(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Kc===null||!Kc.has(r))){e=R0(n,e),e=pR(t,e,1),t=qc(t,e,1),e=io(),t!==null&&(zv(t,1,e),Lo(t,e));break}}t=t.return}}function IX(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=io(),e.pingedLanes|=e.suspendedLanes&n,di===e&&(Li&n)===n&&(Qr===4||Qr===3&&(Li&130023424)===Li&&500>Ir()-b7?Ff(e,0):S7|=n),Lo(e,t)}function RR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=io();e=yu(e,t),e!==null&&(zv(e,t,n),Lo(e,n))}function RX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RR(e,n)}function NX(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(Ie(314))}r!==null&&r.delete(t),RR(e,n)}var NR;NR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,wX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&BI(t,g4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Vi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();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,Ao(r)?(o=!0,h4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E5,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),to(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=zX(r),e=hs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=aP(null,t,r,e,n);break e;case 11:t=iP(null,t,r,e,n);break e;case 14:t=oP(null,t,r,hs(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),aP(e,t,r,i,n);case 3:e:{if(yR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,WI(e,t),y4(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=R0(Error(Ie(423)),t),t=sP(e,t,r,n,i);break e}else if(r!==i){i=R0(Error(Ie(424)),t),t=sP(e,t,r,n,i);break e}else for(oa=Yc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,vs=null,n=jI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=Su(e,t,n);break e}to(e,t,r,n)}t=t.child}return t;case 5:return YI(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),vR(e,t),to(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return SR(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):to(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),iP(e,t,r,i,n);case 7:return to(e,t,t.pendingProps,n),t.child;case 8:return to(e,t,t.pendingProps.children,n),t.child;case 12:return to(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,Yn(m4,r._currentValue),r._currentValue=a,o!==null)if(Ts(o.value,a)){if(o.children===i.children&&!To.current){t=Su(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=pu(-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),p6(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(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(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}to(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Ba(i),r=r(i),t.flags|=1,to(e,t,r,n),t.child;case 14:return r=t.type,i=hs(r,t.pendingProps),i=hs(r.type,i),oP(e,t,r,i,n);case 15:return gR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:hs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h4(t)):e=!1,o0(t,n),UI(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return bR(e,t,n);case 22:return mR(e,t,n)}throw Error(Ie(156,t.tag))};function DR(e,t){return lI(e,t)}function DX(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 Ia(e,t,n,r){return new DX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function Zc(e,t){var n=e.alternate;return n===null?(n=Ia(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 k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return $f(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case GO:return L5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VO:a=10;break e;case UO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ac:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $f(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L5(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=GO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BX(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=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new BX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function FX(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rp,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function zR(e){if(!e)return rd;e=e._reactInternals;e:{if(ah(e)!==e||e.tag!==1)throw Error(Ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ao(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ie(171))}if(e.tag===1){var n=e.type;if(Ao(n))return DI(e,n,t)}return t}function BR(e,t,n,r,i,o,a,s,l){return e=k7(n,r,!0,e,i,o,a,s,l),e.context=zR(null),n=e.current,r=io(),i=Xc(n),o=pu(r,i),o.callback=t??null,qc(n,o,i),e.current.lanes=i,zv(e,i,r),Lo(e,r),e}function M5(e,t,n,r){var i=t.current,o=io(),a=Xc(i);return n=zR(n),t.context===null?t.context=n:t.pendingContext=n,t=pu(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=qc(i,t,a),e!==null&&(ws(e,i,a,o),S3(e,i,a)),a}function E4(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function vP(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function E7(e,t){vP(e,t),(e=e.alternate)&&vP(e,t)}function $X(){return null}var FR=typeof reportError=="function"?reportError:function(e){console.error(e)};function P7(e){this._internalRoot=e}O5.prototype.render=P7.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ie(409));M5(e,t,null,null)};O5.prototype.unmount=P7.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qf(function(){M5(null,e,null,null)}),t[vu]=null}};function O5(e){this._internalRoot=e}O5.prototype.unstable_scheduleHydration=function(e){if(e){var t=gI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Oc.length&&t!==0&&t<Oc[n].priority;n++);Oc.splice(n,0,e),n===0&&vI(e)}};function T7(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function I5(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yP(){}function HX(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=E4(a);o.call(u)}}var a=BR(t,r,e,0,null,!1,!1,"",yP);return e._reactRootContainer=a,e[vu]=a.current,ev(e.nodeType===8?e.parentNode:e),Qf(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=E4(l);s.call(u)}}var l=k7(e,0,!1,null,null,!1,!1,"",yP);return e._reactRootContainer=l,e[vu]=l.current,ev(e.nodeType===8?e.parentNode:e),Qf(function(){M5(t,l,n,r)}),l}function R5(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=E4(a);s.call(l)}}M5(t,a,e,i)}else a=HX(n,t,e,i,r);return E4(a)}hI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Jg(t.pendingLanes);n!==0&&(Y9(t,n|1),Lo(t,Ir()),(on&6)===0&&(N0=Ir()+500,hd()))}break;case 13:Qf(function(){var r=yu(e,1);if(r!==null){var i=io();ws(r,e,1,i)}}),E7(e,1)}};q9=function(e){if(e.tag===13){var t=yu(e,134217728);if(t!==null){var n=io();ws(t,e,134217728,n)}E7(e,134217728)}};pI=function(e){if(e.tag===13){var t=Xc(e),n=yu(e,t);if(n!==null){var r=io();ws(n,e,t,r)}E7(e,t)}};gI=function(){return Pn};mI=function(e,t){var n=Pn;try{return Pn=e,t()}finally{Pn=n}};Qw=function(e,t,n){switch(t){case"input":if(Gw(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_5(r);if(!i)throw Error(Ie(90));YO(r),Gw(r,i)}}}break;case"textarea":KO(e,n);break;case"select":t=n.value,t!=null&&t0(e,!!n.multiple,t,!1)}};nI=x7;rI=Qf;var WX={usingClientEntryPoint:!1,Events:[Fv,Fp,_5,eI,tI,x7]},Lg={findFiberByHostInstance:Tf,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},VX={bundleType:Lg.bundleType,version:Lg.version,rendererPackageName:Lg.rendererPackageName,rendererConfig:Lg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Pu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=aI(e),e===null?null:e.stateNode},findFiberByHostInstance:Lg.findFiberByHostInstance||$X,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vy.isDisabled&&vy.supportsFiber)try{b5=vy.inject(VX),bl=vy}catch{}}ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WX;ha.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!T7(t))throw Error(Ie(200));return FX(e,t,null,n)};ha.createRoot=function(e,t){if(!T7(e))throw Error(Ie(299));var n=!1,r="",i=FR;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=k7(e,1,!1,null,null,n,!1,r,i),e[vu]=t.current,ev(e.nodeType===8?e.parentNode:e),new P7(t)};ha.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ie(188)):(e=Object.keys(e).join(","),Error(Ie(268,e)));return e=aI(t),e=e===null?null:e.stateNode,e};ha.flushSync=function(e){return Qf(e)};ha.hydrate=function(e,t,n){if(!I5(t))throw Error(Ie(200));return R5(null,e,t,!0,n)};ha.hydrateRoot=function(e,t,n){if(!T7(e))throw Error(Ie(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=FR;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=BR(t,null,e,1,n??null,i,!1,o,a),e[vu]=t.current,ev(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new O5(t)};ha.render=function(e,t,n){if(!I5(t))throw Error(Ie(200));return R5(null,e,t,!1,n)};ha.unmountComponentAtNode=function(e){if(!I5(e))throw Error(Ie(40));return e._reactRootContainer?(Qf(function(){R5(null,null,e,!1,function(){e._reactRootContainer=null,e[vu]=null})}),!0):!1};ha.unstable_batchedUpdates=x7;ha.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!I5(n))throw Error(Ie(200));if(e==null||e._reactInternals===void 0)throw Error(Ie(38));return R5(e,t,n,!1,r)};ha.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Il);const yy=R9(Il.exports);var SP=Il.exports;Bw.createRoot=SP.createRoot,Bw.hydrateRoot=SP.hydrateRoot;var Cs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N5={exports:{}},D5={};/**
|
|
* @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 UX=C.exports,GX=Symbol.for("react.element"),jX=Symbol.for("react.fragment"),YX=Object.prototype.hasOwnProperty,qX=UX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,KX={key:!0,ref:!0,__self:!0,__source:!0};function $R(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)YX.call(t,r)&&!KX.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:GX,type:e,key:o,ref:a,props:i,_owner:qX.current}}D5.Fragment=jX;D5.jsx=$R;D5.jsxs=$R;(function(e){e.exports=D5})(N5);const $n=N5.exports.Fragment,x=N5.exports.jsx,re=N5.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Hv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function XX(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?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??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 ZX="chakra-ui-color-mode";function QX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var JX=QX(ZX),bP=()=>{};function xP(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function HR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=JX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>xP(a,s)),[h,p]=C.exports.useState(()=>xP(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>XX({preventTransition:o}),[o]),P=i==="system"&&!l?h:l,E=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);Cs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){E(M);return}if(i==="system"){E("system");return}E(s)},[a,s,i,E]);const _=C.exports.useCallback(()=>{E(P==="dark"?"light":"dark")},[P,E]);C.exports.useEffect(()=>{if(!!r)return w(E)},[r,w,E]);const T=C.exports.useMemo(()=>({colorMode:t??P,toggleColorMode:t?bP:_,setColorMode:t?bP:E,forced:t!==void 0}),[P,_,E,t]);return x(A7.Provider,{value:T,children:n})}HR.displayName="ColorModeProvider";var M6={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]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",P="[object Number]",E="[object Null]",_="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",H="[object ArrayBuffer]",$="[object DataView]",j="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",Q="[object Uint8Array]",K="[object Uint8ClampedArray]",G="[object Uint16Array]",Z="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ye={};ye[j]=ye[de]=ye[V]=ye[J]=ye[ie]=ye[Q]=ye[K]=ye[G]=ye[Z]=!0,ye[s]=ye[l]=ye[H]=ye[h]=ye[$]=ye[p]=ye[m]=ye[v]=ye[w]=ye[P]=ye[_]=ye[M]=ye[I]=ye[R]=ye[z]=!1;var Se=typeof ys=="object"&&ys&&ys.Object===Object&&ys,De=typeof self=="object"&&self&&self.Object===Object&&self,$e=Se||De||Function("return this")(),He=t&&!t.nodeType&&t,qe=He&&!0&&e&&!e.nodeType&&e,tt=qe&&qe.exports===He,Ze=tt&&Se.process,nt=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Tt=nt&&nt.isTypedArray;function xt(U,ne,ge){switch(ge.length){case 0:return U.call(ne);case 1:return U.call(ne,ge[0]);case 2:return U.call(ne,ge[0],ge[1]);case 3:return U.call(ne,ge[0],ge[1],ge[2])}return U.apply(ne,ge)}function Le(U,ne){for(var ge=-1,Ke=Array(U);++ge<U;)Ke[ge]=ne(ge);return Ke}function at(U){return function(ne){return U(ne)}}function At(U,ne){return U?.[ne]}function st(U,ne){return function(ge){return U(ne(ge))}}var gt=Array.prototype,an=Function.prototype,Ct=Object.prototype,Ut=$e["__core-js_shared__"],sn=an.toString,yn=Ct.hasOwnProperty,Oe=function(){var U=/[^.]+$/.exec(Ut&&Ut.keys&&Ut.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),et=Ct.toString,Xt=sn.call(Object),Yt=RegExp("^"+sn.call(yn).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ke=tt?$e.Buffer:void 0,Ot=$e.Symbol,Ne=$e.Uint8Array,ut=ke?ke.allocUnsafe:void 0,ln=st(Object.getPrototypeOf,Object),Nn=Object.create,We=Ct.propertyIsEnumerable,ht=gt.splice,it=Ot?Ot.toStringTag:void 0,Nt=function(){try{var U=Xa(Object,"defineProperty");return U({},"",{}),U}catch{}}(),Zt=ke?ke.isBuffer:void 0,Qn=Math.max,lo=Date.now,gi=Xa($e,"Map"),Os=Xa(Object,"create"),m1=function(){function U(){}return function(ne){if(!Bo(ne))return{};if(Nn)return Nn(ne);U.prototype=ne;var ge=new U;return U.prototype=void 0,ge}}();function va(U){var ne=-1,ge=U==null?0:U.length;for(this.clear();++ne<ge;){var Ke=U[ne];this.set(Ke[0],Ke[1])}}function xh(){this.__data__=Os?Os(null):{},this.size=0}function v1(U){var ne=this.has(U)&&delete this.__data__[U];return this.size-=ne?1:0,ne}function Du(U){var ne=this.__data__;if(Os){var ge=ne[U];return ge===r?void 0:ge}return yn.call(ne,U)?ne[U]:void 0}function wh(U){var ne=this.__data__;return Os?ne[U]!==void 0:yn.call(ne,U)}function Ch(U,ne){var ge=this.__data__;return this.size+=this.has(U)?0:1,ge[U]=Os&&ne===void 0?r:ne,this}va.prototype.clear=xh,va.prototype.delete=v1,va.prototype.get=Du,va.prototype.has=wh,va.prototype.set=Ch;function Ro(U){var ne=-1,ge=U==null?0:U.length;for(this.clear();++ne<ge;){var Ke=U[ne];this.set(Ke[0],Ke[1])}}function Ed(){this.__data__=[],this.size=0}function y1(U){var ne=this.__data__,ge=qa(ne,U);if(ge<0)return!1;var Ke=ne.length-1;return ge==Ke?ne.pop():ht.call(ne,ge,1),--this.size,!0}function zu(U){var ne=this.__data__,ge=qa(ne,U);return ge<0?void 0:ne[ge][1]}function Pd(U){return qa(this.__data__,U)>-1}function S1(U,ne){var ge=this.__data__,Ke=qa(ge,U);return Ke<0?(++this.size,ge.push([U,ne])):ge[Ke][1]=ne,this}Ro.prototype.clear=Ed,Ro.prototype.delete=y1,Ro.prototype.get=zu,Ro.prototype.has=Pd,Ro.prototype.set=S1;function Is(U){var ne=-1,ge=U==null?0:U.length;for(this.clear();++ne<ge;){var Ke=U[ne];this.set(Ke[0],Ke[1])}}function Bu(){this.size=0,this.__data__={hash:new va,map:new(gi||Ro),string:new va}}function b1(U){var ne=Hl(this,U).delete(U);return this.size-=ne?1:0,ne}function x1(U){return Hl(this,U).get(U)}function w1(U){return Hl(this,U).has(U)}function C1(U,ne){var ge=Hl(this,U),Ke=ge.size;return ge.set(U,ne),this.size+=ge.size==Ke?0:1,this}Is.prototype.clear=Bu,Is.prototype.delete=b1,Is.prototype.get=x1,Is.prototype.has=w1,Is.prototype.set=C1;function Ya(U){var ne=this.__data__=new Ro(U);this.size=ne.size}function _1(){this.__data__=new Ro,this.size=0}function k1(U){var ne=this.__data__,ge=ne.delete(U);return this.size=ne.size,ge}function E1(U){return this.__data__.get(U)}function P1(U){return this.__data__.has(U)}function T1(U,ne){var ge=this.__data__;if(ge instanceof Ro){var Ke=ge.__data__;if(!gi||Ke.length<n-1)return Ke.push([U,ne]),this.size=++ge.size,this;ge=this.__data__=new Is(Ke)}return ge.set(U,ne),this.size=ge.size,this}Ya.prototype.clear=_1,Ya.prototype.delete=k1,Ya.prototype.get=E1,Ya.prototype.has=P1,Ya.prototype.set=T1;function A1(U,ne){var ge=Vl(U),Ke=!ge&&Od(U),zt=!ge&&!Ke&&Vu(U),fn=!ge&&!Ke&&!zt&&Ah(U),yt=ge||Ke||zt||fn,Pt=yt?Le(U.length,String):[],Vt=Pt.length;for(var Nr in U)(ne||yn.call(U,Nr))&&!(yt&&(Nr=="length"||zt&&(Nr=="offset"||Nr=="parent")||fn&&(Nr=="buffer"||Nr=="byteLength"||Nr=="byteOffset")||kh(Nr,Vt)))&&Pt.push(Nr);return Pt}function Rs(U,ne,ge){(ge!==void 0&&!ya(U[ne],ge)||ge===void 0&&!(ne in U))&&Bl(U,ne,ge)}function L1(U,ne,ge){var Ke=U[ne];(!(yn.call(U,ne)&&ya(Ke,ge))||ge===void 0&&!(ne in U))&&Bl(U,ne,ge)}function qa(U,ne){for(var ge=U.length;ge--;)if(ya(U[ge][0],ne))return ge;return-1}function Bl(U,ne,ge){ne=="__proto__"&&Nt?Nt(U,ne,{configurable:!0,enumerable:!0,value:ge,writable:!0}):U[ne]=ge}var Fl=Td();function Ns(U){return U==null?U===void 0?N:E:it&&it in Object(U)?Ad(U):Wl(U)}function $l(U){return Wn(U)&&Ns(U)==s}function _h(U){if(!Bo(U)||Bs(U))return!1;var ne=Uu(U)?Yt:X;return ne.test(Wu(U))}function Fu(U){return Wn(U)&&Th(U.length)&&!!ye[Ns(U)]}function Ds(U){if(!Bo(U))return Fs(U);var ne=uo(U),ge=[];for(var Ke in U)Ke=="constructor"&&(ne||!yn.call(U,Ke))||ge.push(Ke);return ge}function No(U,ne,ge,Ke,zt){U!==ne&&Fl(ne,function(fn,yt){if(zt||(zt=new Ya),Bo(fn))kn(U,ne,yt,ge,No,Ke,zt);else{var Pt=Ke?Ke($u(U,yt),fn,yt+"",U,ne,zt):void 0;Pt===void 0&&(Pt=fn),Rs(U,yt,Pt)}},Lh)}function kn(U,ne,ge,Ke,zt,fn,yt){var Pt=$u(U,ge),Vt=$u(ne,ge),Nr=yt.get(Vt);if(Nr){Rs(U,ge,Nr);return}var gr=fn?fn(Pt,Vt,ge+"",U,ne,yt):void 0,hn=gr===void 0;if(hn){var jr=Vl(Vt),co=!jr&&Vu(Vt),Gi=!jr&&!co&&Ah(Vt);gr=Vt,jr||co||Gi?Vl(Pt)?gr=Pt:Ph(Pt)?gr=zs(Pt):co?(hn=!1,gr=_r(Vt,!0)):Gi?(hn=!1,gr=zo(Vt,!0)):gr=[]:Id(Vt)||Od(Vt)?(gr=Pt,Od(Pt)?gr=Rd(Pt):(!Bo(Pt)||Uu(Pt))&&(gr=mi(Vt))):hn=!1}hn&&(yt.set(Vt,gr),zt(gr,Vt,Ke,fn,yt),yt.delete(Vt)),Rs(U,ge,gr)}function Sn(U,ne){return Hu(M1(U,ne,Mh),U+"")}var Do=Nt?function(U,ne){return Nt(U,"toString",{configurable:!0,enumerable:!1,value:Wt(ne),writable:!0})}:Mh;function _r(U,ne){if(ne)return U.slice();var ge=U.length,Ke=ut?ut(ge):new U.constructor(ge);return U.copy(Ke),Ke}function Ur(U){var ne=new U.constructor(U.byteLength);return new Ne(ne).set(new Ne(U)),ne}function zo(U,ne){var ge=ne?Ur(U.buffer):U.buffer;return new U.constructor(ge,U.byteOffset,U.length)}function zs(U,ne){var ge=-1,Ke=U.length;for(ne||(ne=Array(Ke));++ge<Ke;)ne[ge]=U[ge];return ne}function Gr(U,ne,ge,Ke){var zt=!ge;ge||(ge={});for(var fn=-1,yt=ne.length;++fn<yt;){var Pt=ne[fn],Vt=Ke?Ke(ge[Pt],U[Pt],Pt,ge,U):void 0;Vt===void 0&&(Vt=U[Pt]),zt?Bl(ge,Pt,Vt):L1(ge,Pt,Vt)}return ge}function Ka(U){return Sn(function(ne,ge){var Ke=-1,zt=ge.length,fn=zt>1?ge[zt-1]:void 0,yt=zt>2?ge[2]:void 0;for(fn=U.length>3&&typeof fn=="function"?(zt--,fn):void 0,yt&&Eh(ge[0],ge[1],yt)&&(fn=zt<3?void 0:fn,zt=1),ne=Object(ne);++Ke<zt;){var Pt=ge[Ke];Pt&&U(ne,Pt,Ke,fn)}return ne})}function Td(U){return function(ne,ge,Ke){for(var zt=-1,fn=Object(ne),yt=Ke(ne),Pt=yt.length;Pt--;){var Vt=yt[U?Pt:++zt];if(ge(fn[Vt],Vt,fn)===!1)break}return ne}}function Hl(U,ne){var ge=U.__data__;return Ld(ne)?ge[typeof ne=="string"?"string":"hash"]:ge.map}function Xa(U,ne){var ge=At(U,ne);return _h(ge)?ge:void 0}function Ad(U){var ne=yn.call(U,it),ge=U[it];try{U[it]=void 0;var Ke=!0}catch{}var zt=et.call(U);return Ke&&(ne?U[it]=ge:delete U[it]),zt}function mi(U){return typeof U.constructor=="function"&&!uo(U)?m1(ln(U)):{}}function kh(U,ne){var ge=typeof U;return ne=ne??a,!!ne&&(ge=="number"||ge!="symbol"&&he.test(U))&&U>-1&&U%1==0&&U<ne}function Eh(U,ne,ge){if(!Bo(ge))return!1;var Ke=typeof ne;return(Ke=="number"?Ht(ge)&&kh(ne,ge.length):Ke=="string"&&ne in ge)?ya(ge[ne],U):!1}function Ld(U){var ne=typeof U;return ne=="string"||ne=="number"||ne=="symbol"||ne=="boolean"?U!=="__proto__":U===null}function Bs(U){return!!Oe&&Oe in U}function uo(U){var ne=U&&U.constructor,ge=typeof ne=="function"&&ne.prototype||Ct;return U===ge}function Fs(U){var ne=[];if(U!=null)for(var ge in Object(U))ne.push(ge);return ne}function Wl(U){return et.call(U)}function M1(U,ne,ge){return ne=Qn(ne===void 0?U.length-1:ne,0),function(){for(var Ke=arguments,zt=-1,fn=Qn(Ke.length-ne,0),yt=Array(fn);++zt<fn;)yt[zt]=Ke[ne+zt];zt=-1;for(var Pt=Array(ne+1);++zt<ne;)Pt[zt]=Ke[zt];return Pt[ne]=ge(yt),xt(U,this,Pt)}}function $u(U,ne){if(!(ne==="constructor"&&typeof U[ne]=="function")&&ne!="__proto__")return U[ne]}var Hu=Md(Do);function Md(U){var ne=0,ge=0;return function(){var Ke=lo(),zt=o-(Ke-ge);if(ge=Ke,zt>0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Wu(U){if(U!=null){try{return sn.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Od=$l(function(){return arguments}())?$l:function(U){return Wn(U)&&yn.call(U,"callee")&&!We.call(U,"callee")},Vl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Uu(U)}function Ph(U){return Wn(U)&&Ht(U)}var Vu=Zt||O1;function Uu(U){if(!Bo(U))return!1;var ne=Ns(U);return ne==v||ne==S||ne==u||ne==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Id(U){if(!Wn(U)||Ns(U)!=_)return!1;var ne=ln(U);if(ne===null)return!0;var ge=yn.call(ne,"constructor")&&ne.constructor;return typeof ge=="function"&&ge instanceof ge&&sn.call(ge)==Xt}var Ah=Tt?at(Tt):Fu;function Rd(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?A1(U,!0):Ds(U)}var un=Ka(function(U,ne,ge,Ke){No(U,ne,ge,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function O1(){return!1}e.exports=un})(M6,M6.exports);const yl=M6.exports;function _s(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Mf(e,...t){return eZ(e)?e(...t):e}var eZ=e=>typeof e=="function",tZ=e=>/!(important)?$/.test(e),wP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=tZ(r),o=wP(r),a=e?`${e}.${o}`:o;let s=_s(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=wP(s),i?`${s} !important`:s};function uv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function us(e,t){return n=>{const r={property:n,scale:e};return r.transform=uv({scale:e,transform:t}),r}}var nZ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function rZ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:nZ(t),transform:n?uv({scale:n,compose:r}):r}}var WR=["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 iZ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...WR].join(" ")}function oZ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...WR].join(" ")}var aZ={"--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(" ")},sZ={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 lZ(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 uZ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},VR="& > :not(style) ~ :not(style)",cZ={[VR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},dZ={[VR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},I6={"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"},fZ=new Set(Object.values(I6)),UR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),hZ=e=>e.trim();function pZ(e,t){var n;if(e==null||UR.has(e))return e;const r=/(?<type>^[a-z-A-Z]+)\((?<values>(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(hZ).filter(Boolean);if(l?.length===0)return e;const u=s in I6?I6[s]:s;l.unshift(u);const h=l.map(p=>{if(fZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=GR(S)?S:S&&S.split(" "),P=`colors.${v}`,E=P in t.__cssMap?t.__cssMap[P].varRef:v;return w?[E,...Array.isArray(w)?w:[w]].join(" "):E});return`${a}(${h.join(", ")})`}var GR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),gZ=(e,t)=>pZ(e,t??{});function mZ(e){return/^var\(--.+\)$/.test(e)}var vZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},il=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:aZ},backdropFilter(e){return e!=="auto"?e:sZ},ring(e){return lZ(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?iZ():e==="auto-gpu"?oZ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=vZ(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(mZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:gZ,blur:il("blur"),opacity:il("opacity"),brightness:il("brightness"),contrast:il("contrast"),dropShadow:il("drop-shadow"),grayscale:il("grayscale"),hueRotate:il("hue-rotate"),invert:il("invert"),saturate:il("saturate"),sepia:il("sepia"),bgImage(e){return e==null||GR(e)||UR.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){const{space:t,divide:n}=uZ[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:us("borderWidths"),borderStyles:us("borderStyles"),colors:us("colors"),borders:us("borders"),radii:us("radii",rn.px),space:us("space",by(rn.vh,rn.px)),spaceT:us("space",by(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:uv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:us("sizes",by(rn.vh,rn.px)),sizesT:us("sizes",by(rn.vh,rn.fraction)),shadows:us("shadows"),logical:rZ,blur:us("blur",rn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var pn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(pn,{rounded:pn.borderRadius,roundedTop:pn.borderTopRadius,roundedTopLeft:pn.borderTopLeftRadius,roundedTopRight:pn.borderTopRightRadius,roundedTopStart:pn.borderStartStartRadius,roundedTopEnd:pn.borderStartEndRadius,roundedBottom:pn.borderBottomRadius,roundedBottomLeft:pn.borderBottomLeftRadius,roundedBottomRight:pn.borderBottomRightRadius,roundedBottomStart:pn.borderEndStartRadius,roundedBottomEnd:pn.borderEndEndRadius,roundedLeft:pn.borderLeftRadius,roundedRight:pn.borderRightRadius,roundedStart:pn.borderInlineStartRadius,roundedEnd:pn.borderInlineEndRadius,borderStart:pn.borderInlineStart,borderEnd:pn.borderInlineEnd,borderTopStartRadius:pn.borderStartStartRadius,borderTopEndRadius:pn.borderStartEndRadius,borderBottomStartRadius:pn.borderEndStartRadius,borderBottomEndRadius:pn.borderEndEndRadius,borderStartRadius:pn.borderInlineStartRadius,borderEndRadius:pn.borderInlineEndRadius,borderStartWidth:pn.borderInlineStartWidth,borderEndWidth:pn.borderInlineEndWidth,borderStartColor:pn.borderInlineStartColor,borderEndColor:pn.borderInlineEndColor,borderStartStyle:pn.borderInlineStartStyle,borderEndStyle:pn.borderInlineEndStyle});var yZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},R6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(R6,{shadow:R6.boxShadow});var SZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},P4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:cZ,transform:uv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:dZ,transform:uv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(P4,{flexDir:P4.flexDirection});var jR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},bZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var xZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function wZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var CZ=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},_Z=CZ(wZ),kZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},EZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=_Z(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},PZ={srOnly:{transform(e){return e===!0?kZ:e==="focusable"?EZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},km={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(km,{insetStart:km.insetInlineStart,insetEnd:km.insetInlineEnd});var TZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var AZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},LZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},MZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},OZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},IZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function YR(e){return _s(e)&&e.reference?e.reference:String(e)}var z5=(e,...t)=>t.map(YR).join(` ${e} `).replace(/calc/g,""),CP=(...e)=>`calc(${z5("+",...e)})`,_P=(...e)=>`calc(${z5("-",...e)})`,N6=(...e)=>`calc(${z5("*",...e)})`,kP=(...e)=>`calc(${z5("/",...e)})`,EP=e=>{const t=YR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},_f=Object.assign(e=>({add:(...t)=>_f(CP(e,...t)),subtract:(...t)=>_f(_P(e,...t)),multiply:(...t)=>_f(N6(e,...t)),divide:(...t)=>_f(kP(e,...t)),negate:()=>_f(EP(e)),toString:()=>e.toString()}),{add:CP,subtract:_P,multiply:N6,divide:kP,negate:EP});function RZ(e,t="-"){return e.replace(/\s+/g,t)}function NZ(e){const t=RZ(e.toString());return zZ(DZ(t))}function DZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function zZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function BZ(e,t=""){return[t,e].filter(Boolean).join("-")}function FZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function $Z(e,t=""){return NZ(`--${BZ(e,t)}`)}function ei(e,t,n){const r=$Z(e,n);return{variable:r,reference:FZ(r,t)}}function HZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function WZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=WZ(e);return t||typeof e=="number"?`${e}px`:e}var qR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(qR));function PP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function VZ(e){const t=Object.keys(L7(e));return new Set(t)}function TP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function tm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function UZ(e){if(!e)return null;e.base=e.base??"0px";const t=PP(e),n=Object.entries(e).sort(qR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?TP(u):void 0,{_minW:TP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:tm(null,u),minWQuery:tm(a),minMaxQuery:tm(a,u)}}),r=VZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:PP(e),details:n,media:[null,...t.map(o=>tm(o)).slice(1)],toArrayValue(o){if(!_s(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;HZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var _i={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}`},Cc=e=>KR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ru=e=>KR(t=>e(t,"~ &"),"[data-peer]",".peer"),KR=(e,...t)=>t.map(e).join(", "),B5={_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:Cc(_i.hover),_peerHover:ru(_i.hover),_groupFocus:Cc(_i.focus),_peerFocus:ru(_i.focus),_groupFocusVisible:Cc(_i.focusVisible),_peerFocusVisible:ru(_i.focusVisible),_groupActive:Cc(_i.active),_peerActive:ru(_i.active),_groupDisabled:Cc(_i.disabled),_peerDisabled:ru(_i.disabled),_groupInvalid:Cc(_i.invalid),_peerInvalid:ru(_i.invalid),_groupChecked:Cc(_i.checked),_peerChecked:ru(_i.checked),_groupFocusWithin:Cc(_i.focusWithin),_peerFocusWithin:ru(_i.focusWithin),_peerPlaceholderShown:ru(_i.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]"},GZ=Object.keys(B5);function AP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function jZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=AP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,P=_f.negate(s),E=_f.negate(u);r[w]={value:P,var:l,varRef:E}}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:P}=AP(S,t?.cssVarPrefix);return P},p=_s(s)?s:{default:s};n=yl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const P=h(S);if(v==="default")return m[l]=P,m;const E=((w=B5)==null?void 0:w[v])??v;return m[E]={[l]:P},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function YZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function qZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var KZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function XZ(e){return qZ(e,KZ)}function ZZ(e){return e.semanticTokens}function QZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function JZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!_s(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(_s(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function eQ(e){var t;const n=QZ(e),r=XZ(n),i=ZZ(n),o=JZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=jZ(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:UZ(n.breakpoints)}),n}var M7=yl({},E3,pn,yZ,P4,Ta,SZ,TZ,bZ,jR,PZ,km,R6,Xn,IZ,OZ,AZ,LZ,xZ,MZ),tQ=Object.assign({},Xn,Ta,P4,jR,km),nQ=Object.keys(tQ),rQ=[...Object.keys(M7),...GZ],iQ={...M7,...B5},oQ=e=>e in iQ,aQ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Mf(e[a],t);if(s==null)continue;if(s=_s(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;u<l;u+=1){const h=i?.[u];if(!h){o[a]=s[u];continue}o[h]=o[h]||{},s[u]!=null&&(o[h][a]=s[u])}}return o};function sQ(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function lQ(e){return/^var\(--.+\)$/.test(e)}var uQ=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!lQ(t),cQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=sQ(t);return t=n(i)??r(o)??r(t),t};function dQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Mf(o,r),u=aQ(l)(r);let h={};for(let p in u){const m=u[p];let v=Mf(m,r);p in n&&(p=n[p]),uQ(p,v)&&(v=cQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),_s(v)){h[p]=h[p]??{},h[p]=yl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const P=Mf(S?.property,r);if(!a&&S?.static){const E=Mf(S.static,r);h=yl({},h,E)}if(P&&Array.isArray(P)){for(const E of P)h[E]=w;continue}if(P){P==="&"&&_s(w)?h=yl({},h,w):h[P]=w;continue}if(_s(w)){h=yl({},h,w);continue}h[p]=w}return h};return i}var XR=e=>t=>dQ({theme:t,pseudos:B5,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function fQ(e,t){if(Array.isArray(e))return e;if(_s(e))return t(e);if(e!=null)return[e]}function hQ(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function pQ(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const u={},h=fQ(o,t.toArrayValue);if(!h)return u;const p=h.length,m=p===1,v=!!r.parts;for(let S=0;S<p;S++){const w=t.details[S],P=t.details[hQ(h,S)],E=tm(w.minW,P?._minW),_=Mf((s=r[i])==null?void 0:s[h[S]],a);if(!!_){if(v){(l=r.parts)==null||l.forEach(T=>{yl(u,{[T]:m?_[T]:{[E]:_[T]}})});continue}if(!v){m?yl(u,_):u[E]=_;continue}u[E]=_}}return u}}function gQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=pQ(i);return yl({},Mf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function mQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function vn(e){return YZ(e,["styleConfig","size","variant","colorScheme"])}function vQ(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function yQ(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var SQ=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(yQ(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=vQ(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Fi="-ms-",T4="-moz-",gn="-webkit-",ZR="comm",O7="rule",I7="decl",bQ="@import",QR="@keyframes",xQ=Math.abs,F5=String.fromCharCode,wQ=Object.assign;function CQ(e,t){return Ti(e,0)^45?(((t<<2^Ti(e,0))<<2^Ti(e,1))<<2^Ti(e,2))<<2^Ti(e,3):0}function JR(e){return e.trim()}function _Q(e,t){return(e=t.exec(e))?e[0]:e}function wn(e,t,n){return e.replace(t,n)}function B6(e,t){return e.indexOf(t)}function Ti(e,t){return e.charCodeAt(t)|0}function cv(e,t,n){return e.slice(t,n)}function dl(e){return e.length}function R7(e){return e.length}function xy(e,t){return t.push(e),e}function kQ(e,t){return e.map(t).join("")}var $5=1,D0=1,eN=0,Io=0,$r=0,e1="";function H5(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:$5,column:D0,length:a,return:""}}function Mg(e,t){return wQ(H5("",null,null,"",null,null,0),e,{length:-e.length},t)}function EQ(){return $r}function PQ(){return $r=Io>0?Ti(e1,--Io):0,D0--,$r===10&&(D0=1,$5--),$r}function sa(){return $r=Io<eN?Ti(e1,Io++):0,D0++,$r===10&&(D0=1,$5++),$r}function wl(){return Ti(e1,Io)}function P3(){return Io}function Wv(e,t){return cv(e1,e,t)}function dv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function tN(e){return $5=D0=1,eN=dl(e1=e),Io=0,[]}function nN(e){return e1="",e}function T3(e){return JR(Wv(Io-1,F6(e===91?e+2:e===40?e+1:e)))}function TQ(e){for(;($r=wl())&&$r<33;)sa();return dv(e)>2||dv($r)>3?"":" "}function AQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Wv(e,P3()+(t<6&&wl()==32&&sa()==32))}function F6(e){for(;sa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&F6($r);break;case 40:e===41&&F6(e);break;case 92:sa();break}return Io}function LQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&wl()===47)break;return"/*"+Wv(t,Io-1)+"*"+F5(e===47?e:sa())}function MQ(e){for(;!dv(wl());)sa();return Wv(e,Io)}function OQ(e){return nN(A3("",null,null,null,[""],e=tN(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,P=1,E=1,_=0,T="",M=i,I=o,R=r,N=T;P;)switch(S=_,_=sa()){case 40:if(S!=108&&Ti(N,p-1)==58){B6(N+=wn(T3(_),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:N+=T3(_);break;case 9:case 10:case 13:case 32:N+=TQ(S);break;case 92:N+=AQ(P3()-1,7);continue;case 47:switch(wl()){case 42:case 47:xy(IQ(LQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=dl(N)*E;case 125*w:case 59:case 0:switch(_){case 0:case 125:P=0;case 59+h:v>0&&dl(N)-p&&xy(v>32?MP(N+";",r,n,p-1):MP(wn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(R=LP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),_===123)if(h===0)A3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ti(N,3)===110?100:m){case 100:case 109:case 115:A3(e,R,R,r&&xy(LP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:A3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=E=1,T=N="",p=a;break;case 58:p=1+dl(N),v=S;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&PQ()==125)continue}switch(N+=F5(_),_*w){case 38:E=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(dl(N)-1)*E,E=1;break;case 64:wl()===45&&(N+=T3(sa())),m=wl(),h=p=dl(T=N+=MQ(P3())),_++;break;case 45:S===45&&dl(N)==2&&(w=0)}}return o}function LP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=R7(m),S=0,w=0,P=0;S<r;++S)for(var E=0,_=cv(e,p+1,p=xQ(w=a[S])),T=e;E<v;++E)(T=JR(w>0?m[E]+" "+_:wn(_,/&\f/g,m[E])))&&(l[P++]=T);return H5(e,t,n,i===0?O7:s,l,u,h)}function IQ(e,t,n){return H5(e,t,n,ZR,F5(EQ()),cv(e,2,-2),0)}function MP(e,t,n,r){return H5(e,t,n,I7,cv(e,0,r),cv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=R7(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function RQ(e,t,n,r){switch(e.type){case bQ:case I7:return e.return=e.return||e.value;case ZR:return"";case QR:return e.return=e.value+"{"+s0(e.children,r)+"}";case O7:e.value=e.props.join(",")}return dl(n=s0(e.children,r))?e.return=e.value+"{"+n+"}":""}function NQ(e){var t=R7(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function DQ(e){return function(t){t.root||(t=t.return)&&e(t)}}var OP=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function rN(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var zQ=function(t,n,r){for(var i=0,o=0;i=o,o=wl(),i===38&&o===12&&(n[r]=1),!dv(o);)sa();return Wv(t,Io)},BQ=function(t,n){var r=-1,i=44;do switch(dv(i)){case 0:i===38&&wl()===12&&(n[r]=1),t[r]+=zQ(Io-1,n,r);break;case 2:t[r]+=T3(i);break;case 4:if(i===44){t[++r]=wl()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=F5(i)}while(i=sa());return t},FQ=function(t,n){return nN(BQ(tN(t),n))},IP=new WeakMap,$Q=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!IP.get(r))&&!i){IP.set(t,!0);for(var o=[],a=FQ(n,o),s=r.props,l=0,u=0;l<a.length;l++)for(var h=0;h<s.length;h++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[h]):s[h]+" "+a[l]}}},HQ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function iN(e,t){switch(CQ(e,t)){case 5103:return gn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gn+e+T4+e+Fi+e+e;case 6828:case 4268:return gn+e+Fi+e+e;case 6165:return gn+e+Fi+"flex-"+e+e;case 5187:return gn+e+wn(e,/(\w+).+(:[^]+)/,gn+"box-$1$2"+Fi+"flex-$1$2")+e;case 5443:return gn+e+Fi+"flex-item-"+wn(e,/flex-|-self/,"")+e;case 4675:return gn+e+Fi+"flex-line-pack"+wn(e,/align-content|flex-|-self/,"")+e;case 5548:return gn+e+Fi+wn(e,"shrink","negative")+e;case 5292:return gn+e+Fi+wn(e,"basis","preferred-size")+e;case 6060:return gn+"box-"+wn(e,"-grow","")+gn+e+Fi+wn(e,"grow","positive")+e;case 4554:return gn+wn(e,/([^-])(transform)/g,"$1"+gn+"$2")+e;case 6187:return wn(wn(wn(e,/(zoom-|grab)/,gn+"$1"),/(image-set)/,gn+"$1"),e,"")+e;case 5495:case 3959:return wn(e,/(image-set\([^]*)/,gn+"$1$`$1");case 4968:return wn(wn(e,/(.+:)(flex-)?(.*)/,gn+"box-pack:$3"+Fi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gn+e+e;case 4095:case 3583:case 4068:case 2532:return wn(e,/(.+)-inline(.+)/,gn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dl(e)-1-t>6)switch(Ti(e,t+1)){case 109:if(Ti(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+gn+"$2-$3$1"+T4+(Ti(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~B6(e,"stretch")?iN(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ti(e,t+1)!==115)break;case 6444:switch(Ti(e,dl(e)-3-(~B6(e,"!important")&&10))){case 107:return wn(e,":",":"+gn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gn+(Ti(e,14)===45?"inline-":"")+"box$3$1"+gn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ti(e,t+11)){case 114:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gn+e+Fi+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gn+e+Fi+e+e}return e}var WQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case I7:t.return=iN(t.value,t.length);break;case QR:return s0([Mg(t,{value:wn(t.value,"@","@"+gn)})],i);case O7:if(t.length)return kQ(t.props,function(o){switch(_Q(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Mg(t,{props:[wn(o,/:(read-\w+)/,":"+T4+"$1")]})],i);case"::placeholder":return s0([Mg(t,{props:[wn(o,/:(plac\w+)/,":"+gn+"input-$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,":"+T4+"$1")]}),Mg(t,{props:[wn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},VQ=[WQ],oN=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 P=w.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||VQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var P=w.getAttribute("data-emotion").split(" "),E=1;E<P.length;E++)o[P[E]]=!0;s.push(w)});var l,u=[$Q,HQ];{var h,p=[RQ,DQ(function(w){h.insert(w)})],m=NQ(u.concat(i,p)),v=function(P){return s0(OQ(P),m)};l=function(P,E,_,T){h=_,v(P?P+"{"+E.styles+"}":E.styles),T&&(S.inserted[E.name]=!0)}}var S={key:n,sheet:new SQ({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return S.sheet.hydrate(s),S};function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tn.apply(this,arguments)}var aN={exports:{}},Ln={};/** @license React v16.13.1
|
|
* react-is.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var pi=typeof Symbol=="function"&&Symbol.for,N7=pi?Symbol.for("react.element"):60103,D7=pi?Symbol.for("react.portal"):60106,W5=pi?Symbol.for("react.fragment"):60107,V5=pi?Symbol.for("react.strict_mode"):60108,U5=pi?Symbol.for("react.profiler"):60114,G5=pi?Symbol.for("react.provider"):60109,j5=pi?Symbol.for("react.context"):60110,z7=pi?Symbol.for("react.async_mode"):60111,Y5=pi?Symbol.for("react.concurrent_mode"):60111,q5=pi?Symbol.for("react.forward_ref"):60112,K5=pi?Symbol.for("react.suspense"):60113,UQ=pi?Symbol.for("react.suspense_list"):60120,X5=pi?Symbol.for("react.memo"):60115,Z5=pi?Symbol.for("react.lazy"):60116,GQ=pi?Symbol.for("react.block"):60121,jQ=pi?Symbol.for("react.fundamental"):60117,YQ=pi?Symbol.for("react.responder"):60118,qQ=pi?Symbol.for("react.scope"):60119;function ga(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case N7:switch(e=e.type,e){case z7:case Y5:case W5:case U5:case V5:case K5:return e;default:switch(e=e&&e.$$typeof,e){case j5:case q5:case Z5:case X5:case G5:return e;default:return t}}case D7:return t}}}function sN(e){return ga(e)===Y5}Ln.AsyncMode=z7;Ln.ConcurrentMode=Y5;Ln.ContextConsumer=j5;Ln.ContextProvider=G5;Ln.Element=N7;Ln.ForwardRef=q5;Ln.Fragment=W5;Ln.Lazy=Z5;Ln.Memo=X5;Ln.Portal=D7;Ln.Profiler=U5;Ln.StrictMode=V5;Ln.Suspense=K5;Ln.isAsyncMode=function(e){return sN(e)||ga(e)===z7};Ln.isConcurrentMode=sN;Ln.isContextConsumer=function(e){return ga(e)===j5};Ln.isContextProvider=function(e){return ga(e)===G5};Ln.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===N7};Ln.isForwardRef=function(e){return ga(e)===q5};Ln.isFragment=function(e){return ga(e)===W5};Ln.isLazy=function(e){return ga(e)===Z5};Ln.isMemo=function(e){return ga(e)===X5};Ln.isPortal=function(e){return ga(e)===D7};Ln.isProfiler=function(e){return ga(e)===U5};Ln.isStrictMode=function(e){return ga(e)===V5};Ln.isSuspense=function(e){return ga(e)===K5};Ln.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===W5||e===Y5||e===U5||e===V5||e===K5||e===UQ||typeof e=="object"&&e!==null&&(e.$$typeof===Z5||e.$$typeof===X5||e.$$typeof===G5||e.$$typeof===j5||e.$$typeof===q5||e.$$typeof===jQ||e.$$typeof===YQ||e.$$typeof===qQ||e.$$typeof===GQ)};Ln.typeOf=ga;(function(e){e.exports=Ln})(aN);var lN=aN.exports,KQ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},XQ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uN={};uN[lN.ForwardRef]=KQ;uN[lN.Memo]=XQ;var ZQ=!0;function QQ(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var cN=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||ZQ===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},dN=function(t,n,r){cN(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function JQ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eJ={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},tJ=/[A-Z]|^ms/g,nJ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fN=function(t){return t.charCodeAt(1)===45},RP=function(t){return t!=null&&typeof t!="boolean"},Sx=rN(function(e){return fN(e)?e:e.replace(tJ,"-$&").toLowerCase()}),NP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nJ,function(r,i,o){return fl={name:i,styles:o,next:fl},i})}return eJ[t]!==1&&!fN(t)&&typeof n=="number"&&n!==0?n+"px":n};function fv(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 fl={name:n.name,styles:n.styles,next:fl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)fl={name:r.name,styles:r.styles,next:fl},r=r.next;var i=n.styles+";";return i}return rJ(e,t,n)}case"function":{if(e!==void 0){var o=fl,a=n(e);return fl=o,fv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function rJ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=fv(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":RP(a)&&(r+=Sx(o)+":"+NP(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)RP(a[s])&&(r+=Sx(o)+":"+NP(o,a[s])+";");else{var l=fv(e,t,a);switch(o){case"animation":case"animationName":{r+=Sx(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var DP=/label:\s*([^\s;\n{]+)\s*(;|$)/g,fl,B7=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";fl=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=fv(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=fv(r,n,t[s]),i&&(o+=a[s]);DP.lastIndex=0;for(var l="",u;(u=DP.exec(o))!==null;)l+="-"+u[1];var h=JQ(o)+l;return{name:h,styles:o,next:fl}},iJ=function(t){return t()},hN=zw["useInsertionEffect"]?zw["useInsertionEffect"]:!1,oJ=hN||iJ,zP=hN||C.exports.useLayoutEffect,pN=C.exports.createContext(typeof HTMLElement<"u"?oN({key:"css"}):null),aJ=pN.Provider,gN=function(t){return C.exports.forwardRef(function(n,r){var i=C.exports.useContext(pN);return t(n,i,r)})},hv=C.exports.createContext({}),sJ=function(t,n){if(typeof n=="function"){var r=n(t);return r}return Tn({},t,n)},lJ=OP(function(e){return OP(function(t){return sJ(e,t)})}),uJ=function(t){var n=C.exports.useContext(hv);return t.theme!==n&&(n=lJ(n)(t.theme)),C.exports.createElement(hv.Provider,{value:n},t.children)},Q5=gN(function(e,t){var n=e.styles,r=B7([n],void 0,C.exports.useContext(hv)),i=C.exports.useRef();return zP(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),zP(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&dN(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function cJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return B7(t)}var pd=function(){var t=cJ.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},mN=1/60*1e3,dJ=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},vN=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(dJ())},mN)};function fJ(e){var t=[],n=[],r=0,i=!1,o=new WeakSet,a={schedule:function(s,l,u){l===void 0&&(l=!1),u===void 0&&(u=!1);var h=u&&i,p=h?t:n;return l&&o.add(s),p.indexOf(s)===-1&&(p.push(s),h&&i&&(r=t.length)),s},cancel:function(s){var l=n.indexOf(s);l!==-1&&n.splice(l,1),o.delete(s)},process:function(s){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var u=0;u<r;u++){var h=t[u];h(s),o.has(h)&&(a.schedule(h),e())}i=!1}};return a}var hJ=40,$6=!0,pv=!1,H6=!1,Em={delta:0,timestamp:0},J5=["read","update","preRender","render","postRender"],F7=J5.reduce(function(e,t){return e[t]=fJ(function(){return pv=!0}),e},{}),pJ=J5.reduce(function(e,t){var n=F7[t];return e[t]=function(r,i,o){return i===void 0&&(i=!1),o===void 0&&(o=!1),pv||vJ(),n.schedule(r,i,o)},e},{}),gJ=J5.reduce(function(e,t){return e[t]=F7[t].cancel,e},{}),mJ=function(e){return F7[e].process(Em)},yN=function(e){pv=!1,Em.delta=$6?mN:Math.max(Math.min(e-Em.timestamp,hJ),1),Em.timestamp=e,H6=!0,J5.forEach(mJ),H6=!1,pv&&($6=!1,vN(yN))},vJ=function(){pv=!0,$6=!0,H6||vN(yN)},BP=function(){return Em};function yJ(e){return typeof e=="function"}function SJ(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function bJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var xJ=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},SN=xJ(bJ);function bN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var xN=e=>bN(e,t=>t!=null);function wJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var CJ=wJ();function wN(e,...t){return yJ(e)?e(...t):e}function _J(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function kJ(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 EJ=/^((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)-.*))$/,PJ=rN(function(e){return EJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),TJ=PJ,AJ=function(t){return t!=="theme"},FP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?TJ:AJ},$P=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},LJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return cN(n,r,i),oJ(function(){return dN(n,r,i)}),null},MJ=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=$P(t,n,r),l=s||FP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v<m;v++)p.push(h[v],h[0][v])}var S=gN(function(w,P,E){var _=u&&w.as||i,T="",M=[],I=w;if(w.theme==null){I={};for(var R in w)I[R]=w[R];I.theme=C.exports.useContext(hv)}typeof w.className=="string"?T=QQ(P.registered,M,w.className):w.className!=null&&(T=w.className+" ");var N=B7(p.concat(M),P.registered,I);T+=P.key+"-"+N.name,a!==void 0&&(T+=" "+a);var z=u&&s===void 0?FP(_):l,H={};for(var $ in w)u&&$==="as"||z($)&&(H[$]=w[$]);return H.className=T,H.ref=E,C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(LJ,{cache:P,serialized:N,isStringTag:typeof _=="string"}),C.exports.createElement(_,H))});return S.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=i,S.__emotion_styles=p,S.__emotion_forwardProp=s,Object.defineProperty(S,"toString",{value:function(){return"."+a}}),S.withComponent=function(w,P){return e(w,Tn({},n,P,{shouldForwardProp:$P(S,P,!0)})).apply(void 0,p)},S}},OJ=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],W6=MJ.bind();OJ.forEach(function(e){W6[e]=W6(e)});function An(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...h){r();for(const p of h)t[p]=l(p);return An(e,t)}function o(...h){for(const p of h)p in t||(t[p]=l(p));return An(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(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 IJ=An("accordion").parts("root","container","button","panel").extend("icon"),RJ=An("alert").parts("title","description","container").extend("icon","spinner"),NJ=An("avatar").parts("label","badge","container").extend("excessLabel","group"),DJ=An("breadcrumb").parts("link","item","container").extend("separator");An("button").parts();var zJ=An("checkbox").parts("control","icon","container").extend("label");An("progress").parts("track","filledTrack").extend("label");var BJ=An("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),FJ=An("editable").parts("preview","input","textarea"),$J=An("form").parts("container","requiredIndicator","helperText"),HJ=An("formError").parts("text","icon"),WJ=An("input").parts("addon","field","element"),VJ=An("list").parts("container","item","icon"),UJ=An("menu").parts("button","list","item").extend("groupTitle","command","divider"),GJ=An("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),jJ=An("numberinput").parts("root","field","stepperGroup","stepper");An("pininput").parts("field");var YJ=An("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),qJ=An("progress").parts("label","filledTrack","track"),KJ=An("radio").parts("container","control","label"),XJ=An("select").parts("field","icon"),ZJ=An("slider").parts("container","track","thumb","filledTrack","mark"),QJ=An("stat").parts("container","label","helpText","number","icon"),JJ=An("switch").parts("container","track","thumb"),eee=An("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),tee=An("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),nee=An("tag").parts("container","label","closeButton");function Mi(e,t){ree(e)&&(e="100%");var n=iee(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 wy(e){return Math.min(1,Math.max(0,e))}function ree(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function iee(e){return typeof e=="string"&&e.indexOf("%")!==-1}function CN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Of(e){return e.length===1?"0"+e:String(e)}function oee(e,t,n){return{r:Mi(e,255)*255,g:Mi(t,255)*255,b:Mi(n,255)*255}}function HP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function bx(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 aee(e,t,n){var r,i,o;if(e=Mi(e,360),t=Mi(t,100),n=Mi(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=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function WP(e,t,n){e=Mi(e,255),t=Mi(t,255),n=Mi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function see(e,t,n){e=Mi(e,360)*6,t=Mi(t,100),n=Mi(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,a,o,o,s,n][l],h=[s,n,n,a,o,o][l],p=[o,o,s,n,n,a][l];return{r:u*255,g:h*255,b:p*255}}function VP(e,t,n,r){var i=[Of(Math.round(e).toString(16)),Of(Math.round(t).toString(16)),Of(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function lee(e,t,n,r,i){var o=[Of(Math.round(e).toString(16)),Of(Math.round(t).toString(16)),Of(Math.round(n).toString(16)),Of(uee(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function uee(e){return Math.round(parseFloat(e)*255).toString(16)}function UP(e){return Jo(e)/255}function Jo(e){return parseInt(e,16)}function cee(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var V6={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 dee(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=pee(e)),typeof e=="object"&&(iu(e.r)&&iu(e.g)&&iu(e.b)?(t=oee(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):iu(e.h)&&iu(e.s)&&iu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=see(e.h,r,i),a=!0,s="hsv"):iu(e.h)&&iu(e.s)&&iu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=aee(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=CN(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 fee="[-\\+]?\\d+%?",hee="[-\\+]?\\d*\\.\\d+%?",Fc="(?:".concat(hee,")|(?:").concat(fee,")"),xx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")[,|\\s]+(").concat(Fc,")\\s*\\)?"),fs={CSS_UNIT:new RegExp(Fc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),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 pee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=fs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=fs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=fs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:UP(n[4]),format:t?"name":"hex8"}:(n=fs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=fs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:UP(n[4]+n[4]),format:t?"name":"hex8"}:(n=fs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function iu(e){return Boolean(fs.CSS_UNIT.exec(String(e)))}var Vv=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=cee(t)),this.originalInput=t;var i=dee(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=CN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=WP(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=WP(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=HP(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=HP(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),VP(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),lee(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(Mi(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(Mi(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="#"+VP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t??this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=wy(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=wy(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=wy(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=wy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function _N(e){if(e===void 0&&(e={}),e.count!==void 0&&e.count!==null){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(_N(e));return e.count=t,n}var r=gee(e.hue,e.seed),i=mee(r,e),o=vee(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Vv(a)}function gee(e,t){var n=See(e),r=A4(n,t);return r<0&&(r=360+r),r}function mee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A4([0,100],t.seed);var n=kN(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 A4([r,i],t.seed)}function vee(e,t,n){var r=yee(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 A4([r,i],n.seed)}function yee(e,t){for(var n=kN(e).lowerBounds,r=0;r<n.length-1;r++){var i=n[r][0],o=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function See(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=PN.find(function(a){return a.name===e});if(n){var r=EN(n);if(r.hueRange)return r.hueRange}var i=new Vv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function kN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=PN;t<n.length;t++){var r=n[t],i=EN(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A4(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 EN(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 PN=[{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 bee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var xee=e=>Object.keys(e).length===0,Ai=(e,t,n)=>{const r=bee(e,`colors.${t}`,t),{isValid:i}=new Vv(r);return i?r:n},wee=e=>t=>{const n=Ai(t,e);return new Vv(n).isDark()?"dark":"light"},Cee=e=>t=>wee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ai(n,e);return new Vv(r).setAlpha(t).toRgbString()};function GP(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 _ee(e){const t=_N().toHexString();return!e||xee(e)?t:e.string&&e.colors?Eee(e.string,e.colors):e.string&&!e.colors?kee(e.string):e.colors&&!e.string?Pee(e.colors):t}function kee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function Eee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function Pee(e){return e[Math.floor(Math.random()*e.length)]}function Ue(e,t){return n=>n.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function Tee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function TN(e){return Tee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(TN).join(` ${e} `).replace(/calc/g,""),jP=(...e)=>`calc(${eS("+",...e)})`,YP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,qP=(...e)=>`calc(${eS("/",...e)})`,KP=e=>{const t=TN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},cu=Object.assign(e=>({add:(...t)=>cu(jP(e,...t)),subtract:(...t)=>cu(YP(e,...t)),multiply:(...t)=>cu(U6(e,...t)),divide:(...t)=>cu(qP(e,...t)),negate:()=>cu(KP(e)),toString:()=>e.toString()}),{add:jP,subtract:YP,multiply:U6,divide:qP,negate:KP});function Aee(e){return!Number.isInteger(parseFloat(e.toString()))}function Lee(e,t="-"){return e.replace(/\s+/g,t)}function AN(e){const t=Lee(e.toString());return t.includes("\\.")?e:Aee(e)?t.replace(".","\\."):e}function Mee(e,t=""){return[t,AN(e)].filter(Boolean).join("-")}function Oee(e,t){return`var(${AN(e)}${t?`, ${t}`:""})`}function Iee(e,t=""){return`--${Mee(e,t)}`}function Ui(e,t){const n=Iee(e,t?.prefix);return{variable:n,reference:Oee(n,Ree(t?.fallback))}}function Ree(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:Nee,defineMultiStyleConfig:Dee}=rr(IJ.keys),zee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Bee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Fee={pt:"2",px:"4",pb:"5"},$ee={fontSize:"1.25em"},Hee=Nee({container:zee,button:Bee,panel:Fee,icon:$ee}),Wee=Dee({baseStyle:Hee}),{definePartsStyle:Uv,defineMultiStyleConfig:Vee}=rr(RJ.keys),la=ei("alert-fg"),bu=ei("alert-bg"),Uee=Uv({container:{bg:bu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Gee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark}}}}),jee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),Yee=Uv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[bu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[bu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),qee=Uv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[bu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[bu.variable]:`colors.${t}.200`},color:la.reference}}}),Kee={subtle:Gee,"left-accent":jee,"top-accent":Yee,solid:qee},Xee=Vee({baseStyle:Uee,variants:Kee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),LN={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"},Zee={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"},Qee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Jee={...LN,...Zee,container:Qee},MN=Jee,ete=e=>typeof e=="function";function fi(e,...t){return ete(e)?e(...t):e}var{definePartsStyle:ON,defineMultiStyleConfig:tte}=rr(NJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),nte={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},rte={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},XP=ei("avatar-background"),ite=e=>{const{name:t,theme:n}=e,r=t?_ee({string:t}):"colors.gray.400",i=Cee(r)(n);let o="white";return i||(o="gray.800"),{bg:XP.reference,"&:not([data-loaded])":{[XP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},ote=ON(e=>({badge:fi(nte,e),excessLabel:fi(rte,e),container:fi(ite,e)}));function _c(e){const t=e!=="100%"?MN[e]:void 0;return ON({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ate={"2xs":_c(4),xs:_c(6),sm:_c(8),md:_c(12),lg:_c(16),xl:_c(24),"2xl":_c(32),full:_c("100%")},ste=tte({baseStyle:ote,sizes:ate,defaultProps:{size:"md"}}),lte={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),Sl=ei("badge-color"),ute=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[Sl.variable]:"colors.white",_dark:{[u0.variable]:r,[Sl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:Sl.reference}},cte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[Sl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[Sl.variable]:`colors.${t}.200`},bg:u0.reference,color:Sl.reference}},dte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[Sl.variable]:`colors.${t}.500`,_dark:{[Sl.variable]:r},color:Sl.reference,boxShadow:`inset 0 0 0px 1px ${Sl.reference}`}},fte={solid:ute,subtle:cte,outline:dte},Pm={baseStyle:lte,variants:fte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:hte,definePartsStyle:pte}=rr(DJ.keys),gte={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},mte=pte({link:gte}),vte=hte({baseStyle:mte}),yte={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"}}},IN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ue("inherit","whiteAlpha.900")(e),_hover:{bg:Ue("gray.100","whiteAlpha.200")(e)},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ue(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ue(`${t}.50`,r)(e)},_active:{bg:Ue(`${t}.100`,i)(e)}}},Ste=e=>{const{colorScheme:t}=e,n=Ue("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"},...fi(IN,e)}},bte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},xte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ue("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ue("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ue("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=bte[t]??{},a=Ue(n,`${t}.200`)(e);return{bg:a,color:Ue(r,"gray.800")(e),_hover:{bg:Ue(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ue(o,`${t}.400`)(e)}}},wte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ue(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ue(`${t}.700`,`${t}.500`)(e)}}},Cte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},_te={ghost:IN,outline:Ste,solid:xte,link:wte,unstyled:Cte},kte={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"}},Ete={baseStyle:yte,variants:_te,sizes:kte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:Pte}=rr(zJ.keys),Tm=ei("checkbox-size"),Tte=e=>{const{colorScheme:t}=e;return{w:Tm.reference,h:Tm.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e),_hover:{bg:Ue(`${t}.600`,`${t}.300`)(e),borderColor:Ue(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ue("gray.200","transparent")(e),bg:Ue("gray.200","whiteAlpha.300")(e),color:Ue("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ue(`${t}.500`,`${t}.200`)(e),borderColor:Ue(`${t}.500`,`${t}.200`)(e),color:Ue("white","gray.900")(e)},_disabled:{bg:Ue("gray.100","whiteAlpha.100")(e),borderColor:Ue("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ue("red.500","red.300")(e)}}},Ate={_disabled:{cursor:"not-allowed"}},Lte={userSelect:"none",_disabled:{opacity:.4}},Mte={transitionProperty:"transform",transitionDuration:"normal"},Ote=L3(e=>({icon:Mte,container:Ate,control:fi(Tte,e),label:Lte})),Ite={sm:L3({control:{[Tm.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Tm.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Tm.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L4=Pte({baseStyle:Ote,sizes:Ite,defaultProps:{size:"md",colorScheme:"blue"}}),Am=Ui("close-button-size"),Og=Ui("close-button-bg"),Rte={w:[Am.reference],h:[Am.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Og.variable]:"colors.blackAlpha.100",_dark:{[Og.variable]:"colors.whiteAlpha.100"}},_active:{[Og.variable]:"colors.blackAlpha.200",_dark:{[Og.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Og.reference},Nte={lg:{[Am.variable]:"sizes.10",fontSize:"md"},md:{[Am.variable]:"sizes.8",fontSize:"xs"},sm:{[Am.variable]:"sizes.6",fontSize:"2xs"}},Dte={baseStyle:Rte,sizes:Nte,defaultProps:{size:"md"}},{variants:zte,defaultProps:Bte}=Pm,Fte={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},$te={baseStyle:Fte,variants:zte,defaultProps:Bte},Hte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Wte={baseStyle:Hte},Vte={opacity:.6,borderColor:"inherit"},Ute={borderStyle:"solid"},Gte={borderStyle:"dashed"},jte={solid:Ute,dashed:Gte},Yte={baseStyle:Vte,variants:jte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:qte}=rr(BJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function yp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Kte={bg:"blackAlpha.600",zIndex:"overlay"},Xte={display:"flex",zIndex:"modal",justifyContent:"center"},Zte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Qte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Jte={position:"absolute",top:"2",insetEnd:"3"},ene={px:"6",py:"2",flex:"1",overflow:"auto"},tne={px:"6",py:"4"},nne=G6(e=>({overlay:Kte,dialogContainer:Xte,dialog:fi(Zte,e),header:Qte,closeButton:Jte,body:ene,footer:tne})),rne={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},ine=qte({baseStyle:nne,sizes:rne,defaultProps:{size:"xs"}}),{definePartsStyle:one,defineMultiStyleConfig:ane}=rr(FJ.keys),sne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},lne={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},une={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},cne=one({preview:sne,input:lne,textarea:une}),dne=ane({baseStyle:cne}),{definePartsStyle:fne,defineMultiStyleConfig:hne}=rr($J.keys),c0=ei("form-control-color"),pne={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},gne={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},mne=fne({container:{width:"100%",position:"relative"},requiredIndicator:pne,helperText:gne}),vne=hne({baseStyle:mne}),{definePartsStyle:yne,defineMultiStyleConfig:Sne}=rr(HJ.keys),d0=ei("form-error-color"),bne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},xne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},wne=yne({text:bne,icon:xne}),Cne=Sne({baseStyle:wne}),_ne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},kne={baseStyle:_ne},Ene={fontFamily:"heading",fontWeight:"bold"},Pne={"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}},Tne={baseStyle:Ene,sizes:Pne,defaultProps:{size:"xl"}},{definePartsStyle:hu,defineMultiStyleConfig:Ane}=rr(WJ.keys),Lne=hu({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),kc={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"}},Mne={lg:hu({field:kc.lg,addon:kc.lg}),md:hu({field:kc.md,addon:kc.md}),sm:hu({field:kc.sm,addon:kc.sm}),xs:hu({field:kc.xs,addon:kc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ue("blue.500","blue.300")(e),errorBorderColor:n||Ue("red.500","red.300")(e)}}var One=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ue("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0 0 0 1px ${Ai(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ai(t,n),boxShadow:`0 0 0 1px ${Ai(t,n)}`}},addon:{border:"1px solid",borderColor:Ue("inherit","whiteAlpha.50")(e),bg:Ue("gray.100","whiteAlpha.300")(e)}}}),Ine=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e),_hover:{bg:Ue("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r)},_focusVisible:{bg:"transparent",borderColor:Ai(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ue("gray.100","whiteAlpha.50")(e)}}}),Rne=hu(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ai(t,r),boxShadow:`0px 1px 0px 0px ${Ai(t,r)}`},_focusVisible:{borderColor:Ai(t,n),boxShadow:`0px 1px 0px 0px ${Ai(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Nne=hu({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Dne={outline:One,filled:Ine,flushed:Rne,unstyled:Nne},mn=Ane({baseStyle:Lne,sizes:Mne,variants:Dne,defaultProps:{size:"md",variant:"outline"}}),zne=e=>({bg:Ue("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Bne={baseStyle:zne},Fne={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},$ne={baseStyle:Fne},{defineMultiStyleConfig:Hne,definePartsStyle:Wne}=rr(VJ.keys),Vne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Une=Wne({icon:Vne}),Gne=Hne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:Yne}=rr(UJ.keys),qne=e=>({bg:Ue("#fff","gray.700")(e),boxShadow:Ue("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Kne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ue("gray.100","whiteAlpha.100")(e)},_active:{bg:Ue("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ue("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),Xne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Zne={opacity:.6},Qne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Jne={transitionProperty:"common",transitionDuration:"normal"},ere=Yne(e=>({button:Jne,list:fi(qne,e),item:fi(Kne,e),groupTitle:Xne,command:Zne,divider:Qne})),tre=jne({baseStyle:ere}),{defineMultiStyleConfig:nre,definePartsStyle:j6}=rr(GJ.keys),rre={bg:"blackAlpha.600",zIndex:"modal"},ire=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},ore=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ue("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ue("lg","dark-lg")(e)}},are={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},sre={position:"absolute",top:"2",insetEnd:"3"},lre=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},ure={px:"6",py:"4"},cre=j6(e=>({overlay:rre,dialogContainer:fi(ire,e),dialog:fi(ore,e),header:are,closeButton:sre,body:fi(lre,e),footer:ure}));function cs(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var dre={xs:cs("xs"),sm:cs("sm"),md:cs("md"),lg:cs("lg"),xl:cs("xl"),"2xl":cs("2xl"),"3xl":cs("3xl"),"4xl":cs("4xl"),"5xl":cs("5xl"),"6xl":cs("6xl"),full:cs("full")},fre=nre({baseStyle:cre,sizes:dre,defaultProps:{size:"md"}}),hre={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"}},RN=hre,{defineMultiStyleConfig:pre,definePartsStyle:NN}=rr(jJ.keys),V7=Ui("number-input-stepper-width"),DN=Ui("number-input-input-padding"),gre=cu(V7).add("0.5rem").toString(),mre={[V7.variable]:"sizes.6",[DN.variable]:gre},vre=e=>{var t;return((t=fi(mn.baseStyle,e))==null?void 0:t.field)??{}},yre={width:[V7.reference]},Sre=e=>({borderStart:"1px solid",borderStartColor:Ue("inherit","whiteAlpha.300")(e),color:Ue("inherit","whiteAlpha.800")(e),_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),bre=NN(e=>({root:mre,field:fi(vre,e)??{},stepperGroup:yre,stepper:fi(Sre,e)??{}}));function _y(e){var t,n;const r=(t=mn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=RN.fontSizes[o];return NN({field:{...r.field,paddingInlineEnd:DN.reference,verticalAlign:"top"},stepper:{fontSize:cu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var xre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},wre=pre({baseStyle:bre,sizes:xre,variants:mn.variants,defaultProps:mn.defaultProps}),ZP,Cre={...(ZP=mn.baseStyle)==null?void 0:ZP.field,textAlign:"center"},_re={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"}},QP,kre={outline:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=mn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((QP=mn.variants)==null?void 0:QP.unstyled.field)??{}},Ere={baseStyle:Cre,sizes:_re,variants:kre,defaultProps:mn.defaultProps},{defineMultiStyleConfig:Pre,definePartsStyle:Tre}=rr(YJ.keys),ky=Ui("popper-bg"),Are=Ui("popper-arrow-bg"),JP=Ui("popper-arrow-shadow-color"),Lre={zIndex:10},Mre={[ky.variable]:"colors.white",bg:ky.reference,[Are.variable]:ky.reference,[JP.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[JP.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Ore={px:3,py:2,borderBottomWidth:"1px"},Ire={px:3,py:2},Rre={px:3,py:2,borderTopWidth:"1px"},Nre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Dre=Tre({popper:Lre,content:Mre,header:Ore,body:Ire,footer:Rre,closeButton:Nre}),zre=Pre({baseStyle:Dre}),{defineMultiStyleConfig:Bre,definePartsStyle:nm}=rr(qJ.keys),Fre=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ue(GP(),GP("1rem","rgba(0,0,0,0.1)"))(e),a=Ue(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
|
|
to right,
|
|
transparent 0%,
|
|
${Ai(n,a)} 50%,
|
|
transparent 100%
|
|
)`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},$re={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Hre=e=>({bg:Ue("gray.100","whiteAlpha.300")(e)}),Wre=e=>({transitionProperty:"common",transitionDuration:"slow",...Fre(e)}),Vre=nm(e=>({label:$re,filledTrack:Wre(e),track:Hre(e)})),Ure={xs:nm({track:{h:"1"}}),sm:nm({track:{h:"2"}}),md:nm({track:{h:"3"}}),lg:nm({track:{h:"4"}})},Gre=Bre({sizes:Ure,baseStyle:Vre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jre,definePartsStyle:M3}=rr(KJ.keys),Yre=e=>{var t;const n=(t=fi(L4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},qre=M3(e=>{var t,n,r,i;return{label:(n=(t=L4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L4).baseStyle)==null?void 0:i.call(r,e).container,control:Yre(e)}}),Kre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Xre=jre({baseStyle:qre,sizes:Kre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zre,definePartsStyle:Qre}=rr(XJ.keys),Jre=e=>{var t;return{...(t=mn.baseStyle)==null?void 0:t.field,bg:Ue("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ue("white","gray.700")(e)}}},eie={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},tie=Qre(e=>({field:Jre(e),icon:eie})),Ey={paddingInlineEnd:"8"},eT,tT,nT,rT,iT,oT,aT,sT,nie={lg:{...(eT=mn.sizes)==null?void 0:eT.lg,field:{...(tT=mn.sizes)==null?void 0:tT.lg.field,...Ey}},md:{...(nT=mn.sizes)==null?void 0:nT.md,field:{...(rT=mn.sizes)==null?void 0:rT.md.field,...Ey}},sm:{...(iT=mn.sizes)==null?void 0:iT.sm,field:{...(oT=mn.sizes)==null?void 0:oT.sm.field,...Ey}},xs:{...(aT=mn.sizes)==null?void 0:aT.xs,field:{...(sT=mn.sizes)==null?void 0:sT.xs.field,...Ey},icon:{insetEnd:"1"}}},rie=Zre({baseStyle:tie,sizes:nie,variants:mn.variants,defaultProps:mn.defaultProps}),iie=ei("skeleton-start-color"),oie=ei("skeleton-end-color"),aie=e=>{const t=Ue("gray.100","gray.800")(e),n=Ue("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ai(o,r),s=Ai(o,i);return{[iie.variable]:a,[oie.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},sie={baseStyle:aie},Ex=ei("skip-link-bg"),lie={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},uie={baseStyle:lie},{defineMultiStyleConfig:cie,definePartsStyle:tS}=rr(ZJ.keys),gv=ei("slider-thumb-size"),mv=ei("slider-track-size"),Rc=ei("slider-bg"),die=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},fie=e=>({...$7({orientation:e.orientation,horizontal:{h:mv.reference},vertical:{w:mv.reference}}),overflow:"hidden",borderRadius:"sm",[Rc.variable]:"colors.gray.200",_dark:{[Rc.variable]:"colors.whiteAlpha.200"},_disabled:{[Rc.variable]:"colors.gray.300",_dark:{[Rc.variable]:"colors.whiteAlpha.300"}},bg:Rc.reference}),hie=e=>{const{orientation:t}=e;return{...$7({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:gv.reference,h:gv.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"}}},pie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Rc.variable]:`colors.${t}.500`,_dark:{[Rc.variable]:`colors.${t}.200`},bg:Rc.reference}},gie=tS(e=>({container:die(e),track:fie(e),thumb:hie(e),filledTrack:pie(e)})),mie=tS({container:{[gv.variable]:"sizes.4",[mv.variable]:"sizes.1"}}),vie=tS({container:{[gv.variable]:"sizes.3.5",[mv.variable]:"sizes.1"}}),yie=tS({container:{[gv.variable]:"sizes.2.5",[mv.variable]:"sizes.0.5"}}),Sie={lg:mie,md:vie,sm:yie},bie=cie({baseStyle:gie,sizes:Sie,defaultProps:{size:"md",colorScheme:"blue"}}),kf=Ui("spinner-size"),xie={width:[kf.reference],height:[kf.reference]},wie={xs:{[kf.variable]:"sizes.3"},sm:{[kf.variable]:"sizes.4"},md:{[kf.variable]:"sizes.6"},lg:{[kf.variable]:"sizes.8"},xl:{[kf.variable]:"sizes.12"}},Cie={baseStyle:xie,sizes:wie,defaultProps:{size:"md"}},{defineMultiStyleConfig:_ie,definePartsStyle:zN}=rr(QJ.keys),kie={fontWeight:"medium"},Eie={opacity:.8,marginBottom:"2"},Pie={verticalAlign:"baseline",fontWeight:"semibold"},Tie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Aie=zN({container:{},label:kie,helpText:Eie,number:Pie,icon:Tie}),Lie={md:zN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},Mie=_ie({baseStyle:Aie,sizes:Lie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:Oie,definePartsStyle:O3}=rr(JJ.keys),Lm=Ui("switch-track-width"),Hf=Ui("switch-track-height"),Px=Ui("switch-track-diff"),Iie=cu.subtract(Lm,Hf),Y6=Ui("switch-thumb-x"),Ig=Ui("switch-bg"),Rie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Lm.reference],height:[Hf.reference],transitionProperty:"common",transitionDuration:"fast",[Ig.variable]:"colors.gray.300",_dark:{[Ig.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ig.variable]:`colors.${t}.500`,_dark:{[Ig.variable]:`colors.${t}.200`}},bg:Ig.reference}},Nie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Hf.reference],height:[Hf.reference],_checked:{transform:`translateX(${Y6.reference})`}},Die=O3(e=>({container:{[Px.variable]:Iie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:cu(Px).negate().toString()}},track:Rie(e),thumb:Nie})),zie={sm:O3({container:{[Lm.variable]:"1.375rem",[Hf.variable]:"sizes.3"}}),md:O3({container:{[Lm.variable]:"1.875rem",[Hf.variable]:"sizes.4"}}),lg:O3({container:{[Lm.variable]:"2.875rem",[Hf.variable]:"sizes.6"}})},Bie=Oie({baseStyle:Die,sizes:zie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Fie,definePartsStyle:f0}=rr(eee.keys),$ie=f0({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"}}),M4={"&[data-is-numeric=true]":{textAlign:"end"}},Hie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Wie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ue("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},td:{borderBottom:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e),...M4},caption:{color:Ue("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ue(`${t}.100`,`${t}.700`)(e)},td:{background:Ue(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Vie={simple:Hie,striped:Wie,unstyled:{}},Uie={sm:f0({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:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Gie=Fie({baseStyle:$ie,variants:Vie,sizes:Uie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:jie,definePartsStyle:Cl}=rr(tee.keys),Yie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},qie=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}}},Kie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Xie={p:4},Zie=Cl(e=>({root:Yie(e),tab:qie(e),tablist:Kie(e),tabpanel:Xie})),Qie={sm:Cl({tab:{py:1,px:4,fontSize:"sm"}}),md:Cl({tab:{fontSize:"md",py:2,px:4}}),lg:Cl({tab:{fontSize:"lg",py:3,px:4}})},Jie=Cl(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:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ue("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),eoe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ue("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),toe=Cl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ue("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ue("#fff","gray.800")(e),color:Ue(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),noe=Cl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ai(n,`${t}.700`),bg:Ai(n,`${t}.100`)}}}}),roe=Cl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ue("gray.600","inherit")(e),_selected:{color:Ue("#fff","gray.800")(e),bg:Ue(`${t}.600`,`${t}.300`)(e)}}}}),ioe=Cl({}),ooe={line:Jie,enclosed:eoe,"enclosed-colored":toe,"soft-rounded":noe,"solid-rounded":roe,unstyled:ioe},aoe=jie({baseStyle:Zie,sizes:Qie,variants:ooe,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:soe,definePartsStyle:Wf}=rr(nee.keys),loe={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},uoe={lineHeight:1.2,overflow:"visible"},coe={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}},doe=Wf({container:loe,label:uoe,closeButton:coe}),foe={sm:Wf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Wf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Wf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},hoe={subtle:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.subtle(e)}}),solid:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.solid(e)}}),outline:Wf(e=>{var t;return{container:(t=Pm.variants)==null?void 0:t.outline(e)}})},poe=soe({variants:hoe,baseStyle:doe,sizes:foe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),lT,goe={...(lT=mn.baseStyle)==null?void 0:lT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},uT,moe={outline:e=>{var t;return((t=mn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=mn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=mn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((uT=mn.variants)==null?void 0:uT.unstyled.field)??{}},cT,dT,fT,hT,voe={xs:((cT=mn.sizes)==null?void 0:cT.xs.field)??{},sm:((dT=mn.sizes)==null?void 0:dT.sm.field)??{},md:((fT=mn.sizes)==null?void 0:fT.md.field)??{},lg:((hT=mn.sizes)==null?void 0:hT.lg.field)??{}},yoe={baseStyle:goe,sizes:voe,variants:moe,defaultProps:{size:"md",variant:"outline"}},Py=Ui("tooltip-bg"),Tx=Ui("tooltip-fg"),Soe=Ui("popper-arrow-bg"),boe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[Soe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},xoe={baseStyle:boe},woe={Accordion:Wee,Alert:Xee,Avatar:ste,Badge:Pm,Breadcrumb:vte,Button:Ete,Checkbox:L4,CloseButton:Dte,Code:$te,Container:Wte,Divider:Yte,Drawer:ine,Editable:dne,Form:vne,FormError:Cne,FormLabel:kne,Heading:Tne,Input:mn,Kbd:Bne,Link:$ne,List:Gne,Menu:tre,Modal:fre,NumberInput:wre,PinInput:Ere,Popover:zre,Progress:Gre,Radio:Xre,Select:rie,Skeleton:sie,SkipLink:uie,Slider:bie,Spinner:Cie,Stat:Mie,Switch:Bie,Table:Gie,Tabs:aoe,Tag:poe,Textarea:yoe,Tooltip:xoe},Coe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},_oe=Coe,koe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Eoe=koe,Poe={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"}},Toe=Poe,Aoe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Loe=Aoe,Moe={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"},Ooe=Moe,Ioe={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"},Roe={"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)"},Noe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Doe={property:Ioe,easing:Roe,duration:Noe},zoe=Doe,Boe={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},Foe=Boe,$oe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Hoe=$oe,Woe={breakpoints:Eoe,zIndices:Foe,radii:Loe,blur:Hoe,colors:Toe,...RN,sizes:MN,shadows:Ooe,space:LN,borders:_oe,transition:zoe},Voe={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-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Uoe={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"}}},Goe="ltr",joe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Yoe={semanticTokens:Voe,direction:Goe,...Woe,components:woe,styles:Uoe,config:joe},qoe=typeof Element<"u",Koe=typeof Map=="function",Xoe=typeof Set=="function",Zoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function I3(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(!I3(e[r],t[r]))return!1;return!0}var o;if(Koe&&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(!I3(r.value[1],t.get(r.value[0])))return!1;return!0}if(Xoe&&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(Zoe&&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(qoe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!I3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Qoe=function(t,n){try{return I3(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 t1(){const e=C.exports.useContext(hv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function BN(){const e=Hv(),t=t1();return{...e,theme:t}}function Joe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function eae(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function tae(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)=>{if(e==="breakpoints")return Joe(o,l,a[u]??l);const h=`${e}.${l}`;return eae(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function nae(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>eQ(n),[n]);return re(uJ,{theme:i,children:[x(rae,{root:t}),r]})}function rae({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q5,{styles:n=>({[t]:n.__cssVars})})}kJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function iae(){const{colorMode:e}=Hv();return x(Q5,{styles:t=>{const n=SN(t,"styles.global"),r=wN(n,{theme:t,colorMode:e});return r?XR(r)(t):void 0}})}var oae=new Set([...rQ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),aae=new Set(["htmlWidth","htmlHeight","htmlSize"]);function sae(e){return aae.has(e)||!oae.has(e)}var lae=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=bN(a,(p,m)=>oQ(m)),l=wN(e,t),u=Object.assign({},i,l,xN(s),o),h=XR(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=sae);const i=lae({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Hv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function FN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=BN(),a=e?SN(i,`components.${e}`):void 0,s=n||a,l=yl({theme:i,colorMode:o},s?.defaultProps??{},xN(SJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=gQ(s)(l);Qoe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return FN(e,t)}function Ii(e,t={}){return FN(e,t)}function uae(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=uae();function cae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Cn(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??cae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function dae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Fn(...e){return t=>{e.forEach(n=>{dae(n,t)})}}function fae(...e){return C.exports.useMemo(()=>Fn(...e),e)}function pT(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 hae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function gT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function mT(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O4=e=>e,pae=class{descendants=new Map;register=e=>{if(e!=null)return hae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=pT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=gT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=gT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=mT(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=mT(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=pT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function gae(){const e=C.exports.useRef(new pae);return q6(()=>()=>e.current.destroy()),e.current}var[mae,$N]=Cn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function vae(e){const t=$N(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Fn(o,i)}}function HN(){return[O4(mae),()=>O4($N()),()=>gae(),i=>vae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),vT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??vT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??vT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ct(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(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 nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function yae(){return C.exports.useContext(rS).visualElement}const n1=C.exports.createContext(null),sh=typeof document<"u",I4=sh?C.exports.useLayoutEffect:C.exports.useEffect,WN=C.exports.createContext({strict:!1});function Sae(e,t,n,r){const i=yae(),o=C.exports.useContext(WN),a=C.exports.useContext(n1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);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 I4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),I4(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bae(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):jp(n)&&(n.current=r))},[t])}function vv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const xae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||xae.some(t=>vv(e[t]))}function VN(e){return Boolean(oS(e)||e.variants)}function wae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||vv(n)?n:void 0,animate:vv(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cae(e){const{initial:t,animate:n}=wae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[yT(t),yT(n)])}function yT(e){return Array.isArray(e)?e.join(" "):e}const ou=e=>({isEnabled:t=>e.some(n=>!!t[n])}),yv={measureLayout:ou(["layout","layoutId","drag"]),animation:ou(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ou(["exit"]),drag:ou(["drag","dragControls"]),focus:ou(["whileFocus"]),hover:ou(["whileHover","onHoverStart","onHoverEnd"]),tap:ou(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ou(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ou(["whileInView","onViewportEnter","onViewportLeave"])};function _ae(e){for(const t in e)t==="projectionNodeConstructor"?yv.projectionNodeConstructor=e[t]:yv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let kae=1;function Eae(){return aS(()=>{if(Mm.hasEverUpdated)return kae++})}const G7=C.exports.createContext({});class Pae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const UN=C.exports.createContext({}),Tae=Symbol.for("motionComponentSymbol");function Aae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&_ae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:Lae(l)},{isStatic:p}=h;let m=null;const v=Cae(l),S=p?void 0:Eae(),w=i(l,p);if(!p&&sh){v.visualElement=Sae(o,w,h,t);const P=C.exports.useContext(WN).strict,E=C.exports.useContext(UN);v.visualElement&&(m=v.visualElement.loadFeatures(h,P,e,S,n||yv.projectionNodeConstructor,E))}return re(Pae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,bae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[Tae]=o,s}function Lae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function Mae(e){function t(r,i={}){return Aae(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 Oae=["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 j7(e){return typeof e!="string"||e.includes("-")?!1:!!(Oae.indexOf(e)>-1||/[A-Z]/.test(e))}const R4={};function Iae(e){Object.assign(R4,e)}const N4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gv=new Set(N4);function GN(e,{layout:t,layoutId:n}){return Gv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!R4[e]||e==="opacity")}const ks=e=>!!e?.getVelocity,Rae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Nae=(e,t)=>N4.indexOf(e)-N4.indexOf(t);function Dae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Nae);for(const s of t)a+=`${Rae[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 jN(e){return e.startsWith("--")}const zae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,YN=(e,t)=>n=>Math.max(Math.min(n,t),e),Om=e=>e%1?Number(e.toFixed(5)):e,Sv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[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,Bae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jv(e){return typeof e=="string"}const lh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},lh),{transform:YN(0,1)}),Ty=Object.assign(Object.assign({},lh),{default:1}),Yv=e=>({test:t=>jv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ec=Yv("deg"),_l=Yv("%"),wt=Yv("px"),Fae=Yv("vh"),$ae=Yv("vw"),ST=Object.assign(Object.assign({},_l),{parse:e=>_l.parse(e)/100,transform:e=>_l.transform(e*100)}),Y7=(e,t)=>n=>Boolean(jv(n)&&Bae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),qN=(e,t,n)=>r=>{if(!jv(r))return r;const[i,o,a,s]=r.match(Sv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},If={test:Y7("hsl","hue"),parse:qN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_l.transform(Om(t))+", "+_l.transform(Om(n))+", "+Om(Im.transform(r))+")"},Hae=YN(0,255),Lx=Object.assign(Object.assign({},lh),{transform:e=>Math.round(Hae(e))}),$c={test:Y7("rgb","red"),parse:qN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Om(Im.transform(r))+")"};function Wae(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 X6={test:Y7("#"),parse:Wae,transform:$c.transform},eo={test:e=>$c.test(e)||X6.test(e)||If.test(e),parse:e=>$c.test(e)?$c.parse(e):If.test(e)?If.parse(e):X6.parse(e),transform:e=>jv(e)?e:e.hasOwnProperty("red")?$c.transform(e):If.transform(e)},KN="${c}",XN="${n}";function Vae(e){var t,n,r,i;return isNaN(e)&&jv(e)&&((n=(t=e.match(Sv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function ZN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,KN),t.push(...r.map(eo.parse)));const i=e.match(Sv);return i&&(e=e.replace(Sv,XN),t.push(...i.map(lh.parse))),{values:t,numColors:n,tokenised:e}}function QN(e){return ZN(e).values}function JN(e){const{values:t,numColors:n,tokenised:r}=ZN(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?KN:XN,s<n?eo.transform(o[s]):Om(o[s]));return a}}const Uae=e=>typeof e=="number"?0:e;function Gae(e){const t=QN(e);return JN(e)(t.map(Uae))}const xu={test:Vae,parse:QN,createTransformer:JN,getAnimatableNone:Gae},jae=new Set(["brightness","contrast","saturate","opacity"]);function Yae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sv)||[];if(!r)return e;const i=n.replace(r,"");let o=jae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const qae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},xu),{getAnimatableNone:e=>{const t=e.match(qae);return t?t.map(Yae).join(" "):e}}),bT={...lh,transform:Math.round},eD={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Ec,rotateX:Ec,rotateY:Ec,rotateZ:Ec,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Ec,skewX:Ec,skewY:Ec,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:ST,originY:ST,originZ:wt,zIndex:bT,fillOpacity:Im,strokeOpacity:Im,numOctaves:bT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(jN(m)){o[m]=v;continue}const S=eD[m],w=zae(v,S);if(Gv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Dae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function tD(e,t,n){for(const r in t)!ks(t[r])&&!GN(r,n)&&(e[r]=t[r])}function Kae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Xae(e,t,n){const r=e.style||{},i={};return tD(i,r,e),Object.assign(i,Kae(e,t,n)),e.transformValues?e.transformValues(i):i}function Zae(e,t,n){const r={},i=Xae(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 Qae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Jae=["whileTap","onTap","onTapStart","onTapCancel"],ese=["onPan","onPanStart","onPanSessionStart","onPanEnd"],tse=["whileInView","onViewportEnter","onViewportLeave","viewport"],nse=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",...tse,...Jae,...Qae,...ese]);function D4(e){return nse.has(e)}let nD=e=>!D4(e);function rse(e){!e||(nD=t=>t.startsWith("on")?!D4(t):e(t))}try{rse(require("@emotion/is-prop-valid").default)}catch{}function ise(e,t,n){const r={};for(const i in e)(nD(i)||n===!0&&D4(i)||!t&&!D4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function xT(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function ose(e,t,n){const r=xT(t,e.x,e.width),i=xT(n,e.y,e.height);return`${r} ${i}`}const ase={offset:"stroke-dashoffset",array:"stroke-dasharray"},sse={offset:"strokeDashoffset",array:"strokeDasharray"};function lse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ase:sse;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=ose(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&lse(p,o,a,s,!1)}const rD=()=>({...K7(),attrs:{}});function use(e,t){const n=C.exports.useMemo(()=>{const r=rD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};tD(r,e.style,e),n.style={...r,...n.style}}return n}function cse(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?use:Zae)(r,a,s),p={...ise(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const iD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function oD(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 aD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function sD(e,t,n,r){oD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(aD.has(i)?i:iD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ks(t[r])||GN(r,e))&&(n[r]=t[r]);return n}function lD(e){const t=Z7(e);for(const n in e)if(ks(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(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 bv=e=>Array.isArray(e),dse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),uD=e=>bv(e)?e[e.length-1]||0:e;function R3(e){const t=ks(e)?e.get():e;return dse(t)?t.toValue():t}function fse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:hse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const cD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(n1),o=()=>fse(e,t,r,i);return n?o():aS(o)};function hse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=R3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=VN(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 p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:P,...E}=S;for(const _ in E){let T=E[_];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 pse={useVisualState:cD({scrapeMotionValuesFromProps:lD,createRenderState:rD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),sD(t,n)}})},gse={useVisualState:cD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function mse(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?pse:gse,preloadedFeatures:n,useRender:cse(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var jn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(jn||(jn={}));function sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function vse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(jn.Focus,!0)},i=()=>{n&&n.setActive(jn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function dD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function fD(e){return!!e.touches}function yse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const Sse={pageX:0,pageY:0};function bse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||Sse;return{x:r[t+"X"],y:r[t+"Y"]}}function xse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:fD(e)?bse(e,t):xse(e,t)}}const hD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?yse(n):n},wse=()=>sh&&window.onpointerdown===null,Cse=()=>sh&&window.ontouchstart===null,_se=()=>sh&&window.onmousedown===null,kse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ese={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function pD(e){return wse()?e:Cse()?Ese[e]:_se()?kse[e]:e}function h0(e,t,n,r){return sS(e,pD(t),hD(n,t==="pointerdown"),r)}function z4(e,t,n,r){return Q6(e,pD(t),n&&hD(n,t==="pointerdown"),r)}function gD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const wT=gD("dragHorizontal"),CT=gD("dragVertical");function mD(e){let t=!1;if(e==="y")t=CT();else if(e==="x")t=wT();else{const n=wT(),r=CT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function vD(){const e=mD(!0);return e?(e(),!1):!0}function _T(e,t,n){return(r,i)=>{!dD(r)||vD()||(e.animationState&&e.animationState.setActive(jn.Hover,t),n&&n(r,i))}}function Pse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z4(r,"pointerenter",e||n?_T(r,!0,e):void 0,{passive:!e}),z4(r,"pointerleave",t||n?_T(r,!1,t):void 0,{passive:!t})}const yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1;function e_(e){return C.exports.useEffect(()=>()=>e(),[])}function SD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Tse=function(){},B4=function(){};const F4=(e,t,n)=>Math.min(Math.max(n,e),t),Mx=.001,Ase=.01,kT=10,Lse=.05,Mse=1;function Ose({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Tse(e<=kT*1e3);let a=1-t;a=F4(Lse,Mse,a),e=F4(Ase,kT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=Rse(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 Ise=12;function Rse(e,t,n){let r=n;for(let i=1;i<Ise;i++)r=r-e(r)/t(r);return r}function J6(e,t){return e*Math.sqrt(1-t*t)}const Nse=["duration","bounce"],Dse=["stiffness","damping","mass"];function ET(e,t){return t.some(n=>e[n]!==void 0)}function zse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!ET(e,Dse)&&ET(e,Nse)){const n=Ose(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t_(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=SD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=zse(o),v=PT,S=PT;function w(){const P=h?-(h/1e3):0,E=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=J6(T,_);v=I=>{const R=Math.exp(-_*T*I);return n-R*((P+_*T*E)/M*Math.sin(M*I)+E*Math.cos(M*I))},S=I=>{const R=Math.exp(-_*T*I);return _*T*R*(Math.sin(M*I)*(P+_*T*E)/M+E*Math.cos(M*I))-R*(Math.cos(M*I)*(P+_*T*E)-M*E*Math.sin(M*I))}}else if(_===1)v=M=>n-Math.exp(-T*M)*(E+(P+T*E)*M);else{const M=T*Math.sqrt(_*_-1);v=I=>{const R=Math.exp(-_*T*I),N=Math.min(M*I,300);return n-R*((P+_*T*E)*Math.sinh(N)+M*E*Math.cosh(N))/M}}}return w(),{next:P=>{const E=v(P);if(m)a.done=P>=p;else{const _=S(P)*1e3,T=Math.abs(_)<=r,M=Math.abs(n-E)<=i;a.done=T&&M}return a.value=a.done?n:E,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t_.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const PT=e=>0,xv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(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 TT({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=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Bse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Fse=[X6,$c,If],AT=e=>Fse.find(t=>t.test(e)),bD=(e,t)=>{let n=AT(e),r=AT(t),i=n.parse(e),o=r.parse(t);n===If&&(i=TT(i),n=$c),r===If&&(o=TT(o),r=$c);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Bse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",$se=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce($se);function xD(e,t){return eC(e)?n=>wr(e,t,n):eo.test(e)?bD(e,t):CD(e,t)}const wD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>xD(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},Hse=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function LT(e){const t=xu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||typeof t[a]=="number"?r++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const CD=(e,t)=>{const n=xu.createTransformer(t),r=LT(e),i=LT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(wD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Wse=(e,t)=>n=>wr(e,t,n);function Vse(e){if(typeof e=="number")return Wse;if(typeof e=="string")return eo.test(e)?bD:CD;if(Array.isArray(e))return wD;if(typeof e=="object")return Hse}function Use(e,t,n){const r=[],i=n||Vse(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=lS(l,s)}r.push(s)}return r}function Gse([e,t],[n]){return r=>n(xv(e,t,r))}function jse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const s=xv(e[o],e[o+1],i);return t[o](s)}}function _D(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;B4(o===t.length),B4(!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=Use(t,r,i),s=o===2?Gse(e,a):jse(e,a);return n?l=>s(F4(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yse=e=>t=>Math.pow(t,e),kD=e=>t=>t*t*((e+1)*t-e),qse=e=>{const t=kD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},ED=1.525,Kse=4/11,Xse=8/11,Zse=9/10,r_=e=>e,i_=Yse(2),Qse=uS(i_),PD=n_(i_),TD=e=>1-Math.sin(Math.acos(e)),o_=uS(TD),Jse=n_(o_),a_=kD(ED),ele=uS(a_),tle=n_(a_),nle=qse(ED),rle=4356/361,ile=35442/1805,ole=16061/1805,$4=e=>{if(e===1||e===0)return e;const t=e*e;return e<Kse?7.5625*t:e<Xse?9.075*t-9.9*e+3.4:e<Zse?rle*t-ile*e+ole:10.8*e*e-20.52*e+10.72},ale=uS($4),sle=e=>e<.5?.5*(1-$4(1-e*2)):.5*$4(e*2-1)+.5;function lle(e,t){return e.map(()=>t||PD).splice(0,e.length-1)}function ule(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function cle(e,t){return e.map(n=>n*t)}function N3({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=cle(r&&r.length===a.length?r:ule(a),i);function l(){return _D(s,a,{ease:Array.isArray(n)?n:lle(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function dle({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 p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const MT={keyframes:N3,spring:t_,decay:dle};function fle(e){if(Array.isArray(e.to))return N3;if(MT[e.type])return MT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t_:N3}const AD=1/60*1e3,hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),LD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(hle()),AD);function ple(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const h=t[u];h(l),a.has(h)&&(s.schedule(h),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const gle=40;let tC=!0,wv=!1,nC=!1;const p0={delta:0,timestamp:0},qv=["read","update","preRender","render","postRender"],cS=qv.reduce((e,t)=>(e[t]=ple(()=>wv=!0),e),{}),mle=qv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(wv||Sle(),n.schedule(r,i,o)),e},{}),vle=qv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});qv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const yle=e=>cS[e].process(p0),MD=e=>{wv=!1,p0.delta=tC?AD:Math.max(Math.min(e-p0.timestamp,gle),1),p0.timestamp=e,nC=!0,qv.forEach(yle),nC=!1,wv&&(tC=!1,LD(MD))},Sle=()=>{wv=!0,tC=!0,nC||LD(MD)},ble=()=>p0;function OD(e,t,n=0){return e-t-n}function xle(e,t,n=0,r=!0){return r?OD(t+-e,t,n):t-(e-t)+n}function wle(e,t,n,r){return r?e>=t+n:e<=-n}const Cle=e=>{const t=({delta:n})=>e(n);return{start:()=>mle.update(t,!0),stop:()=>vle.update(t)}};function ID(e){var t,n,{from:r,autoplay:i=!0,driver:o=Cle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=SD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:P}=w,E,_=0,T=w.duration,M,I=!1,R=!0,N;const z=fle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,P)&&(N=_D([0,100],[r,P],{clamp:!1}),r=0,P=100);const H=z(Object.assign(Object.assign({},w),{from:r,to:P}));function $(){_++,l==="reverse"?(R=_%2===0,a=xle(a,T,u,R)):(a=OD(a,T,u),l==="mirror"&&H.flipTarget()),I=!1,v&&v()}function j(){E.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const ie=H.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),I=R?ie.done:a<=0}S?.(M),I&&(_===0&&(T??(T=a)),_<s?wle(a,T,u,R)&&$():j())}function V(){h?.(),E=o(de),E.start()}return i&&V(),{stop:()=>{p?.(),E.stop()}}}function RD(e,t){return t?e*(1e3/t):0}function _le({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:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&T<n||r!==void 0&&T>r}function P(T){return n===void 0?r:r===void 0||Math.abs(n-T)<Math.abs(r-T)?n:r}function E(T){S?.stop(),S=ID(Object.assign(Object.assign({},T),{driver:h,onUpdate:M=>{var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function _(T){E(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))_({from:e,velocity:t,to:P(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=P(T),I=M===n?-1:1;let R,N;const z=H=>{R=N,N=H,t=RD(H-R,ble().delta),(I===1&&H>M||I===-1&&H<M)&&_({from:H,to:M,velocity:t})};E({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:w(T)?z:void 0})}return{stop:()=>S?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),OT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s_(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=OT(e)&&OT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ND=(e,t)=>1-3*t+3*e,DD=(e,t)=>3*t-6*e,zD=e=>3*e,H4=(e,t,n)=>((ND(t,n)*e+DD(t,n))*e+zD(t))*e,BD=(e,t,n)=>3*ND(t,n)*e*e+2*DD(t,n)*e+zD(t),kle=1e-7,Ele=10;function Ple(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>kle&&++s<Ele);return a}const Tle=8,Ale=.001;function Lle(e,t,n,r){for(let i=0;i<Tle;++i){const o=BD(t,n,r);if(o===0)return t;const a=H4(t,n,r)-e;t-=a/o}return t}const D3=11,Ly=1/(D3-1);function Mle(e,t,n,r){if(e===t&&n===r)return r_;const i=new Float32Array(D3);for(let a=0;a<D3;++a)i[a]=H4(a*Ly,e,n);function o(a){let s=0,l=1;const u=D3-1;for(;l!==u&&i[l]<=a;++l)s+=Ly;--l;const h=(a-i[l])/(i[l+1]-i[l]),p=s+h*Ly,m=BD(p,e,n);return m>=Ale?Lle(a,p,e,n):m===0?p:Ple(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H4(o(a),t,r)}function Ole({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(jn.Tap,!1),!vD()}function p(S,w){!h()||(yD(i.getInstance(),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=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(jn.Tap,!0),t&&t(S,w))}z4(i,"pointerdown",o?v:void 0,l),e_(u)}const Ile="production",FD=typeof process>"u"||process.env===void 0?Ile:"production",IT=new Set;function $D(e,t,n){e||IT.has(t)||(console.warn(t),n&&console.warn(n),IT.add(t))}const iC=new WeakMap,Ix=new WeakMap,Rle=e=>{const t=iC.get(e.target);t&&t(e)},Nle=e=>{e.forEach(Rle)};function Dle({root:e,...t}){const n=e||document;Ix.has(n)||Ix.set(n,{});const r=Ix.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Nle,{root:e,...t})),r[i]}function zle(e,t,n){const r=Dle(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Ble({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"?Hle:$le)(a,o.current,e,i)}const Fle={some:0,all:1};function $le(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Fle[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(jn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return zle(n.getInstance(),s,l)},[e,r,i,o])}function Hle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(FD!=="production"&&$D(!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(jn.InView,!0)}))},[e])}const Hc=e=>t=>(e(t),null),Wle={inView:Hc(Ble),tap:Hc(Ole),focus:Hc(vse),hover:Hc(Pse)};function l_(){const e=C.exports.useContext(n1);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 Vle(){return Ule(C.exports.useContext(n1))}function Ule(e){return e===null?!0:e.isPresent}function HD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const W4=e=>e*1e3,Gle={linear:r_,easeIn:i_,easeInOut:PD,easeOut:Qse,circIn:TD,circInOut:Jse,circOut:o_,backIn:a_,backInOut:tle,backOut:ele,anticipate:nle,bounceIn:ale,bounceInOut:sle,bounceOut:$4},RT=e=>{if(Array.isArray(e)){B4(e.length===4);const[t,n,r,i]=e;return Mle(t,n,r,i)}else if(typeof e=="string")return Gle[e];return e},jle=e=>Array.isArray(e)&&typeof e[0]!="number",NT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&xu.test(t)&&!t.startsWith("url(")),hf=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Rx=()=>({type:"keyframes",ease:"linear",duration:.3}),Yle=e=>({type:"keyframes",duration:.8,values:e}),DT={x:hf,y:hf,z:hf,rotate:hf,rotateX:hf,rotateY:hf,rotateZ:hf,scaleX:My,scaleY:My,scale:My,opacity:Rx,backgroundColor:Rx,color:Rx,default:My},qle=(e,t)=>{let n;return bv(t)?n=Yle:n=DT[e]||DT.default,{to:t,...n(t)}},Kle={...eD,color:eo,backgroundColor:eo,outlineColor:eo,fill:eo,stroke:eo,borderColor:eo,borderTopColor:eo,borderRightColor:eo,borderBottomColor:eo,borderLeftColor:eo,filter:Z6,WebkitFilter:Z6},u_=e=>Kle[e];function c_(e,t){var n;let r=u_(e);return r!==Z6&&(r=xu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const Xle={current:!1},WD=1/60*1e3,Zle=typeof performance<"u"?()=>performance.now():()=>Date.now(),VD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Zle()),WD);function Qle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const h=t[u];h(l),a.has(h)&&(s.schedule(h),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Jle=40;let oC=!0,Cv=!1,aC=!1;const g0={delta:0,timestamp:0},Kv=["read","update","preRender","render","postRender"],dS=Kv.reduce((e,t)=>(e[t]=Qle(()=>Cv=!0),e),{}),Es=Kv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||tue(),n.schedule(r,i,o)),e},{}),Jf=Kv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Kv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),eue=e=>dS[e].process(g0),UD=e=>{Cv=!1,g0.delta=oC?WD:Math.max(Math.min(e-g0.timestamp,Jle),1),g0.timestamp=e,aC=!0,Kv.forEach(eue),aC=!1,Cv&&(oC=!1,VD(UD))},tue=()=>{Cv=!0,oC=!0,aC||VD(UD)},sC=()=>g0;function GD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Jf.read(r),e(o-t))};return Es.read(r,!0),()=>Jf.read(r)}function nue({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 rue({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W4(o.duration)),o.repeatDelay&&(a.repeatDelay=W4(o.repeatDelay)),e&&(a.ease=jle(e)?e.map(RT):RT(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 iue(e,t){var n,r;return(r=(n=(d_(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function oue(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function aue(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),oue(t),nue(e)||(e={...e,...qle(n,t.to)}),{...t,...rue(e)}}function sue(e,t,n,r,i){const o=d_(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=NT(e,n);a==="none"&&s&&typeof n=="string"?a=c_(e,n):zT(a)&&typeof n=="string"?a=BT(n):!Array.isArray(n)&&zT(n)&&typeof a=="string"&&(n=BT(a));const l=NT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?_le({...p,...o}):ID({...aue(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=uD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function zT(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function BT(e){return typeof e=="number"?0:c_("",e)}function d_(e,t){return e[t]||e.default||e}function f_(e,t,n,r={}){return Xle.current&&(r={type:!1}),t.start(i=>{let o;const a=sue(e,t,n,r,i),s=iue(r,e),l=()=>o=a();let u;return s?u=GD(l,W4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const lue=e=>/^\-?\d*\.?\d+$/.test(e),uue=e=>/^0[^.\s]+$/.test(e);function h_(e,t){e.indexOf(t)===-1&&e.push(t)}function p_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Rm{constructor(){this.subscriptions=[]}add(t){return h_(this.subscriptions,t),()=>p_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const cue=e=>!isNaN(parseFloat(e));class due{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Rm,this.velocityUpdateSubscribers=new Rm,this.renderSubscribers=new Rm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Es.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=()=>Es.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=cue(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?RD(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 B0(e){return new due(e)}const jD=e=>t=>t.test(e),fue={test:e=>e==="auto",parse:e=>e},YD=[lh,wt,_l,Ec,$ae,Fae,fue],Rg=e=>YD.find(jD(e)),hue=[...YD,eo,xu],pue=e=>hue.find(jD(e));function gue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function mue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,gue(e),mue(e))}function vue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,B0(n))}function yue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=uD(o[a]);vue(e,a,s)}}function Sue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s<a;s++){const l=o[s],u=t[l];let h=null;Array.isArray(u)&&(h=u[0]),h===null&&(h=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),h!=null&&(typeof h=="string"&&(lue(h)||uue(h))?h=parseFloat(h):!pue(h)&&xu.test(u)&&(h=c_(l,u)),e.addValue(l,B0(h)),n[l]===void 0&&(n[l]=h),e.setBaseTarget(l,h))}}function bue(e,t){return t?(t[e]||t.default||t).from:void 0}function xue(e,t,n){var r;const i={};for(const o in e){const a=bue(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function V4(e){return Boolean(ks(e)&&e.add)}function wue(e,t,n={}){e.notifyAnimationStart(t);let r;if(Array.isArray(t)){const i=t.map(o=>lC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=qD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>qD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return Cue(e,t,h+u,p,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 qD(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=[],p=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||p&&kue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Gv.has(m)&&(w={...w,type:!1,delay:0});let P=f_(m,v,S,w);V4(u)&&(u.add(m),P=P.then(()=>u.remove(m))),h.push(P)}return Promise.all(h).then(()=>{s&&yue(e,s)})}function Cue(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(_ue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function _ue(e,t){return e.sortNodePosition(t)}function kue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g_=[jn.Animate,jn.InView,jn.Focus,jn.Hover,jn.Tap,jn.Drag,jn.Exit],Eue=[...g_].reverse(),Pue=g_.length;function Tue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wue(e,n,r)))}function Aue(e){let t=Tue(e);const n=Mue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},P=1/0;for(let _=0;_<Pue;_++){const T=Eue[_],M=n[T],I=(h=p[T])!==null&&h!==void 0?h:m[T],R=vv(I),N=T===u?M.isActive:null;N===!1&&(P=_);let z=I===m[T]&&I!==p[T]&&R;if(z&&r&&e.manuallyAnimateOnMount&&(z=!1),M.protectedKeys={...w},!M.isActive&&N===null||!I&&!M.prevProp||iS(I)||typeof I=="boolean")continue;const H=Lue(M.prevProp,I);let $=H||T===u&&M.isActive&&!z&&R||_>P&&R;const j=Array.isArray(I)?I:[I];let de=j.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=Q=>{$=!0,S.delete(Q),M.needsAnimating[Q]=!0};for(const Q in J){const K=de[Q],G=V[Q];w.hasOwnProperty(Q)||(K!==G?bv(K)&&bv(G)?!HD(K,G)||H?ie(Q):M.protectedKeys[Q]=!0:K!==void 0?ie(Q):S.add(Q):K!==void 0&&S.has(Q)?ie(Q):M.protectedKeys[Q]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&($=!1),$&&!z&&v.push(...j.map(Q=>({animation:Q,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 E=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(E=!1),r=!1,E?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.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 Lue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HD(t,e):!1}function pf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mue(){return{[jn.Animate]:pf(!0),[jn.InView]:pf(),[jn.Hover]:pf(),[jn.Tap]:pf(),[jn.Drag]:pf(),[jn.Focus]:pf(),[jn.Exit]:pf()}}const Oue={animation:Hc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Aue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Hc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l_(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(jn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class KD{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=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s_(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();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=Dx(h,this.transformPagePoint),dD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Es.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},fD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function FT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:FT(e,XD(t)),offset:FT(e,Iue(t)),velocity:Rue(t,.1)}}function Iue(e){return e[0]}function XD(e){return e[e.length-1]}function Rue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=XD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W4(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 da(e){return e.max-e.min}function $T(e,t=0,n=.01){return s_(e,t)<n}function HT(e,t,n,r=.5){e.origin=r,e.originPoint=wr(t.min,t.max,e.origin),e.scale=da(n)/da(t),($T(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=wr(n.min,n.max,e.origin)-e.originPoint,($T(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Nm(e,t,n,r){HT(e.x,t.x,n.x,r?.originX),HT(e.y,t.y,n.y,r?.originY)}function WT(e,t,n){e.min=n.min+t.min,e.max=e.min+da(t)}function Nue(e,t,n){WT(e.x,t.x,n.x),WT(e.y,t.y,n.y)}function VT(e,t,n){e.min=t.min-n.min,e.max=e.min+da(t)}function Dm(e,t,n){VT(e.x,t.x,n.x),VT(e.y,t.y,n.y)}function Due(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?wr(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function UT(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 zue(e,{top:t,left:n,bottom:r,right:i}){return{x:UT(e.x,n,i),y:UT(e.y,t,r)}}function GT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Bue(e,t){return{x:GT(e.x,t.x),y:GT(e.y,t.y)}}function Fue(e,t){let n=.5;const r=da(e),i=da(t);return i>r?n=xv(t.min,t.max-r,e.min):r>i&&(n=xv(e.min,e.max-i,t.min)),F4(0,1,n)}function $ue(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 uC=.35;function Hue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:jT(e,"left","right"),y:jT(e,"top","bottom")}}function jT(e,t,n){return{min:YT(e,t),max:YT(e,n)}}function YT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const qT=()=>({translate:0,scale:1,origin:0,originPoint:0}),zm=()=>({x:qT(),y:qT()}),KT=()=>({min:0,max:0}),Ei=()=>({x:KT(),y:KT()});function ul(e){return[e("x"),e("y")]}function ZD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vue(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 Bx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Bx(e)||!Bx(t)||!Bx(n)}function Sf(e){return cC(e)||QD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function QD(e){return XT(e.x)||XT(e.y)}function XT(e){return e&&e!=="0%"}function U4(e,t,n){const r=e-n,i=t*r;return n+i}function ZT(e,t,n,r,i){return i!==void 0&&(e=U4(e,i,r)),U4(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=ZT(e.min,t,n,r,i),e.max=ZT(e.max,t,n,r,i)}function JD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Uue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u<a;u++)s=n[u],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Yp(e,{x:-s.scroll.x,y:-s.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,JD(e,l)),r&&Sf(s.latestValues)&&Yp(e,s.latestValues))}function Mc(e,t){e.min=e.min+t,e.max=e.max+t}function QT(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=wr(e.min,e.max,o);dC(e,t[n],t[r],a,t.scale)}const Gue=["x","scaleX","originX"],jue=["y","scaleY","originY"];function Yp(e,t){QT(e.x,t,Gue),QT(e.y,t,jue)}function ez(e,t){return ZD(Vue(e.getBoundingClientRect(),t))}function Yue(e,t,n){const r=ez(e,n),{scroll:i}=t;return i&&(Mc(r.x,i.x),Mc(r.y,i.y)),r}const que=new WeakMap;class Kue{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ei(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mD(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),ul(v=>{var S,w;let P=this.getAxisMotionValue(v).get()||0;if(_l.test(P)){const E=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];E&&(P=da(E)*(parseFloat(P)/100))}this.originPoint[v]=P}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(jn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=Xue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new KD(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?.(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(jn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Due(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&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zue(r.actual,t):this.constraints=!1,this.elastic=Hue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ul(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$ue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Yue(r,i.root,this.visualElement.getTransformPagePoint());let a=Bue(i.layout.actual,o);if(n){const s=n(Wue(a));this.hasMutatedConstraints=!!s,s&&(a=ZD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ul(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};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 f_(t,r,0,n)}stopAnimation(){ul(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){ul(n=>{const{drag:r}=this.getProps();if(!Oy(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.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ul(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Fue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ul(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;que.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(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=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ul(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Zue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Kue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Que({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(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new KD(h,l,{transformPagePoint:s})}z4(i,"pointerdown",o&&u),e_(()=>a.current&&a.current.end())}const Jue={pan:Hc(Que),drag:Hc(Zue)},fC={current:null},tz={current:!1};function ece(){if(tz.current=!0,!!sh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Iy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function tce(){const e=Iy.map(()=>new Rm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Iy.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Iy[i]]=o=>r.add(o),n["notify"+Iy[i]]=(...o)=>r.notify(...o)}),n}function nce(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ks(o))e.addValue(i,o),V4(r)&&r.add(i);else if(ks(a))e.addValue(i,B0(o)),V4(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,B0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const nz=Object.keys(yv),rce=nz.length,rz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},P={})=>{let E=!1;const{latestValues:_,renderState:T}=S;let M;const I=tce(),R=new Map,N=new Map;let z={};const H={..._},$=p.initial?{..._}:{};let j;function de(){!M||!E||(V(),o(M,T,p.style,te.projection))}function V(){t(te,T,_,P,p)}function J(){I.notifyUpdate(_)}function ie(X,he){const ye=he.onChange(De=>{_[X]=De,p.onUpdate&&Es.update(J,!1,!0)}),Se=he.onRenderRequest(te.scheduleRender);N.set(X,()=>{ye(),Se()})}const{willChange:Q,...K}=u(p);for(const X in K){const he=K[X];_[X]!==void 0&&ks(he)&&(he.set(_[X],!1),V4(Q)&&Q.add(X))}if(p.values)for(const X in p.values){const he=p.values[X];_[X]!==void 0&&ks(he)&&he.set(_[X])}const G=oS(p),Z=VN(p),te={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(X){E=!0,M=te.current=X,te.projection&&te.projection.mount(X),Z&&h&&!G&&(j=h?.addVariantChild(te)),R.forEach((he,ye)=>ie(ye,he)),tz.current||ece(),te.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(te),te.setProps(p)},unmount(){var X;(X=te.projection)===null||X===void 0||X.unmount(),Jf.update(J),Jf.render(de),N.forEach(he=>he()),j?.(),h?.children.delete(te),I.clearAllListeners(),M=void 0,E=!1},loadFeatures(X,he,ye,Se,De,$e){const He=[];for(let qe=0;qe<rce;qe++){const tt=nz[qe],{isEnabled:Ze,Component:nt}=yv[tt];Ze(X)&&nt&&He.push(C.exports.createElement(nt,{key:tt,...X,visualElement:te}))}if(!te.projection&&De){te.projection=new De(Se,te.getLatestValues(),h&&h.projection);const{layoutId:qe,layout:tt,drag:Ze,dragConstraints:nt,layoutScroll:Tt}=X;te.projection.setOptions({layoutId:qe,layout:tt,alwaysMeasureLayout:Boolean(Ze)||nt&&jp(nt),visualElement:te,scheduleRender:()=>te.scheduleRender(),animationType:typeof tt=="string"?tt:"both",initialPromotionConfig:$e,layoutScroll:Tt})}return He},addVariantChild(X){var he;const ye=te.getClosestVariantNode();if(ye)return(he=ye.variantChildren)===null||he===void 0||he.add(X),()=>ye.variantChildren.delete(X)},sortNodePosition(X){return!l||e!==X.treeType?0:l(te.getInstance(),X.getInstance())},getClosestVariantNode:()=>Z?te:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:X=>_[X],setStaticValue:(X,he)=>_[X]=he,getLatestValues:()=>_,setVisibility(X){te.isVisible!==X&&(te.isVisible=X,te.scheduleRender())},makeTargetAnimatable(X,he=!0){return r(te,X,p,he)},measureViewportBox(){return i(M,p)},addValue(X,he){te.hasValue(X)&&te.removeValue(X),R.set(X,he),_[X]=he.get(),ie(X,he)},removeValue(X){var he;R.delete(X),(he=N.get(X))===null||he===void 0||he(),N.delete(X),delete _[X],s(X,T)},hasValue:X=>R.has(X),getValue(X,he){if(p.values&&p.values[X])return p.values[X];let ye=R.get(X);return ye===void 0&&he!==void 0&&(ye=B0(he),te.addValue(X,ye)),ye},forEachValue:X=>R.forEach(X),readValue:X=>_[X]!==void 0?_[X]:a(M,X,P),setBaseTarget(X,he){H[X]=he},getBaseTarget(X){var he;const{initial:ye}=p,Se=typeof ye=="string"||typeof ye=="object"?(he=Q7(p,ye))===null||he===void 0?void 0:he[X]:void 0;if(ye&&Se!==void 0)return Se;if(n){const De=n(p,X);if(De!==void 0&&!ks(De))return De}return $[X]!==void 0&&Se===void 0?void 0:H[X]},...I,build(){return V(),T},scheduleRender(){Es.render(de,!1,!0)},syncRender:de,setProps(X){(X.transformTemplate||p.transformTemplate)&&te.scheduleRender(),p=X,I.updatePropListeners(X),z=nce(te,u(p),z)},getProps:()=>p,getVariant:X=>{var he;return(he=p.variants)===null||he===void 0?void 0:he[X]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(X=!1){if(X)return h?.getVariantContext();if(!G){const ye=h?.getVariantContext()||{};return p.initial!==void 0&&(ye.initial=p.initial),ye}const he={};for(let ye=0;ye<ice;ye++){const Se=iz[ye],De=p[Se];(vv(De)||De===!1)&&(he[Se]=De)}return he}};return te},iz=["initial",...g_],ice=iz.length;function hC(e){return typeof e=="string"&&e.startsWith("var(--")}const oz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function oce(e){const t=oz.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function pC(e,t,n=1){const[r,i]=oce(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():hC(i)?pC(i,t,n+1):i}function ace(e,{...t},n){const r=e.getInstance();if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.forEachValue(i=>{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const sce=new Set(["width","height","top","left","right","bottom","x","y"]),az=e=>sce.has(e),lce=e=>Object.keys(e).some(az),sz=(e,t)=>{e.set(t,!1),e.set(t)},JT=e=>e===lh||e===wt;var eA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(eA||(eA={}));const tA=(e,t)=>parseFloat(e.split(", ")[t]),nA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return tA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?tA(o[1],e):0}},uce=new Set(["x","y","z"]),cce=N4.filter(e=>!uce.has(e));function dce(e){const t=[];return cce.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.syncRender(),t}const rA={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:nA(4,13),y:nA(5,14)},fce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=rA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);sz(h,s[u]),e[u]=rA[u](l,o)}),e},hce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(az);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Rg(h);const m=t[l];let v;if(bv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Rg(h);for(let P=w;P<S;P++)v?B4(Rg(m[P])===v):v=Rg(m[P])}else v=Rg(m);if(p!==v)if(JT(p)&&JT(v)){const S=u.get();typeof S=="string"&&u.set(parseFloat(S)),typeof m=="string"?t[l]=parseFloat(m):Array.isArray(m)&&v===wt&&(t[l]=m.map(parseFloat))}else p?.transform&&v?.transform&&(h===0||m===0)?h===0?u.set(v.transform(h)):t[l]=p.transform(m):(a||(o=dce(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],sz(u,m))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,u=fce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),sh&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function pce(e,t,n,r){return lce(t)?hce(e,t,n,r):{target:t,transitionEnd:r}}const gce=(e,t,n,r)=>{const i=ace(e,t,r);return t=i.target,r=i.transitionEnd,pce(e,t,n,r)};function mce(e){return window.getComputedStyle(e)}const lz={treeType:"dom",readValueFromInstance(e,t){if(Gv.has(t)){const n=u_(t);return n&&n.default||0}else{const n=mce(e),r=(jN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ez(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=xue(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){Sue(e,r,a);const s=gce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:oD},vce=rz(lz),yce=rz({...lz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Gv.has(t)?((n=u_(t))===null||n===void 0?void 0:n.default)||0:(t=aD.has(t)?t:iD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:lD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:sD}),Sce=(e,t)=>j7(e)?yce(t,{enableHardwareAcceleration:!1}):vce(t,{enableHardwareAcceleration:!0});function iA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ng={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=iA(e,t.target.x),r=iA(e,t.target.y);return`${n}% ${r}%`}},oA="_$css",bce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(oz,v=>(o.push(v),oA)));const a=xu.parse(e);if(a.length>5)return r;const s=xu.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 p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(oA,()=>{const S=o[v];return v++,S})}return m}};class xce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Iae(Cce),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()})),Mm.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()||Es.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?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function wce(e){const[t,n]=l_(),r=C.exports.useContext(G7);return x(xce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(UN),isPresent:t,safeToRemove:n})}const Cce={borderRadius:{...Ng,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ng,borderTopRightRadius:Ng,borderBottomLeftRadius:Ng,borderBottomRightRadius:Ng,boxShadow:bce},_ce={measureLayout:wce};function kce(e,t,n={}){const r=ks(e)?e:B0(e);return f_("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const uz=["TopLeft","TopRight","BottomLeft","BottomRight"],Ece=uz.length,aA=e=>typeof e=="string"?parseFloat(e):e,sA=e=>typeof e=="number"||wt.test(e);function Pce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,Tce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Ace(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;h<Ece;h++){const p=`border${uz[h]}Radius`;let m=lA(t,p),v=lA(n,p);if(m===void 0&&v===void 0)continue;m||(m=0),v||(v=0),m===0||v===0||sA(m)===sA(v)?(e[p]=Math.max(wr(aA(m),aA(v),r),0),(_l.test(v)||_l.test(m))&&(e[p]+="%")):e[p]=v}(t.rotate||n.rotate)&&(e.rotate=wr(t.rotate||0,n.rotate||0,r))}function lA(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}const Tce=cz(0,.5,o_),Ace=cz(.5,.95,r_);function cz(e,t,n){return r=>r<e?0:r>t?1:n(xv(e,t,r))}function uA(e,t){e.min=t.min,e.max=t.max}function ds(e,t){uA(e.x,t.x),uA(e.y,t.y)}function cA(e,t,n,r,i){return e-=t,e=U4(e,1/n,r),i!==void 0&&(e=U4(e,1/i,r)),e}function Lce(e,t=0,n=1,r=.5,i,o=e,a=e){if(_l.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=cA(e.min,t,n,s,i),e.max=cA(e.max,t,n,s,i)}function dA(e,t,[n,r,i],o,a){Lce(e,t[n],t[r],t[i],t.scale,o,a)}const Mce=["x","scaleX","originX"],Oce=["y","scaleY","originY"];function fA(e,t,n,r){dA(e.x,t,Mce,n?.x,r?.x),dA(e.y,t,Oce,n?.y,r?.y)}function hA(e){return e.translate===0&&e.scale===1}function dz(e){return hA(e.x)&&hA(e.y)}function fz(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 pA(e){return da(e.x)/da(e.y)}function Ice(e,t,n=.1){return s_(e,t)<=n}class Rce{constructor(){this.members=[]}add(t){h_(this.members,t),t.scheduleRender()}remove(t){if(p_(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,t.snapshot.isShared=!0),!((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)}}const Nce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function gA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===Nce?"none":o}const Dce=(e,t)=>e.depth-t.depth;class zce{constructor(){this.children=[],this.isDirty=!1}add(t){h_(this.children,t),this.isDirty=!0}remove(t){p_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}const mA=["","X","Y","Z"],vA=1e3;function hz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!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(Wce),this.nodes.forEach(Vce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new zce)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Rm),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l?.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}registerPotentialNode(a,s){this.potentialNodes.set(a,s)}mount(a,s=!1){var l;if(this.instance)return;this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;const{layoutId:u,layout:h,visualElement:p}=this.options;if(p&&!p.getInstance()&&p.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),s&&(h||u)&&(this.isLayoutDirty=!0),e){let m;const v=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=GD(v,250),Mm.hasAnimatedSinceResize&&(Mm.hasAnimatedSinceResize=!1,this.nodes.forEach(SA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var P,E,_,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(E=(P=this.options.transition)!==null&&P!==void 0?P:p.getDefaultTransition())!==null&&E!==void 0?E:qce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!fz(this.targetLayout,w)||S,H=!v&&S;if(((_=this.resumeFrom)===null||_===void 0?void 0:_.instance)||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,H);const $={...d_(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&($.delay=0,$.type=!1),this.startAnimation($)}else!v&&this.animationProgress===0&&SA(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,Jf.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(Uce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const S=this.path[v];S.shouldResetTransform=!0,S.updateScroll()}const{layoutId:h,layout:p}=this.options;if(h===void 0&&!p)return;const m=(u=this.options.visualElement)===null||u===void 0?void 0:u.getProps().transformTemplate;this.prevTransformTemplateValue=m?.(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yA);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Kce),this.potentialNodes.clear()),this.nodes.forEach(Hce),this.nodes.forEach(Bce),this.nodes.forEach(Fce),this.clearAllSnapshots(),Nx.update(),Nx.preRender(),Nx.render())}clearAllSnapshots(){this.nodes.forEach($ce),this.sharedNodes.forEach(Gce)}scheduleUpdateProjection(){Es.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Es.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));CA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const s=this.measure();CA(s);const l=this.layout;this.layout={measured:s,actual:this.removeElementScroll(s)},this.layoutCorrected=Ei(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(a=this.options.visualElement)===null||a===void 0||a.notifyLayoutMeasure(this.layout.actual,l?.actual)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=r(this.instance),this.scroll=n(this.instance))}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!dz(this.projectionDelta),u=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,h=u?.(this.latestValues,""),p=h!==this.prevTransformTemplateValue;s&&(l||Sf(this.latestValues)||p)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:a}=this.options;if(!a)return Ei();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(Mc(s.x,l.x),Mc(s.y,l.y)),s}removeElementScroll(a){const s=Ei();ds(s,a);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:h,options:p,isScrollRoot:m}=u;if(u!==this.root&&h&&p.layoutScroll){if(m){ds(s,a);const{scroll:v}=this.root;v&&(Mc(s.x,-v.x),Mc(s.y,-v.y))}Mc(s.x,h.x),Mc(s.y,h.y)}}return s}applyTransform(a,s=!1){const l=Ei();ds(l,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];!s&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Yp(l,{x:-h.scroll.x,y:-h.scroll.y}),Sf(h.latestValues)&&Yp(l,h.latestValues)}return Sf(this.latestValues)&&Yp(l,this.latestValues),l}removeTransform(a){var s;const l=Ei();ds(l,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];if(!h.instance||!Sf(h.latestValues))continue;cC(h.latestValues)&&h.updateSnapshot();const p=Ei(),m=h.measure();ds(p,m),fA(l,h.latestValues,(s=h.snapshot)===null||s===void 0?void 0:s.layout,p)}return Sf(this.latestValues)&&fA(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection()}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var a;const{layout:s,layoutId:l}=this.options;!this.layout||!(s||l)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=Ei(),this.relativeTargetOrigin=Ei(),Dm(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),ds(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ei(),this.targetWithTransforms=Ei()),this.relativeTarget&&this.relativeTargetOrigin&&((a=this.relativeParent)===null||a===void 0?void 0:a.target)?Nue(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):ds(this.target,this.layout.actual),JD(this.target,this.targetDelta)):ds(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=Ei(),this.relativeTargetOrigin=Ei(),Dm(this.relativeTargetOrigin,this.target,this.relativeParent.target),ds(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(!(!this.parent||cC(this.parent.latestValues)||QD(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;const{layout:s,layoutId:l}=this.options;if(this.isTreeAnimating=Boolean(((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||l))return;const u=this.getLead();ds(this.layoutCorrected,this.layout.actual),Uue(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==u);const{target:h}=u;if(!h)return;this.projectionDelta||(this.projectionDelta=zm(),this.projectionDeltaWithTransform=zm());const p=this.treeScale.x,m=this.treeScale.y,v=this.projectionTransform;Nm(this.projectionDelta,this.layoutCorrected,h,this.latestValues),this.projectionTransform=gA(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==p||this.treeScale.y!==m)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s,l,u;(l=(s=this.options).scheduleRender)===null||l===void 0||l.call(s),a&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){var l;const u=this.snapshot,h=u?.latestValues||{},p={...this.latestValues},m=zm();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const v=Ei(),S=u?.isShared,w=(((l=this.getStack())===null||l===void 0?void 0:l.members.length)||0)<=1,P=Boolean(S&&!w&&this.options.crossfade===!0&&!this.path.some(Yce));this.animationProgress=0,this.mixTargetDelta=E=>{var _;const T=E/1e3;bA(m.x,a.x,T),bA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((_=this.relativeParent)===null||_===void 0?void 0:_.layout)&&(Dm(v,this.layout.actual,this.relativeParent.layout.actual),jce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,Pce(p,h,this.latestValues,T,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(Jf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Es.update(()=>{Mm.hasAnimatedSinceResize=!0,this.currentAnimation=kce(0,vA,{...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,vA),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&&pz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||Ei();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}ds(s,l),Yp(s,h),Nm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rce),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 l={};for(let u=0;u<mA.length;u++){const p="rotate"+mA[u];!a.getStaticValue(p)||(s=!0,l[p]=a.getStaticValue(p),a.setStaticValue(p,0))}if(!!s){a?.syncRender();for(const u in l)a.setStaticValue(u,l[u]);a.scheduleRender()}}getProjectionStyles(a={}){var s,l,u;const h={};if(!this.instance||this.isSVG)return h;if(this.isVisible)h.visibility="";else return{visibility:"hidden"};const p=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,h.opacity="",h.pointerEvents=R3(a.pointerEvents)||"",h.transform=p?p(this.latestValues,""):"none",h;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const P={};return this.options.layoutId&&(P.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,P.pointerEvents=R3(a.pointerEvents)||""),this.hasProjected&&!Sf(this.latestValues)&&(P.transform=p?p({},""):"none",this.hasProjected=!1),P}const v=m.animationValues||m.latestValues;this.applyTransformsToTarget(),h.transform=gA(this.projectionDeltaWithTransform,this.treeScale,v),p&&(h.transform=p(v,h.transform));const{x:S,y:w}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${w.origin*100}% 0`,m.animationValues?h.opacity=m===this?(u=(l=v.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:h.opacity=m===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const P in R4){if(v[P]===void 0)continue;const{correct:E,applyTo:_}=R4[P],T=E(v[P],m);if(_){const M=_.length;for(let I=0;I<M;I++)h[_[I]]=T}else h[P]=T}return this.options.layoutId&&(h.pointerEvents=m===this?R3(a.pointerEvents)||"":"none"),h}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(yA),this.root.sharedNodes.clear()}}}function Bce(e){e.updateLayout()}function Fce(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{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):pz(s,i.layout,o)&&ul(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=zm();Nm(l,o,i.layout);const u=zm();i.isShared?Nm(u,e.applyTransform(a,!0),i.measured):Nm(u,o,i.layout);const h=!dz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=Ei();Dm(S,i.layout,m.layout);const w=Ei();Dm(w,o,v.actual),fz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function $ce(e){e.clearSnapshot()}function yA(e){e.clearMeasurements()}function Hce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function SA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Wce(e){e.resolveTargetDelta()}function Vce(e){e.calcProjection()}function Uce(e){e.resetRotation()}function Gce(e){e.removeLeadSnapshot()}function bA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xA(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function jce(e,t,n,r){xA(e.x,t.x,n.x,r),xA(e.y,t.y,n.y,r)}function Yce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qce={duration:.45,ease:[.4,0,.1,1]};function Kce(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 wA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function CA(e){wA(e.x),wA(e.y)}function pz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ice(pA(t),pA(n),.2)}const Xce=hz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fx={current:void 0},Zce=hz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fx.current){const e=new Xce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fx.current=e}return Fx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qce={...Oue,...Wle,...Jue,..._ce},Rl=Mae((e,t)=>mse(e,t,Qce,Sce,Zce));function gz(){const e=C.exports.useRef(!1);return I4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jce(){const e=gz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Es.postRender(r),[r]),t]}class ede 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 tde({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]),x(ede,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(nde),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(tde,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function nde(){return new Map}const Op=e=>e.key||"";function rde(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function ide(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const gd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",$D(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=gz(),h=ide(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(I4(()=>{w.current=!1,rde(h,S),v.current=p}),e_(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x($n,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const P=v.current.map(Op),E=h.map(Op),_=P.length;for(let T=0;T<_;T++){const M=P[T];E.indexOf(M)===-1&&m.add(M)}return a==="wait"&&m.size&&(p=[]),m.forEach(T=>{if(E.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=P.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x($x,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),FD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x($n,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var gl=function(){return gl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},gl.apply(this,arguments)};function mz(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function r1(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(h){try{u(r.next(h))}catch(p){a(p)}}function l(h){try{u(r.throw(h))}catch(p){a(p)}}function u(h){h.done?o(h.value):i(h.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function i1(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(h){return l([u,h])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(h){u=[6,h],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function _A(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Xv=(...e)=>e.filter(Boolean).join(" ");function ode(){return!1}var ade=e=>{const{condition:t,message:n}=e;t&&ode()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Dg={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 mC(e){switch(e?.direction??"right"){case"right":return Dg.slideRight;case"left":return Dg.slideLeft;case"bottom":return Dg.slideDown;case"top":return Dg.slideUp;default:return Dg.slideRight}}var Vf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},sde=e=>e!=null&&parseInt(e.toString(),10)>0,kA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},lde={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:sde(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??Ps.exit(kA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??Ps.enter(kA.enter,i)})},vz=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,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const _=setTimeout(()=>{v(!0)});return()=>clearTimeout(_)},[]),ade({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?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},P=r?n:!0,E=n||r?"enter":"exit";return x(gd,{initial:!1,custom:w,children:P&&le.createElement(Rl.div,{ref:t,...p,className:Xv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:lde,initial:r?"exit":!1,animate:E,exit:"exit"})})});vz.displayName="Collapse";var ude={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??Ps.exit(Vf.exit,n),transitionEnd:t?.exit})},yz={initial:"exit",animate:"enter",exit:"exit",variants:ude},cde=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",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(gd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-fade",o),custom:m,...yz,animate:h,...u})})});cde.displayName="Fade";var dde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??Ps.exit(Vf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??Ps.enter(Vf.enter,n),transitionEnd:e?.enter})},Sz={initial:"exit",animate:"enter",exit:"exit",variants:dde},fde=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,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(gd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",s),...Sz,animate:v,custom:S,...p})})});fde.displayName="ScaleFade";var EA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},hde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??Ps.exit(EA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??Ps.enter(EA.enter,r),transitionEnd:t?.enter}}},bz=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:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,P=a||o?"enter":"exit",E={transitionEnd:u,transition:l,direction:r,delay:h};return x(gd,{custom:E,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Xv("chakra-slide",s),animate:P,exit:"exit",custom:E,variants:hde,style:S,...p})})});bz.displayName="Slide";var pde={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??Ps.exit(Vf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??Ps.enter(Vf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??Ps.exit(Vf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:pde},gde=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:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(gd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Xv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});gde.displayName="SlideFade";var Zv=(...e)=>e.filter(Boolean).join(" ");function mde(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&mde()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[vde,pS]=Cn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[yde,m_]=Cn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[Sde,GPe,bde,xde]=HN(),Nf=Pe(function(t,n){const{getButtonProps:r}=m_(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Zv("chakra-accordion__button",t.className),__css:a})});Nf.displayName="AccordionButton";function wde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;kde(e),Ede(e);const s=bde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:P=>{if(v!==null)if(i&&Array.isArray(h)){const E=P?h.concat(v):h.filter(_=>_!==v);p(E)}else P?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[Cde,v_]=Cn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function _de(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v_(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;Pde(e);const{register:m,index:v,descendants:S}=xde({disabled:t&&!n}),{isOpen:w,onChange:P}=o(v===-1?null:v);Tde({isOpen:w,isDisabled:t});const E=()=>{P?.(!0)},_=()=>{P?.(!1)},T=C.exports.useCallback(()=>{P?.(!w),a(v)},[v,a,w,P]),M=C.exports.useCallback(z=>{const $={ArrowDown:()=>{const j=S.nextEnabled(v);j?.node.focus()},ArrowUp:()=>{const j=S.prevEnabled(v);j?.node.focus()},Home:()=>{const j=S.firstEnabled();j?.node.focus()},End:()=>{const j=S.lastEnabled();j?.node.focus()}}[z.key];$&&(z.preventDefault(),$(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function(H={},$=null){return{...H,type:"button",ref:Fn(m,s,$),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx(H.onClick,T),onFocus:Hx(H.onFocus,I),onKeyDown:Hx(H.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function(H={},$=null){return{...H,ref:$,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:E,onClose:_,getButtonProps:R,getPanelProps:N,htmlProps:i}}function kde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Ede(e){hS({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 Pde(e){hS({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 Tde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Df(e){const{isOpen:t,isDisabled:n}=m_(),{reduceMotion:r}=v_(),i=Zv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Df.displayName="AccordionIcon";var zf=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=_de(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(yde,{value:u},le.createElement(we.div,{ref:n,...o,className:Zv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});zf.displayName="AccordionItem";var Bf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v_(),{getPanelProps:s,isOpen:l}=m_(),u=s(o,n),h=Zv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(vz,{in:l,...i,children:m})});Bf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=vn(r),{htmlProps:s,descendants:l,...u}=wde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(Sde,{value:l},le.createElement(Cde,{value:h},le.createElement(vde,{value:o},le.createElement(we.div,{ref:i,...s,className:Zv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Ade=(...e)=>e.filter(Boolean).join(" "),Lde=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Qv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=vn(e),u=Ade("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${Lde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Qv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function Mde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("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 Ode(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("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 PA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("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[Ide,Rde]=Cn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Nde,y_]=Cn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),xz={info:{icon:Ode,colorScheme:"blue"},warning:{icon:PA,colorScheme:"orange"},success:{icon:Mde,colorScheme:"green"},error:{icon:PA,colorScheme:"red"},loading:{icon:Qv,colorScheme:"blue"}};function Dde(e){return xz[e].colorScheme}function zde(e){return xz[e].icon}var wz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=vn(t),a=t.colorScheme??Dde(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Ide,{value:{status:r}},le.createElement(Nde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});wz.displayName="Alert";var Cz=Pe(function(t,n){const i={display:"inline",...y_().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});Cz.displayName="AlertDescription";function _z(e){const{status:t}=Rde(),n=zde(t),r=y_(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}_z.displayName="AlertIcon";var kz=Pe(function(t,n){const r=y_();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});kz.displayName="AlertTitle";function Bde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Fde(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 p=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?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return Cs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var $de=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G4.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,P=u!=null||h||!w,E=Fde({...t,ignoreFallback:P}),_=$de(E,m),T={ref:n,objectFit:l,objectPosition:s,...P?S:Bde(S,["onError","onLoad"])};return _?i||le.createElement(we.img,{as:G4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G4,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),TA=e=>e?"":void 0,[Hde,Wde]=Cn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Qv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("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 le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Vde(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 $a=Pe((e,t)=>{const n=Wde(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:P,...E}=vn(e),_=C.exports.useMemo(()=>{const R={...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:R}}},[r,n]),{ref:T,type:M}=Vde(P),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:fae(t,T),as:P,type:m??M,"data-active":TA(a),"data-loading":TA(o),__css:_,className:SS("chakra-button",w),...E},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(AA,{...I})):x(AA,{...I}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function AA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re($n,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("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}},le.createElement(Hde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ha=Pe((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 x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ha.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),Ry=e=>e?"":void 0,Wx=e=>e?!0:void 0;function LA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ude,Ez]=Cn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[Gde,a1]=Cn({strict:!1,name:"FormControlContext"});function jde(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`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[P,E]=C.exports.useState(!1),_=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Fn(z,H=>{!H||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Ry(P),"data-disabled":Ry(i),"data-invalid":Ry(r),"data-readonly":Ry(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,P,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Fn(z,H=>{!H||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!P,onFocus:()=>E(!0),onBlur:()=>E(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:_,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var md=Pe(function(t,n){const r=Ii("Form",t),i=vn(t),{getRootProps:o,htmlProps:a,...s}=jde(i),l=o1("chakra-form-control",t.className);return le.createElement(Gde,{value:s},le.createElement(Ude,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});md.displayName="FormControl";var Yde=Pe(function(t,n){const r=a1(),i=Ez(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});Yde.displayName="FormHelperText";function S_(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b_(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b_(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:LA(t?.onFocus,h),onBlur:LA(t?.onBlur,p)}}var[qde,Kde]=Cn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),Xde=Pe((e,t)=>{const n=Ii("FormError",e),r=vn(e),i=a1();return i?.isInvalid?le.createElement(qde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Xde.displayName="FormErrorMessage";var Zde=Pe((e,t)=>{const n=Kde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("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"})})});Zde.displayName="FormErrorIcon";var uh=Pe(function(t,n){const r=so("FormLabel",t),i=vn(t),{className:o,children:a,requiredIndicator:s=x(Pz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});uh.displayName="FormLabel";var Pz=Pe(function(t,n){const r=a1(),i=Ez();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});Pz.displayName="RequiredIndicator";function id(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 x_={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Qde=we("span",{baseStyle:x_});Qde.displayName="VisuallyHidden";var Jde=we("input",{baseStyle:x_});Jde.displayName="VisuallyHiddenInput";var MA=!1,bS=null,F0=!1,bC=new Set,efe=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function tfe(e){return!(e.metaKey||!efe&&e.altKey||e.ctrlKey)}function w_(e,t){bC.forEach(n=>n(e,t))}function OA(e){F0=!0,tfe(e)&&(bS="keyboard",w_("keyboard",e))}function Sp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(F0=!0,w_("pointer",e))}function nfe(e){e.target===window||e.target===document||(F0||(bS="keyboard",w_("keyboard",e)),F0=!1)}function rfe(){F0=!1}function IA(){return bS!=="pointer"}function ife(){if(typeof window>"u"||MA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){F0=!0,e.apply(this,n)},document.addEventListener("keydown",OA,!0),document.addEventListener("keyup",OA,!0),window.addEventListener("focus",nfe,!0),window.addEventListener("blur",rfe,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),MA=!0}function ofe(e){ife(),e(IA());const t=()=>e(IA());return bC.add(t),()=>{bC.delete(t)}}var[jPe,afe]=Cn({name:"CheckboxGroupContext",strict:!1}),sfe=(...e)=>e.filter(Boolean).join(" "),Ji=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function lfe(...e){return function(n){e.forEach(r=>{r?.(n)})}}function ufe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function cfe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function dfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?cfe:ufe;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function ffe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Tz(e={}){const t=b_(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:P,tabIndex:E=void 0,"aria-label":_,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=ffe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),H=cr(l),[$,j]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[Q,K]=C.exports.useState(!1);C.exports.useEffect(()=>ofe(j),[]);const G=C.exports.useRef(null),[Z,te]=C.exports.useState(!0),[X,he]=C.exports.useState(!!h),ye=p!==void 0,Se=ye?p:X,De=C.exports.useCallback(Le=>{if(r||n){Le.preventDefault();return}ye||he(Se?Le.target.checked:S?!0:Le.target.checked),N?.(Le)},[r,n,Se,ye,S,N]);Cs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),id(()=>{n&&V(!1)},[n,V]),Cs(()=>{const Le=G.current;!Le?.form||(Le.form.onreset=()=>{he(!!h)})},[]);const $e=n&&!m,He=C.exports.useCallback(Le=>{Le.key===" "&&K(!0)},[K]),qe=C.exports.useCallback(Le=>{Le.key===" "&&K(!1)},[K]);Cs(()=>{if(!G.current)return;G.current.checked!==Se&&he(G.current.checked)},[G.current]);const tt=C.exports.useCallback((Le={},at=null)=>{const At=st=>{de&&st.preventDefault(),K(!0)};return{...Le,ref:at,"data-active":Ji(Q),"data-hover":Ji(J),"data-checked":Ji(Se),"data-focus":Ji(de),"data-focus-visible":Ji(de&&$),"data-indeterminate":Ji(S),"data-disabled":Ji(n),"data-invalid":Ji(o),"data-readonly":Ji(r),"aria-hidden":!0,onMouseDown:Pa(Le.onMouseDown,At),onMouseUp:Pa(Le.onMouseUp,()=>K(!1)),onMouseEnter:Pa(Le.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Le.onMouseLeave,()=>ie(!1))}},[Q,Se,n,de,$,J,S,o,r]),Ze=C.exports.useCallback((Le={},at=null)=>({...R,...Le,ref:Fn(at,At=>{!At||te(At.tagName==="LABEL")}),onClick:Pa(Le.onClick,()=>{var At;Z||((At=G.current)==null||At.click(),requestAnimationFrame(()=>{var st;(st=G.current)==null||st.focus()}))}),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[R,n,Se,o,Z]),nt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:Fn(G,at),type:"checkbox",name:w,value:P,id:a,tabIndex:E,onChange:Pa(Le.onChange,De),onBlur:Pa(Le.onBlur,z,()=>V(!1)),onFocus:Pa(Le.onFocus,H,()=>V(!0)),onKeyDown:Pa(Le.onKeyDown,He),onKeyUp:Pa(Le.onKeyUp,qe),required:i,checked:Se,disabled:$e,readOnly:r,"aria-label":_,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x_}),[w,P,a,De,z,H,He,qe,i,Se,$e,r,_,T,M,o,u,n,E]),Tt=C.exports.useCallback((Le={},at=null)=>({...Le,ref:at,onMouseDown:Pa(Le.onMouseDown,RA),onTouchStart:Pa(Le.onTouchStart,RA),"data-disabled":Ji(n),"data-checked":Ji(Se),"data-invalid":Ji(o)}),[Se,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:Se,isActive:Q,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:tt,getInputProps:nt,getLabelProps:Tt,htmlProps:R}}function RA(e){e.preventDefault(),e.stopPropagation()}var hfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pfe={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gfe=pd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mfe=pd({from:{opacity:0},to:{opacity:1}}),vfe=pd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Az=Pe(function(t,n){const r=afe(),i={...r,...t},o=Ii("Checkbox",i),a=vn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(dfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:P,...E}=a;let _=v;r?.value&&a.value&&(_=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=lfe(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Tz({...E,isDisabled:S,isChecked:_,onChange:T}),H=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${mfe} 20ms linear, ${vfe} 200ms linear`:`${gfe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),$=C.exports.cloneElement(m,{__css:H,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...pfe,...o.container},className:sfe("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(P,n)}),le.createElement(we.span,{__css:{...hfe,...o.control},className:"chakra-checkbox__control",...R()},$),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Az.displayName="Checkbox";function yfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("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 xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=vn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(yfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function Sfe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C_(e,t){let n=Sfe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(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 j4(e,t,n){return(e-t)*100/(n-t)}function Lz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C_(r,i)}function m0(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function bfe(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,keepWithinRange:l=!0}=e,u=cr(t),[h,p]=C.exports.useState(()=>r==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Mz(Pc(v),o),w=n??S,P=C.exports.useCallback($=>{$!==v&&(m||p($.toString()),u?.($.toString(),Pc($)))},[u,m,v]),E=C.exports.useCallback($=>{let j=$;return l&&(j=m0(j,a,s)),C_(j,w)},[w,l,s,a]),_=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc($):j=Pc(v)+$,j=E(j),P(j)},[E,o,P,v]),T=C.exports.useCallback(($=o)=>{let j;v===""?j=Pc(-$):j=Pc(v)-$,j=E(j),P(j)},[E,o,P,v]),M=C.exports.useCallback(()=>{let $;r==null?$="":$=Vx(r,o,n)??a,P($)},[r,n,o,P,a]),I=C.exports.useCallback($=>{const j=Vx($,o,w)??a;P(j)},[w,o,P,a]),R=Pc(v);return{isOutOfRange:R>s||R<a,isAtMax:R===s,isAtMin:R===a,precision:w,value:v,valueAsNumber:R,update:P,reset:M,increment:_,decrement:T,clamp:E,cast:I,setValue:p}}function Pc(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function Mz(e,t){return Math.max(xC(t),xC(e))}function Vx(e,t,n){const r=Pc(e);if(Number.isNaN(r))return;const i=Mz(r,t);return C_(r,n??i)}var Oz=`
|
|
:root {
|
|
--chakra-vh: 100vh;
|
|
}
|
|
|
|
@supports (height: -webkit-fill-available) {
|
|
:root {
|
|
--chakra-vh: -webkit-fill-available;
|
|
}
|
|
}
|
|
|
|
@supports (height: -moz-fill-available) {
|
|
:root {
|
|
--chakra-vh: -moz-fill-available;
|
|
}
|
|
}
|
|
|
|
@supports (height: 100dvh) {
|
|
:root {
|
|
--chakra-vh: 100dvh;
|
|
}
|
|
}
|
|
`,xfe=()=>x(Q5,{styles:Oz}),wfe=()=>x(Q5,{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;
|
|
}
|
|
|
|
${Oz}
|
|
`});function Uf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():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??document;o?.removeEventListener(t,i,r)}}function Cfe(e){return"current"in e}var Iz=()=>typeof window<"u";function _fe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var kfe=e=>Iz()&&e.test(navigator.vendor),Efe=e=>Iz()&&e.test(_fe()),Pfe=()=>Efe(/mac|iphone|ipad|ipod/i),Tfe=()=>Pfe()&&kfe(/apple/i);function Afe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Uf(i,"pointerdown",o=>{if(!Tfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=Cfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var Lfe=CJ?C.exports.useLayoutEffect:C.exports.useEffect;function NA(e,t=[]){const n=C.exports.useRef(e);return Lfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Mfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Ofe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function _v(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]=Mfe(r,s),p=Ofe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),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":p,onClick:_J(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function __(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k_=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=vn(i),s=S_(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k_.displayName="Input";k_.id="Input";var[Ife,Rz]=Cn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),Rfe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=vn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=__({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 le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Ife,{value:r,children:p}))});Rfe.displayName="InputGroup";var Nfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Dfe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E_=Pe(function(t,n){const{placement:r="left",...i}=t,o=Nfe[r]??{},a=Rz();return x(Dfe,{ref:n,...i,__css:{...a.addon,...o}})});E_.displayName="InputAddon";var Nz=Pe(function(t,n){return x(E_,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Nz.displayName="InputLeftAddon";Nz.id="InputLeftAddon";var Dz=Pe(function(t,n){return x(E_,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Dz.displayName="InputRightAddon";Dz.id="InputRightAddon";var zfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Rz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(zfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var zz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});zz.id="InputLeftElement";zz.displayName="InputLeftElement";var Bz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Bz.id="InputRightElement";Bz.displayName="InputRightElement";function Bfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function od(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Bfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Ffe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:od(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)});Ffe.displayName="AspectRatio";var $fe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=vn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$fe.displayName="Badge";var Nl=we("div");Nl.displayName="Box";var Fz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(Nl,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Fz.displayName="Square";var Hfe=Pe(function(t,n){const{size:r,...i}=t;return x(Fz,{size:r,ref:n,borderRadius:"9999px",...i})});Hfe.displayName="Circle";var $z=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});$z.displayName="Center";var Wfe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Wfe[r],...i,position:"absolute"})});var Vfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=vn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Vfe.displayName="Code";var Ufe=Pe(function(t,n){const{className:r,centerContent:i,...o}=vn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ufe.displayName="Container";var Gfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=vn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Gfe.displayName="Divider";var en=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});en.displayName="Flex";var Hz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,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:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Hz.displayName="Grid";function DA(e){return od(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var jfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=__({gridArea:r,gridColumn:DA(i),gridRow:DA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});jfe.displayName="GridItem";var Gf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=vn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Gf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=vn(t);return x(Nl,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Yfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=vn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Yfe.displayName="Kbd";var jf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=vn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});jf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[qfe,Wz]=Cn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),P_=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=vn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(qfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P_.displayName="List";var Kfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P_,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Kfe.displayName="OrderedList";var Xfe=Pe(function(t,n){const{as:r,...i}=t;return x(P_,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Xfe.displayName="UnorderedList";var Zfe=Pe(function(t,n){const r=Wz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Zfe.displayName="ListItem";var Qfe=Pe(function(t,n){const r=Wz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Qfe.displayName="ListIcon";var Jfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?the(s,u):nhe(r);return x(Hz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Jfe.displayName="SimpleGrid";function ehe(e){return typeof e=="number"?`${e}px`:e}function the(e,t){return od(e,n=>{const r=tae("sizes",n,ehe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function nhe(e){return od(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function rhe(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,[CC]:od(n,i=>r[i])}}function ihe(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{"&":od(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var T_=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>rhe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>ihe({spacing:a,direction:v}),[a,v]),P=!!u,E=!p&&!P,_=C.exports.useMemo(()=>{const M=yS(l);return E?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,$=p?x(Uz,{children:I},N):I;if(!P)return $;const j=C.exports.cloneElement(u,{__css:w}),de=z?null:j;return re(C.exports.Fragment,{children:[$,de]},N)})},[u,w,P,E,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:P?{}:{[CC]:S[CC]},...m},_)});T_.displayName="Stack";var Gz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(T_,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=vn(t),u=__({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function zA(e){return typeof e=="number"?`${e}px`:e}var ohe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:P=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":E=>od(w,_=>zA(O6("space",_)(E))),"--chakra-wrap-y-spacing":E=>od(P,_=>zA(O6("space",_)(E))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,P)=>x(Yz,{children:w},P)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});ohe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var ahe={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[]}}}},qz=ahe,bp=()=>{},she={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},lhe=she,uhe={window:lhe,document:qz},Kz=typeof window<"u"?{window,document}:uhe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(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?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return re(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var che=e=>e?"":void 0;function dhe(){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 Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function fhe(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:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,P]=C.exports.useState(!0),[E,_]=C.exports.useState(!1),T=dhe(),M=K=>{!K||K.tagName!=="BUTTON"&&P(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(K=>{if(n){K.stopPropagation(),K.preventDefault();return}K.currentTarget.focus(),l?.(K)},[n,l]),z=C.exports.useCallback(K=>{E&&Ux(K)&&(K.preventDefault(),K.stopPropagation(),_(!1),T.remove(document,"keyup",z,!1))},[E,T]),H=C.exports.useCallback(K=>{if(u?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;const G=i&&K.key==="Enter";o&&K.key===" "&&(K.preventDefault(),_(!0)),G&&(K.preventDefault(),K.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),$=C.exports.useCallback(K=>{if(h?.(K),n||K.defaultPrevented||K.metaKey||!Ux(K.nativeEvent)||w)return;o&&K.key===" "&&(K.preventDefault(),_(!1),K.currentTarget.click())},[o,w,n,h]),j=C.exports.useCallback(K=>{K.button===0&&(_(!1),T.remove(document,"mouseup",j,!1))},[T]),de=C.exports.useCallback(K=>{if(K.button!==0)return;if(n){K.stopPropagation(),K.preventDefault();return}w||_(!0),K.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",j,!1),a?.(K)},[n,w,a,T,j]),V=C.exports.useCallback(K=>{K.button===0&&(w||_(!1),s?.(K))},[s,w]),J=C.exports.useCallback(K=>{if(n){K.preventDefault();return}m?.(K)},[n,m]),ie=C.exports.useCallback(K=>{E&&(K.preventDefault(),_(!1)),v?.(K)},[E,v]),Q=Fn(t,M);return w?{...S,ref:Q,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:Q,role:"button","data-active":che(E),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:$,onKeyDown:H,onMouseOver:J,onMouseLeave:ie}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function hhe(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function phe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),ghe=e=>tB(e)&&e.tabIndex===-1;function mhe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function vhe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||mhe(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]():vhe(e)?!0:tB(e)}function yhe(e){return e?Jz(e)&&rB(e)&&!ghe(e):!1}var She=["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]"],bhe=She.join(),xhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(bhe));return t.unshift(e),t.filter(n=>rB(n)&&xhe(n))}function whe(e){const t=e.current;if(!t)return!1;const n=phe(t);return!n||t.contains(n)?!1:!!yhe(n)}function Che(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;id(()=>{if(!o||whe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var _he={preventScroll:!0,shouldFocus:!1};function khe(e,t=_he){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=Ehe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);Cs(()=>{!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?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);id(()=>{h()},[h]),Uf(a,"transitionend",h)}function Ehe(e){return"current"in e}var Mo="top",Wa="bottom",Va="right",Oo="left",A_="auto",Jv=[Mo,Wa,Va,Oo],$0="start",kv="end",Phe="clippingParents",oB="viewport",zg="popper",The="reference",BA=Jv.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+kv])},[]),aB=[].concat(Jv,[A_]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+kv])},[]),Ahe="beforeRead",Lhe="read",Mhe="afterRead",Ohe="beforeMain",Ihe="main",Rhe="afterMain",Nhe="beforeWrite",Dhe="write",zhe="afterWrite",Bhe=[Ahe,Lhe,Mhe,Ohe,Ihe,Rhe,Nhe,Dhe,zhe];function Al(e){return e?(e.nodeName||"").toLowerCase():null}function Ga(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function eh(e){var t=Ga(e).Element;return e instanceof t||e instanceof Element}function Da(e){var t=Ga(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L_(e){if(typeof ShadowRoot>"u")return!1;var t=Ga(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Fhe(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];!Da(o)||!Al(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 $he(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},{});!Da(i)||!Al(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Hhe={name:"applyStyles",enabled:!0,phase:"write",fn:Fhe,effect:$he,requires:["computeStyles"]};function kl(e){return e.split("-")[0]}var Yf=Math.max,Y4=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Da(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=eh(e)?Ga(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M_(e){var t=W0(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 lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wu(e){return Ga(e).getComputedStyle(e)}function Whe(e){return["table","td","th"].indexOf(Al(e))>=0}function vd(e){return((eh(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Al(e)==="html"?e:e.assignedSlot||e.parentNode||(L_(e)?e.host:null)||vd(e)}function FA(e){return!Da(e)||wu(e).position==="fixed"?null:e.offsetParent}function Vhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&Da(e)){var r=wu(e);if(r.position==="fixed")return null}var i=CS(e);for(L_(i)&&(i=i.host);Da(i)&&["html","body"].indexOf(Al(i))<0;){var o=wu(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 e2(e){for(var t=Ga(e),n=FA(e);n&&Whe(n)&&wu(n).position==="static";)n=FA(n);return n&&(Al(n)==="html"||Al(n)==="body"&&wu(n).position==="static")?t:n||Vhe(e)||t}function O_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return Yf(e,Y4(t,n))}function Uhe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ghe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Jv))};function jhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kl(n.placement),l=O_(s),u=[Oo,Va].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ghe(i.padding,n),m=M_(o),v=l==="y"?Mo:Oo,S=l==="y"?Wa:Va,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],P=a[l]-n.rects.reference[l],E=e2(o),_=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,T=w/2-P/2,M=p[v],I=_-m[h]-p[S],R=_/2-m[h]/2+T,N=Bm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Yhe(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)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const qhe={name:"arrow",enabled:!0,phase:"main",fn:jhe,effect:Yhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Khe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function $A(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,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,P=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=P.x,w=P.y;var E=a.hasOwnProperty("x"),_=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=e2(n),N="clientHeight",z="clientWidth";if(R===Ga(n)&&(R=vd(n),wu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Va)&&o===kv){M=Wa;var H=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=H-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Wa)&&o===kv){T=Va;var $=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=$-r.width,v*=l?1:-1}}var j=Object.assign({position:s},u&&Khe),de=h===!0?Xhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},j,(V={},V[M]=_?"0":"",V[T]=E?"0":"",V.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},j,(t={},t[M]=_?w+"px":"",t[T]=E?v+"px":"",t.transform="",t))}function Zhe(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:kl(t.placement),variation:V0(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,$A(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,$A(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 Qhe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Zhe,data:{}};var Ny={passive:!0};function Jhe(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=Ga(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const epe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Jhe,data:{}};var tpe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return tpe[t]})}var npe={start:"end",end:"start"};function HA(e){return e.replace(/start|end/g,function(t){return npe[t]})}function I_(e){var t=Ga(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function R_(e){return W0(vd(e)).left+I_(e).scrollLeft}function rpe(e,t){var n=Ga(e),r=vd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+R_(e),y:l}}function ipe(e){var t,n=vd(e),r=I_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+R_(e),l=-r.scrollTop;return wu(i||n).direction==="rtl"&&(s+=Yf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N_(e){var t=wu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Al(e))>=0?e.ownerDocument.body:Da(e)&&N_(e)?e:fB(CS(e))}function Fm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ga(r),a=i?[o].concat(o.visualViewport||[],N_(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Fm(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ope(e,t){var n=W0(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 WA(e,t,n){return t===oB?kC(rpe(e,n)):eh(t)?ope(t,n):kC(ipe(vd(e)))}function ape(e){var t=Fm(CS(e)),n=["absolute","fixed"].indexOf(wu(e).position)>=0,r=n&&Da(e)?e2(e):e;return eh(r)?t.filter(function(i){return eh(i)&&lB(i,r)&&Al(i)!=="body"}):[]}function spe(e,t,n,r){var i=t==="clippingParents"?ape(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=WA(e,u,r);return l.top=Yf(h.top,l.top),l.right=Y4(h.right,l.right),l.bottom=Y4(h.bottom,l.bottom),l.left=Yf(h.left,l.left),l},WA(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 hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?kl(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Wa:l={x:a,y:t.y+t.height};break;case Va:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O_(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case kv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Ev(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?Phe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?zg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,P=w===void 0?0:w,E=cB(typeof P!="number"?P:dB(P,Jv)),_=m===zg?The:zg,T=e.rects.popper,M=e.elements[S?_:m],I=spe(eh(M)?M:M.contextElement||vd(e.elements.popper),l,h,a),R=W0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),H=m===zg?z:R,$={top:I.top-H.top+E.top,bottom:H.bottom-I.bottom+E.bottom,left:I.left-H.left+E.left,right:H.right-I.right+E.right},j=e.modifiersData.offset;if(m===zg&&j){var de=j[i];Object.keys($).forEach(function(V){var J=[Va,Wa].indexOf(V)>=0?1:-1,ie=[Mo,Wa].indexOf(V)>=0?"y":"x";$[V]+=de[ie]*J})}return $}function lpe(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?aB:l,h=V0(r),p=h?s?BA:BA.filter(function(S){return V0(S)===h}):Jv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Ev(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[kl(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function upe(e){if(kl(e)===A_)return[];var t=z3(e);return[HA(e),t,HA(t)]}function cpe(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,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,P=t.options.placement,E=kl(P),_=E===P,T=l||(_||!S?[z3(P)]:upe(P)),M=[P].concat(T).reduce(function(Se,De){return Se.concat(kl(De)===A_?lpe(t,{placement:De,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):De)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,H=M[0],$=0;$<M.length;$++){var j=M[$],de=kl(j),V=V0(j)===$0,J=[Mo,Wa].indexOf(de)>=0,ie=J?"width":"height",Q=Ev(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),K=J?V?Va:Oo:V?Wa:Mo;I[ie]>R[ie]&&(K=z3(K));var G=z3(K),Z=[];if(o&&Z.push(Q[de]<=0),s&&Z.push(Q[K]<=0,Q[G]<=0),Z.every(function(Se){return Se})){H=j,z=!1;break}N.set(j,Z)}if(z)for(var te=S?3:1,X=function(De){var $e=M.find(function(He){var qe=N.get(He);if(qe)return qe.slice(0,De).every(function(tt){return tt})});if($e)return H=$e,"break"},he=te;he>0;he--){var ye=X(he);if(ye==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const dpe={name:"flip",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"],data:{_skip:!1}};function VA(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 UA(e){return[Mo,Va,Wa,Oo].some(function(t){return e[t]>=0})}function fpe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ev(t,{elementContext:"reference"}),s=Ev(t,{altBoundary:!0}),l=VA(a,r),u=VA(s,i,o),h=UA(l),p=UA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const hpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fpe};function ppe(e,t,n){var r=kl(e),i=[Oo,Mo].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,[Oo,Va].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function gpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=ppe(p,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 mpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:gpe};function vpe(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ype={name:"popperOffsets",enabled:!0,phase:"read",fn:vpe,data:{}};function Spe(e){return e==="x"?"y":"x"}function bpe(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,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,P=Ev(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),E=kl(t.placement),_=V0(t.placement),T=!_,M=O_(E),I=Spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,H=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,$=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Wa:Va,Q=M==="y"?"height":"width",K=R[M],G=K+P[J],Z=K-P[ie],te=v?-z[Q]/2:0,X=_===$0?N[Q]:z[Q],he=_===$0?-z[Q]:-N[Q],ye=t.elements.arrow,Se=v&&ye?M_(ye):{width:0,height:0},De=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),$e=De[J],He=De[ie],qe=Bm(0,N[Q],Se[Q]),tt=T?N[Q]/2-te-qe-$e-$.mainAxis:X-qe-$e-$.mainAxis,Ze=T?-N[Q]/2+te+qe+He+$.mainAxis:he+qe+He+$.mainAxis,nt=t.elements.arrow&&e2(t.elements.arrow),Tt=nt?M==="y"?nt.clientTop||0:nt.clientLeft||0:0,xt=(V=j?.[M])!=null?V:0,Le=K+tt-xt-Tt,at=K+Ze-xt,At=Bm(v?Y4(G,Le):G,K,v?Yf(Z,at):Z);R[M]=At,de[M]=At-K}if(s){var st,gt=M==="x"?Mo:Oo,an=M==="x"?Wa:Va,Ct=R[I],Ut=I==="y"?"height":"width",sn=Ct+P[gt],yn=Ct-P[an],Oe=[Mo,Oo].indexOf(E)!==-1,et=(st=j?.[I])!=null?st:0,Xt=Oe?sn:Ct-N[Ut]-z[Ut]-et+$.altAxis,Yt=Oe?Ct+N[Ut]+z[Ut]-et-$.altAxis:yn,ke=v&&Oe?Uhe(Xt,Ct,Yt):Bm(v?Xt:sn,Ct,v?Yt:yn);R[I]=ke,de[I]=ke-Ct}t.modifiersData[r]=de}}const xpe={name:"preventOverflow",enabled:!0,phase:"main",fn:bpe,requiresIfExists:["offset"]};function wpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Cpe(e){return e===Ga(e)||!Da(e)?I_(e):wpe(e)}function _pe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kpe(e,t,n){n===void 0&&(n=!1);var r=Da(t),i=Da(t)&&_pe(t),o=vd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Al(t)!=="body"||N_(o))&&(s=Cpe(t)),Da(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=R_(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Epe(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 Ppe(e){var t=Epe(e);return Bhe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Tpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ape(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 GA={placement:"bottom",modifiers:[],strategy:"absolute"};function jA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Lpe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?GA:i;return function(s,l,u){u===void 0&&(u=o);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},GA,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],m=!1,v={state:h,setOptions:function(E){var _=typeof E=="function"?E(h.options):E;w(),h.options=Object.assign({},o,h.options,_),h.scrollParents={reference:eh(s)?Fm(s):s.contextElement?Fm(s.contextElement):[],popper:Fm(l)};var T=Ppe(Ape([].concat(r,h.options.modifiers)));return h.orderedModifiers=T.filter(function(M){return M.enabled}),S(),v.update()},forceUpdate:function(){if(!m){var E=h.elements,_=E.reference,T=E.popper;if(!!jA(_,T)){h.rects={reference:kpe(_,e2(T),h.options.strategy==="fixed"),popper:M_(T)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function($){return h.modifiersData[$.name]=Object.assign({},$.data)});for(var M=0;M<h.orderedModifiers.length;M++){if(h.reset===!0){h.reset=!1,M=-1;continue}var I=h.orderedModifiers[M],R=I.fn,N=I.options,z=N===void 0?{}:N,H=I.name;typeof R=="function"&&(h=R({state:h,options:z,name:H,instance:v})||h)}}}},update:Tpe(function(){return new Promise(function(P){v.forceUpdate(),P(h)})}),destroy:function(){w(),m=!0}};if(!jA(s,l))return v;v.setOptions(u).then(function(P){!m&&u.onFirstUpdate&&u.onFirstUpdate(P)});function S(){h.orderedModifiers.forEach(function(P){var E=P.name,_=P.options,T=_===void 0?{}:_,M=P.effect;if(typeof M=="function"){var I=M({state:h,name:E,instance:v,options:T}),R=function(){};p.push(I||R)}})}function w(){p.forEach(function(P){return P()}),p=[]}return v}}var Mpe=[epe,ype,Qhe,Hhe,mpe,dpe,xpe,qhe,hpe],Ope=Lpe({defaultModifiers:Mpe}),xp=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function Ipe(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 Rpe={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"},Npe=e=>Rpe[e],YA={scroll:!0,resize:!0};function Dpe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...YA,...e}}:t={enabled:e,options:YA},t}var zpe={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`}},Bpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{qA(e)},effect:({state:e})=>()=>{qA(e)}},qA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Npe(e.placement))},Fpe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{$pe(e)}},$pe=e=>{var t;if(!e.placement)return;const n=Hpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Hpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Wpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{KA(e)},effect:({state:e})=>()=>{KA(e)}},KA=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:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Ipe(e.placement)})},Vpe={"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"}},Upe={"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 Gpe(e,t="ltr"){var n;const r=((n=Vpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Upe[e]??r}function pB(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:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),P=C.exports.useRef(null),E=Gpe(r,v),_=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var $;!t||!S.current||!w.current||(($=_.current)==null||$.call(_),P.current=Ope(S.current,w.current,{placement:E,modifiers:[Wpe,Fpe,Bpe,{...zpe,enabled:!!m},{name:"eventListeners",...Dpe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),P.current.forceUpdate(),_.current=P.current.destroy)},[E,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var $;!S.current&&!w.current&&(($=P.current)==null||$.destroy(),P.current=null)},[]);const M=C.exports.useCallback($=>{S.current=$,T()},[T]),I=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(M,j)}),[M]),R=C.exports.useCallback($=>{w.current=$,T()},[T]),N=C.exports.useCallback(($={},j=null)=>({...$,ref:Fn(R,j),style:{...$.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback(($={},j=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...Q}=$;return{...Q,ref:j,"data-popper-arrow":"",style:jpe($)}},[]),H=C.exports.useCallback(($={},j=null)=>({...$,ref:j,"data-popper-arrow-inner":""}),[]);return{update(){var $;($=P.current)==null||$.update()},forceUpdate(){var $;($=P.current)==null||$.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:H,getReferenceProps:I}}function jpe(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 gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function P(_={}){return{..._,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=_.onClick)==null||M.call(_,T),w()}}}function E(_={}){return{..._,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:P,getDisclosureProps:E}}function Ype(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]),Uf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=hhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[qpe,Kpe]=Cn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(qpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Xpe]=Cn({strict:!1,name:"PortalContext"}),D_="chakra-portal",Zpe=".chakra-portal",Qpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Jpe=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=Xpe(),l=Kpe();Cs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D_,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Qpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Il.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},e0e=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D_),l},[i]),[,s]=C.exports.useState({});return Cs(()=>s({}),[]),Cs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Il.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function ch(e){const{containerRef:t,...n}=e;return t?x(e0e,{containerRef:t,...n}):x(Jpe,{...n})}ch.defaultProps={appendToParentPortal:!0};ch.className=D_;ch.selector=Zpe;ch.displayName="Portal";var t0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,n0e=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,P=(o.get(m)||0)+1;wp.set(m,w),o.set(m,P),a.push(m),w===1&&S&&Dy.set(m,!0),P===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(wp=new WeakMap,wp=new WeakMap,Dy=new WeakMap,zy={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||t0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),n0e(r,i,n,"aria-hidden")):function(){return null}};function z_(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var On={exports:{}},r0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",i0e=r0e,o0e=i0e;function bB(){}function xB(){}xB.resetWarningCache=bB;var a0e=function(){function e(r,i,o,a,s,l){if(l!==o0e){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:xB,resetWarningCache:bB};return n.PropTypes=n,n};On.exports=a0e();var EC="data-focus-lock",wB="data-focus-lock-disabled",s0e="data-no-focus-lock",l0e="data-autofocus-inside",u0e="data-no-autofocus";function c0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d0e(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 CB(e,t){return d0e(t||null,function(n){return e.forEach(function(r){return c0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);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 B_(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=gl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=mz(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 x(r,{...gl({},n)})};PB.isSideCarExport=!0;function f0e(e,t){return e.useMedium(t),PB}var TB=B_({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=B_(),h0e=B_(),p0e=EB({async:!0}),g0e=[],F_=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,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var P=t.group,E=t.className,_=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?g0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,H=z===void 0?{}:z,$=t.sideCar,j=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),Q=ie[0],K=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Z=C.exports.useCallback(function(He){var qe=u.current;if(qe&&qe.focus){var tt=typeof j=="function"?j(qe):j;if(tt){var Ze=typeof tt=="object"?tt:void 0;u.current=null,He?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[j]),te=C.exports.useCallback(function(He){l.current&&TB.useMedium(He)},[]),X=AB.useMedium,he=C.exports.useCallback(function(He){s.current!==He&&(s.current=He,a(He))},[]),ye=Tn((r={},r[wB]=p&&"disabled",r[EC]=P,r),H),Se=m!==!0,De=Se&&m!=="tail",$e=CB([n,he]);return re($n,{children:[Se&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x($,{id:Q,sideCar:p0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:_,shards:I,onActivation:K,onDeactivation:G,returnFocus:Z,focusOptions:de}),x(N,{ref:$e,...ye,className:E,onBlur:X,onFocus:te,children:h}),De&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});F_.propTypes={};F_.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 LB=F_;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(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){$_(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Dl=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},TC=function(e){return Array.isArray(e)?e:[e]},v0e=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},OB=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},IB=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},y0e=function(e,t){return!e||IB(e)||!v0e(e)&&t(OB(e))},RB=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=y0e(t,RB.bind(void 0,e));return e.set(t,r),r},S0e=function(e,t){return e&&!IB(e)?w0e(e)?t(OB(e)):!1:!0},NB=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=S0e(t,NB.bind(void 0,e));return e.set(t,r),r},DB=function(e){return e.dataset},b0e=function(e){return e.tagName==="BUTTON"},zB=function(e){return e.tagName==="INPUT"},BB=function(e){return zB(e)&&e.type==="radio"},x0e=function(e){return!((zB(e)||b0e(e))&&(e.type==="hidden"||e.disabled))},w0e=function(e){var t=e.getAttribute(u0e);return![!0,"true",""].includes(t)},H_=function(e){var t;return Boolean(e&&((t=DB(e))===null||t===void 0?void 0:t.focusGuard))},q4=function(e){return!H_(e)},C0e=function(e){return Boolean(e)},_0e=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},FB=function(e,t,n){return Dl(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(_0e)},k0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W_=k0e.join(","),E0e="".concat(W_,", [data-focus-guard]"),$B=function(e,t){var n;return Dl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?E0e:W_)?[i]:[],$B(i))},[])},V_=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Dl(r.parentNode.querySelectorAll(W_)).filter(function(i){return i===r}):[])},[])},P0e=function(e){var t=e.querySelectorAll("[".concat(l0e,"]"));return Dl(t).map(function(n){return V_([n])}).reduce(function(n,r){return n.concat(r)},[])},U_=function(e,t){return Dl(e).filter(function(n){return RB(t,n)}).filter(function(n){return x0e(n)})},XA=function(e,t){return t===void 0&&(t=new Map),Dl(e).filter(function(n){return NB(t,n)})},AC=function(e,t,n){return FB(U_(V_(e,n),t),!0,n)},ZA=function(e,t){return FB(U_(V_(e),t),!1)},T0e=function(e,t){return U_(P0e(e),t)},Pv=function(e,t){return e.shadowRoot?Pv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Dl(e.children).some(function(n){return Pv(n,t)})},A0e=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},G_=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?A0e(Dl(HB(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},j_=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},L0e=function(e){return e===document.activeElement},M0e=function(e){return Boolean(Dl(e.querySelectorAll("iframe")).some(function(t){return L0e(t)}))},VB=function(e){var t=document&&j_();return!t||t.dataset&&t.dataset.focusGuard?!1:G_(e).some(function(n){return Pv(n,t)||M0e(n)})},O0e=function(){var e=document&&j_();return e?Dl(document.querySelectorAll("[".concat(s0e,"]"))).some(function(t){return Pv(t,e)}):!1},I0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y_=function(e,t){return BB(e)&&e.name?I0e(e,t):e},R0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y_(n,e))}),e.filter(function(n){return t.has(n)})},QA=function(e){return e[0]&&e.length>1?Y_(e[0],e):e[0]},JA=function(e,t){return e.length>1?e.indexOf(Y_(e[t],e)):t},UB="NEW_FOCUS",N0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H_(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,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=R0e(t),w=n!==void 0?S.indexOf(n):-1,P=w-(r?S.indexOf(r):l),E=JA(e,0),_=JA(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return _;if(l>=v&&s&&Math.abs(p)>1)return E;if(p&&Math.abs(P)>1)return h;if(l<=m)return _;if(l>v)return E;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},D0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},z0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=XA(r.filter(D0e(n)));return i&&i.length?QA(i):QA(XA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},GB=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Pv(u,a)?a=u:a=Yx(u,a))})}),a},B0e=function(e,t){return e.reduce(function(n,r){return n.concat(T0e(r,t))},[])},F0e=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(C0e)},$0e=function(e,t){var n=document&&j_(),r=G_(e).filter(q4),i=GB(n||e,e,r),o=new Map,a=ZA(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=ZA([i],o).map(function(m){var v=m.node;return v}),u=F0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=N0e(h,l,n,t);return p===UB?{node:z0e(a,h,B0e(r,o))}:p===void 0?p:u[p]}},H0e=function(e){var t=G_(e).filter(q4),n=GB(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q4(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:H_(s)}})},W0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,V0e=function(e,t,n){n===void 0&&(n={});var r=$0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,W0e(r.node,n.focusOptions),qx--}};const jB=V0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var U0e=function(){return document&&document.activeElement===document.body},G0e=function(){return U0e()||O0e()},v0=null,qp=null,y0=null,Tv=!1,j0e=function(){return!0},Y0e=function(t){return(v0.whiteList||j0e)(t)},q0e=function(t,n){y0={observerNode:t,portaledElement:n}},K0e=function(t){return y0&&y0.portaledElement===t};function eL(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 X0e=function(t){return t&&"current"in t?t.current:t},Z0e=function(t){return t?Boolean(Tv):Tv==="meanwhile"},Q0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},J0e=function(t,n){return n.some(function(r){return Q0e(t,r,r)})},K4=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(X0e).filter(Boolean));if((!h||Y0e(h))&&(i||Z0e(s)||!G0e()||!qp&&o)&&(u&&!(VB(p)||h&&J0e(h,p)||K0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,qp,{focusOptions:l}),y0={})),Tv=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=H0e(p),S=v.map(function(w){var P=w.node;return P}).indexOf(m);S>-1&&(v.filter(function(w){var P=w.guard,E=w.node;return P&&E.dataset.focusAutoGuard}).forEach(function(w){var P=w.node;return P.removeAttribute("tabIndex")}),eL(S,v.length,1,v),eL(S,-1,-1,v))}}}return t},qB=function(t){K4()&&t&&(t.stopPropagation(),t.preventDefault())},q_=function(){return YB(K4)},e1e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||q0e(r,n)},t1e=function(){return null},KB=function(){Tv="just",setTimeout(function(){Tv="meanwhile"},0)},n1e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",q_),window.addEventListener("blur",KB)},r1e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",q_),window.removeEventListener("blur",KB)};function i1e(e){return e.filter(function(t){var n=t.disabled;return!n})}function o1e(e){var t=e.slice(-1)[0];t&&!v0&&n1e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K4(),YB(K4)):(r1e(),qp=null)}TB.assignSyncMedium(e1e);AB.assignMedium(q_);h0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const a1e=m0e(i1e,o1e)(t1e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:a1e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;z_(ZB,["sideCar"]);XB.propTypes={};const s1e=XB;var QB=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?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(s1e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var B3="right-scroll-bar-position",F3="width-before-scroll-bar",l1e="with-scroll-bars-hidden",u1e="--removed-body-scroll-bar-size",JB=EB(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,P=e.as,E=P===void 0?"div":P,_=mz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=gl(gl({},_),i);return re($n,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),gl(gl({},I),{ref:M})):x(E,{...gl({},I,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:F3,zeroRight:B3};var c1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function d1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=c1e();return t&&e.setAttribute("nonce",t),e}function f1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function h1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var p1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=d1e())&&(f1e(t,n),h1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1e=function(){var e=p1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=g1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},m1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},v1e=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[Zx(n),Zx(r),Zx(i)]},y1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return m1e;var t=v1e(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])}},S1e=eF(),b1e=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(l1e,` {
|
|
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(B3,` {
|
|
right: `).concat(s,"px ").concat(r,`;
|
|
}
|
|
|
|
.`).concat(F3,` {
|
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
}
|
|
|
|
.`).concat(B3," .").concat(B3,` {
|
|
right: 0 `).concat(r,`;
|
|
}
|
|
|
|
.`).concat(F3," .").concat(F3,` {
|
|
margin-right: 0 `).concat(r,`;
|
|
}
|
|
|
|
body {
|
|
`).concat(u1e,": ").concat(s,`px;
|
|
}
|
|
`)},x1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return y1e(i)},[i]);return x(S1e,{styles:b1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var By=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",By,By),window.removeEventListener("test",By,By)}catch{MC=!1}var Cp=MC?{passive:!1}:!1,w1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!w1e(e)&&n[t]==="visible")},C1e=function(e){return tF(e,"overflowY")},_1e=function(e){return tF(e,"overflowX")},tL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(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},k1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},E1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?C1e(t):_1e(t)},rF=function(e,t){return e==="v"?k1e(t):E1e(t)},P1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},T1e=function(e,t,n,r,i){var o=P1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],P=v[2],E=w-P-o*S;(S||E)&&nF(e,s)&&(p+=E,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nL=function(e){return[e.deltaX,e.deltaY]},rL=function(e){return e&&"current"in e?e.current:e},A1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L1e=function(e){return`
|
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
`)},M1e=0,_p=[];function O1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(M1e++)[0],o=C.exports.useState(function(){return eF()})[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=gC([e.lockRef.current],(e.shards||[]).map(rL),!0).filter(Boolean);return w.forEach(function(P){return P.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,P){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var E=Fy(w),_=n.current,T="deltaX"in w?w.deltaX:_[0]-E[0],M="deltaY"in w?w.deltaY:_[1]-E[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=tL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=tL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var H=r.current||I;return T1e(H,P,w,H==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var P=w;if(!(!_p.length||_p[_p.length-1]!==o)){var E="deltaY"in P?nL(P):Fy(P),_=t.current.filter(function(I){return I.name===P.type&&I.target===P.target&&A1e(I.delta,E)})[0];if(_&&_.should){P.cancelable&&P.preventDefault();return}if(!_){var T=(a.current.shards||[]).map(rL).filter(Boolean).filter(function(I){return I.contains(P.target)}),M=T.length>0?s(P,T[0]):!a.current.noIsolation;M&&P.cancelable&&P.preventDefault()}}},[]),u=C.exports.useCallback(function(w,P,E,_){var T={name:w,delta:P,target:E,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=Fy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,nL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Fy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return re($n,{children:[S?x(o,{styles:L1e(i)}):null,v?x(x1e,{gapMode:"margin"}):null]})}const I1e=f0e(JB,O1e);var iF=C.exports.forwardRef(function(e,t){return x(_S,{...gl({},e,{ref:t,sideCar:I1e})})});iF.classNames=_S.classNames;const oF=iF;var dh=(...e)=>e.filter(Boolean).join(" ");function rm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var R1e=class{modals;constructor(){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}},OC=new R1e;function N1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function D1e(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),[p,m,v]=B1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");z1e(u,t&&a),N1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),P=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[E,_]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},H=null)=>({role:"dialog",...z,ref:Fn(H,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":E?m:void 0,"aria-describedby":T?v:void 0,onClick:rm(z.onClick,$=>$.stopPropagation())}),[v,T,p,m,E]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},H=null)=>({...z,ref:Fn(H,h),onClick:rm(z.onClick,R),onKeyDown:rm(z.onKeyDown,P),onMouseDown:rm(z.onMouseDown,w)}),[P,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:_,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function z1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function B1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[F1e,fh]=Cn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[$1e,ad]=Cn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),P={...D1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x($1e,{value:P,children:x(F1e,{value:S,children:x(gd,{onExitComplete:v,children:P.isOpen&&x(ch,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Av=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__body",n),s=fh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Av.displayName="ModalBody";var K_=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=ad(),a=dh("chakra-modal__close-btn",r),s=fh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:rm(n,l=>{l.stopPropagation(),o()}),...i})});K_.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=ad(),[p,m]=l_();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var H1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...Sz,custom:{initialScale:.95,reverse:!0}},none:{}},W1e=we(Rl.section),V1e=e=>H1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=V1e(n),...i}=e;return x(W1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Lv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=ad(),u=s(a,t),h=l(i),p=dh("chakra-modal__content",n),m=fh(),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}=ad();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Lv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=dh("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...fh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=ad();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=dh("chakra-modal__header",n),l={flex:0,...fh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var U1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=dh("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...fh().overlay},{motionPreset:u}=ad();return x(U1e,{...i||(u==="none"?{}:yz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function lF(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var uF=Pe((e,t)=>x(Lv,{ref:t,role:"alertdialog",...e})),[YPe,G1e]=Cn(),j1e=we(bz),Y1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=ad(),h=s(a,t),p=l(o),m=dh("chakra-modal__content",n),v=fh(),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:P}=G1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(j1e,{motionProps:i,direction:P,in:u,className:m,...h,__css:S,children:r})))});Y1e.displayName="DrawerContent";function q1e(e,t){const n=cr(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 cF=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("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"})}),X1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("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 iL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var Z1e=50,oL=300;function Q1e(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);q1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?Z1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},oL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},oL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var J1e=/^[Ee0-9+\-.]$/;function ege(e){return J1e.test(e)}function tge(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 nge(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:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:P,name:E,"aria-describedby":_,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:H,format:$,parse:j,...de}=e,V=cr(I),J=cr(R),ie=cr(N),Q=cr(H??ege),K=cr(z),G=bfe(e),{update:Z,increment:te,decrement:X}=G,[he,ye]=C.exports.useState(!1),Se=!(s||l),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useRef(null),tt=C.exports.useCallback(ke=>ke.split("").filter(Q).join(""),[Q]),Ze=C.exports.useCallback(ke=>j?.(ke)??ke,[j]),nt=C.exports.useCallback(ke=>($?.(ke)??ke).toString(),[$]);id(()=>{(G.valueAsNumber>o||G.valueAsNumber<i)&&ie?.("rangeOverflow",nt(G.value),G.valueAsNumber)},[G.valueAsNumber,G.value,nt,ie]),Cs(()=>{if(!De.current)return;if(De.current.value!=G.value){const Ot=Ze(De.current.value);G.setValue(tt(Ot))}},[Ze,tt]);const Tt=C.exports.useCallback((ke=a)=>{Se&&te(ke)},[te,Se,a]),xt=C.exports.useCallback((ke=a)=>{Se&&X(ke)},[X,Se,a]),Le=Q1e(Tt,xt);iL(He,"disabled",Le.stop,Le.isSpinning),iL(qe,"disabled",Le.stop,Le.isSpinning);const at=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Z(tt(Ne)),$e.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Z,tt,Ze]),At=C.exports.useCallback(ke=>{var Ot;V?.(ke),$e.current&&(ke.target.selectionStart=$e.current.start??((Ot=ke.currentTarget.value)==null?void 0:Ot.length),ke.currentTarget.selectionEnd=$e.current.end??ke.currentTarget.selectionStart)},[V]),st=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;tge(ke,Q)||ke.preventDefault();const Ot=gt(ke)*a,Ne=ke.key,ln={ArrowUp:()=>Tt(Ot),ArrowDown:()=>xt(Ot),Home:()=>Z(i),End:()=>Z(o)}[Ne];ln&&(ke.preventDefault(),ln(ke))},[Q,a,Tt,xt,Z,i,o]),gt=ke=>{let Ot=1;return(ke.metaKey||ke.ctrlKey)&&(Ot=.1),ke.shiftKey&&(Ot=10),Ot},an=C.exports.useMemo(()=>{const ke=K?.(G.value);if(ke!=null)return ke;const Ot=G.value.toString();return Ot||void 0},[G.value,K]),Ct=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumber<i&&(ke=i),G.valueAsNumber>o&&(ke=o),G.cast(ke))},[G,o,i]),Ut=C.exports.useCallback(()=>{ye(!1),n&&Ct()},[n,ye,Ct]),sn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=De.current)==null||ke.focus()})},[t]),yn=C.exports.useCallback(ke=>{ke.preventDefault(),Le.up(),sn()},[sn,Le]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Le.down(),sn()},[sn,Le]);Uf(()=>De.current,"wheel",ke=>{var Ot;const ut=(((Ot=De.current)==null?void 0:Ot.ownerDocument)??document).activeElement===De.current;if(!v||!ut)return;ke.preventDefault();const ln=gt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Tt(ln):Nn===1&&xt(ln)},{passive:!1});const et=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Fn(Ot,He),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||yn(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,yn,Le.stop,l]),Xt=C.exports.useCallback((ke={},Ot=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Fn(Ot,qe),role:"button",tabIndex:-1,onPointerDown:ol(ke.onPointerDown,ut=>{ut.button!==0||Ne||Oe(ut)}),onPointerLeave:ol(ke.onPointerLeave,Le.stop),onPointerUp:ol(ke.onPointerUp,Le.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Le.stop,l]),Yt=C.exports.useCallback((ke={},Ot=null)=>({name:E,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":_,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Fn(De,Ot),value:nt(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":an,autoComplete:"off",autoCorrect:"off",onChange:ol(ke.onChange,at),onKeyDown:ol(ke.onKeyDown,st),onFocus:ol(ke.onFocus,At,()=>ye(!0)),onBlur:ol(ke.onBlur,J,Ut)}),[E,m,p,M,T,nt,_,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,an,at,st,At,J,Ut]);return{value:nt(G.value),valueAsNumber:G.valueAsNumber,isFocused:he,isDisabled:l,isReadOnly:s,getIncrementButtonProps:et,getDecrementButtonProps:Xt,getInputProps:Yt,htmlProps:de}}var[rge,PS]=Cn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[ige,X_]=Cn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),Z_=Pe(function(t,n){const r=Ii("NumberInput",t),i=vn(t),o=b_(i),{htmlProps:a,...s}=nge(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(ige,{value:l},le.createElement(rge,{value:r},le.createElement(we.div,{...a,ref:n,className:cF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z_.displayName="NumberInput";var dF=Pe(function(t,n){const r=PS();return le.createElement(we.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}})});dF.displayName="NumberInputStepper";var Q_=Pe(function(t,n){const{getInputProps:r}=X_(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:cF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q_.displayName="NumberInputField";var fF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J_=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X_(),o=i(t,n);return x(fF,{...o,__css:r.stepper,children:t.children??x(K1e,{})})});J_.displayName="NumberDecrementStepper";var e8=Pe(function(t,n){const{getIncrementButtonProps:r}=X_(),i=r(t,n),o=PS();return x(fF,{...i,__css:o.stepper,children:t.children??x(X1e,{})})});e8.displayName="NumberIncrementStepper";var t2=(...e)=>e.filter(Boolean).join(" ");function oge(e,...t){return age(e)?e(...t):e}var age=e=>typeof e=="function";function al(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function sge(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[lge,hh]=Cn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),[uge,n2]=Cn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `}),kp={click:"click",hover:"hover"};function cge(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:P,onClose:E,onOpen:_,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);P&&(z.current=!0);const[H,$]=C.exports.useState(!1),[j,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,Q,K,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(at=>`${at}-${J}`),{referenceRef:Z,getArrowProps:te,getPopperProps:X,getArrowInnerProps:he,forceUpdate:ye}=pB({...w,enabled:P||!!S}),Se=Ype({isOpen:P,ref:R});Afe({enabled:P,ref:I}),Che(R,{focusRef:I,visible:P,shouldFocus:o&&u===kp.click}),khe(R,{focusRef:r,visible:P,shouldFocus:a&&u===kp.click});const De=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:Se.present}),$e=C.exports.useCallback((at={},At=null)=>{const st={...at,style:{...at.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Fn(R,At),children:De?at.children:null,id:Q,tabIndex:-1,role:"dialog",onKeyDown:al(at.onKeyDown,gt=>{n&>.key==="Escape"&&E()}),onBlur:al(at.onBlur,gt=>{const an=aL(gt),Ct=Jx(R.current,an),Ut=Jx(I.current,an);P&&t&&(!Ct&&!Ut)&&E()}),"aria-labelledby":H?K:void 0,"aria-describedby":j?G:void 0};return u===kp.hover&&(st.role="tooltip",st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0}),st.onMouseLeave=al(at.onMouseLeave,gt=>{gt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>E(),p))})),st},[De,Q,H,K,j,G,u,n,E,P,t,p,l,s]),He=C.exports.useCallback((at={},At=null)=>X({...at,style:{visibility:P?"visible":"hidden",...at.style}},At),[P,X]),qe=C.exports.useCallback((at,At=null)=>({...at,ref:Fn(At,M,Z)}),[M,Z]),tt=C.exports.useRef(),Ze=C.exports.useRef(),nt=C.exports.useCallback(at=>{M.current==null&&Z(at)},[Z]),Tt=C.exports.useCallback((at={},At=null)=>{const st={...at,ref:Fn(I,At,nt),id:ie,"aria-haspopup":"dialog","aria-expanded":P,"aria-controls":Q};return u===kp.click&&(st.onClick=al(at.onClick,T)),u===kp.hover&&(st.onFocus=al(at.onFocus,()=>{tt.current===void 0&&_()}),st.onBlur=al(at.onBlur,gt=>{const an=aL(gt),Ct=!Jx(R.current,an);P&&t&&Ct&&E()}),st.onKeyDown=al(at.onKeyDown,gt=>{gt.key==="Escape"&&E()}),st.onMouseEnter=al(at.onMouseEnter,()=>{N.current=!0,tt.current=window.setTimeout(()=>_(),h)}),st.onMouseLeave=al(at.onMouseLeave,()=>{N.current=!1,tt.current&&(clearTimeout(tt.current),tt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&E()},p)})),st},[ie,P,Q,u,nt,T,_,t,E,h,p]);C.exports.useEffect(()=>()=>{tt.current&&clearTimeout(tt.current),Ze.current&&clearTimeout(Ze.current)},[]);const xt=C.exports.useCallback((at={},At=null)=>({...at,id:K,ref:Fn(At,st=>{$(!!st)})}),[K]),Le=C.exports.useCallback((at={},At=null)=>({...at,id:G,ref:Fn(At,st=>{de(!!st)})}),[G]);return{forceUpdate:ye,isOpen:P,onAnimationComplete:Se.onComplete,onClose:E,getAnchorProps:qe,getArrowProps:te,getArrowInnerProps:he,getPopoverPositionerProps:He,getPopoverProps:$e,getTriggerProps:Tt,getHeaderProps:xt,getBodyProps:Le}}function Jx(e,t){return e===t||e?.contains(t)}function aL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t8(e){const t=Ii("Popover",e),{children:n,...r}=vn(e),i=t1(),o=cge({...r,direction:i.direction});return x(lge,{value:o,children:x(uge,{value:t,children:oge(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t8.displayName="Popover";function n8(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=hh(),a=n2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:t2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n8.displayName="PopoverArrow";var dge=Pe(function(t,n){const{getBodyProps:r}=hh(),i=n2();return le.createElement(we.div,{...r(t,n),className:t2("chakra-popover__body",t.className),__css:i.body})});dge.displayName="PopoverBody";var fge=Pe(function(t,n){const{onClose:r}=hh(),i=n2();return x(xS,{size:"sm",onClick:r,className:t2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});fge.displayName="PopoverCloseButton";function hge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var pge={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]}}},gge=we(Rl.section),hF=Pe(function(t,n){const{variants:r=pge,...i}=t,{isOpen:o}=hh();return le.createElement(gge,{ref:n,variants:hge(r),initial:!1,animate:o?"enter":"exit",...i})});hF.displayName="PopoverTransition";var r8=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=hh(),u=n2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(hF,{...i,...a(o,n),onAnimationComplete:sge(l,o.onAnimationComplete),className:t2("chakra-popover__content",t.className),__css:h}))});r8.displayName="PopoverContent";var mge=Pe(function(t,n){const{getHeaderProps:r}=hh(),i=n2();return le.createElement(we.header,{...r(t,n),className:t2("chakra-popover__header",t.className),__css:i.header})});mge.displayName="PopoverHeader";function i8(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=hh();return C.exports.cloneElement(t,n(t.props,t.ref))}i8.displayName="PopoverTrigger";function vge(e,t,n){return(e-t)*100/(n-t)}var yge=pd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),Sge=pd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),bge=pd({"0%":{left:"-40%"},"100%":{left:"100%"}}),xge=pd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function pF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=vge(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 gF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${Sge} 2s linear infinite`:void 0},...r})};gF.displayName="Shape";var IC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});IC.displayName="Circle";var wge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=pF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),P=v?void 0:(w.percent??0)*2.64,E=P==null?void 0:`${P} ${264-P}`,_=v?{css:{animation:`${yge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:E,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(gF,{size:n,isIndeterminate:v,children:[x(IC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(IC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,..._})]}),u)});wge.displayName="CircularProgress";var[Cge,_ge]=Cn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `}),kge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=pF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",..._ge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),mF=Pe((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":p,"aria-labelledby":m,title:v,role:S,...w}=vn(e),P=Ii("Progress",e),E=u??((n=P.track)==null?void 0:n.borderRadius),_={animation:`${xge} 1s linear infinite`},I={...!h&&a&&s&&_,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${bge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...P.track};return le.createElement(we.div,{ref:t,borderRadius:E,__css:R,...w},re(Cge,{value:P,children:[x(kge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:E,title:v,role:S}),l]}))});mF.displayName="Progress";var Ege=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});Ege.displayName="CircularProgressLabel";var Pge=(...e)=>e.filter(Boolean).join(" "),Tge=e=>e?"":void 0;function Age(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 vF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:Pge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});vF.displayName="SelectField";var yF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=vn(e),[w,P]=Age(S,nQ),E=S_(P),_={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 le.createElement(we.div,{className:"chakra-select__wrapper",__css:_,...w,...i},x(vF,{ref:t,height:u??l,minH:h??p,placeholder:o,...E,__css:T,children:e.children}),x(SF,{"data-disabled":Tge(E.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});yF.displayName="Select";var Lge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),Mge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),SF=e=>{const{children:t=x(Lge,{}),...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 x(Mge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};SF.displayName="SelectIcon";function Oge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ige(e){const t=Nge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function bF(e){return!!e.touches}function Rge(e){return bF(e)&&e.touches.length>1}function Nge(e){return e.view??window}function Dge(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function zge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function xF(e,t="page"){return bF(e)?Dge(e,t):zge(e,t)}function Bge(e){return t=>{const n=Ige(t);(!n||n&&t.button===0)&&e(t)}}function Fge(e,t=!1){function n(i){e(i,{point:xF(i)})}return t?Bge(n):n}function $3(e,t,n,r){return Oge(e,t,Fge(n,t==="pointerdown"),r)}function wF(e){const t=C.exports.useRef(null);return t.current=e,t}var $ge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,Rge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:xF(e)},{timestamp:i}=BP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Vge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Uge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=BP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,pJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),gJ.update(this.updatePoint)}};function sL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:sL(e.point,t[t.length-1]),offset:sL(e.point,t[0]),velocity:Wge(t,.1)}}var Hge=e=>e*1e3;function Wge(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>Hge(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 Vge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function lL(e){return"x"in e&&"y"in e}function Uge(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(lL(e)&&lL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function CF(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=wF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new $ge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Gge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;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;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var jge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function Yge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function _F({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return jge(()=>{const a=e(),s=a.map((l,u)=>Gge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(Yge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function qge(e){return typeof e=="object"&&e!==null&&"current"in e}function Kge(e){const[t]=_F({observeMutation:!1,getNodes(){return[qge(e)?e.current:e]}});return t}var Xge=Object.getOwnPropertyNames,Zge=(e,t)=>function(){return e&&(t=(0,e[Xge(e)[0]])(e=0)),t},yd=Zge({"../../../react-shim.js"(){}});yd();yd();yd();var Ma=e=>e?"":void 0,S0=e=>e?!0:void 0,Sd=(...e)=>e.filter(Boolean).join(" ");yd();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}yd();yd();function Qge(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 im(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function kF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const P=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...im({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${P.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${P.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,P)=>$y(w).height>$y(P).height?w:P,H3):r.reduce((w,P)=>$y(w).width>$y(P).width?w:P,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...im({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",...im({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]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...im({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 EF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Jge(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:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),H=cr(w),$=EF({isReversed:a,direction:s,orientation:l}),[j,de]=nS({value:i,defaultValue: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[V,J]=C.exports.useState(!1),[ie,Q]=C.exports.useState(!1),[K,G]=C.exports.useState(-1),Z=!(h||p),te=C.exports.useRef(j),X=j.map(We=>m0(We,t,n)),he=I*S,ye=eme(X,t,n,he),Se=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});Se.current.value=X,Se.current.valueBounds=ye;const De=X.map(We=>n-We+t),He=($?De:X).map(We=>j4(We,t,n)),qe=l==="vertical",tt=C.exports.useRef(null),Ze=C.exports.useRef(null),nt=_F({getNodes(){const We=Ze.current,ht=We?.querySelectorAll("[role=slider]");return ht?Array.from(ht):[]}}),Tt=C.exports.useId(),Le=Qge(u??Tt),at=C.exports.useCallback(We=>{var ht;if(!tt.current)return;Se.current.eventSource="pointer";const it=tt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ht=We.touches)==null?void 0:ht[0])??We,Qn=qe?it.bottom-Zt:Nt-it.left,lo=qe?it.height:it.width;let gi=Qn/lo;return $&&(gi=1-gi),Lz(gi,t,n)},[qe,$,n,t]),At=(n-t)/10,st=S||(n-t)/100,gt=C.exports.useMemo(()=>({setValueAtIndex(We,ht){if(!Z)return;const it=Se.current.valueBounds[We];ht=parseFloat(wC(ht,it.min,st)),ht=m0(ht,it.min,it.max);const Nt=[...Se.current.value];Nt[We]=ht,de(Nt)},setActiveIndex:G,stepUp(We,ht=st){const it=Se.current.value[We],Nt=$?it-ht:it+ht;gt.setValueAtIndex(We,Nt)},stepDown(We,ht=st){const it=Se.current.value[We],Nt=$?it+ht:it-ht;gt.setValueAtIndex(We,Nt)},reset(){de(te.current)}}),[st,$,de,Z]),an=C.exports.useCallback(We=>{const ht=We.key,Nt={ArrowRight:()=>gt.stepUp(K),ArrowUp:()=>gt.stepUp(K),ArrowLeft:()=>gt.stepDown(K),ArrowDown:()=>gt.stepDown(K),PageUp:()=>gt.stepUp(K,At),PageDown:()=>gt.stepDown(K,At),Home:()=>{const{min:Zt}=ye[K];gt.setValueAtIndex(K,Zt)},End:()=>{const{max:Zt}=ye[K];gt.setValueAtIndex(K,Zt)}}[ht];Nt&&(We.preventDefault(),We.stopPropagation(),Nt(We),Se.current.eventSource="keyboard")},[gt,K,At,ye]),{getThumbStyle:Ct,rootStyle:Ut,trackStyle:sn,innerTrackStyle:yn}=C.exports.useMemo(()=>kF({isReversed:$,orientation:l,thumbRects:nt,thumbPercents:He}),[$,l,He,nt]),Oe=C.exports.useCallback(We=>{var ht;const it=We??K;if(it!==-1&&M){const Nt=Le.getThumb(it),Zt=(ht=Ze.current)==null?void 0:ht.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,K,Le]);id(()=>{Se.current.eventSource==="keyboard"&&z?.(Se.current.value)},[X,z]);const et=We=>{const ht=at(We)||0,it=Se.current.value.map(gi=>Math.abs(gi-ht)),Nt=Math.min(...it);let Zt=it.indexOf(Nt);const Qn=it.filter(gi=>gi===Nt);Qn.length>1&&ht>Se.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),gt.setValueAtIndex(Zt,ht),Oe(Zt)},Xt=We=>{if(K==-1)return;const ht=at(We)||0;G(K),gt.setValueAtIndex(K,ht),Oe(K)};CF(Ze,{onPanSessionStart(We){!Z||(J(!0),et(We),N?.(Se.current.value))},onPanSessionEnd(){!Z||(J(!1),z?.(Se.current.value))},onPan(We){!Z||Xt(We)}});const Yt=C.exports.useCallback((We={},ht=null)=>({...We,...R,id:Le.root,ref:Fn(ht,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(ie),style:{...We.style,...Ut}}),[R,h,ie,Ut,Le]),ke=C.exports.useCallback((We={},ht=null)=>({...We,ref:Fn(ht,tt),id:Le.track,"data-disabled":Ma(h),style:{...We.style,...sn}}),[h,sn,Le]),Ot=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.innerTrack,style:{...We.style,...yn}}),[yn,Le]),Ne=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We,Zt=X[it];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${it}\`. The \`value\` or \`defaultValue\` length is : ${X.length}`);const Qn=ye[it];return{...Nt,ref:ht,role:"slider",tabIndex:Z?0:void 0,id:Le.getThumb(it),"data-active":Ma(V&&K===it),"aria-valuetext":H?.(Zt)??P?.[it],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E?.[it],"aria-labelledby":E?.[it]?void 0:_?.[it],style:{...We.style,...Ct(it)},onKeyDown:b0(We.onKeyDown,an),onFocus:b0(We.onFocus,()=>{Q(!0),G(it)}),onBlur:b0(We.onBlur,()=>{Q(!1),G(-1)})}},[Le,X,ye,Z,V,K,H,P,l,h,p,E,_,Ct,an,Q]),ut=C.exports.useCallback((We={},ht=null)=>({...We,ref:ht,id:Le.output,htmlFor:X.map((it,Nt)=>Le.getThumb(Nt)).join(" "),"aria-live":"off"}),[Le,X]),ln=C.exports.useCallback((We,ht=null)=>{const{value:it,...Nt}=We,Zt=!(it<t||it>n),Qn=it>=X[0]&&it<=X[X.length-1];let lo=j4(it,t,n);lo=$?100-lo:lo;const gi={position:"absolute",pointerEvents:"none",...im({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ht,id:Le.getMarker(We.value),role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!Zt),"data-highlighted":Ma(Qn),style:{...We.style,...gi}}},[h,$,n,t,l,X,Le]),Nn=C.exports.useCallback((We,ht=null)=>{const{index:it,...Nt}=We;return{...Nt,ref:ht,id:Le.getInput(it),type:"hidden",value:X[it],name:Array.isArray(T)?T[it]:`${T}-${it}`}},[T,X,Le]);return{state:{value:X,isFocused:ie,isDragging:V,getThumbPercent:We=>He[We],getThumbMinValue:We=>ye[We].min,getThumbMaxValue:We=>ye[We].max},actions:gt,getRootProps:Yt,getTrackProps:ke,getInnerTrackProps:Ot,getThumbProps:Ne,getMarkerProps:ln,getInputProps:Nn,getOutputProps:ut}}function eme(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[tme,TS]=Cn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <RangeSlider />"}),[nme,o8]=Cn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "<RangeSlider />" `}),PF=Pe(function(t,n){const r=Ii("Slider",t),i=vn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Jge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(tme,{value:l},le.createElement(nme,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});PF.defaultProps={orientation:"horizontal"};PF.displayName="RangeSlider";var rme=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o8(),s=r(t,n);return le.createElement(we.div,{...s,className:Sd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});rme.displayName="RangeSliderThumb";var ime=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:Sd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});ime.displayName="RangeSliderTrack";var ome=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o8(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});ome.displayName="RangeSliderFilledTrack";var ame=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",t.className)})});ame.displayName="RangeSliderMark";yd();yd();function sme(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:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":P,"aria-label":E,"aria-labelledby":_,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),H=EF({isReversed:a,direction:s,orientation:l}),[$,j]=nS({value:i,defaultValue:o??ume(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),Q=!(h||p),K=(n-t)/10,G=S||(n-t)/100,Z=m0($,t,n),te=n-Z+t,he=j4(H?te:Z,t,n),ye=l==="vertical",Se=wF({min:t,max:n,step:S,isDisabled:h,value:Z,isInteractive:Q,isReversed:H,isVertical:ye,eventSource:null,focusThumbOnChange:M,orientation:l}),De=C.exports.useRef(null),$e=C.exports.useRef(null),He=C.exports.useRef(null),qe=C.exports.useId(),tt=u??qe,[Ze,nt]=[`slider-thumb-${tt}`,`slider-track-${tt}`],Tt=C.exports.useCallback(Ne=>{var ut;if(!De.current)return;const ln=Se.current;ln.eventSource="pointer";const Nn=De.current.getBoundingClientRect(),{clientX:We,clientY:ht}=((ut=Ne.touches)==null?void 0:ut[0])??Ne,it=ye?Nn.bottom-ht:We-Nn.left,Nt=ye?Nn.height:Nn.width;let Zt=it/Nt;H&&(Zt=1-Zt);let Qn=Lz(Zt,ln.min,ln.max);return ln.step&&(Qn=parseFloat(wC(Qn,ln.min,ln.step))),Qn=m0(Qn,ln.min,ln.max),Qn},[ye,H,Se]),xt=C.exports.useCallback(Ne=>{const ut=Se.current;!ut.isInteractive||(Ne=parseFloat(wC(Ne,ut.min,G)),Ne=m0(Ne,ut.min,ut.max),j(Ne))},[G,j,Se]),Le=C.exports.useMemo(()=>({stepUp(Ne=G){const ut=H?Z-Ne:Z+Ne;xt(ut)},stepDown(Ne=G){const ut=H?Z+Ne:Z-Ne;xt(ut)},reset(){xt(o||0)},stepTo(Ne){xt(Ne)}}),[xt,H,Z,G,o]),at=C.exports.useCallback(Ne=>{const ut=Se.current,Nn={ArrowRight:()=>Le.stepUp(),ArrowUp:()=>Le.stepUp(),ArrowLeft:()=>Le.stepDown(),ArrowDown:()=>Le.stepDown(),PageUp:()=>Le.stepUp(K),PageDown:()=>Le.stepDown(K),Home:()=>xt(ut.min),End:()=>xt(ut.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),ut.eventSource="keyboard")},[Le,xt,K,Se]),At=z?.(Z)??P,st=Kge($e),{getThumbStyle:gt,rootStyle:an,trackStyle:Ct,innerTrackStyle:Ut}=C.exports.useMemo(()=>{const Ne=Se.current,ut=st??{width:0,height:0};return kF({isReversed:H,orientation:Ne.orientation,thumbRects:[ut],thumbPercents:[he]})},[H,st,he,Se]),sn=C.exports.useCallback(()=>{Se.current.focusThumbOnChange&&setTimeout(()=>{var ut;return(ut=$e.current)==null?void 0:ut.focus()})},[Se]);id(()=>{const Ne=Se.current;sn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Z,N]);function yn(Ne){const ut=Tt(Ne);ut!=null&&ut!==Se.current.value&&j(ut)}CF(He,{onPanSessionStart(Ne){const ut=Se.current;!ut.isInteractive||(V(!0),sn(),yn(Ne),R?.(ut.value))},onPanSessionEnd(){const Ne=Se.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!Se.current.isInteractive||yn(Ne)}});const Oe=C.exports.useCallback((Ne={},ut=null)=>({...Ne,...I,ref:Fn(ut,He),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Ma(J),style:{...Ne.style,...an}}),[I,h,J,an]),et=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,De),id:nt,"data-disabled":Ma(h),style:{...Ne.style,...Ct}}),[h,nt,Ct]),Xt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,style:{...Ne.style,...Ut}}),[Ut]),Yt=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:Fn(ut,$e),role:"slider",tabIndex:Q?0:void 0,id:Ze,"data-active":Ma(de),"aria-valuetext":At,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Z,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":E,"aria-labelledby":E?void 0:_,style:{...Ne.style,...gt(0)},onKeyDown:b0(Ne.onKeyDown,at),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[Q,Ze,de,At,t,n,Z,l,h,p,E,_,gt,at]),ke=C.exports.useCallback((Ne,ut=null)=>{const ln=!(Ne.value<t||Ne.value>n),Nn=Z>=Ne.value,We=j4(Ne.value,t,n),ht={position:"absolute",pointerEvents:"none",...lme({orientation:l,vertical:{bottom:H?`${100-We}%`:`${We}%`},horizontal:{left:H?`${100-We}%`:`${We}%`}})};return{...Ne,ref:ut,role:"presentation","aria-hidden":!0,"data-disabled":Ma(h),"data-invalid":Ma(!ln),"data-highlighted":Ma(Nn),style:{...Ne.style,...ht}}},[h,H,n,t,l,Z]),Ot=C.exports.useCallback((Ne={},ut=null)=>({...Ne,ref:ut,type:"hidden",value:Z,name:T}),[T,Z]);return{state:{value:Z,isFocused:J,isDragging:de},actions:Le,getRootProps:Oe,getTrackProps:et,getInnerTrackProps:Xt,getThumbProps:Yt,getMarkerProps:ke,getInputProps:Ot}}function lme(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function ume(e,t){return t<e?e:e+(t-e)/2}var[cme,AS]=Cn({name:"SliderContext",hookName:"useSliderContext",providerName:"<Slider />"}),[dme,LS]=Cn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:"<Slider />"}),a8=Pe((e,t)=>{const n=Ii("Slider",e),r=vn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=sme(r),l=a(),u=o({},t);return le.createElement(cme,{value:s},le.createElement(dme,{value:n},le.createElement(we.div,{...l,className:Sd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a8.defaultProps={orientation:"horizontal"};a8.displayName="Slider";var TF=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__thumb",e.className),__css:r.thumb})});TF.displayName="SliderThumb";var AF=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__track",e.className),__css:r.track})});AF.displayName="SliderTrack";var LF=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});LF.displayName="SliderFilledTrack";var RC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:Sd("chakra-slider__marker",e.className),__css:r.mark})});RC.displayName="SliderMark";var fme=(...e)=>e.filter(Boolean).join(" "),uL=e=>e?"":void 0,s8=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=vn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Tz(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 le.createElement(we.label,{...h(),className:fme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":uL(s.isChecked),"data-hover":uL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s8.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[hme,MF,pme,gme]=HN();function mme(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=pme(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[vme,r2]=Cn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function yme(e){const{focusedIndex:t,orientation:n,direction:r}=r2(),i=MF(),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())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",E={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];E&&(a.preventDefault(),E(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function Sme(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=r2(),{index:u,register:h}=gme({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=fhe({...r,ref:Fn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:OF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":IF(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[bme,xme]=Cn({});function wme(e){const t=r2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(bme,{key:s,value:{isSelected:s===r,id:IF(n,s),tabId:OF(n,s),selectedIndex:r}},a));return{...e,children:o}}function Cme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=r2(),{isSelected:o,id:a,tabId:s}=xme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({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 _me(){const e=r2(),t=MF(),{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 Cs(()=>{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 p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function OF(e,t){return`${e}--tab-${t}`}function IF(e,t){return`${e}--tabpanel-${t}`}var[kme,i2]=Cn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),RF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=vn(t),{htmlProps:s,descendants:l,...u}=mme(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(hme,{value:l},le.createElement(vme,{value:h},le.createElement(kme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});RF.displayName="Tabs";var Eme=Pe(function(t,n){const r=_me(),i={...t.style,...r},o=i2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});Eme.displayName="TabIndicator";var Pme=Pe(function(t,n){const r=yme({...t,ref:n}),o={display:"flex",...i2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});Pme.displayName="TabList";var NF=Pe(function(t,n){const r=Cme({...t,ref:n}),i=i2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});NF.displayName="TabPanel";var DF=Pe(function(t,n){const r=wme(t),i=i2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});DF.displayName="TabPanels";var zF=Pe(function(t,n){const r=i2(),i=Sme({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});zF.displayName="Tab";var Tme=(...e)=>e.filter(Boolean).join(" ");function Ame(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Lme=["h","minH","height","minHeight"],BF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=vn(e),a=S_(o),s=i?Ame(n,Lme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:Tme("chakra-textarea",r),__css:s})});BF.displayName="Textarea";function Mme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return Ome(e)?e(...t):e}var Ome=e=>typeof e=="function";function Ime(e,t){const n=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 i?.[t]??n}var Rme=(e,t)=>e.find(n=>n.id===t);function cL(e,t){const n=FF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function FF(e,t){for(const[n,r]of Object.entries(e))if(Rme(r,t))return n}function Nme(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 Dme(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 zme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},ml=Bme(zme);function Bme(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=Fme(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=cL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:$F(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=FF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(cL(ml.getState(),i).position)}}var dL=0;function Fme(e,t={}){dL+=1;const n=t.id??dL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>ml.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var $me=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 le.createElement(wz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(_z,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(kz,{id:u?.title,children:i}),s&&x(Cz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function $F(e={}){const{render:t,toastComponent:n=$me}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Hme(e,t){const n=i=>({...t,...i,position:Ime(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=$F(o);return ml.notify(a,o)};return r.update=(i,o)=>{ml.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,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=ml.closeAll,r.close=ml.close,r.isActive=ml.isActive,r}function o2(e){const{theme:t}=BN();return C.exports.useMemo(()=>Hme(t.direction,e),[e,t.direction])}var Wme={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]}}},HF=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=Wme,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Vle();id(()=>{v||r?.()},[v]),id(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),P=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),Mme(P,p);const E=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),_=C.exports.useMemo(()=>Nme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:_},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:E},DC(n,{id:t,onClose:P})))});HF.displayName="ToastComponent";var Vme=e=>{const t=C.exports.useSyncExternalStore(ml.subscribe,ml.getState,ml.getState),{children:n,motionVariants:r,component:i=HF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Dme(l),children:x(gd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re($n,{children:[n,x(ch,{...o,children:s})]})};function Ume(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Gme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var jme={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 Bg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function Yme(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:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:P,modifiers:E,isDisabled:_,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:H}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:$,getPopperProps:j,getArrowInnerProps:de,getArrowProps:V}=pB({enabled:N,placement:h,arrowPadding:P,modifiers:E,gutter:T,offset:M,direction:I}),J=C.exports.useId(),Q=`tooltip-${p??J}`,K=C.exports.useRef(null),G=C.exports.useRef(),Z=C.exports.useRef(),te=C.exports.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=void 0),H()},[H]),X=qme(K,te),he=C.exports.useCallback(()=>{if(!_&&!G.current){X();const Ze=zC(K);G.current=Ze.setTimeout(z,t)}},[X,_,z,t]),ye=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(K);Z.current=Ze.setTimeout(te,n)},[n,te]),Se=C.exports.useCallback(()=>{N&&r&&ye()},[r,ye,N]),De=C.exports.useCallback(()=>{N&&a&&ye()},[a,ye,N]),$e=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&ye()},[N,ye]);Uf(()=>X4(K),"keydown",s?$e:void 0),Uf(()=>X4(K),"scroll",()=>{N&&o&&te()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Z.current)},[]),Uf(()=>K.current,"pointerleave",ye);const He=C.exports.useCallback((Ze={},nt=null)=>({...Ze,ref:Fn(K,nt,$),onPointerEnter:Bg(Ze.onPointerEnter,xt=>{xt.pointerType!=="touch"&&he()}),onClick:Bg(Ze.onClick,Se),onPointerDown:Bg(Ze.onPointerDown,De),onFocus:Bg(Ze.onFocus,he),onBlur:Bg(Ze.onBlur,ye),"aria-describedby":N?Q:void 0}),[he,ye,De,N,Q,Se,$]),qe=C.exports.useCallback((Ze={},nt=null)=>j({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},nt),[j,S,w]),tt=C.exports.useCallback((Ze={},nt=null)=>{const Tt={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:nt,...R,...Ze,id:Q,role:"tooltip",style:Tt}},[R,Q]);return{isOpen:N,show:he,hide:ye,getTriggerProps:He,getTooltipProps:tt,getTooltipPositionerProps:qe,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function qme(e,t){return C.exports.useEffect(()=>{const n=X4(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X4(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Kme=we(Rl.div),hi=Pe((e,t)=>{const n=so("Tooltip",e),r=vn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...P}=r,E=m??v??h??S;if(E){n.bg=E;const H=mQ(i,"colors",E);n[Hr.arrowBg.var]=H}const _=Yme({...P,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,..._.getTriggerProps()},o);else{const H=C.exports.Children.only(o);M=C.exports.cloneElement(H,_.getTriggerProps(H.props,H.ref))}const I=!!l,R=_.getTooltipProps({},t),N=I?Ume(R,["role","id"]):R,z=Gme(R,["role","id"]);return a?re($n,{children:[M,x(gd,{children:_.isOpen&&le.createElement(ch,{...p},le.createElement(we.div,{..._.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Kme,{variants:jme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x($n,{children:o})});hi.displayName="Tooltip";var Xme=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(nae,{theme:o,cssVarsRoot:s,children:re(HR,{colorModeManager:n,options:o.config,children:[i?x(wfe,{}):x(xfe,{}),x(iae,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Zme({children:e,theme:t=Yoe,toastOptions:n,...r}){return re(Xme,{theme:t,...r,children:[e,x(Vme,{...n})]})}function Ss(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function sd(e){return!!e&&!!e[tr]}function Cu(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ave}(e)||Array.isArray(e)||!!e[yL]||!!(!((t=e.constructor)===null||t===void 0)&&t[yL])||l8(e)||u8(e))}function th(e,t,n){n===void 0&&(n=!1),l1(e)===0?(n?Object.keys:w0)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function l1(e){var t=e[tr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:l8(e)?2:u8(e)?3:0}function x0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qme(e,t){return l1(e)===2?e.get(t):e[t]}function WF(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function VF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l8(e){return ive&&e instanceof Map}function u8(e){return ove&&e instanceof Set}function bf(e){return e.o||e.t}function c8(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=GF(e);delete t[tr];for(var n=w0(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function d8(e,t){return t===void 0&&(t=!1),f8(e)||sd(e)||!Cu(e)||(l1(e)>1&&(e.set=e.add=e.clear=e.delete=Jme),Object.freeze(e),t&&th(e,function(n,r){return d8(r,!0)},!0)),e}function Jme(){Ss(2)}function f8(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function El(e){var t=HC[e];return t||Ss(18,e),t}function eve(e,t){HC[e]||(HC[e]=t)}function BC(){return Mv}function rw(e,t){t&&(El("Patches"),e.u=[],e.s=[],e.v=t)}function Z4(e){FC(e),e.p.forEach(tve),e.p=null}function FC(e){e===Mv&&(Mv=e.l)}function fL(e){return Mv={p:[],l:Mv,h:e,m:!0,_:0}}function tve(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||El("ES5").S(t,e,r),r?(n[tr].P&&(Z4(t),Ss(4)),Cu(e)&&(e=Q4(t,e),t.l||J4(t,e)),t.u&&El("Patches").M(n[tr].t,e,t.u,t.s)):e=Q4(t,n,[]),Z4(t),t.u&&t.v(t.u,t.s),e!==UF?e:void 0}function Q4(e,t,n){if(f8(t))return t;var r=t[tr];if(!r)return th(t,function(o,a){return hL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c8(r.k):r.o;th(r.i===3?new Set(i):i,function(o,a){return hL(e,r,i,o,a,n)}),J4(e,i,!1),n&&e.u&&El("Patches").R(r,n,e.u,e.s)}return r.o}function hL(e,t,n,r,i,o){if(sd(i)){var a=Q4(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(WF(n,r,a),!sd(a))return;e.m=!1}if(Cu(i)&&!f8(i)){if(!e.h.F&&e._<1)return;Q4(e,i),t&&t.A.l||J4(e,i)}}function J4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d8(t,n)}function ow(e,t){var n=e[tr];return(n?bf(n):e)[t]}function pL(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 Nc(e){e.P||(e.P=!0,e.l&&Nc(e.l))}function aw(e){e.o||(e.o=c8(e.t))}function $C(e,t,n){var r=l8(t)?El("MapSet").N(t,n):u8(t)?El("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:BC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Ov;a&&(l=[s],u=om);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):El("ES5").J(t,n);return(n?n.A:BC()).p.push(r),r}function nve(e){return sd(e)||Ss(22,e),function t(n){if(!Cu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!El("ES5").K(i)))return i.t;i.I=!0,r=gL(n,o),i.I=!1}else r=gL(n,o);return th(r,function(a,s){i&&Qme(i.t,a)===s||WF(r,a,t(s))}),o===3?new Set(r):r}(e)}function gL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c8(e)}function rve(){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[tr];return Ov.get(l,o)},set:function(l){var u=this[tr];Ov.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Nc(s);break;case 4:n(s)&&Nc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!VF(m,p))return!0}}var S=!!a[tr];return l.length!==w0(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;l<a.length;l++)if(!a.hasOwnProperty(l))return!0;return!1}var i={};eve("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(h,p){if(h){for(var m=Array(p.length),v=0;v<p.length;v++)Object.defineProperty(m,""+v,e(v,!0));return m}var S=GF(p);delete S[tr];for(var w=w0(S),P=0;P<w.length;P++){var E=w[P];S[E]=e(E,h||!!S[E].enumerable)}return Object.create(Object.getPrototypeOf(p),S)}(s,o),u={i:s?5:4,A:a?a.A:BC(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,tr,{value:u,writable:!0}),l},S:function(o,a,s){s?sd(a)&&a[tr].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var h=u[tr];if(h){var p=h.t,m=h.k,v=h.D,S=h.i;if(S===4)th(m,function(T){T!==tr&&(p[T]!==void 0||x0(p,T)?v[T]||l(m[T]):(v[T]=!0,Nc(h)))}),th(p,function(T){m[T]!==void 0||x0(m,T)||(v[T]=!1,Nc(h))});else if(S===5){if(r(h)&&(Nc(h),v.length=!0),m.length<p.length)for(var w=m.length;w<p.length;w++)v[w]=!1;else for(var P=p.length;P<m.length;P++)v[P]=!0;for(var E=Math.min(m.length,p.length),_=0;_<E;_++)m.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&l(m[_])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var mL,Mv,h8=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ive=typeof Map<"u",ove=typeof Set<"u",vL=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",UF=h8?Symbol.for("immer-nothing"):((mL={})["immer-nothing"]=!0,mL),yL=h8?Symbol.for("immer-draftable"):"__$immer_draftable",tr=h8?Symbol.for("immer-state"):"__$immer_state",ave=""+Object.prototype.constructor,w0=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,GF=Object.getOwnPropertyDescriptors||function(e){var t={};return w0(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},HC={},Ov={get:function(e,t){if(t===tr)return e;var n=bf(e);if(!x0(n,t))return function(i,o,a){var s,l=pL(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Cu(r)?r:r===ow(e.t,t)?(aw(e),e.o[t]=$C(e.A.h,r,e)):r},has:function(e,t){return t in bf(e)},ownKeys:function(e){return Reflect.ownKeys(bf(e))},set:function(e,t,n){var r=pL(bf(e),t);if(r?.set)return r.set.call(e.k,n),!0;if(!e.P){var i=ow(bf(e),t),o=i?.[tr];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(VF(n,i)&&(n!==void 0||x0(e.t,t)))return!0;aw(e),Nc(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return ow(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,aw(e),Nc(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=bf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ss(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ss(12)}},om={};th(Ov,function(e,t){om[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),om.deleteProperty=function(e,t){return om.set.call(this,e,t,void 0)},om.set=function(e,t,n){return Ov.set.call(this,e[0],t,n,e[0])};var sve=function(){function e(n){var r=this;this.g=vL,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=r;return function(w){var P=this;w===void 0&&(w=s);for(var E=arguments.length,_=Array(E>1?E-1:0),T=1;T<E;T++)_[T-1]=arguments[T];return l.produce(w,function(M){var I;return(I=o).call.apply(I,[P,M].concat(_))})}}var u;if(typeof o!="function"&&Ss(6),a!==void 0&&typeof a!="function"&&Ss(7),Cu(i)){var h=fL(r),p=$C(r,i,void 0),m=!0;try{u=o(p),m=!1}finally{m?Z4(h):FC(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(w){return rw(h,a),iw(w,h)},function(w){throw Z4(h),w}):(rw(h,a),iw(u,h))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===UF&&(u=void 0),r.F&&d8(u,!0),a){var v=[],S=[];El("Patches").M(i,u,v,S),a(v,S)}return u}Ss(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var h=arguments.length,p=Array(h>1?h-1:0),m=1;m<h;m++)p[m-1]=arguments[m];return r.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(p))})};var a,s,l=r.produce(i,o,function(u,h){a=u,s=h});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,a,s]}):[l,a,s]},typeof n?.useProxies=="boolean"&&this.setUseProxies(n.useProxies),typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Cu(n)||Ss(8),sd(n)&&(n=nve(n));var r=fL(this),i=$C(this,n,void 0);return i[tr].C=!0,FC(r),i},t.finishDraft=function(n,r){var i=n&&n[tr],o=i.A;return rw(o,r),iw(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!vL&&Ss(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=El("Patches").$;return sd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new sve,jF=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SL(Object(n),!0).forEach(function(r){MB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $i(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var xL=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sw=function(){return Math.random().toString(36).substring(7).split("").join(".")},e5={INIT:"@@redux/INIT"+sw(),REPLACE:"@@redux/REPLACE"+sw(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sw()}};function lve(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function p8(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($i(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p8)(e,t)}if(typeof e!="function")throw new Error($i(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($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var P=!0;return u(),s.push(w),function(){if(!!P){if(l)throw new Error($i(6));P=!1,u();var _=s.indexOf(w);s.splice(_,1),a=null}}}function m(w){if(!lve(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var P=a=s,E=0;E<P.length;E++){var _=P[E];_()}return w}function v(w){if(typeof w!="function")throw new Error($i(10));i=w,m({type:e5.REPLACE})}function S(){var w,P=p;return w={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error($i(11));function T(){_.next&&_.next(h())}T();var M=P(T);return{unsubscribe:M}}},w[xL]=function(){return this},w}return m({type:e5.INIT}),r={dispatch:m,subscribe:p,getState:h,replaceReducer:v},r[xL]=S,r}function uve(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:e5.INIT});if(typeof r>"u")throw new Error($i(12));if(typeof n(void 0,{type:e5.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function YF(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),a;try{uve(n)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var h=!1,p={},m=0;m<o.length;m++){var v=o[m],S=n[v],w=l[v],P=S(w,u);if(typeof P>"u")throw u&&u.type,new Error($i(14));p[v]=P,h=h||P!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function cve(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error($i(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=t5.apply(void 0,s)(i.dispatch),bL(bL({},i),{},{dispatch:o})}}}var n5="NOT_FOUND";function dve(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:n5},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function fve(e,t){var n=[];function r(s){var l=n.findIndex(function(h){return t(s,h.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n5}function i(s,l){r(s)===n5&&(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 hve=function(t,n){return t===n};function pve(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function gve(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?hve:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=pve(i),u=a===1?dve(l):fve(a,l);function h(){var p=u.get(arguments);if(p===n5){if(p=e.apply(null,arguments),s){var m=u.getEntries(),v=m.find(function(S){return s(S.value,p)});v&&(p=v.value)}u.put(arguments,p)}return p}return h.clearCache=function(){return u.clear()},h}function mve(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function vve(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=0,h,p={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(p=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var v=p,S=v.memoizeOptions,w=S===void 0?n:S,P=Array.isArray(w)?w:[w],E=mve(s),_=e.apply(void 0,[function(){return u++,m.apply(null,arguments)}].concat(P)),T=e(function(){for(var I=[],R=E.length,N=0;N<R;N++)I.push(E[N].apply(null,arguments));return h=_.apply(null,I),h});return Object.assign(T,{resultFunc:m,memoizedResultFunc:_,dependencies:E,lastResult:function(){return h},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),T};return i}var ft=vve(gve);function qF(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(a){return function(s){return typeof s=="function"?s(i,o,e):a(s)}}};return t}var KF=qF();KF.withExtraArgument=qF;const wL=KF;var yve=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sve=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(h){return l([u,h])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(h){u=[6,h],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},r5=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},bve=Object.defineProperty,xve=Object.defineProperties,wve=Object.getOwnPropertyDescriptors,CL=Object.getOwnPropertySymbols,Cve=Object.prototype.hasOwnProperty,_ve=Object.prototype.propertyIsEnumerable,_L=function(e,t,n){return t in e?bve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Qc=function(e,t){for(var n in t||(t={}))Cve.call(t,n)&&_L(e,n,t[n]);if(CL)for(var r=0,i=CL(t);r<i.length;r++){var n=i[r];_ve.call(t,n)&&_L(e,n,t[n])}return e},lw=function(e,t){return xve(e,wve(t))},kve=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(u){i(u)}},a=function(l){try{s(n.throw(l))}catch(u){i(u)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},Eve=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?t5:t5.apply(null,arguments)};function Pve(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var Tve=function(e){yve(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,r5([void 0],n[0].concat(this)))):new(t.bind.apply(t,r5([void 0],n.concat(this))))},t}(Array);function WC(e){return Cu(e)?jF(e,function(){}):e}function Ave(e){return typeof e=="boolean"}function Lve(){return function(t){return Mve(t)}}function Mve(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new Tve;return n&&(Ave(n)?r.push(wL):r.push(wL.withExtraArgument(n.extraArgument))),r}var Ove=!0;function Ive(e){var t=Lve(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,a=o===void 0?t():o,s=n.devTools,l=s===void 0?!0:s,u=n.preloadedState,h=u===void 0?void 0:u,p=n.enhancers,m=p===void 0?void 0:p,v;if(typeof i=="function")v=i;else if(Pve(i))v=YF(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=a;typeof S=="function"&&(S=S(t));var w=cve.apply(void 0,S),P=t5;l&&(P=Eve(Qc({trace:!Ove},typeof l=="object"&&l)));var E=[w];Array.isArray(m)?E=r5([w],m):typeof m=="function"&&(E=m(E));var _=P.apply(void 0,E);return p8(v,h,_)}function Jr(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return Qc(Qc({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function XF(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function Rve(e){return typeof e=="function"}function Nve(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?XF(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(Rve(e))l=function(){return WC(e())};else{var u=WC(e);l=function(){return u}}function h(p,m){p===void 0&&(p=l());var v=r5([o[m.type]],a.filter(function(S){var w=S.matcher;return w(m)}).map(function(S){var w=S.reducer;return w}));return v.filter(function(S){return!!S}).length===0&&(v=[s]),v.reduce(function(S,w){if(w)if(sd(S)){var P=S,E=w(P,m);return E===void 0?S:E}else{if(Cu(S))return jF(S,function(_){return w(_,m)});var E=w(S,m);if(E===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return S},p)}return h.getInitialState=l,h}function Dve(e,t){return e+"/"+t}function MS(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:WC(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(h){var p=r[h],m=Dve(t,h),v,S;"reducer"in p?(v=p.reducer,S=p.prepare):v=p,o[h]=v,a[m]=v,s[h]=S?Jr(m,S):Jr(m)});function l(){var h=typeof e.extraReducers=="function"?XF(e.extraReducers):[e.extraReducers],p=h[0],m=p===void 0?{}:p,v=h[1],S=v===void 0?[]:v,w=h[2],P=w===void 0?void 0:w,E=Qc(Qc({},m),a);return Nve(n,function(_){for(var T in E)_.addCase(T,E[T]);for(var M=0,I=S;M<I.length;M++){var R=I[M];_.addMatcher(R.matcher,R.reducer)}P&&_.addDefaultCase(P)})}var u;return{name:t,reducer:function(h,p){return u||(u=l()),u(h,p)},actions:s,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var zve="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bve=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=zve[Math.random()*64|0];return t},Fve=["name","message","stack","code"],uw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),kL=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),$ve=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Fve;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}};(function(){function e(t,n,r){var i=Jr(t+"/fulfilled",function(u,h,p,m){return{payload:u,meta:lw(Qc({},m||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),o=Jr(t+"/pending",function(u,h,p){return{payload:void 0,meta:lw(Qc({},p||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),a=Jr(t+"/rejected",function(u,h,p,m,v){return{payload:m,error:(r&&r.serializeError||$ve)(u||"Rejected"),meta:lw(Qc({},v||{}),{arg:p,requestId:h,rejectedWithValue:!!m,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(h,p,m){var v=r?.idGenerator?r.idGenerator(u):Bve(),S=new s,w,P=new Promise(function(M,I){return S.signal.addEventListener("abort",function(){return I({name:"AbortError",message:w||"Aborted"})})}),E=!1;function _(M){E&&(w=M,S.abort())}var T=function(){return kve(this,null,function(){var M,I,R,N,z,H;return Sve(this,function($){switch($.label){case 0:return $.trys.push([0,4,,5]),N=(M=r?.condition)==null?void 0:M.call(r,u,{getState:p,extra:m}),Wve(N)?[4,N]:[3,2];case 1:N=$.sent(),$.label=2;case 2:if(N===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,h(o(v,u,(I=r?.getPendingMeta)==null?void 0:I.call(r,{requestId:v,arg:u},{getState:p,extra:m}))),[4,Promise.race([P,Promise.resolve(n(u,{dispatch:h,getState:p,extra:m,requestId:v,signal:S.signal,abort:_,rejectWithValue:function(j,de){return new uw(j,de)},fulfillWithValue:function(j,de){return new kL(j,de)}})).then(function(j){if(j instanceof uw)throw j;return j instanceof kL?i(j.payload,v,u,j.meta):i(j,v,u)})])];case 3:return R=$.sent(),[3,5];case 4:return z=$.sent(),R=z instanceof uw?a(null,v,u,z.payload,z.meta):a(z,v,u),[3,5];case 5:return H=r&&!r.dispatchConditionRejection&&a.match(R)&&R.meta.condition,H||h(R),[2,R]}})})}();return Object.assign(T,{abort:_,requestId:v,arg:u,unwrap:function(){return T.then(Hve)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=e,e})();function Hve(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Wve(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var g8="listenerMiddleware";Jr(g8+"/add");Jr(g8+"/removeAll");Jr(g8+"/remove");var EL;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:global);rve();var ZF={exports:{}},QF={};/**
|
|
* @license React
|
|
* use-sync-external-store-shim.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var j0=C.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=j0.useState,jve=j0.useEffect,Yve=j0.useLayoutEffect,qve=j0.useDebugValue;function Kve(e,t){var n=t(),r=Gve({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Yve(function(){i.value=n,i.getSnapshot=t,cw(i)&&o({inst:i})},[e,n,t]),jve(function(){return cw(i)&&o({inst:i}),e(function(){cw(i)&&o({inst:i})})},[e]),qve(n),n}function cw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Uve(e,n)}catch{return!0}}function Xve(e,t){return t()}var Zve=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xve:Kve;QF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Zve;(function(e){e.exports=QF})(ZF);var JF={exports:{}},e$={};/**
|
|
* @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 OS=C.exports,Qve=ZF.exports;function Jve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var e2e=typeof Object.is=="function"?Object.is:Jve,t2e=Qve.useSyncExternalStore,n2e=OS.useRef,r2e=OS.useEffect,i2e=OS.useMemo,o2e=OS.useDebugValue;e$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=n2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=i2e(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 p=S}return p=v}if(S=p,e2e(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=t2e(e,o[0],o[1]);return r2e(function(){a.hasValue=!0,a.value=s},[s]),o2e(s),s};(function(e){e.exports=e$})(JF);function a2e(e){e()}let t$=a2e;const s2e=e=>t$=e,l2e=()=>t$,ld=C.exports.createContext(null);function n$(){return C.exports.useContext(ld)}const u2e=()=>{throw new Error("uSES not initialized!")};let r$=u2e;const c2e=e=>{r$=e},d2e=(e,t)=>e===t;function f2e(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(r,i=d2e){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 h2e=f2e();var p2e={exports:{}},Mn={};/**
|
|
* @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 m8=Symbol.for("react.element"),v8=Symbol.for("react.portal"),IS=Symbol.for("react.fragment"),RS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),g2e=Symbol.for("react.server_context"),BS=Symbol.for("react.forward_ref"),FS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),m2e=Symbol.for("react.offscreen"),i$;i$=Symbol.for("react.module.reference");function ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m8:switch(e=e.type,e){case IS:case NS:case RS:case FS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case g2e:case zS:case BS:case WS:case HS:case DS:return e;default:return t}}case v8:return t}}}Mn.ContextConsumer=zS;Mn.ContextProvider=DS;Mn.Element=m8;Mn.ForwardRef=BS;Mn.Fragment=IS;Mn.Lazy=WS;Mn.Memo=HS;Mn.Portal=v8;Mn.Profiler=NS;Mn.StrictMode=RS;Mn.Suspense=FS;Mn.SuspenseList=$S;Mn.isAsyncMode=function(){return!1};Mn.isConcurrentMode=function(){return!1};Mn.isContextConsumer=function(e){return ja(e)===zS};Mn.isContextProvider=function(e){return ja(e)===DS};Mn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m8};Mn.isForwardRef=function(e){return ja(e)===BS};Mn.isFragment=function(e){return ja(e)===IS};Mn.isLazy=function(e){return ja(e)===WS};Mn.isMemo=function(e){return ja(e)===HS};Mn.isPortal=function(e){return ja(e)===v8};Mn.isProfiler=function(e){return ja(e)===NS};Mn.isStrictMode=function(e){return ja(e)===RS};Mn.isSuspense=function(e){return ja(e)===FS};Mn.isSuspenseList=function(e){return ja(e)===$S};Mn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===IS||e===NS||e===RS||e===FS||e===$S||e===m2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===BS||e.$$typeof===i$||e.getModuleId!==void 0)};Mn.typeOf=ja;(function(e){e.exports=Mn})(p2e);function v2e(){const e=l2e();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 PL={notify(){},get:()=>[]};function y2e(e,t){let n,r=PL;function i(p){return l(),r.subscribe(p)}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=v2e())}function u(){n&&(n(),n=void 0,r.clear(),r=PL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const S2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2e=S2e?C.exports.useLayoutEffect:C.exports.useEffect;function x2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=y2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return b2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||ld).Provider,{value:i,children:n})}function o$(e=ld){const t=e===ld?n$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const w2e=o$();function C2e(e=ld){const t=e===ld?w2e:o$(e);return function(){return t().dispatch}}const _2e=C2e();c2e(JF.exports.useSyncExternalStoreWithSelector);s2e(Il.exports.unstable_batchedUpdates);var y8="persist:",a$="persist/FLUSH",S8="persist/REHYDRATE",s$="persist/PAUSE",l$="persist/PERSIST",u$="persist/PURGE",c$="persist/REGISTER",k2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function TL(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 E2e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TL(n,!0).forEach(function(r){P2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TL(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T2e(e,t,n,r){r.debug;var i=E2e({},n);return e&&W3(e)==="object"&&Object.keys(e).forEach(function(o){o!=="_persist"&&t[o]===n[o]&&(i[o]=e[o])}),i}function A2e(e){var t=e.blacklist||null,n=e.whitelist||null,r=e.transforms||[],i=e.throttle||0,o=e.debounce||0,a="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key),s=e.storage,l;e.serialize===!1?l=function(N){return N}:typeof e.serialize=="function"?l=e.serialize:l=L2e;var u=e.writeFailHandler||null,h={},p={},m=[],v=null,S=null;let w=0;function P(R){clearTimeout(w),w=setTimeout(()=>{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(E,i)),h=R},o)}function E(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,H){return H.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&_()}function _(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)E();return S||Promise.resolve()};return{update:P,flush:I}}function L2e(e){return JSON.stringify(e)}function M2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).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=O2e,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 O2e(e){return JSON.parse(e)}function I2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y8).concat(e.key);return t.removeItem(n,R2e)}function R2e(e){}function AL(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 au(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AL(n,!0).forEach(function(r){N2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AL(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D2e(e,t){if(e==null)return{};var n=z2e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function z2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var B2e=5e3;function F2e(e,t){var n=e.version!==void 0?e.version:k2e;e.debug;var r=e.stateReconciler===void 0?T2e:e.stateReconciler,i=e.getStoredState||M2e,o=e.timeout!==void 0?e.timeout:B2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=D2e(m,["_persist"]),w=S;if(p.type===l$){var P=!1,E=function(z,H){P||(p.rehydrate(e.key,z,H),P=!0)};if(o&&setTimeout(function(){!P&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=A2e(e)),v)return au({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function(H,$){return Promise.resolve(H)};z(N,n).then(function(H){E(H)},function(H){E(void 0,H)})},function(N){E(void 0,N)}),au({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===u$)return s=!0,p.result(I2e(e)),au({},t(w,p),{_persist:v});if(p.type===a$)return p.result(a&&a.flush()),au({},t(w,p),{_persist:v});if(p.type===s$)l=!0;else if(p.type===S8){if(s)return au({},w,{_persist:au({},v,{rehydrated:!0})});if(p.key===e.key){var _=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,_,e):_,I=au({},M,{_persist:au({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(au({},R,{_persist:v}))}}function LL(e){return W2e(e)||H2e(e)||$2e()}function $2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function H2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function W2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function ML(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 VC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ML(n,!0).forEach(function(r){V2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ML(n).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V2e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d$={registry:[],bootstrapped:!1},U2e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case c$:return VC({},t,{registry:[].concat(LL(t.registry),[n.key])});case S8:var r=t.registry.indexOf(n.key),i=LL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function G2e(e,t,n){var r=n||!1,i=p8(U2e,d$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:c$,key:u})},a=function(u,h,p){var m={type:S8,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:u$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:s$})},persist:function(){e.dispatch({type:l$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b8={},x8={};x8.__esModule=!0;x8.default=q2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var j2e={getItem:dw,setItem:dw,removeItem:dw};function Y2e(e){if((typeof self>"u"?"undefined":V3(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{return!1}return!0}function q2e(e){var t="".concat(e,"Storage");return Y2e(t)?self[t]:j2e}b8.__esModule=!0;b8.default=Z2e;var K2e=X2e(x8);function X2e(e){return e&&e.__esModule?e:{default:e}}function Z2e(e){var t=(0,K2e.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 f$=void 0,Q2e=J2e(b8);function J2e(e){return e&&e.__esModule?e:{default:e}}var eye=(0,Q2e.default)("local");f$=eye;var h$={},p$={},nh={};Object.defineProperty(nh,"__esModule",{value:!0});nh.PLACEHOLDER_UNDEFINED=nh.PACKAGE_NAME=void 0;nh.PACKAGE_NAME="redux-deep-persist";nh.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w8={};(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={}))})(w8);(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=nh,n=w8,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const Q in V){const K=J?`${J}.${Q}`:Q,G=V[Q];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${Q}:<Circular>`:(ie.add(G),(0,e.getCircularPath)(G,K,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const Q=V[ie];J[ie]=(0,e._cloneDeep)(Q)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),Q=(0,e.cloneDeep)(J),K=Object.keys(ie).reduce((Z,te)=>(h.call(Q,te)||(Z[te]=void 0),Z),{});if((0,e.isDate)(ie)||(0,e.isDate)(Q))return ie.valueOf()===Q.valueOf()?{}:Q;const G=Object.keys(Q).reduce((Z,te)=>{if(!h.call(ie,te))return Z[te]=Q[te],Z;const X=(0,e.difference)(ie[te],Q[te]);return(0,e.isObjectLike)(X)&&(0,e.isEmpty)(X)&&!(0,e.isDate)(X)?(0,e.isArray)(ie)&&!(0,e.isArray)(Q)||!(0,e.isArray)(ie)&&(0,e.isArray)(Q)?Q:Z:(Z[te]=X,Z)},K);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,Q)=>{if(ie){const K=parseInt(Q,10),G=(0,e.isIntegerString)(Q)&&K<0?ie.length+K:Q;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const P=function(V,J){return[...V].reverse().reduce((K,G,Z)=>{const te=(0,e.isIntegerString)(G)?[]:{};return te[G]=Z===0?J:K,te},{})};e.assocPath=P;const E=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((Q,K,G)=>(G===J.length-1&&Q&&(0,e.isObjectLike)(Q)&&delete Q[K],Q&&Q[K]),ie),ie};e.dissocPath=E;const _=function(V,J,...ie){if(!ie||!ie.length)return J;const Q=ie.shift(),{preservePlaceholder:K,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(Q))for(const Z in Q)if((0,e.isObjectLike)(Q[Z])&&(0,e.isObjectLike)(J[Z]))J[Z]||(J[Z]={}),_(V,J[Z],Q[Z]);else if((0,e.isArray)(J)){let te=Q[Z];const X=K?t.PLACEHOLDER_UNDEFINED:void 0;G||(te=typeof te<"u"?te:J[parseInt(Z,10)]),te=te!==t.PLACEHOLDER_UNDEFINED?te:X,J[parseInt(Z,10)]=te}else{const te=Q[Z]!==t.PLACEHOLDER_UNDEFINED?Q[Z]:void 0;J[Z]=te}return _(V,J,...ie)},T=function(V,J,ie){return _({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,Q,K){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Z=V[G],te=(0,e.isArray)(V),X=Q?Q+"."+G:G;Z===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(X)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(X)!==-1)&&te&&(V[parseInt(G,10)]=void 0),Z===void 0&&K&&ie===n.ConfigType.BLACKLIST&&J.indexOf(X)===-1&&te&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Z,J,ie,X,K)}},I=function(V,J,ie,Q){const K=(0,e.cloneDeep)(V);return M(K,J,ie,"",Q),K};e.preserveUndefined=I;const R=function(V,J,ie){return ie.indexOf(V)===J};e.unique=R;const N=function(V){return V.reduce((J,ie)=>{const Q=V.filter(he=>he===ie),K=V.filter(he=>(ie+".").indexOf(he+".")===0),{duplicates:G,subsets:Z}=J,te=Q.length>1&&G.indexOf(ie)===-1,X=K.length>1;return{duplicates:[...G,...te?Q:[]],subsets:[...Z,...X?K:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const Q=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",K=`${t.PACKAGE_NAME}: incorrect ${Q} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments.
|
|
|
|
`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${K} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Z,subsets:te}=(0,e.findDuplicatesAndSubsets)(V);if(Z.length>1)throw new Error(`${K} Duplicated paths.
|
|
|
|
${JSON.stringify(Z)}
|
|
|
|
${G}`);if(te.length>1)throw new Error(`${K} You are trying to persist an entire property and also some of its subset.
|
|
|
|
${JSON.stringify(te)}
|
|
|
|
${G}`)};e.singleTransformValidator=z;const H=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((Q,K)=>J.indexOf(Q)!==K);if(ie.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(ie)}`)}};e.transformsValidator=H;const $=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.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(V){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:Q},"whitelist")}if(J){const{duplicates:ie,subsets:Q}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:Q},"blacklist")}};e.configValidator=$;const j=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}.
|
|
|
|
${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset.
|
|
|
|
${JSON.stringify(J)}`)};e.throwError=j;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const Q=ie.split("."),K=Q[0],G=Q.slice(1).join(".")||void 0,Z=J.filter(X=>Object.keys(X)[0]===K)[0],te=Z?Object.values(Z)[0]:void 0;return Z||J.push({[K]:G?[G]:void 0}),Z&&!te&&G&&(Z[K]=[G]),Z&&te&&G&&te.push(G),J},[]):[]};e.getRootKeysGroup=de})(p$);(function(e){var t=ys&&ys.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w<S.length;w++)m.indexOf(S[w])<0&&Object.prototype.propertyIsEnumerable.call(p,S[w])&&(v[S[w]]=p[S[w]]);return v};Object.defineProperty(e,"__esModule",{value:!0}),e.getPersistConfig=e.getTransforms=e.createBlacklist=e.createWhitelist=e.autoMergeDeep=void 0;const n=p$,r=nh,i=w8,o=function(p,m,v={}){const S=v.whitelist||null,w=v.blacklist||null;function P(E){return!!(S&&S.indexOf(E)===-1||w&&w.indexOf(E)!==-1)}return{in:(E,_,T)=>!P(_)&&p?p(E,_,T):E,out:(E,_,T)=>!P(_)&&m?m(E,_,T):E,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:P,transforms:E})=>{if(w||P)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)(E);const _=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,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=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(P=>{const E=P.split(".");w=(0,n.path)(v,E),typeof w>"u"&&(0,n.isIntegerString)(E[E.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const _=(0,n.assocPath)(E,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:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(P=>P.split(".")).reduce((P,E)=>(0,n.dissocPath)(P,E),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:P,rootReducer:E}=p,_=t(p,["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(E(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),H=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),$=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),j=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},_),{key:m,storage:w,transforms:[...H,...$,...j,...P||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(h$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),tye=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C8(r)?r:!1},C8=e=>Boolean(typeof e=="string"?tye(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)})),i5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),nye=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/**
|
|
* @license
|
|
* Lodash <https://lodash.com/>
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
* Released under MIT license <https://lodash.com/license>
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
*/(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,P=1,E=2,_=4,T=8,M=16,I=32,R=64,N=128,z=256,H=512,$=30,j="...",de=800,V=16,J=1,ie=2,Q=3,K=1/0,G=9007199254740991,Z=17976931348623157e292,te=0/0,X=4294967295,he=X-1,ye=X>>>1,Se=[["ary",N],["bind",P],["bindKey",E],["curry",T],["curryRight",M],["flip",H],["partial",I],["partialRight",R],["rearg",z]],De="[object Arguments]",$e="[object Array]",He="[object AsyncFunction]",qe="[object Boolean]",tt="[object Date]",Ze="[object DOMException]",nt="[object Error]",Tt="[object Function]",xt="[object GeneratorFunction]",Le="[object Map]",at="[object Number]",At="[object Null]",st="[object Object]",gt="[object Promise]",an="[object Proxy]",Ct="[object RegExp]",Ut="[object Set]",sn="[object String]",yn="[object Symbol]",Oe="[object Undefined]",et="[object WeakMap]",Xt="[object WeakSet]",Yt="[object ArrayBuffer]",ke="[object DataView]",Ot="[object Float32Array]",Ne="[object Float64Array]",ut="[object Int8Array]",ln="[object Int16Array]",Nn="[object Int32Array]",We="[object Uint8Array]",ht="[object Uint8ClampedArray]",it="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gi=/&(?:amp|lt|gt|quot|#39);/g,Os=/[&<>"']/g,m1=RegExp(gi.source),va=RegExp(Os.source),xh=/<%-([\s\S]+?)%>/g,v1=/<%([\s\S]+?)%>/g,Du=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ed=/[\\^$.*+?()[\]{}|]/g,y1=RegExp(Ed.source),zu=/^\s+/,Pd=/\s/,S1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Is=/\{\n\/\* \[wrapped with (.+)\] \*/,Bu=/,? & /,b1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,x1=/[()=,{}\[\]\/\s]/,w1=/\\(\\)?/g,C1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ya=/\w*$/,_1=/^[-+]0x[0-9a-f]+$/i,k1=/^0b[01]+$/i,E1=/^\[object .+?Constructor\]$/,P1=/^0o[0-7]+$/i,T1=/^(?:0|[1-9]\d*)$/,A1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,L1=/['\n\r\u2028\u2029\\]/g,qa="\\ud800-\\udfff",Bl="\\u0300-\\u036f",Fl="\\ufe20-\\ufe2f",Ns="\\u20d0-\\u20ff",$l=Bl+Fl+Ns,_h="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",Sn=" \\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",_r="\\ufe0e\\ufe0f",Ur=Ds+No+kn+Sn,zo="['\u2019]",zs="["+qa+"]",Gr="["+Ur+"]",Ka="["+$l+"]",Td="\\d+",Hl="["+_h+"]",Xa="["+Fu+"]",Ad="[^"+qa+Ur+Td+_h+Fu+Do+"]",mi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ka+"|"+mi+")",Eh="[^"+qa+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Bs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",Wl="(?:"+Xa+"|"+Ad+")",M1="(?:"+uo+"|"+Ad+")",$u="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Md=kh+"?",Wu="["+_r+"]?",ya="(?:"+Fs+"(?:"+[Eh,Ld,Bs].join("|")+")"+Wu+Md+")*",Od="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Wu+Md+ya,Ph="(?:"+[Hl,Ld,Bs].join("|")+")"+Ht,Vu="(?:"+[Eh+Ka+"?",Ka,Ld,Bs,zs].join("|")+")",Uu=RegExp(zo,"g"),Th=RegExp(Ka,"g"),Bo=RegExp(mi+"(?="+mi+")|"+Vu+Ht,"g"),Wn=RegExp([uo+"?"+Xa+"+"+$u+"(?="+[Gr,uo,"$"].join("|")+")",M1+"+"+Hu+"(?="+[Gr,uo+Wl,"$"].join("|")+")",uo+"?"+Wl+"+"+$u,uo+"+"+Hu,Vl,Od,Td,Ph].join("|"),"g"),Id=RegExp("["+Fs+qa+$l+_r+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["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"],Lh=-1,un={};un[Ot]=un[Ne]=un[ut]=un[ln]=un[Nn]=un[We]=un[ht]=un[it]=un[Nt]=!0,un[De]=un[$e]=un[Yt]=un[qe]=un[ke]=un[tt]=un[nt]=un[Tt]=un[Le]=un[at]=un[st]=un[Ct]=un[Ut]=un[sn]=un[et]=!1;var Wt={};Wt[De]=Wt[$e]=Wt[Yt]=Wt[ke]=Wt[qe]=Wt[tt]=Wt[Ot]=Wt[Ne]=Wt[ut]=Wt[ln]=Wt[Nn]=Wt[Le]=Wt[at]=Wt[st]=Wt[Ct]=Wt[Ut]=Wt[sn]=Wt[yn]=Wt[We]=Wt[ht]=Wt[it]=Wt[Nt]=!0,Wt[nt]=Wt[Tt]=Wt[et]=!1;var Mh={\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"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ge=parseFloat,Ke=parseInt,zt=typeof ys=="object"&&ys&&ys.Object===Object&&ys,fn=typeof self=="object"&&self&&self.Object===Object&&self,yt=zt||fn||Function("return this")(),Pt=t&&!t.nodeType&&t,Vt=Pt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Pt,gr=Nr&&zt.process,hn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=hn&&hn.isArrayBuffer,co=hn&&hn.isDate,Gi=hn&&hn.isMap,Sa=hn&&hn.isRegExp,$s=hn&&hn.isSet,I1=hn&&hn.isTypedArray;function vi(oe,xe,ve){switch(ve.length){case 0:return oe.call(xe);case 1:return oe.call(xe,ve[0]);case 2:return oe.call(xe,ve[0],ve[1]);case 3:return oe.call(xe,ve[0],ve[1],ve[2])}return oe.apply(xe,ve)}function R1(oe,xe,ve,je){for(var kt=-1,Qt=oe==null?0:oe.length;++kt<Qt;){var It=oe[kt];xe(je,It,ve(It),oe)}return je}function Vn(oe,xe){for(var ve=-1,je=oe==null?0:oe.length;++ve<je&&xe(oe[ve],ve,oe)!==!1;);return oe}function fo(oe,xe){for(var ve=oe==null?0:oe.length;ve--&&xe(oe[ve],ve,oe)!==!1;);return oe}function Dn(oe,xe){for(var ve=-1,je=oe==null?0:oe.length;++ve<je;)if(!xe(oe[ve],ve,oe))return!1;return!0}function ho(oe,xe){for(var ve=-1,je=oe==null?0:oe.length,kt=0,Qt=[];++ve<je;){var It=oe[ve];xe(It,ve,oe)&&(Qt[kt++]=It)}return Qt}function Ri(oe,xe){var ve=oe==null?0:oe.length;return!!ve&&Yu(oe,xe,0)>-1}function Oh(oe,xe,ve){for(var je=-1,kt=oe==null?0:oe.length;++je<kt;)if(ve(xe,oe[je]))return!0;return!1}function zn(oe,xe){for(var ve=-1,je=oe==null?0:oe.length,kt=Array(je);++ve<je;)kt[ve]=xe(oe[ve],ve,oe);return kt}function ba(oe,xe){for(var ve=-1,je=xe.length,kt=oe.length;++ve<je;)oe[kt+ve]=xe[ve];return oe}function Nd(oe,xe,ve,je){var kt=-1,Qt=oe==null?0:oe.length;for(je&&Qt&&(ve=oe[++kt]);++kt<Qt;)ve=xe(ve,oe[kt],kt,oe);return ve}function p2(oe,xe,ve,je){var kt=oe==null?0:oe.length;for(je&&kt&&(ve=oe[--kt]);kt--;)ve=xe(ve,oe[kt],kt,oe);return ve}function Gu(oe,xe){for(var ve=-1,je=oe==null?0:oe.length;++ve<je;)if(xe(oe[ve],ve,oe))return!0;return!1}var g2=Hs("length");function ju(oe){return oe.split("")}function N1(oe){return oe.match(b1)||[]}function m2(oe,xe,ve){var je;return ve(oe,function(kt,Qt,It){if(xe(kt,Qt,It))return je=Qt,!1}),je}function Ul(oe,xe,ve,je){for(var kt=oe.length,Qt=ve+(je?1:-1);je?Qt--:++Qt<kt;)if(xe(oe[Qt],Qt,oe))return Qt;return-1}function Yu(oe,xe,ve){return xe===xe?x2(oe,xe,ve):Ul(oe,Dd,ve)}function Fo(oe,xe,ve,je){for(var kt=ve-1,Qt=oe.length;++kt<Qt;)if(je(oe[kt],xe))return kt;return-1}function Dd(oe){return oe!==oe}function zd(oe,xe){var ve=oe==null?0:oe.length;return ve?Fd(oe,xe)/ve:te}function Hs(oe){return function(xe){return xe==null?n:xe[oe]}}function Bd(oe){return function(xe){return oe==null?n:oe[xe]}}function Ih(oe,xe,ve,je,kt){return kt(oe,function(Qt,It,cn){ve=je?(je=!1,Qt):xe(ve,Qt,It,cn)}),ve}function v2(oe,xe){var ve=oe.length;for(oe.sort(xe);ve--;)oe[ve]=oe[ve].value;return oe}function Fd(oe,xe){for(var ve,je=-1,kt=oe.length;++je<kt;){var Qt=xe(oe[je]);Qt!==n&&(ve=ve===n?Qt:ve+Qt)}return ve}function $d(oe,xe){for(var ve=-1,je=Array(oe);++ve<oe;)je[ve]=xe(ve);return je}function qu(oe,xe){return zn(xe,function(ve){return[ve,oe[ve]]})}function ji(oe){return oe&&oe.slice(0,B1(oe)+1).replace(zu,"")}function kr(oe){return function(xe){return oe(xe)}}function Hd(oe,xe){return zn(xe,function(ve){return oe[ve]})}function Ku(oe,xe){return oe.has(xe)}function $o(oe,xe){for(var ve=-1,je=oe.length;++ve<je&&Yu(xe,oe[ve],0)>-1;);return ve}function Za(oe,xe){for(var ve=oe.length;ve--&&Yu(xe,oe[ve],0)>-1;);return ve}function D1(oe,xe){for(var ve=oe.length,je=0;ve--;)oe[ve]===xe&&++je;return je}var y2=Bd(Mh),Qa=Bd(O1);function Ws(oe){return"\\"+ne[oe]}function Rh(oe,xe){return oe==null?n:oe[xe]}function Gl(oe){return Id.test(oe)}function Nh(oe){return Ah.test(oe)}function S2(oe){for(var xe,ve=[];!(xe=oe.next()).done;)ve.push(xe.value);return ve}function Dh(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je,kt){ve[++xe]=[kt,je]}),ve}function zh(oe,xe){return function(ve){return oe(xe(ve))}}function Ho(oe,xe){for(var ve=-1,je=oe.length,kt=0,Qt=[];++ve<je;){var It=oe[ve];(It===xe||It===h)&&(oe[ve]=h,Qt[kt++]=ve)}return Qt}function Wd(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je){ve[++xe]=je}),ve}function b2(oe){var xe=-1,ve=Array(oe.size);return oe.forEach(function(je){ve[++xe]=[je,je]}),ve}function x2(oe,xe,ve){for(var je=ve-1,kt=oe.length;++je<kt;)if(oe[je]===xe)return je;return-1}function z1(oe,xe,ve){for(var je=ve+1;je--;)if(oe[je]===xe)return je;return je}function xa(oe){return Gl(oe)?Xu(oe):g2(oe)}function Ni(oe){return Gl(oe)?C2(oe):ju(oe)}function B1(oe){for(var xe=oe.length;xe--&&Pd.test(oe.charAt(xe)););return xe}var w2=Bd(U);function Xu(oe){for(var xe=Bo.lastIndex=0;Bo.test(oe);)++xe;return xe}function C2(oe){return oe.match(Bo)||[]}function Vd(oe){return oe.match(Wn)||[]}var po=function oe(xe){xe=xe==null?yt:wa.defaults(yt.Object(),xe,wa.pick(yt,Rd));var ve=xe.Array,je=xe.Date,kt=xe.Error,Qt=xe.Function,It=xe.Math,cn=xe.Object,Ud=xe.RegExp,F1=xe.String,yi=xe.TypeError,Zu=ve.prototype,jl=Qt.prototype,bn=cn.prototype,Jn=xe["__core-js_shared__"],ir=jl.toString,tn=bn.hasOwnProperty,Gd=0,Qu=function(){var c=/[^.]+$/.exec(Jn&&Jn.keys&&Jn.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Bh=bn.toString,ni=ir.call(cn),$1=yt._,H1=Ud("^"+ir.call(tn).replace(Ed,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ju=Nr?xe.Buffer:n,Yr=xe.Symbol,Si=xe.Uint8Array,ec=Ju?Ju.allocUnsafe:n,tc=zh(cn.getPrototypeOf,cn),Fh=cn.create,W1=bn.propertyIsEnumerable,jd=Zu.splice,V1=Yr?Yr.isConcatSpreadable:n,nc=Yr?Yr.iterator:n,Vs=Yr?Yr.toStringTag:n,Yd=function(){try{var c=Ft(cn,"defineProperty");return c({},"",{}),c}catch{}}(),_2=xe.clearTimeout!==yt.clearTimeout&&xe.clearTimeout,k2=je&&je.now!==yt.Date.now&&je.now,qd=xe.setTimeout!==yt.setTimeout&&xe.setTimeout,Kd=It.ceil,Yl=It.floor,rc=cn.getOwnPropertySymbols,E2=Ju?Ju.isBuffer:n,$h=xe.isFinite,P2=Zu.join,T2=zh(cn.keys,cn),mr=It.max,qr=It.min,U1=je.now,A2=xe.parseInt,G1=It.random,L2=Zu.reverse,j1=Ft(xe,"DataView"),ic=Ft(xe,"Map"),Y1=Ft(xe,"Promise"),oc=Ft(xe,"Set"),ac=Ft(xe,"WeakMap"),sc=Ft(cn,"create"),Xd=ac&&new ac,Ja={},vb=df(j1),yb=df(ic),Sb=df(Y1),lc=df(oc),q1=df(ac),uc=Yr?Yr.prototype:n,Zd=uc?uc.valueOf:n,K1=uc?uc.toString:n;function B(c){if(br(c)&&!Rt(c)&&!(c instanceof Gt)){if(c instanceof Yi)return c;if(tn.call(c,"__wrapped__"))return Lk(c)}return new Yi(c)}var ql=function(){function c(){}return function(g){if(!sr(g))return{};if(Fh)return Fh(g);c.prototype=g;var b=new c;return c.prototype=n,b}}();function Qd(){}function Yi(c,g){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=n}B.templateSettings={escape:xh,evaluate:v1,interpolate:Du,variable:"",imports:{_:B}},B.prototype=Qd.prototype,B.prototype.constructor=B,Yi.prototype=ql(Qd.prototype),Yi.prototype.constructor=Yi;function Gt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function Di(){var c=new Gt(this.__wrapped__);return c.__actions__=Ci(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Ci(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Ci(this.__views__),c}function bi(){if(this.__filtered__){var c=new Gt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function M2(){var c=this.__wrapped__.value(),g=this.__dir__,b=Rt(c),L=g<0,D=b?c.length:0,F=JV(0,D,this.__views__),Y=F.start,ee=F.end,ce=ee-Y,Ce=L?ee:Y-1,_e=this.__iteratees__,Ae=_e.length,Ge=0,dt=qr(ce,this.__takeCount__);if(!b||!L&&D==ce&&dt==ce)return Zs(c,this.__actions__);var St=[];e:for(;ce--&&Ge<dt;){Ce+=g;for(var $t=-1,bt=c[Ce];++$t<Ae;){var jt=_e[$t],Jt=jt.iteratee,Xo=jt.type,Qi=Jt(bt);if(Xo==ie)bt=Qi;else if(!Qi){if(Xo==J)continue e;break e}}St[Ge++]=bt}return St}Gt.prototype=ql(Qd.prototype),Gt.prototype.constructor=Gt;function Us(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g<b;){var L=c[g];this.set(L[0],L[1])}}function O2(){this.__data__=sc?sc(null):{},this.size=0}function I2(c){var g=this.has(c)&&delete this.__data__[c];return this.size-=g?1:0,g}function R2(c){var g=this.__data__;if(sc){var b=g[c];return b===l?n:b}return tn.call(g,c)?g[c]:n}function X1(c){var g=this.__data__;return sc?g[c]!==n:tn.call(g,c)}function N2(c,g){var b=this.__data__;return this.size+=this.has(c)?0:1,b[c]=sc&&g===n?l:g,this}Us.prototype.clear=O2,Us.prototype.delete=I2,Us.prototype.get=R2,Us.prototype.has=X1,Us.prototype.set=N2;function Wo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g<b;){var L=c[g];this.set(L[0],L[1])}}function D2(){this.__data__=[],this.size=0}function z2(c){var g=this.__data__,b=Er(g,c);if(b<0)return!1;var L=g.length-1;return b==L?g.pop():jd.call(g,b,1),--this.size,!0}function Z1(c){var g=this.__data__,b=Er(g,c);return b<0?n:g[b][1]}function Q1(c){return Er(this.__data__,c)>-1}function B2(c,g){var b=this.__data__,L=Er(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=Z1,Wo.prototype.has=Q1,Wo.prototype.set=B2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g<b;){var L=c[g];this.set(L[0],L[1])}}function Hh(){this.size=0,this.__data__={hash:new Us,map:new(ic||Wo),string:new Us}}function bb(c){var g=Mt(this,c).delete(c);return this.size-=g?1:0,g}function F2(c){return Mt(this,c).get(c)}function J1(c){return Mt(this,c).has(c)}function $2(c,g){var b=Mt(this,c),L=b.size;return b.set(c,g),this.size+=b.size==L?0:1,this}Vo.prototype.clear=Hh,Vo.prototype.delete=bb,Vo.prototype.get=F2,Vo.prototype.has=J1,Vo.prototype.set=$2;function Ca(c){var g=-1,b=c==null?0:c.length;for(this.__data__=new Vo;++g<b;)this.add(c[g])}function es(c){return this.__data__.set(c,l),this}function xb(c){return this.__data__.has(c)}Ca.prototype.add=Ca.prototype.push=es,Ca.prototype.has=xb;function vr(c){var g=this.__data__=new Wo(c);this.size=g.size}function H2(){this.__data__=new Wo,this.size=0}function Jd(c){var g=this.__data__,b=g.delete(c);return this.size=g.size,b}function ef(c){return this.__data__.get(c)}function Wh(c){return this.__data__.has(c)}function Vh(c,g){var b=this.__data__;if(b instanceof Wo){var L=b.__data__;if(!ic||L.length<i-1)return L.push([c,g]),this.size=++b.size,this;b=this.__data__=new Vo(L)}return b.set(c,g),this.size=b.size,this}vr.prototype.clear=H2,vr.prototype.delete=Jd,vr.prototype.get=ef,vr.prototype.has=Wh,vr.prototype.set=Vh;function eg(c,g){var b=Rt(c),L=!b&&ff(c),D=!b&&!L&&xc(c),F=!b&&!L&&!D&&gp(c),Y=b||L||D||F,ee=Y?$d(c.length,F1):[],ce=ee.length;for(var Ce in c)(g||tn.call(c,Ce))&&!(Y&&(Ce=="length"||D&&(Ce=="offset"||Ce=="parent")||F&&(Ce=="buffer"||Ce=="byteLength"||Ce=="byteOffset")||Jl(Ce,ce)))&&ee.push(Ce);return ee}function cc(c){var g=c.length;return g?c[nf(0,g-1)]:n}function ri(c,g){return j2(Ci(c),Kl(g,0,c.length))}function wb(c){return j2(Ci(c))}function tg(c,g,b){(b!==n&&!as(c[g],b)||b===n&&!(g in c))&&Uo(c,g,b)}function Gs(c,g,b){var L=c[g];(!(tn.call(c,g)&&as(L,b))||b===n&&!(g in c))&&Uo(c,g,b)}function Er(c,g){for(var b=c.length;b--;)if(as(c[b][0],g))return b;return-1}function Cb(c,g,b,L){return ts(c,function(D,F,Y){g(L,D,b(D),Y)}),L}function Qe(c,g){return c&&_a(g,li(g),c)}function dc(c,g){return c&&_a(g,bo(g),c)}function Uo(c,g,b){g=="__proto__"&&Yd?Yd(c,g,{configurable:!0,enumerable:!0,value:b,writable:!0}):c[g]=b}function Uh(c,g){for(var b=-1,L=g.length,D=ve(L),F=c==null;++b<L;)D[b]=F?n:zb(c,g[b]);return D}function Kl(c,g,b){return c===c&&(b!==n&&(c=c<=b?c:b),g!==n&&(c=c>=g?c:g)),c}function ii(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=tU(c),!ee)return Ci(c,Y)}else{var Ae=si(c),Ge=Ae==Tt||Ae==xt;if(xc(c))return Js(c,ee);if(Ae==st||Ae==De||Ge&&!D){if(Y=ce||Ge?{}:xk(c),!ee)return ce?mg(c,dc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Ae])return D?c:{};Y=nU(c,Ae,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Xk(c)?c.forEach(function(bt){Y.add(ii(bt,g,b,bt,c,F))}):qk(c)&&c.forEach(function(bt,jt){Y.set(jt,ii(bt,g,b,jt,c,F))});var St=Ce?ce?me:qo:ce?bo:li,$t=_e?n:St(c);return Vn($t||c,function(bt,jt){$t&&(jt=bt,bt=c[jt]),Gs(Y,jt,ii(bt,g,b,jt,c,F))}),Y}function Gh(c){var g=li(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=cn(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function ng(c,g,b){if(typeof c!="function")throw new yi(a);return xg(function(){c.apply(n,b)},g)}function fc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=zn(g,kr(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=Ku,Y=!1,g=new Ca(g));e:for(;++D<ee;){var _e=c[D],Ae=b==null?_e:b(_e);if(_e=L||_e!==0?_e:0,Y&&Ae===Ae){for(var Ge=Ce;Ge--;)if(g[Ge]===Ae)continue e;ce.push(_e)}else F(g,Ae,L)||ce.push(_e)}return ce}var ts=sf(Yo),Yh=sf(mo,!0);function rg(c,g){var b=!0;return ts(c,function(L,D,F){return b=!!g(L,D,F),b}),b}function yr(c,g,b){for(var L=-1,D=c.length;++L<D;){var F=c[L],Y=g(F);if(Y!=null&&(ee===n?Y===Y&&!Ko(Y):b(Y,ee)))var ee=Y,ce=F}return ce}function Go(c,g,b,L){var D=c.length;for(b=Dt(b),b<0&&(b=-b>D?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:Qk(L);b<L;)c[b++]=g;return c}function jo(c,g){var b=[];return ts(c,function(L,D,F){g(L,D,F)&&b.push(L)}),b}function Pr(c,g,b,L,D){var F=-1,Y=c.length;for(b||(b=iU),D||(D=[]);++F<Y;){var ee=c[F];g>0&&b(ee)?g>1?Pr(ee,g-1,b,L,D):ba(D,ee):L||(D[D.length]=ee)}return D}var qh=el(),go=el(!0);function Yo(c,g){return c&&qh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function Kh(c,g){return ho(g,function(b){return eu(c[b])})}function js(c,g){g=Qs(g,c);for(var b=0,L=g.length;c!=null&&b<L;)c=c[nl(g[b++])];return b&&b==L?c:n}function ig(c,g,b){var L=g(c);return Rt(c)?L:ba(L,b(c))}function oi(c){return c==null?c===n?Oe:At:Vs&&Vs in cn(c)?zr(c):dU(c)}function Xh(c,g){return c>g}function Zh(c,g){return c!=null&&tn.call(c,g)}function Qh(c,g){return c!=null&&g in cn(c)}function Jh(c,g,b){return c>=qr(g,b)&&c<mr(g,b)}function hc(c,g,b){for(var L=b?Oh:Ri,D=c[0].length,F=c.length,Y=F,ee=ve(F),ce=1/0,Ce=[];Y--;){var _e=c[Y];Y&&g&&(_e=zn(_e,kr(g))),ce=qr(_e.length,ce),ee[Y]=!b&&(g||D>=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Ae=-1,Ge=ee[0];e:for(;++Ae<D&&Ce.length<ce;){var dt=_e[Ae],St=g?g(dt):dt;if(dt=b||dt!==0?dt:0,!(Ge?Ku(Ge,St):L(Ce,St,b))){for(Y=F;--Y;){var $t=ee[Y];if(!($t?Ku($t,St):L(c[Y],St,b)))continue e}Ge&&Ge.push(St),Ce.push(dt)}}return Ce}function ep(c,g,b,L){return Yo(c,function(D,F,Y){g(L,b(D),F,Y)}),L}function ns(c,g,b){g=Qs(g,c),c=kk(c,g);var L=c==null?c:c[nl(ka(g))];return L==null?n:vi(L,c,b)}function tp(c){return br(c)&&oi(c)==De}function og(c){return br(c)&&oi(c)==Yt}function ag(c){return br(c)&&oi(c)==tt}function pc(c,g,b,L,D){return c===g?!0:c==null||g==null||!br(c)&&!br(g)?c!==c&&g!==g:sg(c,g,b,L,pc,D)}function sg(c,g,b,L,D,F){var Y=Rt(c),ee=Rt(g),ce=Y?$e:si(c),Ce=ee?$e:si(g);ce=ce==De?st:ce,Ce=Ce==De?st:Ce;var _e=ce==st,Ae=Ce==st,Ge=ce==Ce;if(Ge&&xc(c)){if(!xc(g))return!1;Y=!0,_e=!1}if(Ge&&!_e)return F||(F=new vr),Y||gp(c)?Ye(c,g,b,L,D,F):Bn(c,g,ce,b,L,D,F);if(!(b&S)){var dt=_e&&tn.call(c,"__wrapped__"),St=Ae&&tn.call(g,"__wrapped__");if(dt||St){var $t=dt?c.value():c,bt=St?g.value():g;return F||(F=new vr),D($t,bt,b,L,F)}}return Ge?(F||(F=new vr),En(c,g,b,L,D,F)):!1}function _b(c){return br(c)&&si(c)==Le}function gc(c,g,b,L){var D=b.length,F=D,Y=!L;if(c==null)return!F;for(c=cn(c);D--;){var ee=b[D];if(Y&&ee[2]?ee[1]!==c[ee[0]]:!(ee[0]in c))return!1}for(;++D<F;){ee=b[D];var ce=ee[0],Ce=c[ce],_e=ee[1];if(Y&&ee[2]){if(Ce===n&&!(ce in c))return!1}else{var Ae=new vr;if(L)var Ge=L(Ce,_e,ce,c,g,Ae);if(!(Ge===n?pc(_e,Ce,S|w,L,Ae):Ge))return!1}}return!0}function np(c){if(!sr(c)||aU(c))return!1;var g=eu(c)?H1:E1;return g.test(df(c))}function or(c){return br(c)&&oi(c)==Ct}function Bt(c){return br(c)&&si(c)==Ut}function Dr(c){return br(c)&&Q2(c.length)&&!!un[oi(c)]}function ar(c){return typeof c=="function"?c:c==null?xo:typeof c=="object"?Rt(c)?qs(c[0],c[1]):mc(c):uE(c)}function Tr(c){if(!bg(c))return T2(c);var g=[];for(var b in cn(c))tn.call(c,b)&&b!="constructor"&&g.push(b);return g}function qi(c){if(!sr(c))return cU(c);var g=bg(c),b=[];for(var L in c)L=="constructor"&&(g||!tn.call(c,L))||b.push(L);return b}function Ys(c,g){return c<g}function Sr(c,g){var b=-1,L=So(c)?ve(c.length):[];return ts(c,function(D,F,Y){L[++b]=g(D,F,Y)}),L}function mc(c){var g=Et(c);return g.length==1&&g[0][2]?Ck(g[0][0],g[0][1]):function(b){return b===c||gc(b,c,g)}}function qs(c,g){return Pb(c)&&wk(g)?Ck(nl(c),g):function(b){var L=zb(b,c);return L===n&&L===g?Bb(b,c):pc(g,L,S|w)}}function Xl(c,g,b,L,D){c!==g&&qh(g,function(F,Y){if(D||(D=new vr),sr(F))lg(c,g,Y,b,Xl,L,D);else{var ee=L?L(Ab(c,Y),F,Y+"",c,g,D):n;ee===n&&(ee=F),tg(c,Y,ee)}},bo)}function lg(c,g,b,L,D,F,Y){var ee=Ab(c,b),ce=Ab(g,b),Ce=Y.get(ce);if(Ce){tg(c,b,Ce);return}var _e=F?F(ee,ce,b+"",c,g,Y):n,Ae=_e===n;if(Ae){var Ge=Rt(ce),dt=!Ge&&xc(ce),St=!Ge&&!dt&&gp(ce);_e=ce,Ge||dt||St?Rt(ee)?_e=ee:Lr(ee)?_e=Ci(ee):dt?(Ae=!1,_e=Js(ce,!0)):St?(Ae=!1,_e=V2(ce,!0)):_e=[]:wg(ce)||ff(ce)?(_e=ee,ff(ee)?_e=Jk(ee):(!sr(ee)||eu(ee))&&(_e=xk(ce))):Ae=!1}Ae&&(Y.set(ce,_e),D(_e,ce,L,F,Y),Y.delete(ce)),tg(c,b,_e)}function vc(c,g){var b=c.length;if(!!b)return g+=g<0?b:0,Jl(g,b)?c[g]:n}function xi(c,g,b){g.length?g=zn(g,function(F){return Rt(F)?function(Y){return js(Y,F.length===1?F[0]:F)}:F}):g=[xo];var L=-1;g=zn(g,kr(Te()));var D=Sr(c,function(F,Y,ee){var ce=zn(g,function(Ce){return Ce(F)});return{criteria:ce,index:++L,value:F}});return v2(D,function(F,Y){return Eb(F,Y,b)})}function ug(c,g){return rp(c,g,function(b,L){return Bb(c,L)})}function rp(c,g,b){for(var L=-1,D=g.length,F={};++L<D;){var Y=g[L],ee=js(c,Y);b(ee,Y)&&Zl(F,Qs(Y,c),ee)}return F}function rs(c){return function(g){return js(g,c)}}function Ks(c,g,b,L){var D=L?Fo:Yu,F=-1,Y=g.length,ee=c;for(c===g&&(g=Ci(g)),b&&(ee=zn(c,kr(b)));++F<Y;)for(var ce=0,Ce=g[F],_e=b?b(Ce):Ce;(ce=D(ee,_e,ce,L))>-1;)ee!==c&&jd.call(ee,ce,1),jd.call(c,ce,1);return c}function tf(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Jl(D)?jd.call(c,D,1):up(c,D)}}return c}function nf(c,g){return c+Yl(G1()*(g-c+1))}function Xs(c,g,b,L){for(var D=-1,F=mr(Kd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function yc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Yl(g/2),g&&(c+=c);while(g);return b}function _t(c,g){return Lb(_k(c,g,xo),c+"")}function ip(c){return cc(mp(c))}function rf(c,g){var b=mp(c);return j2(b,Kl(g,0,b.length))}function Zl(c,g,b,L){if(!sr(c))return c;g=Qs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++D<F;){var ce=nl(g[D]),Ce=b;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return c;if(D!=Y){var _e=ee[ce];Ce=L?L(_e,ce,ee):n,Ce===n&&(Ce=sr(_e)?_e:Jl(g[D+1])?[]:{})}Gs(ee,ce,Ce),ee=ee[ce]}return c}var of=Xd?function(c,g){return Xd.set(c,g),c}:xo,op=Yd?function(c,g){return Yd(c,"toString",{configurable:!0,enumerable:!1,value:$b(g),writable:!0})}:xo;function ai(c){return j2(mp(c))}function Ar(c,g,b){var L=-1,D=c.length;g<0&&(g=-g>D?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L<D;)F[L]=c[L+g];return F}function vo(c,g){var b;return ts(c,function(L,D,F){return b=g(L,D,F),!b}),!!b}function Kr(c,g,b){var L=0,D=c==null?L:c.length;if(typeof g=="number"&&g===g&&D<=ye){for(;L<D;){var F=L+D>>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y<g)?L=F+1:D=F}return D}return ap(c,g,xo,b)}function ap(c,g,b,L){var D=0,F=c==null?0:c.length;if(F===0)return 0;g=b(g);for(var Y=g!==g,ee=g===null,ce=Ko(g),Ce=g===n;D<F;){var _e=Yl((D+F)/2),Ae=b(c[_e]),Ge=Ae!==n,dt=Ae===null,St=Ae===Ae,$t=Ko(Ae);if(Y)var bt=L||St;else Ce?bt=St&&(L||Ge):ee?bt=St&&Ge&&(L||!dt):ce?bt=St&&Ge&&!dt&&(L||!$t):dt||$t?bt=!1:bt=L?Ae<=g:Ae<g;bt?D=_e+1:F=_e}return qr(F,he)}function sp(c,g){for(var b=-1,L=c.length,D=0,F=[];++b<L;){var Y=c[b],ee=g?g(Y):Y;if(!b||!as(ee,ce)){var ce=ee;F[D++]=Y===0?0:Y}}return F}function lp(c){return typeof c=="number"?c:Ko(c)?te:+c}function Ki(c){if(typeof c=="string")return c;if(Rt(c))return zn(c,Ki)+"";if(Ko(c))return K1?K1.call(c):"";var g=c+"";return g=="0"&&1/c==-K?"-0":g}function wi(c,g,b){var L=-1,D=Ri,F=c.length,Y=!0,ee=[],ce=ee;if(b)Y=!1,D=Oh;else if(F>=i){var Ce=g?null:W(c);if(Ce)return Wd(Ce);Y=!1,D=Ku,ce=new Ca}else ce=g?[]:ee;e:for(;++L<F;){var _e=c[L],Ae=g?g(_e):_e;if(_e=b||_e!==0?_e:0,Y&&Ae===Ae){for(var Ge=ce.length;Ge--;)if(ce[Ge]===Ae)continue e;g&&ce.push(Ae),ee.push(_e)}else D(ce,Ae,b)||(ce!==ee&&ce.push(Ae),ee.push(_e))}return ee}function up(c,g){return g=Qs(g,c),c=kk(c,g),c==null||delete c[nl(ka(g))]}function cg(c,g,b,L){return Zl(c,g,b(js(c,g)),L)}function Sc(c,g,b,L){for(var D=c.length,F=L?D:-1;(L?F--:++F<D)&&g(c[F],F,c););return b?Ar(c,L?0:F,L?F+1:D):Ar(c,L?F+1:0,L?D:F)}function Zs(c,g){var b=c;return b instanceof Gt&&(b=b.value()),Nd(g,function(L,D){return D.func.apply(D.thisArg,ba([L],D.args))},b)}function cp(c,g,b){var L=c.length;if(L<2)return L?wi(c[0]):[];for(var D=-1,F=ve(L);++D<L;)for(var Y=c[D],ee=-1;++ee<L;)ee!=D&&(F[D]=fc(F[D]||Y,c[ee],g,b));return wi(Pr(F,1),g,b)}function dg(c,g,b){for(var L=-1,D=c.length,F=g.length,Y={};++L<D;){var ee=L<F?g[L]:n;b(Y,c[L],ee)}return Y}function af(c){return Lr(c)?c:[]}function bc(c){return typeof c=="function"?c:xo}function Qs(c,g){return Rt(c)?c:Pb(c,g)?[c]:Ak(xn(c))}var kb=_t;function is(c,g,b){var L=c.length;return b=b===n?L:b,!g&&b>=L?c:Ar(c,g,b)}var fg=_2||function(c){return yt.clearTimeout(c)};function Js(c,g){if(g)return c.slice();var b=c.length,L=ec?ec(b):new c.constructor(b);return c.copy(L),L}function hg(c){var g=new c.constructor(c.byteLength);return new Si(g).set(new Si(c)),g}function Ql(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,Ya.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Zd?cn(Zd.call(c)):{}}function V2(c,g){var b=g?hg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function pg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c<g||Ce&&b&&D&&!L&&!F||ee&&b&&D||!Y&&D||!ce)return-1}return 0}function Eb(c,g,b){for(var L=-1,D=c.criteria,F=g.criteria,Y=D.length,ee=b.length;++L<Y;){var ce=pg(D[L],F[L]);if(ce){if(L>=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Ae=!L;++ee<ce;)_e[ee]=g[ee];for(;++D<Y;)(Ae||D<F)&&(_e[b[D]]=c[D]);for(;Ce--;)_e[ee++]=c[D++];return _e}function gg(c,g,b,L){for(var D=-1,F=c.length,Y=-1,ee=b.length,ce=-1,Ce=g.length,_e=mr(F-ee,0),Ae=ve(_e+Ce),Ge=!L;++D<_e;)Ae[D]=c[D];for(var dt=D;++ce<Ce;)Ae[dt+ce]=g[ce];for(;++Y<ee;)(Ge||D<F)&&(Ae[dt+b[Y]]=c[D++]);return Ae}function Ci(c,g){var b=-1,L=c.length;for(g||(g=ve(L));++b<L;)g[b]=c[b];return g}function _a(c,g,b,L){var D=!b;b||(b={});for(var F=-1,Y=g.length;++F<Y;){var ee=g[F],ce=L?L(b[ee],c[ee],ee,b,c):n;ce===n&&(ce=c[ee]),D?Uo(b,ee,ce):Gs(b,ee,ce)}return b}function yo(c,g){return _a(c,qt(c),g)}function mg(c,g){return _a(c,os(c),g)}function dp(c,g){return function(b,L){var D=Rt(b)?R1:Cb,F=g?g():{};return D(b,c,Te(L,2),F)}}function Xi(c){return _t(function(g,b){var L=-1,D=b.length,F=D>1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Zi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=cn(g);++L<D;){var ee=b[L];ee&&c(g,ee,L,F)}return g})}function sf(c,g){return function(b,L){if(b==null)return b;if(!So(b))return c(b,L);for(var D=b.length,F=g?D:-1,Y=cn(b);(g?F--:++F<D)&&L(Y[F],F,Y)!==!1;);return b}}function el(c){return function(g,b,L){for(var D=-1,F=cn(g),Y=L(g),ee=Y.length;ee--;){var ce=Y[c?ee:++D];if(b(F[ce],ce,F)===!1)break}return g}}function fp(c,g,b){var L=g&P,D=lf(c);function F(){var Y=this&&this!==yt&&this instanceof F?D:c;return Y.apply(L?b:this,arguments)}return F}function hp(c){return function(g){g=xn(g);var b=Gl(g)?Ni(g):n,L=b?b[0]:g.charAt(0),D=b?is(b,1).join(""):g.slice(1);return L[c]()+D}}function tl(c){return function(g){return Nd(sE(aE(g).replace(Uu,"")),c,"")}}function lf(c){return function(){var g=arguments;switch(g.length){case 0:return new c;case 1:return new c(g[0]);case 2:return new c(g[0],g[1]);case 3:return new c(g[0],g[1],g[2]);case 4:return new c(g[0],g[1],g[2],g[3]);case 5:return new c(g[0],g[1],g[2],g[3],g[4]);case 6:return new c(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new c(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var b=ql(c.prototype),L=c.apply(b,g);return sr(L)?L:b}}function G2(c,g,b){var L=lf(c);function D(){for(var F=arguments.length,Y=ve(F),ee=F,ce=Ve(D);ee--;)Y[ee]=arguments[ee];var Ce=F<3&&Y[0]!==ce&&Y[F-1]!==ce?[]:Ho(Y,ce);if(F-=Ce.length,F<b)return A(c,g,uf,D.placeholder,n,Y,Ce,n,n,b-F);var _e=this&&this!==yt&&this instanceof D?L:c;return vi(_e,this,Y)}return D}function vg(c){return function(g,b,L){var D=cn(g);if(!So(g)){var F=Te(b,3);g=li(g),b=function(ee){return F(D[ee],ee,D)}}var Y=c(g,b,L);return Y>-1?D[F?g[Y]:Y]:n}}function yg(c){return er(function(g){var b=g.length,L=b,D=Yi.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new yi(a);if(D&&!Y&&be(F)=="wrapper")var Y=new Yi([],!0)}for(L=Y?L:b;++L<b;){F=g[L];var ee=be(F),ce=ee=="wrapper"?ue(F):n;ce&&Tb(ce[0])&&ce[1]==(N|T|I|z)&&!ce[4].length&&ce[9]==1?Y=Y[be(ce[0])].apply(Y,ce[3]):Y=F.length==1&&Tb(F)?Y[ee]():Y.thru(F)}return function(){var Ce=arguments,_e=Ce[0];if(Y&&Ce.length==1&&Rt(_e))return Y.plant(_e).value();for(var Ae=0,Ge=b?g[Ae].apply(this,Ce):_e;++Ae<b;)Ge=g[Ae].call(this,Ge);return Ge}})}function uf(c,g,b,L,D,F,Y,ee,ce,Ce){var _e=g&N,Ae=g&P,Ge=g&E,dt=g&(T|M),St=g&H,$t=Ge?n:lf(c);function bt(){for(var jt=arguments.length,Jt=ve(jt),Xo=jt;Xo--;)Jt[Xo]=arguments[Xo];if(dt)var Qi=Ve(bt),Zo=D1(Jt,Qi);if(L&&(Jt=U2(Jt,L,D,dt)),F&&(Jt=gg(Jt,F,Y,dt)),jt-=Zo,dt&&jt<Ce){var Mr=Ho(Jt,Qi);return A(c,g,uf,bt.placeholder,b,Jt,Mr,ee,ce,Ce-jt)}var ss=Ae?b:this,nu=Ge?ss[c]:c;return jt=Jt.length,ee?Jt=fU(Jt,ee):St&&jt>1&&Jt.reverse(),_e&&ce<jt&&(Jt.length=ce),this&&this!==yt&&this instanceof bt&&(nu=$t||lf(nu)),nu.apply(ss,Jt)}return bt}function cf(c,g){return function(b,L){return ep(b,c,g(L),{})}}function pp(c,g){return function(b,L){var D;if(b===n&&L===n)return g;if(b!==n&&(D=b),L!==n){if(D===n)return L;typeof b=="string"||typeof L=="string"?(b=Ki(b),L=Ki(L)):(b=lp(b),L=lp(L)),D=c(b,L)}return D}}function Sg(c){return er(function(g){return g=zn(g,kr(Te())),_t(function(b){var L=this;return c(g,function(D){return vi(D,L,b)})})})}function d(c,g){g=g===n?" ":Ki(g);var b=g.length;if(b<2)return b?yc(g,c):g;var L=yc(g,Kd(c/xa(g)));return Gl(g)?is(Ni(L),0,c).join(""):L.slice(0,c)}function f(c,g,b,L){var D=g&P,F=lf(c);function Y(){for(var ee=-1,ce=arguments.length,Ce=-1,_e=L.length,Ae=ve(_e+ce),Ge=this&&this!==yt&&this instanceof Y?F:c;++Ce<_e;)Ae[Ce]=L[Ce];for(;ce--;)Ae[Ce++]=arguments[++ee];return vi(Ge,D?b:this,Ae)}return Y}function y(c){return function(g,b,L){return L&&typeof L!="number"&&Zi(g,b,L)&&(b=L=n),g=tu(g),b===n?(b=g,g=0):b=tu(b),L=L===n?g<b?1:-1:tu(L),Xs(g,b,L,c)}}function k(c){return function(g,b){return typeof g=="string"&&typeof b=="string"||(g=Ea(g),b=Ea(b)),c(g,b)}}function A(c,g,b,L,D,F,Y,ee,ce,Ce){var _e=g&T,Ae=_e?Y:n,Ge=_e?n:Y,dt=_e?F:n,St=_e?n:F;g|=_e?I:R,g&=~(_e?R:I),g&_||(g&=~(P|E));var $t=[c,g,D,dt,Ae,St,Ge,ee,ce,Ce],bt=b.apply(n,$t);return Tb(c)&&Ek(bt,$t),bt.placeholder=L,Pk(bt,c,g)}function O(c){var g=It[c];return function(b,L){if(b=Ea(b),L=L==null?0:qr(Dt(L),292),L&&$h(b)){var D=(xn(b)+"e").split("e"),F=g(D[0]+"e"+(+D[1]+L));return D=(xn(F)+"e").split("e"),+(D[0]+"e"+(+D[1]-L))}return g(b)}}var W=oc&&1/Wd(new oc([,-0]))[1]==K?function(c){return new oc(c)}:Vb;function se(c){return function(g){var b=si(g);return b==Le?Dh(g):b==Ut?b2(g):qu(g,c(g))}}function pe(c,g,b,L,D,F,Y,ee){var ce=g&E;if(!ce&&typeof c!="function")throw new yi(a);var Ce=L?L.length:0;if(Ce||(g&=~(I|R),L=D=n),Y=Y===n?Y:mr(Dt(Y),0),ee=ee===n?ee:Dt(ee),Ce-=D?D.length:0,g&R){var _e=L,Ae=D;L=D=n}var Ge=ce?n:ue(c),dt=[c,g,b,L,D,_e,Ae,F,Y,ee];if(Ge&&uU(dt,Ge),c=dt[0],g=dt[1],b=dt[2],L=dt[3],D=dt[4],ee=dt[9]=dt[9]===n?ce?0:c.length:mr(dt[9]-Ce,0),!ee&&g&(T|M)&&(g&=~(T|M)),!g||g==P)var St=fp(c,g,b);else g==T||g==M?St=G2(c,g,ee):(g==I||g==(P|I))&&!D.length?St=f(c,g,b,L):St=uf.apply(n,dt);var $t=Ge?of:Ek;return Pk($t(St,dt),c,g)}function Re(c,g,b,L){return c===n||as(c,bn[b])&&!tn.call(L,b)?g:c}function rt(c,g,b,L,D,F){return sr(c)&&sr(g)&&(F.set(g,c),Xl(c,g,n,rt,F),F.delete(g)),c}function Lt(c){return wg(c)?n:c}function Ye(c,g,b,L,D,F){var Y=b&S,ee=c.length,ce=g.length;if(ee!=ce&&!(Y&&ce>ee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Ae=-1,Ge=!0,dt=b&w?new Ca:n;for(F.set(c,g),F.set(g,c);++Ae<ee;){var St=c[Ae],$t=g[Ae];if(L)var bt=Y?L($t,St,Ae,g,c,F):L(St,$t,Ae,c,g,F);if(bt!==n){if(bt)continue;Ge=!1;break}if(dt){if(!Gu(g,function(jt,Jt){if(!Ku(dt,Jt)&&(St===jt||D(St,jt,b,L,F)))return dt.push(Jt)})){Ge=!1;break}}else if(!(St===$t||D(St,$t,b,L,F))){Ge=!1;break}}return F.delete(c),F.delete(g),Ge}function Bn(c,g,b,L,D,F,Y){switch(b){case ke:if(c.byteLength!=g.byteLength||c.byteOffset!=g.byteOffset)return!1;c=c.buffer,g=g.buffer;case Yt:return!(c.byteLength!=g.byteLength||!F(new Si(c),new Si(g)));case qe:case tt:case at:return as(+c,+g);case nt:return c.name==g.name&&c.message==g.message;case Ct:case sn:return c==g+"";case Le:var ee=Dh;case Ut:var ce=L&S;if(ee||(ee=Wd),c.size!=g.size&&!ce)return!1;var Ce=Y.get(c);if(Ce)return Ce==g;L|=w,Y.set(c,g);var _e=Ye(ee(c),ee(g),L,D,F,Y);return Y.delete(c),_e;case yn:if(Zd)return Zd.call(c)==Zd.call(g)}return!1}function En(c,g,b,L,D,F){var Y=b&S,ee=qo(c),ce=ee.length,Ce=qo(g),_e=Ce.length;if(ce!=_e&&!Y)return!1;for(var Ae=ce;Ae--;){var Ge=ee[Ae];if(!(Y?Ge in g:tn.call(g,Ge)))return!1}var dt=F.get(c),St=F.get(g);if(dt&&St)return dt==g&&St==c;var $t=!0;F.set(c,g),F.set(g,c);for(var bt=Y;++Ae<ce;){Ge=ee[Ae];var jt=c[Ge],Jt=g[Ge];if(L)var Xo=Y?L(Jt,jt,Ge,g,c,F):L(jt,Jt,Ge,c,g,F);if(!(Xo===n?jt===Jt||D(jt,Jt,b,L,F):Xo)){$t=!1;break}bt||(bt=Ge=="constructor")}if($t&&!bt){var Qi=c.constructor,Zo=g.constructor;Qi!=Zo&&"constructor"in c&&"constructor"in g&&!(typeof Qi=="function"&&Qi instanceof Qi&&typeof Zo=="function"&&Zo instanceof Zo)&&($t=!1)}return F.delete(c),F.delete(g),$t}function er(c){return Lb(_k(c,n,Ik),c+"")}function qo(c){return ig(c,li,qt)}function me(c){return ig(c,bo,os)}var ue=Xd?function(c){return Xd.get(c)}:Vb;function be(c){for(var g=c.name+"",b=Ja[g],L=tn.call(Ja,g)?b.length:0;L--;){var D=b[L],F=D.func;if(F==null||F==c)return D.name}return g}function Ve(c){var g=tn.call(B,"placeholder")?B:c;return g.placeholder}function Te(){var c=B.iteratee||Hb;return c=c===Hb?ar:c,arguments.length?c(arguments[0],arguments[1]):c}function Mt(c,g){var b=c.__data__;return oU(g)?b[typeof g=="string"?"string":"hash"]:b.map}function Et(c){for(var g=li(c),b=g.length;b--;){var L=g[b],D=c[L];g[b]=[L,D,wk(D)]}return g}function Ft(c,g){var b=Rh(c,g);return np(b)?b:n}function zr(c){var g=tn.call(c,Vs),b=c[Vs];try{c[Vs]=n;var L=!0}catch{}var D=Bh.call(c);return L&&(g?c[Vs]=b:delete c[Vs]),D}var qt=rc?function(c){return c==null?[]:(c=cn(c),ho(rc(c),function(g){return W1.call(c,g)}))}:Ub,os=rc?function(c){for(var g=[];c;)ba(g,qt(c)),c=tc(c);return g}:Ub,si=oi;(j1&&si(new j1(new ArrayBuffer(1)))!=ke||ic&&si(new ic)!=Le||Y1&&si(Y1.resolve())!=gt||oc&&si(new oc)!=Ut||ac&&si(new ac)!=et)&&(si=function(c){var g=oi(c),b=g==st?c.constructor:n,L=b?df(b):"";if(L)switch(L){case vb:return ke;case yb:return Le;case Sb:return gt;case lc:return Ut;case q1:return et}return g});function JV(c,g,b){for(var L=-1,D=b.length;++L<D;){var F=b[L],Y=F.size;switch(F.type){case"drop":c+=Y;break;case"dropRight":g-=Y;break;case"take":g=qr(g,c+Y);break;case"takeRight":c=mr(c,g-Y);break}}return{start:c,end:g}}function eU(c){var g=c.match(Is);return g?g[1].split(Bu):[]}function bk(c,g,b){g=Qs(g,c);for(var L=-1,D=g.length,F=!1;++L<D;){var Y=nl(g[L]);if(!(F=c!=null&&b(c,Y)))break;c=c[Y]}return F||++L!=D?F:(D=c==null?0:c.length,!!D&&Q2(D)&&Jl(Y,D)&&(Rt(c)||ff(c)))}function tU(c){var g=c.length,b=new c.constructor(g);return g&&typeof c[0]=="string"&&tn.call(c,"index")&&(b.index=c.index,b.input=c.input),b}function xk(c){return typeof c.constructor=="function"&&!bg(c)?ql(tc(c)):{}}function nU(c,g,b){var L=c.constructor;switch(g){case Yt:return hg(c);case qe:case tt:return new L(+c);case ke:return Ql(c,b);case Ot:case Ne:case ut:case ln:case Nn:case We:case ht:case it:case Nt:return V2(c,b);case Le:return new L;case at:case sn:return new L(c);case Ct:return W2(c);case Ut:return new L;case yn:return Un(c)}}function rU(c,g){var b=g.length;if(!b)return c;var L=b-1;return g[L]=(b>1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(S1,`{
|
|
/* [wrapped with `+g+`] */
|
|
`)}function iU(c){return Rt(c)||ff(c)||!!(V1&&c&&c[V1])}function Jl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&T1.test(c))&&c>-1&&c%1==0&&c<g}function Zi(c,g,b){if(!sr(b))return!1;var L=typeof g;return(L=="number"?So(b)&&Jl(g,b.length):L=="string"&&g in b)?as(b[g],c):!1}function Pb(c,g){if(Rt(c))return!1;var b=typeof c;return b=="number"||b=="symbol"||b=="boolean"||c==null||Ko(c)?!0:Ch.test(c)||!wh.test(c)||g!=null&&c in cn(g)}function oU(c){var g=typeof c;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?c!=="__proto__":c===null}function Tb(c){var g=be(c),b=B[g];if(typeof b!="function"||!(g in Gt.prototype))return!1;if(c===b)return!0;var L=ue(b);return!!L&&c===L[0]}function aU(c){return!!Qu&&Qu in c}var sU=Jn?eu:Gb;function bg(c){var g=c&&c.constructor,b=typeof g=="function"&&g.prototype||bn;return c===b}function wk(c){return c===c&&!sr(c)}function Ck(c,g){return function(b){return b==null?!1:b[c]===g&&(g!==n||c in cn(b))}}function lU(c){var g=X2(c,function(L){return b.size===u&&b.clear(),L}),b=g.cache;return g}function uU(c,g){var b=c[1],L=g[1],D=b|L,F=D<(P|E|N),Y=L==N&&b==T||L==N&&b==z&&c[7].length<=g[8]||L==(N|z)&&g[7].length<=g[8]&&b==T;if(!(F||Y))return c;L&P&&(c[2]=g[2],D|=b&P?0:_);var ee=g[3];if(ee){var ce=c[3];c[3]=ce?U2(ce,ee,g[4]):ee,c[4]=ce?Ho(c[3],h):g[4]}return ee=g[5],ee&&(ce=c[5],c[5]=ce?gg(ce,ee,g[6]):ee,c[6]=ce?Ho(c[5],h):g[6]),ee=g[7],ee&&(c[7]=ee),L&N&&(c[8]=c[8]==null?g[8]:qr(c[8],g[8])),c[9]==null&&(c[9]=g[9]),c[0]=g[0],c[1]=D,c}function cU(c){var g=[];if(c!=null)for(var b in cn(c))g.push(b);return g}function dU(c){return Bh.call(c)}function _k(c,g,b){return g=mr(g===n?c.length-1:g,0),function(){for(var L=arguments,D=-1,F=mr(L.length-g,0),Y=ve(F);++D<F;)Y[D]=L[g+D];D=-1;for(var ee=ve(g+1);++D<g;)ee[D]=L[D];return ee[g]=b(Y),vi(c,this,ee)}}function kk(c,g){return g.length<2?c:js(c,Ar(g,0,-1))}function fU(c,g){for(var b=c.length,L=qr(g.length,b),D=Ci(c);L--;){var F=g[L];c[L]=Jl(F,b)?D[F]:n}return c}function Ab(c,g){if(!(g==="constructor"&&typeof c[g]=="function")&&g!="__proto__")return c[g]}var Ek=Tk(of),xg=qd||function(c,g){return yt.setTimeout(c,g)},Lb=Tk(op);function Pk(c,g,b){var L=g+"";return Lb(c,rU(L,hU(eU(L),b)))}function Tk(c){var g=0,b=0;return function(){var L=U1(),D=V-(L-b);if(b=L,D>0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b<g;){var F=nf(b,D),Y=c[F];c[F]=c[b],c[b]=Y}return c.length=g,c}var Ak=lU(function(c){var g=[];return c.charCodeAt(0)===46&&g.push(""),c.replace(Ro,function(b,L,D,F){g.push(D?F.replace(w1,"$1"):L||b)}),g});function nl(c){if(typeof c=="string"||Ko(c))return c;var g=c+"";return g=="0"&&1/c==-K?"-0":g}function df(c){if(c!=null){try{return ir.call(c)}catch{}try{return c+""}catch{}}return""}function hU(c,g){return Vn(Se,function(b){var L="_."+b[0];g&b[1]&&!Ri(c,L)&&c.push(L)}),c.sort()}function Lk(c){if(c instanceof Gt)return c.clone();var g=new Yi(c.__wrapped__,c.__chain__);return g.__actions__=Ci(c.__actions__),g.__index__=c.__index__,g.__values__=c.__values__,g}function pU(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=mr(Dt(g),0);var L=c==null?0:c.length;if(!L||g<1)return[];for(var D=0,F=0,Y=ve(Kd(L/g));D<L;)Y[F++]=Ar(c,D,D+=g);return Y}function gU(c){for(var g=-1,b=c==null?0:c.length,L=0,D=[];++g<b;){var F=c[g];F&&(D[L++]=F)}return D}function mU(){var c=arguments.length;if(!c)return[];for(var g=ve(c-1),b=arguments[0],L=c;L--;)g[L-1]=arguments[L];return ba(Rt(b)?Ci(b):[b],Pr(g,1))}var vU=_t(function(c,g){return Lr(c)?fc(c,Pr(g,1,Lr,!0)):[]}),yU=_t(function(c,g){var b=ka(g);return Lr(b)&&(b=n),Lr(c)?fc(c,Pr(g,1,Lr,!0),Te(b,2)):[]}),SU=_t(function(c,g){var b=ka(g);return Lr(b)&&(b=n),Lr(c)?fc(c,Pr(g,1,Lr,!0),n,b):[]});function bU(c,g,b){var L=c==null?0:c.length;return L?(g=b||g===n?1:Dt(g),Ar(c,g<0?0:g,L)):[]}function xU(c,g,b){var L=c==null?0:c.length;return L?(g=b||g===n?1:Dt(g),g=L-g,Ar(c,0,g<0?0:g)):[]}function wU(c,g){return c&&c.length?Sc(c,Te(g,3),!0,!0):[]}function CU(c,g){return c&&c.length?Sc(c,Te(g,3),!0):[]}function _U(c,g,b,L){var D=c==null?0:c.length;return D?(b&&typeof b!="number"&&Zi(c,g,b)&&(b=0,L=D),Go(c,g,b,L)):[]}function Mk(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=b==null?0:Dt(b);return D<0&&(D=mr(L+D,0)),Ul(c,Te(g,3),D)}function Ok(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=L-1;return b!==n&&(D=Dt(b),D=b<0?mr(L+D,0):qr(D,L-1)),Ul(c,Te(g,3),D,!0)}function Ik(c){var g=c==null?0:c.length;return g?Pr(c,1):[]}function kU(c){var g=c==null?0:c.length;return g?Pr(c,K):[]}function EU(c,g){var b=c==null?0:c.length;return b?(g=g===n?1:Dt(g),Pr(c,g)):[]}function PU(c){for(var g=-1,b=c==null?0:c.length,L={};++g<b;){var D=c[g];L[D[0]]=D[1]}return L}function Rk(c){return c&&c.length?c[0]:n}function TU(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=b==null?0:Dt(b);return D<0&&(D=mr(L+D,0)),Yu(c,g,D)}function AU(c){var g=c==null?0:c.length;return g?Ar(c,0,-1):[]}var LU=_t(function(c){var g=zn(c,af);return g.length&&g[0]===c[0]?hc(g):[]}),MU=_t(function(c){var g=ka(c),b=zn(c,af);return g===ka(b)?g=n:b.pop(),b.length&&b[0]===c[0]?hc(b,Te(g,2)):[]}),OU=_t(function(c){var g=ka(c),b=zn(c,af);return g=typeof g=="function"?g:n,g&&b.pop(),b.length&&b[0]===c[0]?hc(b,n,g):[]});function IU(c,g){return c==null?"":P2.call(c,g)}function ka(c){var g=c==null?0:c.length;return g?c[g-1]:n}function RU(c,g,b){var L=c==null?0:c.length;if(!L)return-1;var D=L;return b!==n&&(D=Dt(b),D=D<0?mr(L+D,0):qr(D,L-1)),g===g?z1(c,g,D):Ul(c,Dd,D,!0)}function NU(c,g){return c&&c.length?vc(c,Dt(g)):n}var DU=_t(Nk);function Nk(c,g){return c&&c.length&&g&&g.length?Ks(c,g):c}function zU(c,g,b){return c&&c.length&&g&&g.length?Ks(c,g,Te(b,2)):c}function BU(c,g,b){return c&&c.length&&g&&g.length?Ks(c,g,n,b):c}var FU=er(function(c,g){var b=c==null?0:c.length,L=Uh(c,g);return tf(c,zn(g,function(D){return Jl(D,b)?+D:D}).sort(pg)),L});function $U(c,g){var b=[];if(!(c&&c.length))return b;var L=-1,D=[],F=c.length;for(g=Te(g,3);++L<F;){var Y=c[L];g(Y,L,c)&&(b.push(Y),D.push(L))}return tf(c,D),b}function Mb(c){return c==null?c:L2.call(c)}function HU(c,g,b){var L=c==null?0:c.length;return L?(b&&typeof b!="number"&&Zi(c,g,b)?(g=0,b=L):(g=g==null?0:Dt(g),b=b===n?L:Dt(b)),Ar(c,g,b)):[]}function WU(c,g){return Kr(c,g)}function VU(c,g,b){return ap(c,g,Te(b,2))}function UU(c,g){var b=c==null?0:c.length;if(b){var L=Kr(c,g);if(L<b&&as(c[L],g))return L}return-1}function GU(c,g){return Kr(c,g,!0)}function jU(c,g,b){return ap(c,g,Te(b,2),!0)}function YU(c,g){var b=c==null?0:c.length;if(b){var L=Kr(c,g,!0)-1;if(as(c[L],g))return L}return-1}function qU(c){return c&&c.length?sp(c):[]}function KU(c,g){return c&&c.length?sp(c,Te(g,2)):[]}function XU(c){var g=c==null?0:c.length;return g?Ar(c,1,g):[]}function ZU(c,g,b){return c&&c.length?(g=b||g===n?1:Dt(g),Ar(c,0,g<0?0:g)):[]}function QU(c,g,b){var L=c==null?0:c.length;return L?(g=b||g===n?1:Dt(g),g=L-g,Ar(c,g<0?0:g,L)):[]}function JU(c,g){return c&&c.length?Sc(c,Te(g,3),!1,!0):[]}function eG(c,g){return c&&c.length?Sc(c,Te(g,3)):[]}var tG=_t(function(c){return wi(Pr(c,1,Lr,!0))}),nG=_t(function(c){var g=ka(c);return Lr(g)&&(g=n),wi(Pr(c,1,Lr,!0),Te(g,2))}),rG=_t(function(c){var g=ka(c);return g=typeof g=="function"?g:n,wi(Pr(c,1,Lr,!0),n,g)});function iG(c){return c&&c.length?wi(c):[]}function oG(c,g){return c&&c.length?wi(c,Te(g,2)):[]}function aG(c,g){return g=typeof g=="function"?g:n,c&&c.length?wi(c,n,g):[]}function Ob(c){if(!(c&&c.length))return[];var g=0;return c=ho(c,function(b){if(Lr(b))return g=mr(b.length,g),!0}),$d(g,function(b){return zn(c,Hs(b))})}function Dk(c,g){if(!(c&&c.length))return[];var b=Ob(c);return g==null?b:zn(b,function(L){return vi(g,n,L)})}var sG=_t(function(c,g){return Lr(c)?fc(c,g):[]}),lG=_t(function(c){return cp(ho(c,Lr))}),uG=_t(function(c){var g=ka(c);return Lr(g)&&(g=n),cp(ho(c,Lr),Te(g,2))}),cG=_t(function(c){var g=ka(c);return g=typeof g=="function"?g:n,cp(ho(c,Lr),n,g)}),dG=_t(Ob);function fG(c,g){return dg(c||[],g||[],Gs)}function hG(c,g){return dg(c||[],g||[],Zl)}var pG=_t(function(c){var g=c.length,b=g>1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Dk(c,b)});function zk(c){var g=B(c);return g.__chain__=!0,g}function gG(c,g){return g(c),c}function Y2(c,g){return g(c)}var mG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Gt)||!Jl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new Yi(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function vG(){return zk(this)}function yG(){return new Yi(this.value(),this.__chain__)}function SG(){this.__values__===n&&(this.__values__=Zk(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function bG(){return this}function xG(c){for(var g,b=this;b instanceof Qd;){var L=Lk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function wG(){var c=this.__wrapped__;if(c instanceof Gt){var g=c;return this.__actions__.length&&(g=new Gt(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new Yi(g,this.__chain__)}return this.thru(Mb)}function CG(){return Zs(this.__wrapped__,this.__actions__)}var _G=dp(function(c,g,b){tn.call(c,b)?++c[b]:Uo(c,b,1)});function kG(c,g,b){var L=Rt(c)?Dn:rg;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}function EG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var PG=vg(Mk),TG=vg(Ok);function AG(c,g){return Pr(q2(c,g),1)}function LG(c,g){return Pr(q2(c,g),K)}function MG(c,g,b){return b=b===n?1:Dt(b),Pr(q2(c,g),b)}function Bk(c,g){var b=Rt(c)?Vn:ts;return b(c,Te(g,3))}function Fk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var OG=dp(function(c,g,b){tn.call(c,b)?c[b].push(g):Uo(c,b,[g])});function IG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Yu(c,g,b)>-1}var RG=_t(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return ts(c,function(Y){F[++L]=D?vi(g,Y,b):ns(Y,g,b)}),F}),NG=dp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=Rt(c)?zn:Sr;return b(c,Te(g,3))}function DG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),xi(c,g,b))}var zG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function BG(c,g,b){var L=Rt(c)?Nd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,ts)}function FG(c,g,b){var L=Rt(c)?p2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function $G(c,g){var b=Rt(c)?ho:jo;return b(c,Z2(Te(g,3)))}function HG(c){var g=Rt(c)?cc:ip;return g(c)}function WG(c,g,b){(b?Zi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ri:rf;return L(c,g)}function VG(c){var g=Rt(c)?wb:ai;return g(c)}function UG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Le||g==Ut?c.size:Tr(c).length}function GG(c,g,b){var L=Rt(c)?Gu:vo;return b&&Zi(c,g,b)&&(g=n),L(c,Te(g,3))}var jG=_t(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Zi(c,g[0],g[1])?g=[]:b>2&&Zi(g[0],g[1],g[2])&&(g=[g[0]]),xi(c,Pr(g,1),[])}),K2=k2||function(){return yt.Date.now()};function YG(c,g){if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function $k(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,pe(c,N,n,n,n,n,g)}function Hk(c,g){var b;if(typeof g!="function")throw new yi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Ib=_t(function(c,g,b){var L=P;if(b.length){var D=Ho(b,Ve(Ib));L|=I}return pe(c,L,g,b,D)}),Wk=_t(function(c,g,b){var L=P|E;if(b.length){var D=Ho(b,Ve(Wk));L|=I}return pe(g,L,c,b,D)});function Vk(c,g,b){g=b?n:g;var L=pe(c,T,n,n,n,n,n,g);return L.placeholder=Vk.placeholder,L}function Uk(c,g,b){g=b?n:g;var L=pe(c,M,n,n,n,n,n,g);return L.placeholder=Uk.placeholder,L}function Gk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Ae=!1,Ge=!0;if(typeof c!="function")throw new yi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Ae="maxWait"in b,F=Ae?mr(Ea(b.maxWait)||0,g):F,Ge="trailing"in b?!!b.trailing:Ge);function dt(Mr){var ss=L,nu=D;return L=D=n,Ce=Mr,Y=c.apply(nu,ss),Y}function St(Mr){return Ce=Mr,ee=xg(jt,g),_e?dt(Mr):Y}function $t(Mr){var ss=Mr-ce,nu=Mr-Ce,cE=g-ss;return Ae?qr(cE,F-nu):cE}function bt(Mr){var ss=Mr-ce,nu=Mr-Ce;return ce===n||ss>=g||ss<0||Ae&&nu>=F}function jt(){var Mr=K2();if(bt(Mr))return Jt(Mr);ee=xg(jt,$t(Mr))}function Jt(Mr){return ee=n,Ge&&L?dt(Mr):(L=D=n,Y)}function Xo(){ee!==n&&fg(ee),Ce=0,L=ce=D=ee=n}function Qi(){return ee===n?Y:Jt(K2())}function Zo(){var Mr=K2(),ss=bt(Mr);if(L=arguments,D=this,ce=Mr,ss){if(ee===n)return St(ce);if(Ae)return fg(ee),ee=xg(jt,g),dt(ce)}return ee===n&&(ee=xg(jt,g)),Y}return Zo.cancel=Xo,Zo.flush=Qi,Zo}var qG=_t(function(c,g){return ng(c,1,g)}),KG=_t(function(c,g,b){return ng(c,Ea(g)||0,b)});function XG(c){return pe(c,H)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new yi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new yi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function ZG(c){return Hk(2,c)}var QG=kb(function(c,g){g=g.length==1&&Rt(g[0])?zn(g[0],kr(Te())):zn(Pr(g,1),kr(Te()));var b=g.length;return _t(function(L){for(var D=-1,F=qr(L.length,b);++D<F;)L[D]=g[D].call(this,L[D]);return vi(c,this,L)})}),Rb=_t(function(c,g){var b=Ho(g,Ve(Rb));return pe(c,I,n,g,b)}),jk=_t(function(c,g){var b=Ho(g,Ve(jk));return pe(c,R,n,g,b)}),JG=er(function(c,g){return pe(c,z,n,n,n,g)});function ej(c,g){if(typeof c!="function")throw new yi(a);return g=g===n?g:Dt(g),_t(c,g)}function tj(c,g){if(typeof c!="function")throw new yi(a);return g=g==null?0:mr(Dt(g),0),_t(function(b){var L=b[g],D=is(b,0,g);return L&&ba(D,L),vi(c,this,D)})}function nj(c,g,b){var L=!0,D=!0;if(typeof c!="function")throw new yi(a);return sr(b)&&(L="leading"in b?!!b.leading:L,D="trailing"in b?!!b.trailing:D),Gk(c,g,{leading:L,maxWait:g,trailing:D})}function rj(c){return $k(c,1)}function ij(c,g){return Rb(bc(g),c)}function oj(){if(!arguments.length)return[];var c=arguments[0];return Rt(c)?c:[c]}function aj(c){return ii(c,v)}function sj(c,g){return g=typeof g=="function"?g:n,ii(c,v,g)}function lj(c){return ii(c,p|v)}function uj(c,g){return g=typeof g=="function"?g:n,ii(c,p|v,g)}function cj(c,g){return g==null||jh(c,g,li(g))}function as(c,g){return c===g||c!==c&&g!==g}var dj=k(Xh),fj=k(function(c,g){return c>=g}),ff=tp(function(){return arguments}())?tp:function(c){return br(c)&&tn.call(c,"callee")&&!W1.call(c,"callee")},Rt=ve.isArray,hj=jr?kr(jr):og;function So(c){return c!=null&&Q2(c.length)&&!eu(c)}function Lr(c){return br(c)&&So(c)}function pj(c){return c===!0||c===!1||br(c)&&oi(c)==qe}var xc=E2||Gb,gj=co?kr(co):ag;function mj(c){return br(c)&&c.nodeType===1&&!wg(c)}function vj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||xc(c)||gp(c)||ff(c)))return!c.length;var g=si(c);if(g==Le||g==Ut)return!c.size;if(bg(c))return!Tr(c).length;for(var b in c)if(tn.call(c,b))return!1;return!0}function yj(c,g){return pc(c,g)}function Sj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?pc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==nt||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!wg(c)}function bj(c){return typeof c=="number"&&$h(c)}function eu(c){if(!sr(c))return!1;var g=oi(c);return g==Tt||g==xt||g==He||g==an}function Yk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var qk=Gi?kr(Gi):_b;function xj(c,g){return c===g||gc(c,g,Et(g))}function wj(c,g,b){return b=typeof b=="function"?b:n,gc(c,g,Et(g),b)}function Cj(c){return Kk(c)&&c!=+c}function _j(c){if(sU(c))throw new kt(o);return np(c)}function kj(c){return c===null}function Ej(c){return c==null}function Kk(c){return typeof c=="number"||br(c)&&oi(c)==at}function wg(c){if(!br(c)||oi(c)!=st)return!1;var g=tc(c);if(g===null)return!0;var b=tn.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?kr(Sa):or;function Pj(c){return Yk(c)&&c>=-G&&c<=G}var Xk=$s?kr($s):Bt;function J2(c){return typeof c=="string"||!Rt(c)&&br(c)&&oi(c)==sn}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==yn}var gp=I1?kr(I1):Dr;function Tj(c){return c===n}function Aj(c){return br(c)&&si(c)==et}function Lj(c){return br(c)&&oi(c)==Xt}var Mj=k(Ys),Oj=k(function(c,g){return c<=g});function Zk(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):Ci(c);if(nc&&c[nc])return S2(c[nc]());var g=si(c),b=g==Le?Dh:g==Ut?Wd:mp;return b(c)}function tu(c){if(!c)return c===0?c:0;if(c=Ea(c),c===K||c===-K){var g=c<0?-1:1;return g*Z}return c===c?c:0}function Dt(c){var g=tu(c),b=g%1;return g===g?b?g-b:g:0}function Qk(c){return c?Kl(Dt(c),0,X):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return te;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=ji(c);var b=k1.test(c);return b||P1.test(c)?Ke(c.slice(2),b?2:8):_1.test(c)?te:+c}function Jk(c){return _a(c,bo(c))}function Ij(c){return c?Kl(Dt(c),-G,G):c===0?c:0}function xn(c){return c==null?"":Ki(c)}var Rj=Xi(function(c,g){if(bg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)tn.call(g,b)&&Gs(c,b,g[b])}),eE=Xi(function(c,g){_a(g,bo(g),c)}),ey=Xi(function(c,g,b,L){_a(g,bo(g),c,L)}),Nj=Xi(function(c,g,b,L){_a(g,li(g),c,L)}),Dj=er(Uh);function zj(c,g){var b=ql(c);return g==null?b:Qe(b,g)}var Bj=_t(function(c,g){c=cn(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Zi(g[0],g[1],D)&&(L=1);++b<L;)for(var F=g[b],Y=bo(F),ee=-1,ce=Y.length;++ee<ce;){var Ce=Y[ee],_e=c[Ce];(_e===n||as(_e,bn[Ce])&&!tn.call(c,Ce))&&(c[Ce]=F[Ce])}return c}),Fj=_t(function(c){return c.push(n,rt),vi(tE,n,c)});function $j(c,g){return m2(c,Te(g,3),Yo)}function Hj(c,g){return m2(c,Te(g,3),mo)}function Wj(c,g){return c==null?c:qh(c,Te(g,3),bo)}function Vj(c,g){return c==null?c:go(c,Te(g,3),bo)}function Uj(c,g){return c&&Yo(c,Te(g,3))}function Gj(c,g){return c&&mo(c,Te(g,3))}function jj(c){return c==null?[]:Kh(c,li(c))}function Yj(c){return c==null?[]:Kh(c,bo(c))}function zb(c,g,b){var L=c==null?n:js(c,g);return L===n?b:L}function qj(c,g){return c!=null&&bk(c,g,Zh)}function Bb(c,g){return c!=null&&bk(c,g,Qh)}var Kj=cf(function(c,g,b){g!=null&&typeof g.toString!="function"&&(g=Bh.call(g)),c[g]=b},$b(xo)),Xj=cf(function(c,g,b){g!=null&&typeof g.toString!="function"&&(g=Bh.call(g)),tn.call(c,g)?c[g].push(b):c[g]=[b]},Te),Zj=_t(ns);function li(c){return So(c)?eg(c):Tr(c)}function bo(c){return So(c)?eg(c,!0):qi(c)}function Qj(c,g){var b={};return g=Te(g,3),Yo(c,function(L,D,F){Uo(b,g(L,D,F),L)}),b}function Jj(c,g){var b={};return g=Te(g,3),Yo(c,function(L,D,F){Uo(b,D,g(L,D,F))}),b}var eY=Xi(function(c,g,b){Xl(c,g,b)}),tE=Xi(function(c,g,b,L){Xl(c,g,b,L)}),tY=er(function(c,g){var b={};if(c==null)return b;var L=!1;g=zn(g,function(F){return F=Qs(F,c),L||(L=F.length>1),F}),_a(c,me(c),b),L&&(b=ii(b,p|m|v,Lt));for(var D=g.length;D--;)up(b,g[D]);return b});function nY(c,g){return nE(c,Z2(Te(g)))}var rY=er(function(c,g){return c==null?{}:ug(c,g)});function nE(c,g){if(c==null)return{};var b=zn(me(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function iY(c,g,b){g=Qs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++L<D;){var F=c==null?n:c[nl(g[L])];F===n&&(L=D,F=b),c=eu(F)?F.call(c):F}return c}function oY(c,g,b){return c==null?c:Zl(c,g,b)}function aY(c,g,b,L){return L=typeof L=="function"?L:n,c==null?c:Zl(c,g,b,L)}var rE=se(li),iE=se(bo);function sY(c,g,b){var L=Rt(c),D=L||xc(c)||gp(c);if(g=Te(g,4),b==null){var F=c&&c.constructor;D?b=L?new F:[]:sr(c)?b=eu(F)?ql(tc(c)):{}:b={}}return(D?Vn:Yo)(c,function(Y,ee,ce){return g(b,Y,ee,ce)}),b}function lY(c,g){return c==null?!0:up(c,g)}function uY(c,g,b){return c==null?c:cg(c,g,bc(b))}function cY(c,g,b,L){return L=typeof L=="function"?L:n,c==null?c:cg(c,g,bc(b),L)}function mp(c){return c==null?[]:Hd(c,li(c))}function dY(c){return c==null?[]:Hd(c,bo(c))}function fY(c,g,b){return b===n&&(b=g,g=n),b!==n&&(b=Ea(b),b=b===b?b:0),g!==n&&(g=Ea(g),g=g===g?g:0),Kl(Ea(c),g,b)}function hY(c,g,b){return g=tu(g),b===n?(b=g,g=0):b=tu(b),c=Ea(c),Jh(c,g,b)}function pY(c,g,b){if(b&&typeof b!="boolean"&&Zi(c,g,b)&&(g=b=n),b===n&&(typeof g=="boolean"?(b=g,g=n):typeof c=="boolean"&&(b=c,c=n)),c===n&&g===n?(c=0,g=1):(c=tu(c),g===n?(g=c,c=0):g=tu(g)),c>g){var L=c;c=g,g=L}if(b||c%1||g%1){var D=G1();return qr(c+D*(g-c+ge("1e-"+((D+"").length-1))),g)}return nf(c,g)}var gY=tl(function(c,g,b){return g=g.toLowerCase(),c+(b?oE(g):g)});function oE(c){return Fb(xn(c).toLowerCase())}function aE(c){return c=xn(c),c&&c.replace(A1,y2).replace(Th,"")}function mY(c,g,b){c=xn(c),g=Ki(g);var L=c.length;b=b===n?L:Kl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function vY(c){return c=xn(c),c&&va.test(c)?c.replace(Os,Qa):c}function yY(c){return c=xn(c),c&&y1.test(c)?c.replace(Ed,"\\$&"):c}var SY=tl(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),bY=tl(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),xY=hp("toLowerCase");function wY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Yl(D),b)+c+d(Kd(D),b)}function CY(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;return g&&L<g?c+d(g-L,b):c}function _Y(c,g,b){c=xn(c),g=Dt(g);var L=g?xa(c):0;return g&&L<g?d(g-L,b)+c:c}function kY(c,g,b){return b||g==null?g=0:g&&(g=+g),A2(xn(c).replace(zu,""),g||0)}function EY(c,g,b){return(b?Zi(c,g,b):g===n)?g=1:g=Dt(g),yc(xn(c),g)}function PY(){var c=arguments,g=xn(c[0]);return c.length<3?g:g.replace(c[1],c[2])}var TY=tl(function(c,g,b){return c+(b?"_":"")+g.toLowerCase()});function AY(c,g,b){return b&&typeof b!="number"&&Zi(c,g,b)&&(g=b=n),b=b===n?X:b>>>0,b?(c=xn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=Ki(g),!g&&Gl(c))?is(Ni(c),0,b):c.split(g,b)):[]}var LY=tl(function(c,g,b){return c+(b?" ":"")+Fb(g)});function MY(c,g,b){return c=xn(c),b=b==null?0:Kl(Dt(b),0,c.length),g=Ki(g),c.slice(b,b+g.length)==g}function OY(c,g,b){var L=B.templateSettings;b&&Zi(c,g,b)&&(g=n),c=xn(c),g=ey({},g,L,Re);var D=ey({},g.imports,L.imports,Re),F=li(D),Y=Hd(D,F),ee,ce,Ce=0,_e=g.interpolate||Rs,Ae="__p += '",Ge=Ud((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Du?C1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),dt="//# sourceURL="+(tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+`
|
|
`;c.replace(Ge,function(bt,jt,Jt,Xo,Qi,Zo){return Jt||(Jt=Xo),Ae+=c.slice(Ce,Zo).replace(L1,Ws),jt&&(ee=!0,Ae+=`' +
|
|
__e(`+jt+`) +
|
|
'`),Qi&&(ce=!0,Ae+=`';
|
|
`+Qi+`;
|
|
__p += '`),Jt&&(Ae+=`' +
|
|
((__t = (`+Jt+`)) == null ? '' : __t) +
|
|
'`),Ce=Zo+bt.length,bt}),Ae+=`';
|
|
`;var St=tn.call(g,"variable")&&g.variable;if(!St)Ae=`with (obj) {
|
|
`+Ae+`
|
|
}
|
|
`;else if(x1.test(St))throw new kt(s);Ae=(ce?Ae.replace(Zt,""):Ae).replace(Qn,"$1").replace(lo,"$1;"),Ae="function("+(St||"obj")+`) {
|
|
`+(St?"":`obj || (obj = {});
|
|
`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
|
|
function print() { __p += __j.call(arguments, '') }
|
|
`:`;
|
|
`)+Ae+`return __p
|
|
}`;var $t=lE(function(){return Qt(F,dt+"return "+Ae).apply(n,Y)});if($t.source=Ae,Nb($t))throw $t;return $t}function IY(c){return xn(c).toLowerCase()}function RY(c){return xn(c).toUpperCase()}function NY(c,g,b){if(c=xn(c),c&&(b||g===n))return ji(c);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Za(L,D)+1;return is(L,F,Y).join("")}function DY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.slice(0,B1(c)+1);if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=Za(L,Ni(g))+1;return is(L,0,D).join("")}function zY(c,g,b){if(c=xn(c),c&&(b||g===n))return c.replace(zu,"");if(!c||!(g=Ki(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return is(L,D).join("")}function BY(c,g){var b=$,L=j;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?Ki(g.omission):L}c=xn(c);var F=c.length;if(Gl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-xa(L);if(ee<1)return L;var ce=Y?is(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Db(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Ud(D.source,xn(Ya.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Ae=Ce.index;ce=ce.slice(0,Ae===n?ee:Ae)}}else if(c.indexOf(Ki(D),ee)!=ee){var Ge=ce.lastIndexOf(D);Ge>-1&&(ce=ce.slice(0,Ge))}return ce+L}function FY(c){return c=xn(c),c&&m1.test(c)?c.replace(gi,w2):c}var $Y=tl(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Fb=hp("toUpperCase");function sE(c,g,b){return c=xn(c),g=b?n:g,g===n?Nh(c)?Vd(c):N1(c):c.match(g)||[]}var lE=_t(function(c,g){try{return vi(c,n,g)}catch(b){return Nb(b)?b:new kt(b)}}),HY=er(function(c,g){return Vn(g,function(b){b=nl(b),Uo(c,b,Ib(c[b],c))}),c});function WY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new yi(a);return[b(L[0]),L[1]]}):[],_t(function(L){for(var D=-1;++D<g;){var F=c[D];if(vi(F[0],this,L))return vi(F[1],this,L)}})}function VY(c){return Gh(ii(c,p))}function $b(c){return function(){return c}}function UY(c,g){return c==null||c!==c?g:c}var GY=yg(),jY=yg(!0);function xo(c){return c}function Hb(c){return ar(typeof c=="function"?c:ii(c,p))}function YY(c){return mc(ii(c,p))}function qY(c,g){return qs(c,ii(g,p))}var KY=_t(function(c,g){return function(b){return ns(b,c,g)}}),XY=_t(function(c,g){return function(b){return ns(c,b,g)}});function Wb(c,g,b){var L=li(g),D=Kh(g,L);b==null&&!(sr(g)&&(D.length||!L.length))&&(b=g,g=c,c=this,D=Kh(g,li(g)));var F=!(sr(b)&&"chain"in b)||!!b.chain,Y=eu(c);return Vn(D,function(ee){var ce=g[ee];c[ee]=ce,Y&&(c.prototype[ee]=function(){var Ce=this.__chain__;if(F||Ce){var _e=c(this.__wrapped__),Ae=_e.__actions__=Ci(this.__actions__);return Ae.push({func:ce,args:arguments,thisArg:c}),_e.__chain__=Ce,_e}return ce.apply(c,ba([this.value()],arguments))})}),c}function ZY(){return yt._===this&&(yt._=$1),this}function Vb(){}function QY(c){return c=Dt(c),_t(function(g){return vc(g,c)})}var JY=Sg(zn),eq=Sg(Dn),tq=Sg(Gu);function uE(c){return Pb(c)?Hs(nl(c)):rs(c)}function nq(c){return function(g){return c==null?n:js(c,g)}}var rq=y(),iq=y(!0);function Ub(){return[]}function Gb(){return!1}function oq(){return{}}function aq(){return""}function sq(){return!0}function lq(c,g){if(c=Dt(c),c<1||c>G)return[];var b=X,L=qr(c,X);g=Te(g),c-=X;for(var D=$d(L,g);++b<c;)g(b);return D}function uq(c){return Rt(c)?zn(c,nl):Ko(c)?[c]:Ci(Ak(xn(c)))}function cq(c){var g=++Gd;return xn(c)+g}var dq=pp(function(c,g){return c+g},0),fq=O("ceil"),hq=pp(function(c,g){return c/g},1),pq=O("floor");function gq(c){return c&&c.length?yr(c,xo,Xh):n}function mq(c,g){return c&&c.length?yr(c,Te(g,2),Xh):n}function vq(c){return zd(c,xo)}function yq(c,g){return zd(c,Te(g,2))}function Sq(c){return c&&c.length?yr(c,xo,Ys):n}function bq(c,g){return c&&c.length?yr(c,Te(g,2),Ys):n}var xq=pp(function(c,g){return c*g},1),wq=O("round"),Cq=pp(function(c,g){return c-g},0);function _q(c){return c&&c.length?Fd(c,xo):0}function kq(c,g){return c&&c.length?Fd(c,Te(g,2)):0}return B.after=YG,B.ary=$k,B.assign=Rj,B.assignIn=eE,B.assignInWith=ey,B.assignWith=Nj,B.at=Dj,B.before=Hk,B.bind=Ib,B.bindAll=HY,B.bindKey=Wk,B.castArray=oj,B.chain=zk,B.chunk=pU,B.compact=gU,B.concat=mU,B.cond=WY,B.conforms=VY,B.constant=$b,B.countBy=_G,B.create=zj,B.curry=Vk,B.curryRight=Uk,B.debounce=Gk,B.defaults=Bj,B.defaultsDeep=Fj,B.defer=qG,B.delay=KG,B.difference=vU,B.differenceBy=yU,B.differenceWith=SU,B.drop=bU,B.dropRight=xU,B.dropRightWhile=wU,B.dropWhile=CU,B.fill=_U,B.filter=EG,B.flatMap=AG,B.flatMapDeep=LG,B.flatMapDepth=MG,B.flatten=Ik,B.flattenDeep=kU,B.flattenDepth=EU,B.flip=XG,B.flow=GY,B.flowRight=jY,B.fromPairs=PU,B.functions=jj,B.functionsIn=Yj,B.groupBy=OG,B.initial=AU,B.intersection=LU,B.intersectionBy=MU,B.intersectionWith=OU,B.invert=Kj,B.invertBy=Xj,B.invokeMap=RG,B.iteratee=Hb,B.keyBy=NG,B.keys=li,B.keysIn=bo,B.map=q2,B.mapKeys=Qj,B.mapValues=Jj,B.matches=YY,B.matchesProperty=qY,B.memoize=X2,B.merge=eY,B.mergeWith=tE,B.method=KY,B.methodOf=XY,B.mixin=Wb,B.negate=Z2,B.nthArg=QY,B.omit=tY,B.omitBy=nY,B.once=ZG,B.orderBy=DG,B.over=JY,B.overArgs=QG,B.overEvery=eq,B.overSome=tq,B.partial=Rb,B.partialRight=jk,B.partition=zG,B.pick=rY,B.pickBy=nE,B.property=uE,B.propertyOf=nq,B.pull=DU,B.pullAll=Nk,B.pullAllBy=zU,B.pullAllWith=BU,B.pullAt=FU,B.range=rq,B.rangeRight=iq,B.rearg=JG,B.reject=$G,B.remove=$U,B.rest=ej,B.reverse=Mb,B.sampleSize=WG,B.set=oY,B.setWith=aY,B.shuffle=VG,B.slice=HU,B.sortBy=jG,B.sortedUniq=qU,B.sortedUniqBy=KU,B.split=AY,B.spread=tj,B.tail=XU,B.take=ZU,B.takeRight=QU,B.takeRightWhile=JU,B.takeWhile=eG,B.tap=gG,B.throttle=nj,B.thru=Y2,B.toArray=Zk,B.toPairs=rE,B.toPairsIn=iE,B.toPath=uq,B.toPlainObject=Jk,B.transform=sY,B.unary=rj,B.union=tG,B.unionBy=nG,B.unionWith=rG,B.uniq=iG,B.uniqBy=oG,B.uniqWith=aG,B.unset=lY,B.unzip=Ob,B.unzipWith=Dk,B.update=uY,B.updateWith=cY,B.values=mp,B.valuesIn=dY,B.without=sG,B.words=sE,B.wrap=ij,B.xor=lG,B.xorBy=uG,B.xorWith=cG,B.zip=dG,B.zipObject=fG,B.zipObjectDeep=hG,B.zipWith=pG,B.entries=rE,B.entriesIn=iE,B.extend=eE,B.extendWith=ey,Wb(B,B),B.add=dq,B.attempt=lE,B.camelCase=gY,B.capitalize=oE,B.ceil=fq,B.clamp=fY,B.clone=aj,B.cloneDeep=lj,B.cloneDeepWith=uj,B.cloneWith=sj,B.conformsTo=cj,B.deburr=aE,B.defaultTo=UY,B.divide=hq,B.endsWith=mY,B.eq=as,B.escape=vY,B.escapeRegExp=yY,B.every=kG,B.find=PG,B.findIndex=Mk,B.findKey=$j,B.findLast=TG,B.findLastIndex=Ok,B.findLastKey=Hj,B.floor=pq,B.forEach=Bk,B.forEachRight=Fk,B.forIn=Wj,B.forInRight=Vj,B.forOwn=Uj,B.forOwnRight=Gj,B.get=zb,B.gt=dj,B.gte=fj,B.has=qj,B.hasIn=Bb,B.head=Rk,B.identity=xo,B.includes=IG,B.indexOf=TU,B.inRange=hY,B.invoke=Zj,B.isArguments=ff,B.isArray=Rt,B.isArrayBuffer=hj,B.isArrayLike=So,B.isArrayLikeObject=Lr,B.isBoolean=pj,B.isBuffer=xc,B.isDate=gj,B.isElement=mj,B.isEmpty=vj,B.isEqual=yj,B.isEqualWith=Sj,B.isError=Nb,B.isFinite=bj,B.isFunction=eu,B.isInteger=Yk,B.isLength=Q2,B.isMap=qk,B.isMatch=xj,B.isMatchWith=wj,B.isNaN=Cj,B.isNative=_j,B.isNil=Ej,B.isNull=kj,B.isNumber=Kk,B.isObject=sr,B.isObjectLike=br,B.isPlainObject=wg,B.isRegExp=Db,B.isSafeInteger=Pj,B.isSet=Xk,B.isString=J2,B.isSymbol=Ko,B.isTypedArray=gp,B.isUndefined=Tj,B.isWeakMap=Aj,B.isWeakSet=Lj,B.join=IU,B.kebabCase=SY,B.last=ka,B.lastIndexOf=RU,B.lowerCase=bY,B.lowerFirst=xY,B.lt=Mj,B.lte=Oj,B.max=gq,B.maxBy=mq,B.mean=vq,B.meanBy=yq,B.min=Sq,B.minBy=bq,B.stubArray=Ub,B.stubFalse=Gb,B.stubObject=oq,B.stubString=aq,B.stubTrue=sq,B.multiply=xq,B.nth=NU,B.noConflict=ZY,B.noop=Vb,B.now=K2,B.pad=wY,B.padEnd=CY,B.padStart=_Y,B.parseInt=kY,B.random=pY,B.reduce=BG,B.reduceRight=FG,B.repeat=EY,B.replace=PY,B.result=iY,B.round=wq,B.runInContext=oe,B.sample=HG,B.size=UG,B.snakeCase=TY,B.some=GG,B.sortedIndex=WU,B.sortedIndexBy=VU,B.sortedIndexOf=UU,B.sortedLastIndex=GU,B.sortedLastIndexBy=jU,B.sortedLastIndexOf=YU,B.startCase=LY,B.startsWith=MY,B.subtract=Cq,B.sum=_q,B.sumBy=kq,B.template=OY,B.times=lq,B.toFinite=tu,B.toInteger=Dt,B.toLength=Qk,B.toLower=IY,B.toNumber=Ea,B.toSafeInteger=Ij,B.toString=xn,B.toUpper=RY,B.trim=NY,B.trimEnd=DY,B.trimStart=zY,B.truncate=BY,B.unescape=FY,B.uniqueId=cq,B.upperCase=$Y,B.upperFirst=Fb,B.each=Bk,B.eachRight=Fk,B.first=Rk,Wb(B,function(){var c={};return Yo(B,function(g,b){tn.call(B.prototype,b)||(c[b]=g)}),c}(),{chain:!1}),B.VERSION=r,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){B[c].placeholder=B}),Vn(["drop","take"],function(c,g){Gt.prototype[c]=function(b){b=b===n?1:mr(Dt(b),0);var L=this.__filtered__&&!g?new Gt(this):this.clone();return L.__filtered__?L.__takeCount__=qr(b,L.__takeCount__):L.__views__.push({size:qr(b,X),type:c+(L.__dir__<0?"Right":"")}),L},Gt.prototype[c+"Right"]=function(b){return this.reverse()[c](b).reverse()}}),Vn(["filter","map","takeWhile"],function(c,g){var b=g+1,L=b==J||b==Q;Gt.prototype[c]=function(D){var F=this.clone();return F.__iteratees__.push({iteratee:Te(D,3),type:b}),F.__filtered__=F.__filtered__||L,F}}),Vn(["head","last"],function(c,g){var b="take"+(g?"Right":"");Gt.prototype[c]=function(){return this[b](1).value()[0]}}),Vn(["initial","tail"],function(c,g){var b="drop"+(g?"":"Right");Gt.prototype[c]=function(){return this.__filtered__?new Gt(this):this[b](1)}}),Gt.prototype.compact=function(){return this.filter(xo)},Gt.prototype.find=function(c){return this.filter(c).head()},Gt.prototype.findLast=function(c){return this.reverse().find(c)},Gt.prototype.invokeMap=_t(function(c,g){return typeof c=="function"?new Gt(this):this.map(function(b){return ns(b,c,g)})}),Gt.prototype.reject=function(c){return this.filter(Z2(Te(c)))},Gt.prototype.slice=function(c,g){c=Dt(c);var b=this;return b.__filtered__&&(c>0||g<0)?new Gt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Gt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Gt.prototype.toArray=function(){return this.take(X)},Yo(Gt.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Gt,Ce=ee[0],_e=ce||Rt(Y),Ae=function(jt){var Jt=D.apply(B,ba([jt],ee));return L&&Ge?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ge=this.__chain__,dt=!!this.__actions__.length,St=F&&!Ge,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Gt(this);var bt=c.apply(Y,ee);return bt.__actions__.push({func:Y2,args:[Ae],thisArg:n}),new Yi(bt,Ge)}return St&&$t?c.apply(this,ee):(bt=this.thru(Ae),St?L?bt.value()[0]:bt.value():bt)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=Zu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Gt.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";tn.call(Ja,L)||(Ja[L]=[]),Ja[L].push({name:g,func:b})}}),Ja[uf(n,E).name]=[{name:"wrapper",func:n}],Gt.prototype.clone=Di,Gt.prototype.reverse=bi,Gt.prototype.value=M2,B.prototype.at=mG,B.prototype.chain=vG,B.prototype.commit=yG,B.prototype.next=SG,B.prototype.plant=xG,B.prototype.reverse=wG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=CG,B.prototype.first=B.prototype.head,nc&&(B.prototype[nc]=bG),B},wa=po();Vt?((Vt.exports=wa)._=wa,Pt._=wa):yt._=wa}).call(ys)})(Zr,Zr.exports);const Je=Zr.exports;var rye=Object.create,g$=Object.defineProperty,iye=Object.getOwnPropertyDescriptor,oye=Object.getOwnPropertyNames,aye=Object.getPrototypeOf,sye=Object.prototype.hasOwnProperty,ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lye=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oye(t))!sye.call(e,i)&&i!==n&&g$(e,i,{get:()=>t[i],enumerable:!(r=iye(t,i))||r.enumerable});return e},m$=(e,t,n)=>(n=e!=null?rye(aye(e)):{},lye(t||!e||!e.__esModule?g$(n,"default",{value:e,enumerable:!0}):n,e)),uye=ze((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),v$=ze((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=ze((e,t)=>{var n=v$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),cye=ze((e,t)=>{var n=VS(),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}),dye=ze((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),fye=ze((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),hye=ze((e,t)=>{var n=VS();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}),US=ze((e,t)=>{var n=uye(),r=cye(),i=dye(),o=fye(),a=hye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),pye=ze((e,t)=>{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),gye=ze((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),mye=ze((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),vye=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}),Tu=ze((e,t)=>{var n=y$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),_8=ze((e,t)=>{var n=Tu(),r=n.Symbol;t.exports=r}),yye=ze((e,t)=>{var n=_8(),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 p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),Sye=ze((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=ze((e,t)=>{var n=_8(),r=yye(),i=Sye(),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}),S$=ze((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),b$=ze((e,t)=>{var n=GS(),r=S$(),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}),bye=ze((e,t)=>{var n=Tu(),r=n["__core-js_shared__"];t.exports=r}),xye=ze((e,t)=>{var n=bye(),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{}try{return o+""}catch{}}return""}t.exports=i}),wye=ze((e,t)=>{var n=b$(),r=xye(),i=S$(),o=x$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).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}),Cye=ze((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=ze((e,t)=>{var n=wye(),r=Cye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k8=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Map");t.exports=i}),jS=ze((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),_ye=ze((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),kye=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}),Eye=ze((e,t)=>{var n=jS(),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}),Pye=ze((e,t)=>{var n=jS(),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}),Tye=ze((e,t)=>{var n=jS(),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}),Aye=ze((e,t)=>{var n=_ye(),r=kye(),i=Eye(),o=Pye(),a=Tye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Lye=ze((e,t)=>{var n=Aye(),r=US(),i=k8();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),Mye=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}),YS=ze((e,t)=>{var n=Mye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),Oye=ze((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Iye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),Rye=ze((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),Nye=ze((e,t)=>{var n=YS();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}),w$=ze((e,t)=>{var n=Lye(),r=Oye(),i=Iye(),o=Rye(),a=Nye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u<h;){var p=l[u];this.set(p[0],p[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s}),Dye=ze((e,t)=>{var n=US(),r=k8(),i=w$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length<o-1)return h.push([s,l]),this.size=++u.size,this;u=this.__data__=new i(h)}return u.set(s,l),this.size=u.size,this}t.exports=a}),zye=ze((e,t)=>{var n=US(),r=pye(),i=gye(),o=mye(),a=vye(),s=Dye();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}),Bye=ze((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Fye=ze((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),$ye=ze((e,t)=>{var n=w$(),r=Bye(),i=Fye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s<l;)this.add(a[s])}o.prototype.add=o.prototype.push=r,o.prototype.has=i,t.exports=o}),Hye=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o<a;)if(i(r[o],o,r))return!0;return!1}t.exports=n}),Wye=ze((e,t)=>{function n(r,i){return r.has(i)}t.exports=n}),C$=ze((e,t)=>{var n=$ye(),r=Hye(),i=Wye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,P=u.length;if(w!=P&&!(S&&P>w))return!1;var E=v.get(l),_=v.get(u);if(E&&_)return E==u&&_==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T<w;){var R=l[T],N=u[T];if(p)var z=S?p(N,R,T,u,l,v):p(R,N,T,l,u,v);if(z!==void 0){if(z)continue;M=!1;break}if(I){if(!r(u,function(H,$){if(!i(I,$)&&(R===H||m(R,H,h,p,v)))return I.push($)})){M=!1;break}}else if(!(R===N||m(R,N,h,p,v))){M=!1;break}}return v.delete(l),v.delete(u),M}t.exports=s}),Vye=ze((e,t)=>{var n=Tu(),r=n.Uint8Array;t.exports=r}),Uye=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}),Gye=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}),jye=ze((e,t)=>{var n=_8(),r=Vye(),i=v$(),o=C$(),a=Uye(),s=Gye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",P="[object Set]",E="[object String]",_="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,H,$,j,de,V,J){switch($){case M:if(z.byteLength!=H.byteLength||z.byteOffset!=H.byteOffset)return!1;z=z.buffer,H=H.buffer;case T:return!(z.byteLength!=H.byteLength||!V(new r(z),new r(H)));case h:case p:case S:return i(+z,+H);case m:return z.name==H.name&&z.message==H.message;case w:case E:return z==H+"";case v:var ie=a;case P:var Q=j&l;if(ie||(ie=s),z.size!=H.size&&!Q)return!1;var K=J.get(z);if(K)return K==H;j|=u,J.set(z,H);var G=o(ie(z),ie(H),j,de,V,J);return J.delete(z),G;case _:if(R)return R.call(z)==R.call(H)}return!1}t.exports=N}),Yye=ze((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o<a;)r[s+o]=i[o];return r}t.exports=n}),E8=ze((e,t)=>{var n=Array.isArray;t.exports=n}),qye=ze((e,t)=>{var n=Yye(),r=E8();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Kye=ze((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o<a;){var u=r[o];i(u,o,r)&&(l[s++]=u)}return l}t.exports=n}),Xye=ze((e,t)=>{function n(){return[]}t.exports=n}),Zye=ze((e,t)=>{var n=Kye(),r=Xye(),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}),Qye=ze((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o<r;)a[o]=i(o);return a}t.exports=n}),qS=ze((e,t)=>{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Jye=ze((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),e3e=ze((e,t)=>{var n=Jye(),r=qS(),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}),t3e=ze((e,t)=>{function n(){return!1}t.exports=n}),_$=ze((e,t)=>{var n=Tu(),r=t3e(),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}),n3e=ze((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o<a}t.exports=i}),k$=ze((e,t)=>{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),r3e=ze((e,t)=>{var n=GS(),r=k$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",P="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",H="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[I]=V[R]=V[N]=V[z]=V[H]=V[$]=V[j]=V[de]=!0,V[o]=V[a]=V[_]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[P]=V[E]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),i3e=ze((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),o3e=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{}}();t.exports=s}),E$=ze((e,t)=>{var n=r3e(),r=i3e(),i=o3e(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),a3e=ze((e,t)=>{var n=Qye(),r=e3e(),i=E8(),o=_$(),a=n3e(),s=E$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),P=!v&&!S&&!w&&s(p),E=v||S||w||P,_=E?n(p.length,String):[],T=_.length;for(var M in p)(m||u.call(p,M))&&!(E&&(M=="length"||w&&(M=="offset"||M=="parent")||P&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&_.push(M);return _}t.exports=h}),s3e=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}),l3e=ze((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),u3e=ze((e,t)=>{var n=l3e(),r=n(Object.keys,Object);t.exports=r}),c3e=ze((e,t)=>{var n=s3e(),r=u3e(),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}),d3e=ze((e,t)=>{var n=b$(),r=k$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),f3e=ze((e,t)=>{var n=a3e(),r=c3e(),i=d3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),h3e=ze((e,t)=>{var n=qye(),r=Zye(),i=f3e();function o(a){return n(a,i,r)}t.exports=o}),p3e=ze((e,t)=>{var n=h3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,P=n(l),E=P.length;if(w!=E&&!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 R=!0;m.set(s,l),m.set(l,s);for(var N=v;++_<w;){T=S[_];var z=s[T],H=l[T];if(h)var $=v?h(H,z,T,l,s,m):h(z,H,T,s,l,m);if(!($===void 0?z===H||p(z,H,u,h,m):$)){R=!1;break}N||(N=T=="constructor")}if(R&&!N){var j=s.constructor,de=l.constructor;j!=de&&"constructor"in s&&"constructor"in l&&!(typeof j=="function"&&j instanceof j&&typeof de=="function"&&de instanceof de)&&(R=!1)}return m.delete(s),m.delete(l),R}t.exports=a}),g3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"DataView");t.exports=i}),m3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Promise");t.exports=i}),v3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"Set");t.exports=i}),y3e=ze((e,t)=>{var n=u1(),r=Tu(),i=n(r,"WeakMap");t.exports=i}),S3e=ze((e,t)=>{var n=g3e(),r=k8(),i=m3e(),o=v3e(),a=y3e(),s=GS(),l=x$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),P=l(r),E=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())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case P:return u;case E:return p;case _:return m;case T:return v}return R}),t.exports=M}),b3e=ze((e,t)=>{var n=zye(),r=C$(),i=jye(),o=p3e(),a=S3e(),s=E8(),l=_$(),u=E$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function P(E,_,T,M,I,R){var N=s(E),z=s(_),H=N?m:a(E),$=z?m:a(_);H=H==p?v:H,$=$==p?v:$;var j=H==v,de=$==v,V=H==$;if(V&&l(E)){if(!l(_))return!1;N=!0,j=!1}if(V&&!j)return R||(R=new n),N||u(E)?r(E,_,T,M,I,R):i(E,_,H,T,M,I,R);if(!(T&h)){var J=j&&w.call(E,"__wrapped__"),ie=de&&w.call(_,"__wrapped__");if(J||ie){var Q=J?E.value():E,K=ie?_.value():_;return R||(R=new n),I(Q,K,T,M,R)}}return V?(R||(R=new n),o(E,_,T,M,I,R)):!1}t.exports=P}),x3e=ze((e,t)=>{var n=b3e(),r=qS();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}),P$=ze((e,t)=>{var n=x3e();function r(i,o){return n(i,o)}t.exports=r}),w3e=["ctrl","shift","alt","meta","mod"],C3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function $m(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>C3e[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=>!w3e.includes(o));return{...r,keys:i}}function _3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function k3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function E3e(e){return T$(e,["input","textarea","select"])}function T$({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 P3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var T3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),P=v.toLowerCase();if(u!==r&&P!=="alt"||m!==s&&P!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(P)||l.includes(w))?!0:l?l.every(E=>n.has(E)):!l},A3e=C.exports.createContext(void 0),L3e=()=>C.exports.useContext(A3e),M3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),O3e=()=>C.exports.useContext(M3e),I3e=m$(P$());function R3e(e){let t=C.exports.useRef(void 0);return(0,I3e.default)(t.current,e)||(t.current=e),t.current}var OL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function vt(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=R3e(a),{enabledScopes:h}=O3e(),p=L3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!P3e(h,u?.scopes))return;let m=w=>{if(!(E3e(w)&&!T$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){OL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(P=>{let E=$m(P,u?.combinationKey);if(T3e(w,E,o)||E.keys?.includes("*")){if(_3e(w,E,u?.preventDefault),!k3e(w,E,u?.enabled)){OL(w);return}l(w,E)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey($m(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey($m(w,u?.combinationKey)))}},[e,l,u,h]),i}m$(P$());var UC=new Set;function N3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add($m(t)))}function D3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=$m(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{N3e(e.key)}),document.addEventListener("keyup",e=>{D3e(e.key)})});function z3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const B3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("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 main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),F3e=ct({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("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"})})}),$3e=ct({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("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"})}),H3e=ct({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("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"})}),W3e=ct({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("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 no=(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.OUTPAINTING=8]="OUTPAINTING",e[e.BOUNDING_BOX=9]="BOUNDING_BOX",e))(no||{});const V3e={[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:"ImageToImage 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:"Outpainting settings control the process used to cleanly manage seams between existing compositions and new invocations, using larger areas of the image for seam guidance, or applying various configurations on the generation process.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[9]:{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"}},za=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(md,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(uh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s8,{className:"invokeai__switch-root",...s})]})})};function A$(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(lke(i.target.checked))})]})}const IL=/^-?(0\.)?\.?$/,As=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:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:P,numberInputStepperProps:E,tooltipProps:_,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(IL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(IL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const H=Je.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String(H)),h(H)};return x(hi,{..._,children:re(md,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(uh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z_,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Q_,{className:"invokeai__number-input-field",textAlign:s,...P}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e8,{...E,className:"invokeai__number-input-stepper-button"}),x(J_,{...E,className:"invokeai__number-input-stepper-button"})]})]})]})})},Au=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return re(md,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(uh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(hi,{label:i,...o,children:x(yF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})})]})},U3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],G3e=[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],j3e=[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],Y3e=[{key:"2x",value:2},{key:"4x",value:4}],P8=0,T8=4294967295,q3e=["gfpgan","codeformer"],K3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],X3e=ft(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),Z3e=ft(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),A8=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee(X3e),{isGFPGANAvailable:i}=Ee(Z3e),o=l=>e(K3(l)),a=l=>e(dV(l)),s=l=>e(X3(l.target.value));return re(en,{direction:"column",gap:2,children:[x(Au,{label:"Type",validValues:q3e.concat(),value:n,onChange:s}),x(As,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(As,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(za,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(SV(r.target.checked))})}var L$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},RL=le.createContext&&le.createContext(L$),Jc=globalThis&&globalThis.__assign||function(){return Jc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jc.apply(this,arguments)},J3e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function M$(e){return e&&e.map(function(t,n){return le.createElement(t.tag,Jc({key:n},t.attr),M$(t.child))})}function pt(e){return function(t){return x(e4e,{...Jc({attr:Jc({},e.attr)},t),children:M$(e.child)})}}function e4e(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,a=J3e(e,["attr","size","title"]),s=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),re("svg",{...Jc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Jc(Jc({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),children:[o&&x("title",{children:o}),e.children]})};return RL!==void 0?x(RL.Consumer,{children:function(n){return t(n)}}):t(L$)}function t4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z"}},{tag:"path",attr:{d:"m11 16 5-4-5-4v3.001H3v2h8z"}}]})(e)}function L8(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z"}},{tag:"path",attr:{d:"M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z"}}]})(e)}function n4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z"}}]})(e)}function r4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z"}}]})(e)}function i4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11 6H9v3H6v2h3v3h2v-3h3V9h-3z"}},{tag:"path",attr:{d:"M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(e)}function o4e(e){return pt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6 9h8v2H6z"}},{tag:"path",attr:{d:"M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z"}}]})(e)}const mt=Pe((e,t)=>{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(hi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ha,{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 bs(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:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:P=!0,withReset:E=!1,hideTooltip:_=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:H,sliderMarkProps:$,sliderTrackProps:j,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:Q,sliderIAIIconButtonProps:K,...G}=e,[Z,te]=C.exports.useState(String(i)),X=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Z&&Z!==""&&te(String(i))},[i,Z,te]);const he=De=>{const $e=Je.clamp(S?Math.floor(Number(De.target.value)):Number(De.target.value),o,X);te(String($e)),l($e)},ye=De=>{te(De),l(Number(De))},Se=()=>{!T||T()};return re(md,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(uh,{className:"invokeai__slider-component-label",...H,children:r}),re(Gz,{w:"100%",gap:2,children:[re(a8,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:ye,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&re($n,{children:[x(RC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...$,children:o}),x(RC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...$,children:a})]}),x(AF,{className:"invokeai__slider_track",...j,children:x(LF,{className:"invokeai__slider_track-filled"})}),x(hi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:_,...Q,children:x(TF,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z_,{min:o,max:X,step:s,value:Z,onChange:ye,onBlur:he,className:"invokeai__slider-number-field",isDisabled:R,...V,children:[x(Q_,{className:"invokeai__slider-number-input",width:w,readOnly:P,...J}),re(dF,{...ie,children:[x(e8,{className:"invokeai__slider-number-stepper"}),x(J_,{className:"invokeai__slider-number-stepper"})]})]}),E&&x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L8,{}),onClick:Se,isDisabled:M,...K})]})]})}function O$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(bs,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const I$=()=>x(Nl,{flex:"1",textAlign:"left",children:"Other Options"}),a4e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(en,{gap:2,direction:"column",children:x(za,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(hV(r.target.checked))})})},s4e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(en,{gap:2,direction:"column",children:x(za,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(vV(r.target.checked))})})},R$=()=>re(en,{gap:2,direction:"column",children:[x(s4e,{}),x(a4e,{})]}),M8=()=>x(Nl,{flex:"1",textAlign:"left",children:"Seed"});function l4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(za,{label:"Randomize Seed",isChecked:t,onChange:r=>e(ake(r.target.checked))})}function u4e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(f2(o));return x(As,{label:"Seed",step:1,precision:0,flexGrow:1,min:P8,max:T8,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const N$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function c4e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(f2(N$(P8,T8))),children:x("p",{children:"Shuffle"})})}function d4e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(As,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(cke(r)),value:t,isInteger:!1})}function f4e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(As,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(eke(r)),value:t,isInteger:!1})}const O8=()=>re(en,{gap:2,direction:"column",children:[x(l4e,{}),re(en,{gap:2,children:[x(u4e,{}),x(c4e,{})]}),x(en,{gap:2,children:x(d4e,{})}),x(en,{gap:2,children:x(f4e,{})})]});function D$(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(za,{isDisabled:!e,isChecked:t,onChange:i=>n(ske(i.target.checked))})]})}const h4e=ft(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),p4e=ft(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),I8=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(h4e),{isESRGANAvailable:r}=Ee(p4e);return re("div",{className:"upscale-options",children:[x(Au,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:Y3e}),x(As,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function g4e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(za,{isChecked:e,width:"auto",onChange:r=>t(nke(r.target.checked))})}function R8(){return re(en,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(g4e,{})]})}function m4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(md,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(uh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k_,{...s,className:"input-entry",size:"sm",width:o})]})}function v4e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(yV(i.target.value));return x(m4e,{label:"Seed Weights",value:e,isInvalid:t&&!(C8(e)||e===""),isDisabled:!t,onChange:r})}function y4e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(As,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(dke(i)),isInteger:!1})}const N8=()=>re(en,{gap:2,direction:"column",children:[x(y4e,{}),x(v4e,{})]});function S4e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(As,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(cV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Cr=ft(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:Je.isEqual}}),b4e=ft(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),z$=e=>e.options;function x4e(){const e=Ee(i=>i.options.height),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(fV(Number(i.target.value))),validValues:j3e,styleClass:"main-option-block"})}const w4e=ft([e=>e.options,b4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function C4e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(w4e);return x(As,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(Q8e(i)),value:t,width:D8,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function _4e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(Au,{label:"Sampler",value:e,onChange:r=>t(mV(r.target.value)),validValues:U3e,styleClass:"main-option-block"})}function k4e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(As,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(xV(r)),value:t,width:D8,styleClass:"main-option-block",textAlign:"center"})}function E4e(){const e=Ee(i=>i.options.width),t=Ee(Cr),n=Xe();return x(Au,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(wV(Number(i.target.value))),validValues:G3e,styleClass:"main-option-block"})}const D8="auto";function z8(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(C4e,{}),x(k4e,{}),x(S4e,{})]}),re("div",{className:"main-options-row",children:[x(E4e,{}),x(x4e,{}),x(_4e,{})]})]})})}const P4e={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:[]},B$=MS({name:"system",initialState:P4e,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:T4e,setIsProcessing:gu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:NL,setSocketId:qPe,setShouldConfirmOnDelete:F$,setOpenAccordions:A4e,setSystemStatus:L4e,setCurrentStatus:G3,setSystemConfig:M4e,setShouldDisplayGuides:O4e,processingCanceled:I4e,errorOccurred:DL,errorSeen:$$,setModelList:zL,setIsCancelable:Kp,modelChangeRequested:R4e,setSaveIntermediatesInterval:N4e,setEnableImageDebugging:D4e,generationRequested:z4e,addToast:am,clearToastQueue:B4e,setProcessingIndeterminateTask:F4e}=B$.actions,$4e=B$.reducer;function H4e(e){return pt({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 W4e(e){return pt({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 H$(e){return pt({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 V4e(e){return pt({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 U4e(e){return pt({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 G4e=ft(e=>e.system,e=>e.shouldDisplayGuides),j4e=({children:e,feature:t})=>{const n=Ee(G4e),{text:r}=V3e[t];return n?re(t8,{trigger:"hover",children:[x(i8,{children:x(Nl,{children:e})}),re(r8,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n8,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},Y4e=Pe(({feature:e,icon:t=H4e},n)=>x(j4e,{feature:e,children:x(Nl,{ref:n,children:x(ma,{marginBottom:"-.15rem",as:t})})}));function q4e(e){const{header:t,feature:n,options:r}=e;return re(zf,{className:"advanced-settings-item",children:[x("h2",{children:re(Nf,{className:"advanced-settings-header",children:[t,x(Y4e,{feature:n}),x(Df,{})]})}),x(Bf,{className:"advanced-settings-panel",children:r})]})}const B8=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(A4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(q4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function K4e(e){return pt({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 X4e(e){return pt({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 Z4e(e){return pt({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 W$(e){return pt({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 V$(e){return pt({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 Q4e(e){return pt({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 J4e(e){return pt({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 e5e(e){return pt({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 t5e(e){return pt({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 n5e(e){return pt({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 F8(e){return pt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function U$(e){return pt({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 KS(e){return pt({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 r5e(e){return pt({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 G$(e){return pt({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 i5e(e){return pt({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 o5e(e){return pt({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 a5e(e){return pt({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 s5e(e){return pt({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 l5e(e){return pt({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 u5e(e){return pt({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 c5e(e){return pt({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 d5e(e){return pt({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 f5e(e){return pt({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 h5e(e){return pt({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 p5e(e){return pt({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 g5e(e){return pt({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 m5e(e){return pt({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 v5e(e){return pt({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 y5e(e){return pt({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 S5e(e){return pt({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 j$(e){return pt({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 b5e(e){return pt({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 x5e(e){return pt({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 BL(e){return pt({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 Y$(e){return pt({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 w5e(e){return pt({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 c1(e){return pt({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 C5e(e){return pt({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 $8(e){return pt({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 _5e(e){return pt({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 H8(e){return pt({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 k5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],W8=e=>e.kind==="line"&&e.layer==="mask",E5e=e=>e.kind==="line"&&e.layer==="base",o5=e=>e.kind==="image"&&e.layer==="base",P5e=e=>e.kind==="line",Rn=e=>e.canvas,Lu=e=>e.canvas.layerState.stagingArea.images.length>0,q$=e=>e.canvas.layerState.objects.find(o5),K$=ft([e=>e.options,e=>e.system,q$,Cr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(C8(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:Je.isEqual,resultEqualityCheck:Je.isEqual}}),GC=Jr("socketio/generateImage"),T5e=Jr("socketio/runESRGAN"),A5e=Jr("socketio/runFacetool"),L5e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),FL=Jr("socketio/requestNewImages"),M5e=Jr("socketio/cancelProcessing"),O5e=Jr("socketio/requestSystemConfig"),X$=Jr("socketio/requestModelChange"),I5e=Jr("socketio/saveStagingAreaImageToGallery"),R5e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(hi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function Z$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i}=Ee(K$),o=Ee(Cr),a=()=>{r(GC(o))};return vt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(o))},[i,o]),x("div",{style:{flexGrow:4},children:t?x(mt,{"aria-label":"Invoke",type:"submit",icon:x(m5e,{}),isDisabled:!i,onClick:a,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:a,className:"invoke-btn",...n,children:"Invoke"})})}const N5e=ft(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function Q$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(N5e),a=()=>n(M5e());return vt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(mt,{icon:x(U4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const D5e=ft(e=>e.options,e=>e.shouldLoopback),z5e=()=>{const e=Xe(),t=Ee(D5e);return x(mt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(y5e,{}),onClick:()=>{e(ike(!t))}})},V8=()=>{const e=Ee(Cr);return re("div",{className:"process-buttons",children:[x(Z$,{}),e==="img2img"&&x(z5e,{}),x(Q$,{})]})},B5e=ft([e=>e.options,Cr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),U8=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(B5e),{isReady:r}=Ee(K$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};vt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(md,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(BF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function J$(e){return pt({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 eH(e){return pt({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 F5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function $5e(e,t){e.classList?e.classList.add(t):F5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $L(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function H5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$L(e.className,t):e.setAttribute("class",$L(e.className&&e.className.baseVal||"",t))}const HL={disabled:!1},tH=le.createContext(null);var nH=function(t){return t.scrollTop},sm="unmounted",xf="exited",wf="entering",Ip="entered",YC="exiting",Mu=function(e){$_(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=xf,o.appearStatus=wf):l=Ip:r.unmountOnExit||r.mountOnEnter?l=sm:l=xf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sm?{status:xf}: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!==wf&&a!==Ip&&(o=wf):(a===wf||a===Ip)&&(o=YC)}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===wf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&nH(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===xf&&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]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||HL.disabled){this.safeSetState({status:Ip},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:wf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Ip},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:yy.findDOMNode(this);if(!o||HL.disabled){this.safeSetState({status:xf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:xf},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:yy.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=z_(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(tH.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Mu.contextType=tH;Mu.propTypes={};function Ep(){}Mu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Mu.UNMOUNTED=sm;Mu.EXITED=xf;Mu.ENTERING=wf;Mu.ENTERED=Ip;Mu.EXITING=YC;const W5e=Mu;var V5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return $5e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return H5e(t,r)})},G8=function(e){$_(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,l){var u=r.resolveArguments(s,l),h=u[0],p=u[1];r.removeClasses(h,"exit"),r.addClass(h,p?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,l)},r.onEntering=function(s,l){var u=r.resolveArguments(s,l),h=u[0],p=u[1],m=p?"appear":"enter";r.addClass(h,m,"active"),r.props.onEntering&&r.props.onEntering(s,l)},r.onEntered=function(s,l){var u=r.resolveArguments(s,l),h=u[0],p=u[1],m=p?"appear":"enter";r.removeClasses(h,m),r.addClass(h,m,"done"),r.props.onEntered&&r.props.onEntered(s,l)},r.onExit=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var l=r.resolveArguments(s),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var l=r.resolveArguments(s),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,l){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,l]},r.getClassNames=function(s){var l=r.props.classNames,u=typeof l=="string",h=u&&l?l+"-":"",p=u?""+h+s:l[s],m=u?p+"-active":l[s+"Active"],v=u?p+"-done":l[s+"Done"];return{baseClassName:p,activeClassName:m,doneClassName:v}},r}var n=t.prototype;return n.addClass=function(i,o,a){var s=this.getClassNames(o)[a+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;o==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&i&&nH(i),s&&(this.appliedClasses[o][a]=s,V5e(i,s))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],s=a.base,l=a.active,u=a.done;this.appliedClasses[o]={},s&&pw(i,s),l&&pw(i,l),u&&pw(i,u)},n.render=function(){var i=this.props;i.classNames;var o=z_(i,["classNames"]);return x(W5e,{...o,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(le.Component);G8.defaultProps={classNames:""};G8.propTypes={};const rH=G8,hl=(e,t)=>Math.floor(e/t)*t,Wc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(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}},WL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),U5e=e=>({width:Wc(e.width,64),height:Wc(e.height,64)}),G5e=.999,j5e=.1,Y5e=20,Fg=.95,lm={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},q5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},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:lm,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,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"},iH=MS({name:"canvas",initialState:q5e,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(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!W8(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:hl(Je.clamp(n.width,64,512),64),height:hl(Je.clamp(n.height,64,512),64)},o={x:Wc(n.width/2-i.width/2,64),y:Wc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...lm,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Fg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=hl(Je.clamp(i,64,n/e.stageScale),64),s=hl(Je.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=U5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=WL(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(Je.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(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(P5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(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(e.layerState),e.layerState=lm,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Fg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=WL(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(o5)){const i=Pp(r.width,r.height,512,512,Fg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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=Pp(r,i,s,l,Fg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Fg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},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(Je.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...lm.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!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:hl(Je.clamp(o,64,512),64),height:hl(Je.clamp(a,64,512),64)},l={x:Wc(o/2-s.width/2,64),y:Wc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...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}}}),{addImageToStagingArea:K5e,addLine:oH,addPointToCurrentLine:aH,clearMask:X5e,commitStagingAreaImage:Z5e,discardStagedImages:Q5e,fitBoundingBoxToStage:KPe,nextStagingAreaImage:J5e,prevStagingAreaImage:eSe,redo:tSe,resetCanvas:sH,resetCanvasInteractionState:nSe,resetCanvasView:rSe,resizeAndScaleCanvas:lH,resizeCanvas:iSe,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:um,setBoundingBoxPreviewFill:XPe,setBrushColor:oSe,setBrushSize:mw,setCanvasContainerDimensions:aSe,clearCanvasHistory:uH,setCursorPosition:cH,setDoesCanvasNeedScaling:Wi,setInitialCanvasImage:j8,setInpaintReplace:VL,setIsDrawing:XS,setIsMaskEnabled:dH,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:ZPe,setIsMoveStageKeyHeld:QPe,setIsMovingBoundingBox:UL,setIsMovingStage:a5,setIsTransformingBoundingBox:vw,setLayer:fH,setMaskColor:sSe,setMergedCanvas:lSe,setShouldAutoSave:uSe,setShouldCropToBoundingBoxOnSave:cSe,setShouldDarkenOutsideBoundingBox:dSe,setShouldLockBoundingBox:JPe,setShouldPreserveMaskedArea:fSe,setShouldShowBoundingBox:hSe,setShouldShowBrush:eTe,setShouldShowBrushPreview:tTe,setShouldShowCanvasDebugInfo:pSe,setShouldShowCheckboardTransparency:nTe,setShouldShowGrid:gSe,setShouldShowIntermediates:mSe,setShouldShowStagingImage:vSe,setShouldShowStagingOutline:GL,setShouldSnapToGrid:ySe,setShouldUseInpaintReplace:SSe,setStageCoordinates:hH,setStageDimensions:rTe,setStageScale:bSe,setTool:C0,toggleShouldLockBoundingBox:iTe,toggleTool:oTe,undo:xSe}=iH.actions,wSe=iH.reducer,pH=""+new URL("logo.13003d72.png",import.meta.url).href,CSe=ft(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:Je.isEqual}}),Y8=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(CSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;vt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(Wi(!0)),400)},[n,i]),vt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),vt("shift+o",()=>{m(),t(Wi(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J8e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(rke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(oke(!i)),t(Wi(!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]),x(rH,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(hi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(J$,{}):x(eH,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function _Se(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Q3e,{}),x(B8,{accordionInfo:e})]})}const q8=C.exports.createContext(null),kSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(q8),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x($8,{}),x(Gf,{size:"lg",children:"Click or Drag and Drop"})]})})},ESe=ft(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=_v(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(ESe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(L5e(e)),o()};vt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(F$(!S.target.checked));return re($n,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(lF,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Av,{children:re(en,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(md,{children:re(en,{alignItems:"center",children:[x(uh,{mb:0,children:"Don't ask me again"}),x(s8,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,className:"modal-close-btn",children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),ed=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t8,{...o,children:[x(i8,{children:t}),re(r8,{className:`invokeai__popover-content ${r}`,children:[i&&x(n8,{className:"invokeai__popover-arrow"}),n]})]})},PSe=ft([e=>e.system,e=>e.options,e=>e.gallery,Cr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),gH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(PSe),m=o2(),v=()=>{!u||(h&&e(cd(!1)),e(d2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};vt("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=()=>{!u||(u.metadata&&e(K8e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};vt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.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 P=()=>{u?.metadata&&e(f2(u.metadata.image.seed))};vt("s",()=>{u?.metadata?.image?.seed?(P(),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 E=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));vt("p",()=>{u?.metadata?.image?.prompt?(E(),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(T5e(u))};vt("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(A5e(u))};vt("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(bV(!l)),I=()=>{!u||(h&&e(cd(!1)),e(j8(u)),e(Wi(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return vt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Send to...",icon:x(x5e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(BL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:I,leftIcon:x(BL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(KS,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(G$,{}),size:"sm",children:x(jf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(mt,{icon:x(v5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:E}),x(mt,{icon:x(b5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:P}),x(mt,{icon:x(t5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(l5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(A8,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(ed,{trigger:"hover",triggerComponent:x(mt,{icon:x(o5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(I8,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:_,children:"Upscale Image"})]})})]}),x(mt,{icon:x(U$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(mt,{icon:x(c1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},TSe={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},mH=MS({name:"gallery",initialState:TSe,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=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r<n.length-1){const i=n[r+1];e.currentImage=i,e.currentImageUuid=i.uuid}}},selectPrevImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:vH,setCurrentImage:ASe,addGalleryImages:LSe,setIntermediateImage:MSe,selectNextImage:K8,selectPrevImage:X8,setShouldPinGallery:OSe,setShouldShowGallery:_0,setGalleryScrollPosition:ISe,setGalleryImageMinimumWidth:$g,setGalleryImageObjectFit:RSe,setShouldHoldGalleryOpen:yH,setShouldAutoSwitchToNewImages:NSe,setCurrentCategory:Wy,setGalleryWidth:DSe}=mH.actions,zSe=mH.reducer;ct({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"});ct({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"});ct({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"});ct({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"});ct({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ct({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"});ct({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("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"})});ct({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"});ct({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"});ct({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"});ct({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"});ct({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ct({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({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"});ct({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("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"})})});ct({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ct({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ct({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ct({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ct({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ct({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ct({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ct({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ct({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"});ct({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var SH=ct({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ct({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ct({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"});ct({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"});ct({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({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"});ct({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"});ct({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"});ct({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"});ct({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("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"}),x("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"})]})});ct({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"});ct({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"});ct({displayName:"SpinnerIcon",path:re($n,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ct({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"});ct({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("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"})});ct({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"});ct({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"});ct({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"});ct({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ct({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"});ct({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"});ct({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"});ct({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("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"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ct({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"});ct({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"});ct({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ct({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ct({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 BSe(e){return pt({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 Gn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i,withCopy:o=!1})=>re(en,{gap:2,children:[n&&x(hi,{label:`Recall ${e}`,children:x(Ha,{"aria-label":"Use this parameter",icon:x(BSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),o&&x(hi,{label:`Copy ${e}`,children:x(Ha,{"aria-label":`Copy ${e}`,icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(t.toString())})}),re(en,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(jf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(SH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),FSe=(e,t)=>e.image.uuid===t.image.uuid,bH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();vt("esc",()=>{n(bV(!1))});const r=e?.metadata?.image||{},i=e?.dreamPrompt,{type:o,postprocessing:a,sampler:s,prompt:l,seed:u,variations:h,steps:p,cfg_scale:m,seamless:v,hires_fix:S,width:w,height:P,strength:E,fit:_,init_image_path:T,mask_image_path:M,orig_path:I,scale:R}=r,N=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(en,{gap:1,direction:"column",width:"100%",children:[re(en,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(jf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(SH,{mx:"2px"})]})]}),Object.keys(r).length>0?re($n,{children:[o&&x(Gn,{label:"Generation type",value:o}),e.metadata?.model_weights&&x(Gn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(o)&&x(Gn,{label:"Original image",value:I}),o==="gfpgan"&&E!==void 0&&x(Gn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),o==="esrgan"&&R!==void 0&&x(Gn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),o==="esrgan"&&E!==void 0&&x(Gn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),l&&x(Gn,{label:"Prompt",labelPosition:"top",value:U3(l),onClick:()=>n(gb(l))}),u!==void 0&&x(Gn,{label:"Seed",value:u,onClick:()=>n(f2(u))}),s&&x(Gn,{label:"Sampler",value:s,onClick:()=>n(mV(s))}),p&&x(Gn,{label:"Steps",value:p,onClick:()=>n(xV(p))}),m!==void 0&&x(Gn,{label:"CFG scale",value:m,onClick:()=>n(cV(m))}),h&&h.length>0&&x(Gn,{label:"Seed-weight pairs",value:i5(h),onClick:()=>n(yV(i5(h)))}),v&&x(Gn,{label:"Seamless",value:v,onClick:()=>n(vV(v))}),S&&x(Gn,{label:"High Resolution Optimization",value:S,onClick:()=>n(hV(S))}),w&&x(Gn,{label:"Width",value:w,onClick:()=>n(wV(w))}),P&&x(Gn,{label:"Height",value:P,onClick:()=>n(fV(P))}),T&&x(Gn,{label:"Initial image",value:T,isLink:!0,onClick:()=>n(d2(T))}),M&&x(Gn,{label:"Mask image",value:M,isLink:!0,onClick:()=>n(gV(M))}),o==="img2img"&&E&&x(Gn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),_&&x(Gn,{label:"Image to image fit",value:_,onClick:()=>n(SV(_))}),a&&a.length>0&&re($n,{children:[x(Gf,{size:"sm",children:"Postprocessing"}),a.map((z,H)=>{if(z.type==="esrgan"){const{scale:$,strength:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Upscale (ESRGAN)`}),x(Gn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(Gn,{label:"Strength",value:j,onClick:()=>n(x9(j))})]},H)}else if(z.type==="gfpgan"){const{strength:$}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (GFPGAN)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},H)}else if(z.type==="codeformer"){const{strength:$,fidelity:j}=z;return re(en,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${H+1}: Face restoration (Codeformer)`}),x(Gn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),j&&x(Gn,{label:"Fidelity",value:j,onClick:()=>{n(dV(j)),n(X3("codeformer"))}})]},H)}})]}),i&&x(Gn,{withCopy:!0,label:"Dream Prompt",value:i}),re(en,{gap:2,direction:"column",children:[re(en,{gap:2,children:[x(hi,{label:"Copy metadata JSON",children:x(Ha,{"aria-label":"Copy metadata JSON",icon:x(KS,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(N)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:N})})]})]}):x($z,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},FSe),xH=ft([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=>u.uuid===e?.currentImage?.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:Je.isEqual}});function $Se(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())},m=()=>{e(cd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(bH,{image:i,styleClass:"current-image-metadata"})]})}const HSe=ft([e=>e.gallery,e=>e.options,Cr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),wH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(HSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re($n,{children:[x(gH,{}),x($Se,{})]}):x("div",{className:"current-image-display-placeholder",children:x(V4e,{})})})},WSe=()=>{const e=C.exports.useContext(q8);return x(mt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x($8,{}),onClick:e||void 0})};function VSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=o2(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(uV())};return re($n,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(WSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const USe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(VSe,{})}):x(kSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(wH,{})})]})};function GSe(e){return pt({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 jSe=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)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Br.apply(this,arguments)},jL={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},YL={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Vy={width:"20px",height:"20px",position:"absolute"},YSe={top:Br(Br({},jL),{top:"-5px"}),right:Br(Br({},YL),{left:void 0,right:"-5px"}),bottom:Br(Br({},jL),{top:void 0,bottom:"-5px"}),left:Br(Br({},YL),{left:"-5px"}),topRight:Br(Br({},Vy),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Br(Br({},Vy),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Br(Br({},Vy),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Br(Br({},Vy),{left:"-10px",top:"-10px",cursor:"nw-resize"})},qSe=function(e){jSe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return x("div",{className:this.props.className||"",style:Br(Br({position:"absolute",userSelect:"none"},YSe[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(C.exports.PureComponent),KSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cl=globalThis&&globalThis.__assign||function(){return cl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},cl.apply(this,arguments)},XSe={width:"auto",height:"auto"},Uy=function(e,t,n){return Math.max(Math.min(e,n),t)},qL=function(e,t){return Math.round(e/t)*t},Ap=function(e,t){return new RegExp(e,"i").test(t)},Gy=function(e){return Boolean(e.touches&&e.touches.length)},ZSe=function(e){return Boolean((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},KL=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},Sw=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},jy=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return n*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},QSe=function(e,t,n,r,i,o,a){return r=jy(r,e.width,t,n),i=jy(i,e.height,t,n),o=jy(o,e.width,t,n),a=jy(a,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},JSe=["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"],XL="__resizable_base__",CH=function(e){KSe(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(XL):o.className+=XL,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||XSe},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 Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(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&&Ap("left",o),s=i&&Ap("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<l?n:l),u&&Number.isFinite(u)&&(r=r&&r<u?r:u),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var i=this.props.scale||1,o=this.props.resizeRatio||1,a=this.state,s=a.direction,l=a.original,u=this.props,h=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=l.width,S=l.height,w=p||0,P=m||0;return Ap("right",s)&&(v=l.width+(n-l.x)*o/i,h&&(S=(v-P)/this.ratio+w)),Ap("left",s)&&(v=l.width-(n-l.x)*o/i,h&&(S=(v-P)/this.ratio+w)),Ap("bottom",s)&&(S=l.height+(r-l.y)*o/i,h&&(v=(S-w)*this.ratio+P)),Ap("top",s)&&(S=l.height-(r-l.y)*o/i,h&&(v=(S-w)*this.ratio+P)),{newWidth:v,newHeight:S}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,i,o){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,h=typeof o.width>"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var P=(m-S)*this.ratio+w,E=(v-S)*this.ratio+w,_=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,P),I=Math.min(p,E),R=Math.max(m,_),N=Math.min(v,T);n=Uy(n,M,I),r=Uy(r,R,N)}else n=Uy(n,h,p),r=Uy(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&&ZSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Gy(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 p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Gy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Gy(n)?n.touches[0].clientX:n.clientX,h=Gy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,P=this.getParentSize(),E=QSe(P,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=E.maxWidth,a=E.maxHeight,s=E.minWidth,l=E.minHeight;var _=this.calculateNewSizeFromDirection(u,h),T=_.newHeight,M=_.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=KL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=KL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=qL(M,this.props.grid[0]),z=qL(T,this.props.grid[1]),H=this.props.snapGap||0;M=H===0||Math.abs(N-M)<=H?N:M,T=H===0||Math.abs(z-T)<=H?z:T}var $={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var j=M/P.width*100;M=j+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var j=T/P.height*100;T=j+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Il.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:cl(cl({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(qSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return JSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=cl(cl(cl({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return re(o,{...cl({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("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 qn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,P=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:P},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` 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?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,ebe(i,...t)]}function ebe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function tbe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _H(...e){return t=>e.forEach(n=>tbe(n,t))}function Ua(...e){return C.exports.useCallback(_H(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(rbe);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(KC,Tn({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,Tn({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...ibe(r,n.props),ref:_H(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const nbe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function rbe(e){return C.exports.isValidElement(e)&&e.type===nbe}function ibe(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 obe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],_u=obe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,Tn({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kH(e,t){e&&Il.exports.flushSync(()=>e.dispatchEvent(t))}function EH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,P=le.useRef(null),E=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:E,collectionRef:P},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:P}=v,E=o(s,w),_=Ua(S,E.collectionRef);return le.createElement(Iv,{ref:_},P)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:P,...E}=v,_=le.useRef(null),T=Ua(S,_),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(_,{ref:_,...E}),()=>void M.itemMap.delete(_))),le.createElement(Iv,{[h]:"",ref:T},P)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const E=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>E.indexOf(M.ref.current)-E.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const abe=C.exports.createContext(void 0);function PH(e){const t=C.exports.useContext(abe);return e||t||"ltr"}function Ll(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 sbe(e,t=globalThis?.document){const n=Ll(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",lbe="dismissableLayer.pointerDownOutside",ube="dismissableLayer.focusOutside";let ZL;const cbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dbe=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(cbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Ua(t,z=>m(z)),P=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),_=P.indexOf(E),T=p?P.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=_,R=fbe(z=>{const H=z.target,$=[...h.branches].some(j=>j.contains(H));!I||$||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=hbe(z=>{const H=z.target;[...h.branches].some(j=>j.contains(H))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return sbe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ZL=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),QL(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ZL)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),QL())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(_u.div,Tn({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:qn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:qn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:qn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function fbe(e,t=globalThis?.document){const n=Ll(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(){TH(lbe,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 hbe(e,t=globalThis?.document){const n=Ll(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&TH(ube,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 QL(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function TH(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?kH(i,o):i.dispatchEvent(o)}let bw=0;function pbe(){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:JL()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:JL()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function JL(){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 xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},gbe=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=Ll(i),h=Ll(o),p=C.exports.useRef(null),m=Ua(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(E){if(v.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Cf(p.current,{select:!0})},P=function(E){v.paused||!s||s.contains(E.relatedTarget)||Cf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",P),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",P)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){nM.add(v);const w=document.activeElement;if(!s.contains(w)){const E=new CustomEvent(xw,eM);s.addEventListener(xw,u),s.dispatchEvent(E),E.defaultPrevented||(mbe(xbe(AH(s)),{select:!0}),document.activeElement===w&&Cf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const E=new CustomEvent(ww,eM);s.addEventListener(ww,h),s.dispatchEvent(E),E.defaultPrevented||Cf(w??document.body,{select:!0}),s.removeEventListener(ww,h),nM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const P=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(P&&E){const _=w.currentTarget,[T,M]=vbe(_);T&&M?!w.shiftKey&&E===M?(w.preventDefault(),n&&Cf(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),n&&Cf(M,{select:!0})):E===_&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(_u.div,Tn({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function mbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cf(r,{select:t}),document.activeElement!==n)return}function vbe(e){const t=AH(e),n=tM(t,e),r=tM(t.reverse(),e);return[n,r]}function AH(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 tM(e,t){for(const n of e)if(!ybe(n,{upTo:t}))return n}function ybe(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 Sbe(e){return e instanceof HTMLInputElement&&"select"in e}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sbe(e)&&t&&e.select()}}const nM=bbe();function bbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rM(e,t),e.unshift(t)},remove(t){var n;e=rM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function rM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},wbe=zw["useId".toString()]||(()=>{});let Cbe=0;function _be(e){const[t,n]=C.exports.useState(wbe());return Y0(()=>{e||n(r=>r??String(Cbe++))},[e]),e||(t?`radix-${t}`:"")}function d1(e){return e.split("-")[0]}function ZS(e){return e.split("-")[1]}function f1(e){return["top","bottom"].includes(d1(e))?"x":"y"}function Z8(e){return e==="y"?"height":"width"}function iM(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=f1(t),l=Z8(s),u=r[l]/2-i[l]/2,h=d1(t),p=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(ZS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const kbe=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}=iM(l,r,s),p=r,m={},v=0;for(let S=0;S<o.length;S++){const{name:w,fn:P}=o[S],{x:E,y:_,data:T,reset:M}=await P({x:u,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=E??u,h=_??h,m={...m,[w]:{...m[w],...T}},M&&v<=50){v++,typeof M=="object"&&(M.placement&&(p=M.placement),M.rects&&(l=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:u,y:h}=iM(l,p,s)),S=-1;continue}}return{x:u,y:h,placement:p,strategy:i,middlewareData:m}};function Ebe(e){return{top:0,right:0,bottom:0,left:0,...e}}function LH(e){return typeof e!="number"?Ebe(e):{top:e,right:e,bottom:e,left:e}}function s5(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function l5(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=t,S=LH(v),P=s[m?p==="floating"?"reference":"floating":p],E=s5(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(P)))==null||n?P:P.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:h,strategy:l})),_=s5(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[p]);return{top:E.top-_.top+S.top,bottom:_.bottom-E.bottom+S.bottom,left:E.left-_.left+S.left,right:_.right-E.right+S.right}}const Pbe=Math.min,Tbe=Math.max;function ZC(e,t,n){return Tbe(e,Pbe(t,n))}const oM=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=LH(r),h={x:i,y:o},p=f1(a),m=ZS(a),v=Z8(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",P=p==="y"?"bottom":"right",E=s.reference[v]+s.reference[p]-h[p]-s.floating[v],_=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=E/2-_/2,R=u[w],N=M-S[v]-u[P],z=M/2-S[v]/2+I,H=ZC(R,z,N),de=(m==="start"?u[w]:u[P])>0&&z!==H&&s.reference[v]<=s.floating[v]?z<R?R-z:N-z:0;return{[p]:h[p]-de,data:{[p]:H,centerOffset:z-H}}}}),Abe={left:"right",right:"left",bottom:"top",top:"bottom"};function u5(e){return e.replace(/left|right|bottom|top/g,t=>Abe[t])}function Lbe(e,t,n){n===void 0&&(n=!1);const r=ZS(e),i=f1(e),o=Z8(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u5(a)),{main:a,cross:u5(a)}}const Mbe={start:"end",end:"start"};function aM(e){return e.replace(/start|end/g,t=>Mbe[t])}const Obe=["top","right","bottom","left"];function Ibe(e){const t=u5(e);return[aM(e),t,aM(t)]}const Rbe=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:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=d1(r),E=p||(w===a||!v?[u5(a)]:Ibe(a)),_=[a,...E],T=await l5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:H,cross:$}=Lbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[H],T[$])}if(I=[...I,{placement:r,overflows:M}],!M.every(H=>H<=0)){var R,N;const H=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,$=_[H];if($)return{data:{index:H,overflows:I},reset:{placement:$}};let j="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(j=de);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function sM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lM(e){return Obe.some(t=>e[t]>=0)}const Nbe=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 l5(r,{...n,elementContext:"reference"}),a=sM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:lM(a)}}}case"escaped":{const o=await l5(r,{...n,altBoundary:!0}),a=sM(o,i.floating);return{data:{escapedOffsets:a,escaped:lM(a)}}}default:return{}}}}};async function Dbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=d1(n),s=ZS(n),l=f1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};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 zbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Dbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function MH(e){return e==="x"?"y":"x"}const Bbe=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:P=>{let{x:E,y:_}=P;return{x:E,y:_}}},...l}=e,u={x:n,y:r},h=await l5(t,l),p=f1(d1(i)),m=MH(p);let v=u[p],S=u[m];if(o){const P=p==="y"?"top":"left",E=p==="y"?"bottom":"right",_=v+h[P],T=v-h[E];v=ZC(_,v,T)}if(a){const P=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[P],T=S-h[E];S=ZC(_,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Fbe=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},p=f1(i),m=MH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+P.mainAxis,N=o.reference[p]+o.reference[I]-P.mainAxis;v<R?v=R:v>N&&(v=N)}if(u){var E,_,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(d1(i)),N=o.reference[m]-o.floating[I]+(R&&(E=(_=a.offset)==null?void 0:_[m])!=null?E:0)+(R?0:P.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?P.crossAxis:0);S<N?S=N:S>z&&(S=z)}return{[p]:v,[m]:S}}}};function OH(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ou(e){if(e==null)return window;if(!OH(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Ou(e).getComputedStyle(e)}function ku(e){return OH(e)?"":e?(e.nodeName||"").toLowerCase():""}function IH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ml(e){return e instanceof Ou(e).HTMLElement}function ud(e){return e instanceof Ou(e).Element}function $be(e){return e instanceof Ou(e).Node}function Q8(e){if(typeof ShadowRoot>"u")return!1;const t=Ou(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function QS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Hbe(e){return["table","td","th"].includes(ku(e))}function RH(e){const t=/firefox/i.test(IH()),n=s2(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 NH(){return!/^((?!chrome|android).)*safari/i.test(IH())}const uM=Math.min,Hm=Math.max,c5=Math.round;function Eu(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&&Ml(e)&&(l=e.offsetWidth>0&&c5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c5(s.height)/e.offsetHeight||1);const h=ud(e)?Ou(e):window,p=!NH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(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 bd(e){return(($be(e)?e.ownerDocument:e.document)||window.document).documentElement}function JS(e){return ud(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function DH(e){return Eu(bd(e)).left+JS(e).scrollLeft}function Wbe(e){const t=Eu(e);return c5(t.width)!==e.offsetWidth||c5(t.height)!==e.offsetHeight}function Vbe(e,t,n){const r=Ml(t),i=bd(t),o=Eu(e,r&&Wbe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((ku(t)!=="body"||QS(i))&&(a=JS(t)),Ml(t)){const l=Eu(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=DH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function zH(e){return ku(e)==="html"?e:e.assignedSlot||e.parentNode||(Q8(e)?e.host:null)||bd(e)}function cM(e){return!Ml(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ube(e){let t=zH(e);for(Q8(t)&&(t=t.host);Ml(t)&&!["html","body"].includes(ku(t));){if(RH(t))return t;t=t.parentNode}return null}function QC(e){const t=Ou(e);let n=cM(e);for(;n&&Hbe(n)&&getComputedStyle(n).position==="static";)n=cM(n);return n&&(ku(n)==="html"||ku(n)==="body"&&getComputedStyle(n).position==="static"&&!RH(n))?t:n||Ube(e)||t}function dM(e){if(Ml(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Eu(e);return{width:t.width,height:t.height}}function Gbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ml(n),o=bd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((ku(n)!=="body"||QS(o))&&(a=JS(n)),Ml(n))){const l=Eu(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 jbe(e,t){const n=Ou(e),r=bd(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=NH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Ybe(e){var t;const n=bd(e),r=JS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Hm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Hm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+DH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Hm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function BH(e){const t=zH(e);return["html","body","#document"].includes(ku(t))?e.ownerDocument.body:Ml(t)&&QS(t)?t:BH(t)}function d5(e,t){var n;t===void 0&&(t=[]);const r=BH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ou(r),a=i?[o].concat(o.visualViewport||[],QS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d5(a))}function qbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Q8(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Kbe(e,t){const n=Eu(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 fM(e,t,n){return t==="viewport"?s5(jbe(e,n)):ud(t)?Kbe(t,n):s5(Ybe(bd(e)))}function Xbe(e){const t=d5(e),r=["absolute","fixed"].includes(s2(e).position)&&Ml(e)?QC(e):e;return ud(r)?t.filter(i=>ud(i)&&qbe(i,r)&&ku(i)!=="body"):[]}function Zbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Xbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=fM(t,h,i);return u.top=Hm(p.top,u.top),u.right=uM(p.right,u.right),u.bottom=uM(p.bottom,u.bottom),u.left=Hm(p.left,u.left),u},fM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Qbe={getClippingRect:Zbe,convertOffsetParentRelativeRectToViewportRelativeRect:Gbe,isElement:ud,getDimensions:dM,getOffsetParent:QC,getDocumentElement:bd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Vbe(t,QC(n),r),floating:{...dM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Jbe(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?[...ud(e)?d5(e):[],...d5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ud(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?Eu(e):null;s&&S();function S(){const w=Eu(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(P=>{l&&P.removeEventListener("scroll",n),u&&P.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const exe=(e,t,n)=>kbe(e,t,{platform:Qbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(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(!e9(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)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function txe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function nxe(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=txe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||exe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Il.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(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]),P=C.exports.useCallback(T=>{o.current=T,w()},[w]),E=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:P,floating:E}),[u,v,_,P,E])}const rxe=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?oM({element:t.current,padding:n}).fn(i):{}:t?oM({element:t,padding:n}).fn(i):{}}}};function ixe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{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 FH="Popper",[J8,$H]=a2(FH),[oxe,HH]=J8(FH),axe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(oxe,{scope:t,anchor:r,onAnchorChange:i},n)},sxe="PopperAnchor",lxe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=HH(sxe,n),a=C.exports.useRef(null),s=Ua(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(_u.div,Tn({},i,{ref:s}))}),f5="PopperContent",[uxe,aTe]=J8(f5),[cxe,dxe]=J8(f5,{hasParent:!1,positionUpdateFns:new Set}),fxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:P=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=HH(f5,h),[N,z]=C.exports.useState(null),H=Ua(t,Ct=>z(Ct)),[$,j]=C.exports.useState(null),de=ixe($),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),Q=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},K=Array.isArray(P)?P:[P],G=K.length>0,Z={padding:Q,boundary:K.filter(pxe),altBoundary:G},{reference:te,floating:X,strategy:he,x:ye,y:Se,placement:De,middlewareData:$e,update:He}=nxe({strategy:"fixed",placement:ie,whileElementsMounted:Jbe,middleware:[zbe({mainAxis:m+J,alignmentAxis:S}),M?Bbe({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?Fbe():void 0,...Z}):void 0,$?rxe({element:$,padding:w}):void 0,M?Rbe({...Z}):void 0,gxe({arrowWidth:V,arrowHeight:J}),T?Nbe({strategy:"referenceHidden"}):void 0].filter(hxe)});Y0(()=>{te(R.anchor)},[te,R.anchor]);const qe=ye!==null&&Se!==null,[tt,Ze]=WH(De),nt=(i=$e.arrow)===null||i===void 0?void 0:i.x,Tt=(o=$e.arrow)===null||o===void 0?void 0:o.y,xt=((a=$e.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Le,at]=C.exports.useState();Y0(()=>{N&&at(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:At,positionUpdateFns:st}=dxe(f5,h),gt=!At;C.exports.useLayoutEffect(()=>{if(!gt)return st.add(He),()=>{st.delete(He)}},[gt,st,He]),C.exports.useLayoutEffect(()=>{gt&&qe&&Array.from(st).reverse().forEach(Ct=>requestAnimationFrame(Ct))},[gt,qe,st]);const an={"data-side":tt,"data-align":Ze,...I,ref:H,style:{...I.style,animation:qe?void 0:"none",opacity:(s=$e.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:X,"data-radix-popper-content-wrapper":"",style:{position:he,left:0,top:0,transform:qe?`translate3d(${Math.round(ye)}px, ${Math.round(Se)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Le,["--radix-popper-transform-origin"]:[(l=$e.transformOrigin)===null||l===void 0?void 0:l.x,(u=$e.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(uxe,{scope:h,placedSide:tt,onArrowChange:j,arrowX:nt,arrowY:Tt,shouldHideArrow:xt},gt?C.exports.createElement(cxe,{scope:h,hasParent:!0,positionUpdateFns:st},C.exports.createElement(_u.div,an)):C.exports.createElement(_u.div,an)))});function hxe(e){return e!==void 0}function pxe(e){return e!==null}const gxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=WH(s),P={start:"0%",center:"50%",end:"100%"}[w],E=((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=p?P:`${E}px`,M=`${-v}px`):S==="top"?(T=p?P:`${E}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?P:`${_}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?P:`${_}px`),{data:{x:T,y:M}}}});function WH(e){const[t,n="center"]=e.split("-");return[t,n]}const mxe=axe,vxe=lxe,yxe=fxe;function Sxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const VH=e=>{const{present:t,children:n}=e,r=bxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Ua(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};VH.displayName="Presence";function bxe(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]=Sxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Yy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Yy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Yy(r.current).includes(p.animationName);p.target===t&&v&&Il.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Yy(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 Yy(e){return e?.animationName||"none"}function xxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=wxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ll(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function wxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Ll(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",Cxe={bubbles:!1,cancelable:!0},ek="RovingFocusGroup",[t9,UH,_xe]=EH(ek),[kxe,GH]=a2(ek,[_xe]),[Exe,Pxe]=kxe(ek),Txe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Axe,Tn({},e,{ref:t}))))),Axe=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,p=C.exports.useRef(null),m=Ua(t,p),v=PH(o),[S=null,w]=xxe({prop:a,defaultProp:s,onChange:l}),[P,E]=C.exports.useState(!1),_=Ll(u),T=UH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,_),()=>N.removeEventListener(Cw,_)},[_]),C.exports.createElement(Exe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>E(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(_u.div,Tn({tabIndex:P||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:qn(e.onMouseDown,()=>{M.current=!0}),onFocus:qn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!P){const H=new CustomEvent(Cw,Cxe);if(N.currentTarget.dispatchEvent(H),!H.defaultPrevented){const $=T().filter(ie=>ie.focusable),j=$.find(ie=>ie.active),de=$.find(ie=>ie.id===S),J=[j,de,...$].filter(Boolean).map(ie=>ie.ref.current);jH(J)}}M.current=!1}),onBlur:qn(e.onBlur,()=>E(!1))})))}),Lxe="RovingFocusGroupItem",Mxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=_be(),s=Pxe(Lxe,n),l=s.currentTabStopId===a,u=UH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(_u.span,Tn({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:qn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:qn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:qn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Rxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(P=>P.focusable).map(P=>P.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const P=w.indexOf(m.currentTarget);w=s.loop?Nxe(w,P+1):w.slice(P+1)}setTimeout(()=>jH(w))}})})))}),Oxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ixe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Rxe(e,t,n){const r=Ixe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Oxe[r]}function jH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Dxe=Txe,zxe=Mxe,Bxe=["Enter"," "],Fxe=["ArrowDown","PageUp","Home"],YH=["ArrowUp","PageDown","End"],$xe=[...Fxe,...YH],eb="Menu",[n9,Hxe,Wxe]=EH(eb),[ph,qH]=a2(eb,[Wxe,$H,GH]),tk=$H(),KH=GH(),[Vxe,tb]=ph(eb),[Uxe,nk]=ph(eb),Gxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=tk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Ll(o),m=PH(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(mxe,s,C.exports.createElement(Vxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Uxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},jxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=tk(n);return C.exports.createElement(vxe,Tn({},i,r,{ref:t}))}),Yxe="MenuPortal",[sTe,qxe]=ph(Yxe,{forceMount:void 0}),td="MenuContent",[Kxe,XH]=ph(td),Xxe=C.exports.forwardRef((e,t)=>{const n=qxe(td,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=tb(td,e.__scopeMenu),a=nk(td,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(VH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Zxe,Tn({},i,{ref:t})):C.exports.createElement(Qxe,Tn({},i,{ref:t})))))}),Zxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu),r=C.exports.useRef(null),i=Ua(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(ZH,Tn({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Qxe=C.exports.forwardRef((e,t)=>{const n=tb(td,e.__scopeMenu);return C.exports.createElement(ZH,Tn({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),ZH=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:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=tb(td,n),P=nk(td,n),E=tk(n),_=KH(n),T=Hxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Ua(t,R,w.onContentChange),z=C.exports.useRef(0),H=C.exports.useRef(""),$=C.exports.useRef(0),j=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?oF:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,Q=G=>{var Z,te;const X=H.current+G,he=T().filter(qe=>!qe.disabled),ye=document.activeElement,Se=(Z=he.find(qe=>qe.ref.current===ye))===null||Z===void 0?void 0:Z.textValue,De=he.map(qe=>qe.textValue),$e=swe(De,X,Se),He=(te=he.find(qe=>qe.textValue===$e))===null||te===void 0?void 0:te.ref.current;(function qe(tt){H.current=tt,window.clearTimeout(z.current),tt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(X),He&&setTimeout(()=>He.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),pbe();const K=C.exports.useCallback(G=>{var Z,te;return de.current===((Z=j.current)===null||Z===void 0?void 0:Z.side)&&uwe(G,(te=j.current)===null||te===void 0?void 0:te.area)},[]);return C.exports.createElement(Kxe,{scope:n,searchRef:H,onItemEnter:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),onItemLeave:C.exports.useCallback(G=>{var Z;K(G)||((Z=R.current)===null||Z===void 0||Z.focus(),I(null))},[K]),onTriggerLeave:C.exports.useCallback(G=>{K(G)&&G.preventDefault()},[K]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.exports.useCallback(G=>{j.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(gbe,{asChild:!0,trapped:i,onMountAutoFocus:qn(o,G=>{var Z;G.preventDefault(),(Z=R.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:a},C.exports.createElement(dbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Dxe,Tn({asChild:!0},_,{dir:P.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{P.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(yxe,Tn({role:"menu","aria-orientation":"vertical","data-state":iwe(w.open),"data-radix-menu-content":"",dir:P.dir},E,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:qn(S.onKeyDown,G=>{const te=G.target.closest("[data-radix-menu-content]")===G.currentTarget,X=G.ctrlKey||G.altKey||G.metaKey,he=G.key.length===1;te&&(G.key==="Tab"&&G.preventDefault(),!X&&he&&Q(G.key));const ye=R.current;if(G.target!==ye||!$xe.includes(G.key))return;G.preventDefault();const De=T().filter($e=>!$e.disabled).map($e=>$e.ref.current);YH.includes(G.key)&&De.reverse(),owe(De)}),onBlur:qn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),H.current="")}),onPointerMove:qn(e.onPointerMove,i9(G=>{const Z=G.target,te=V.current!==G.clientX;if(G.currentTarget.contains(Z)&&te){const X=G.clientX>V.current?"right":"left";de.current=X,V.current=G.clientX}}))})))))))}),r9="MenuItem",hM="menu.itemSelect",Jxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=nk(r9,e.__scopeMenu),s=XH(r9,e.__scopeMenu),l=Ua(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(hM,{bubbles:!0,cancelable:!0});p.addEventListener(hM,v=>r?.(v),{once:!0}),kH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(ewe,Tn({},i,{ref:l,disabled:n,onClick:qn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:qn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:qn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Bxe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),ewe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=XH(r9,n),s=KH(n),l=C.exports.useRef(null),u=Ua(t,l),[h,p]=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(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(zxe,Tn({asChild:!0},s,{focusable:!r}),C.exports.createElement(_u.div,Tn({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:qn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:qn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:qn(e.onFocus,()=>p(!0)),onBlur:qn(e.onBlur,()=>p(!1))}))))}),twe="MenuRadioGroup";ph(twe,{value:void 0,onValueChange:()=>{}});const nwe="MenuItemIndicator";ph(nwe,{checked:!1});const rwe="MenuSub";ph(rwe);function iwe(e){return e?"open":"closed"}function owe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function awe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function swe(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=awe(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 lwe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,h=t[a].y;l>r!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function uwe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lwe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const cwe=Gxe,dwe=jxe,fwe=Xxe,hwe=Jxe,QH="ContextMenu",[pwe,lTe]=a2(QH,[qH]),nb=qH(),[gwe,JH]=pwe(QH),mwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=nb(t),u=Ll(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(gwe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(cwe,Tn({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},vwe="ContextMenuTrigger",ywe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(vwe,n),o=nb(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=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(dwe,Tn({},o,{virtualRef:s})),C.exports.createElement(_u.span,Tn({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:qn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:qn(e.onPointerDown,qy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:qn(e.onPointerMove,qy(u)),onPointerCancel:qn(e.onPointerCancel,qy(u)),onPointerUp:qn(e.onPointerUp,qy(u))})))}),Swe="ContextMenuContent",bwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=JH(Swe,n),o=nb(n),a=C.exports.useRef(!1);return C.exports.createElement(fwe,Tn({},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)"}}))}),xwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=nb(n);return C.exports.createElement(hwe,Tn({},i,r,{ref:t}))});function qy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const wwe=mwe,Cwe=ywe,_we=bwe,gf=xwe,kwe=ft([e=>e.gallery,e=>e.options,Lu,Cr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`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:w,isStaging:n,shouldEnableResize:!(w||r==="unifiedCanvas"&&s)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Ewe=ft([e=>e.options,e=>e.gallery,e=>e.system,Cr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Pwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Twe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(Ewe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=o2(),P=()=>S(!0),E=()=>S(!1),_=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(f2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(cd(!1)),t(d2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(cd(!1)),t(j8(s)),t(lH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(X8e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(q8e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(wwe,{onOpenChange:H=>{t(yH(H))},children:[x(Cwe,{children:re(Nl,{position:"relative",className:"hoverable-image",onMouseOver:P,onMouseOut:E,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(ASe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:F8,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(hi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ha,{"aria-label":"Delete image",icon:x(w5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(_we,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:H=>{H.detail.originalEvent.preventDefault()},children:[x(gf,{onClickCapture:_,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(gf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(gf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(hi,{label:"Load initial image used for this generation",children:x(gf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(gf,{onClickCapture:M,children:"Send to Image To Image"}),x(gf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(gf,{"data-warning":!0,children:"Delete Image"})})]})]})},Pwe),gs=e=>{const{label:t,styleClass:n,...r}=e;return x(Az,{className:`invokeai__checkbox ${n}`,...r,children:t})},Ky=320,pM=40,Awe={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}},gM=400;function eW(){const e=Xe(),{images:t,currentCategory:n,currentImageUuid:r,shouldPinGallery:i,shouldShowGallery:o,galleryScrollPosition:a,galleryImageMinimumWidth:s,galleryGridTemplateColumns:l,activeTabName:u,galleryImageObjectFit:h,shouldHoldGalleryOpen:p,shouldAutoSwitchToNewImages:m,areMoreImagesAvailable:v,galleryWidth:S,isLightBoxOpen:w,isStaging:P,shouldEnableResize:E}=Ee(kwe),{galleryMinWidth:_,galleryMaxWidth:T}=w?{galleryMinWidth:gM,galleryMaxWidth:gM}:Awe[u],[M,I]=C.exports.useState(S>=Ky),[R,N]=C.exports.useState(!1),[z,H]=C.exports.useState(0),$=C.exports.useRef(null),j=C.exports.useRef(null),de=C.exports.useRef(null);C.exports.useEffect(()=>{S>=Ky&&I(!1)},[S]);const V=()=>{e(OSe(!i)),e(Wi(!0))},J=()=>{o?Q():ie()},ie=()=>{e(_0(!0)),i&&e(Wi(!0))},Q=C.exports.useCallback(()=>{e(_0(!1)),e(yH(!1)),e(ISe(j.current?j.current.scrollTop:0)),setTimeout(()=>e(Wi(!0)),400)},[e]),K=()=>{e(jC(n))},G=he=>{e($g(he))},Z=()=>{p||(de.current=window.setTimeout(()=>Q(),500))},te=()=>{de.current&&window.clearTimeout(de.current)};vt("g",()=>{J()},[o,i]),vt("left",()=>{e(X8())},{enabled:!P},[P]),vt("right",()=>{e(K8())},{enabled:!P},[P]),vt("shift+g",()=>{V()},[i]),vt("esc",()=>{e(_0(!1))},{enabled:()=>!i,preventDefault:!0},[i]);const X=32;return vt("shift+up",()=>{if(s<256){const he=Je.clamp(s+X,32,256);e($g(he))}},[s]),vt("shift+down",()=>{if(s>32){const he=Je.clamp(s-X,32,256);e($g(he))}},[s]),C.exports.useEffect(()=>{!j.current||(j.current.scrollTop=a)},[a,o]),C.exports.useEffect(()=>{function he(ye){!i&&$.current&&!$.current.contains(ye.target)&&Q()}return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[Q,i]),x(rH,{nodeRef:$,in:o||p,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:re("div",{className:"image-gallery-wrapper",style:{zIndex:i?1:100},"data-pinned":i,ref:$,onMouseLeave:i?void 0:Z,onMouseEnter:i?void 0:te,onMouseOver:i?void 0:te,children:[re(CH,{minWidth:_,maxWidth:i?T:window.innerWidth,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:E},size:{width:S,height:i?"100%":"100vh"},onResizeStart:(he,ye,Se)=>{H(Se.clientHeight),Se.style.height=`${Se.clientHeight}px`,i&&(Se.style.position="fixed",Se.style.right="1rem",N(!0))},onResizeStop:(he,ye,Se,De)=>{const $e=i?Je.clamp(Number(S)+De.width,_,Number(T)):Number(S)+De.width;e(DSe($e)),Se.removeAttribute("data-resize-alert"),i&&(Se.style.position="relative",Se.style.removeProperty("right"),Se.style.setProperty("height",i?"100%":"100vh"),N(!1),e(Wi(!0)))},onResize:(he,ye,Se,De)=>{const $e=Je.clamp(Number(S)+De.width,_,Number(i?T:.95*window.innerWidth));$e>=Ky&&!M?I(!0):$e<Ky&&M&&I(!1),s>$e-pM&&e($g($e-pM)),i&&($e>=T?Se.setAttribute("data-resize-alert","true"):Se.removeAttribute("data-resize-alert")),Se.style.height=`${z}px`},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:M?re($n,{children:[x(ta,{size:"sm","data-selected":n==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":n==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re($n,{children:[x(mt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":n==="result",icon:x(u5e,{}),onClick:()=>e(Wy("result"))}),x(mt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":n==="user",icon:x(_5e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(ed,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(mt,{size:"sm","aria-label":"Gallery Settings",icon:x(H8,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(bs,{value:s,onChange:G,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(mt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e($g(64)),icon:x(L8,{}),"data-selected":i,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(gs,{label:"Maintain Aspect Ratio",isChecked:h==="contain",onChange:()=>e(RSe(h==="contain"?"cover":"contain"))})}),x("div",{children:x(gs,{label:"Auto-Switch to New Images",isChecked:m,onChange:he=>e(NSe(he.target.checked))})})]})}),x(mt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:V,icon:i?x(J$,{}):x(eH,{})})]})]}),x("div",{className:"image-gallery-container",ref:j,children:t.length||v?re($n,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:l},children:t.map(he=>{const{uuid:ye}=he;return x(Twe,{image:he,isSelected:r===ye},ye)})}),x($a,{onClick:K,isDisabled:!v,className:"image-gallery-load-more-btn",children:v?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(H$,{}),x("p",{children:"No Images In Gallery"})]})})]}),R&&x("div",{style:{width:S+"px",height:"100%"}})]})})}const Lwe=ft([e=>e.options,Cr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),rk=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(Lwe),l=()=>{t(uke(!o)),t(Wi(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(hi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(GSe,{})})})]}),!a&&x(eW,{})]})})};function Mwe(){return x(rk,{optionsPanel:x(_Se,{}),children:x(USe,{})})}function Owe(){Ee(t=>t.options.showAdvancedOptions);const e={seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})},face_restore:{header:x(A$,{}),feature:no.FACE_CORRECTION,options:x(A8,{})},upscale:{header:x(D$,{}),feature:no.UPSCALE,options:x(I8,{})},other:{header:x(I$,{}),feature:no.OTHER,options:x(R$,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(B8,{accordionInfo:e})]})}const Iwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(wH,{})})});function Rwe(){return x(rk,{optionsPanel:x(Owe,{}),children:x(Iwe,{})})}var o9=function(e,t){return o9=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])},o9(e,t)};function Nwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pl=function(){return Pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Pl.apply(this,arguments)};function mM(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}var Ra=function(e,t){return Number(e.toFixed(t))},Dwe=function(e,t){return typeof e=="number"?e:t},ui=function(e,t,n){n&&typeof n=="function"&&n(e,t)},zwe=function(e){return-Math.cos(e*Math.PI)/2+.5},Bwe=function(e){return e},Fwe=function(e){return e*e},$we=function(e){return e*(2-e)},Hwe=function(e){return e<.5?2*e*e:-1+(4-2*e)*e},Wwe=function(e){return e*e*e},Vwe=function(e){return--e*e*e+1},Uwe=function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},Gwe=function(e){return e*e*e*e},jwe=function(e){return 1- --e*e*e*e},Ywe=function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},qwe=function(e){return e*e*e*e*e},Kwe=function(e){return 1+--e*e*e*e*e},Xwe=function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e},tW={easeOut:zwe,linear:Bwe,easeInQuad:Fwe,easeOutQuad:$we,easeInOutQuad:Hwe,easeInCubic:Wwe,easeOutCubic:Vwe,easeInOutCubic:Uwe,easeInQuart:Gwe,easeOutQuart:jwe,easeInOutQuart:Ywe,easeInQuint:qwe,easeOutQuint:Kwe,easeInOutQuint:Xwe},nW=function(e){typeof e=="number"&&cancelAnimationFrame(e)},vl=function(e){!e.mounted||(nW(e.animation),e.animate=!1,e.animation=null,e.velocity=null)};function rW(e,t,n,r){if(!!e.mounted){var i=new Date().getTime(),o=1;vl(e),e.animation=function(){if(!e.mounted)return nW(e.animation);var a=new Date().getTime()-i,s=a/n,l=tW[t],u=l(s);a>=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function xd(e,t,n,r){var i=Zwe(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,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):rW(e,r,n,function(v){var S=s+h*v,w=l+p*v,P=u+m*v;o(S,w,P)})}}function Zwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Qwe(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 Jwe=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,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ik=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=Qwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Jwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ik(e,t);return e.bounds=n,n};function rb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?e<t?Ra(t,2):e>n?Ra(n,2):Ra(e,2):Ra(e,2)};function ib(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 p=l-t*h,m=u-n*h,v=rb(p,m,i,o,0,0,null);return v}function l2(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 vM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ob(o,n);return!l},yM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},e6e=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}},t6e=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 n6e(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,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||n<m,P=r>v||r<S,E=n>p?u.offsetWidth:e.setup.minPositionX||0,_=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ib(e,E,_,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:P?I:r}}}function r6e(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,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=rb(t,n,s,o,r,i,a),P=w.x,E=w.y;e.setTransformState(u,P,E)}}var i6e=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,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},o6e=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},a6e=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 s6e(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function SM(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:h<a?a:h}if(t<o&&n<o){var h=o+(e-o)*u;return h<s?s:h>o?o:h}}return r?t:a9(e,o,a,i)}function l6e(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function u6e(e,t){var n=o6e(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=l6e(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,P=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:P}}e.lastMousePosition=t,e.velocityTime=l}}function c6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=a6e(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,P=r.panning,E=P.lockAxisY,_=P.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=s6e(e,l),H=Math.max(z,N),$=h5(e,M),j=h5(e,I),de=$*i.offsetWidth/100,V=j*i.offsetHeight/100,J=u+de,ie=h-de,Q=p+V,K=m-V,G=e.transformState,Z=new Date().getTime();rW(e,T,H,function(te){var X=e.transformState,he=X.scale,ye=X.positionX,Se=X.positionY,De=new Date().getTime()-Z,$e=De/N,He=tW[S.animationType],qe=1-He(Math.min(1,$e)),tt=1-te,Ze=ye+a*tt,nt=Se+s*tt,Tt=SM(Ze,G.positionX,ye,_,v,h,u,ie,J,qe),xt=SM(nt,G.positionY,Se,E,v,m,p,K,Q,qe);(ye!==Ze||Se!==nt)&&e.setTransformState(he,Tt,xt)})}}function bM(e,t){var n=e.transformState.scale;vl(e),q0(e,n),t.touches?t6e(e,t):e6e(e,t)}function xM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=i6e(e,t,n),u=l.x,h=l.y,p=h5(e,a),m=h5(e,s);u6e(e,{x:u,y:h}),r6e(e,u,h,p,m)}}function d6e(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?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s<u||l<h,m=!t&&n&&n?.total>.1&&p;m?c6e(e):iW(e)}}function iW(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<r||!a&&!s;if(!h){var p=n6e(e);p&&xd(e,p,l,u)}}function oW(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.minScale,s=o.limitToBounds,l=o.zoomAnimation,u=l.disabled,h=l.animationTime,p=l.animationType,m=u||r>=a;if((r>=1||s)&&iW(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=ok(e,a,v,S);w&&xd(e,w,h,p)}}function ok(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=ib(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},f6e=Pl(Pl({},Zp),{setComponents:function(){},contextInstance:null}),Hg={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}},aW=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},wM=function(e){var t=Pl({},Hg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Hg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Hg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=Pl(Pl({},Hg[n]),e[n]):s?t[n]=mM(mM([],Hg[n]),e[n]):t[n]=e[n]}}),t},sW=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),p=l2(Ra(h,3),s,a,u,!1);return p};function lW(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,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=sW(e,t,n),w=ok(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,w,r,i)}function uW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=aW(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ik(e,a.scale),m=rb(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||xd(e,v,t,n)}}function h6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=p6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,P=l2(n||Math.min(S,w),a,s,0,!1),E=(l.width-m*P)/2,_=(l.height-v*P)/2,T=(l.left-h)*P+E,M=(l.top-p)*P+_,I=ik(e,P),R=rb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:P}}function p6e(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 g6e(e){if(e){if(e?.offsetWidth===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 m6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,1,t,n,r)}},v6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),lW(e,-1,t,n,r)}},y6e=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,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};xd(e,v,i,o)}}},S6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),uW(e,t,n)}},b6e=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=cW(t||i.scale,o,a);xd(e,s,n,r)}}},x6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),vl(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&g6e(a)&&a&&o.contains(a)){var s=h6e(e,a,n);xd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:m6e(e),zoomOut:v6e(e),setTransform:y6e(e),resetTransform:S6e(e),centerView:b6e(e),zoomToElement:x6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ob=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},CM=function(e){e&&clearTimeout(e)},w6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},cW=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}},C6e=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 p=ob(u,a);return!p};function _6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Dwe(t,n);return r}function dW(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 k6e=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,p=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=l2(Ra(v,3),u,l,p,S);return w},E6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?r<o||r>a||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaY<t.deltaY||n.deltaY<0&&n.deltaY>t.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},P6e=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=ob(a,i);return!l},T6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},A6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},fW=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))},L6e=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,p=h*n;return l2(Ra(p,2),a,o,l,!u)},M6e=160,O6e=100,I6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(vl(e),ui(Fr(e),t,r),ui(Fr(e),t,i))},R6e=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,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var P=_6e(t,null),E=k6e(e,P,w,!t.ctrlKey);if(l!==E){var _=q0(e,E),T=dW(t,o,l),M=S||v===0||h,I=u&&M,R=ib(e,T.x,T.y,E,_,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(E,N,z),ui(Fr(e),t,r),ui(Fr(e),t,i)}},N6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;CM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(oW(e,t.x,t.y),e.wheelAnimationTimer=null)},O6e);var o=E6e(e,t);o&&(CM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Fr(e),t,r),ui(Fr(e),t,i))},M6e))},D6e=function(e,t){var n=fW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,vl(e)},z6e=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 p=A6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=fW(t),v=L6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,P=a&&w,E=ib(e,p.x,p.y,v,S,P),_=E.x,T=E.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,_,T)}}}},B6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,oW(e,t?.x,t?.y)};function F6e(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 uW(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,p=sW(e,h,o),m=dW(t,u,l),v=ok(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");xd(e,v,a,s)}}var $6e=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?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ob(l,s);return!(p||!h)},hW=le.createContext(f6e),H6e=function(e){Nwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=aW(n.props),n.setup=wM(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=kw();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=C6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(I6e(n,r),R6e(n,r),N6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),vl(n),bM(n,r),ui(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=yM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),xM(n,r.clientX,r.clientY),ui(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(d6e(n),ui(Fr(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=P6e(n,r);!l||(D6e(n,r),vl(n),ui(Fr(n),r,a),ui(Fr(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=T6e(n);!l||(r.preventDefault(),r.stopPropagation(),z6e(n,r),ui(Fr(n),r,a),ui(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(B6e(n),ui(Fr(n),r,o),ui(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=vM(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,vl(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(vl(n),bM(n,r),ui(Fr(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=yM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];xM(n,s.clientX,s.clientY),ui(Fr(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=$6e(n,r);!o||F6e(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,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Fr(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=cW(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=w6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=kw();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=kw();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),vl(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=wM(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(hW.Provider,{value:Pl(Pl({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),W6e=le.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]),x(H6e,{...Pl({},e,{setRef:i})})});function V6e(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 U6e=`.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;
|
|
}
|
|
`,_M={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};V6e(U6e);var G6e=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(hW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+_M.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+_M.content+" "+o,style:s,children:t})})};function j6e({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 x(W6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re($n,{children:[re("div",{className:"lightbox-image-options",children:[x(mt,{icon:x(i4e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(mt,{icon:x(o4e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(mt,{icon:x(n4e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(mt,{icon:x(r4e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(mt,{icon:x(W4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(mt,{icon:x(L8,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(G6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||"",onLoad:()=>S()})})]})})}function Y6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(xH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(X8())},p=()=>{e(K8())};return vt("Esc",()=>{t&&e(cd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(mt,{icon:x(t4e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(cd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(gH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ha,{"aria-label":"Previous image",icon:x(W$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ha,{"aria-label":"Next image",icon:x(V$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re($n,{children:[x(j6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(bH,{image:n})]})]}),x(eW,{})]})]})}const q6e=ft(Rn,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),K6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(q6e),n=a=>{e(um({...t,width:Math.floor(a)}))},r=a=>{e(um({...t,height:Math.floor(a)}))},i=()=>{e(um({...t,width:Math.floor(512)}))},o=()=>{e(um({...t,height:Math.floor(512)}))};return re(en,{direction:"column",gap:"1rem",children:[x(bs,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(bs,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})},X6e=()=>x(Nl,{flex:"1",textAlign:"left",children:"Bounding Box"}),u2=e=>e.system,Z6e=e=>e.system.toastQueue,Q6e=ft(Rn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee(Q6e),n=Xe();return re(en,{alignItems:"center",columnGap:"1rem",children:[x(bs,{label:"Inpaint Replace",value:e,onChange:r=>{n(VL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(VL(1)),isResetDisabled:!t}),x(za,{isChecked:t,onChange:r=>n(SSe(r.target.checked))})]})}const eCe=ft([z$,u2],(e,t)=>{const{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l}=e,{infill_methods:u}=t;return{seamSize:n,seamBlur:r,seamStrength:i,seamSteps:o,tileSize:a,shouldForceOutpaint:s,infillMethod:l,availableInfillMethods:u}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),tCe=()=>{const e=Xe(),{seamSize:t,seamBlur:n,seamStrength:r,seamSteps:i,tileSize:o,shouldForceOutpaint:a,infillMethod:s,availableInfillMethods:l}=Ee(eCe);return re(en,{direction:"column",gap:"1rem",children:[x(J6e,{}),x(bs,{sliderMarkRightOffset:-6,label:"Seam Size",min:1,max:256,sliderNumberInputProps:{max:512},value:t,onChange:u=>{e(sO(u))},handleReset:()=>e(sO(96)),withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Blur",min:0,max:64,sliderNumberInputProps:{max:512},value:n,onChange:u=>{e(aO(u))},handleReset:()=>{e(aO(16))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-2,label:"Seam Strength",min:0,max:1,step:.01,value:r,onChange:u=>{e(uO(u))},handleReset:()=>{e(uO(.7))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(bs,{sliderMarkRightOffset:-4,label:"Seam Steps",min:1,max:32,sliderNumberInputProps:{max:100},value:i,onChange:u=>{e(lO(u))},handleReset:()=>{e(lO(10))},withInput:!0,withSliderMarks:!0,withReset:!0}),x(za,{label:"Force Outpaint",isChecked:a,onChange:u=>{e(tke(u.target.checked))}}),x(Au,{label:"Infill Method",value:s,validValues:l,onChange:u=>e(pV(u.target.value))}),x(bs,{isInputDisabled:s!=="tile",isResetDisabled:s!=="tile",isSliderDisabled:s!=="tile",sliderMarkRightOffset:-4,label:"Tile Size",min:16,max:64,sliderNumberInputProps:{max:256},value:o,onChange:u=>{e(cO(u))},handleReset:()=>{e(cO(32))},withInput:!0,withSliderMarks:!0,withReset:!0})]})},nCe=()=>x(Nl,{flex:"1",textAlign:"left",children:"Outpainting Composition"});function rCe(){const e={boundingBox:{header:x(X6e,{}),feature:no.BOUNDING_BOX,options:x(K6e,{})},outpainting:{header:x(nCe,{}),feature:no.OUTPAINTING,options:x(tCe,{})},seed:{header:x(M8,{}),feature:no.SEED,options:x(O8,{})},variations:{header:x(R8,{}),feature:no.VARIATIONS,options:x(N8,{})}};return re(Y8,{children:[x(U8,{}),x(V8,{}),x(z8,{}),x(O$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(B8,{accordionInfo:e})]})}const iCe=ft(Rn,q$,Cr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),oCe=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(iCe),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(aSe({width:a,height:s})),e(iSe()),e(Wi(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Qv,{thickness:"2px",speed:"1s",size:"xl"})})};var aCe=Math.PI/180;function sCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},lt={_global:k0,version:"8.3.13",isBrowser:sCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return lt.angleDeg?e*aCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return lt.DD.isDragging},isDragReady(){return!!lt.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{lt[e.prototype.getClassName()]=e};lt._injectGlobal(lt);class ia{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 ia(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=fe._getRotation(l.rotation),l}}var lCe="[object Array]",uCe="[object Number]",cCe="[object String]",dCe="[object Boolean]",fCe=Math.PI/180,hCe=180/Math.PI,Ew="#",pCe="",gCe="0",mCe="Konva warning: ",kM="Konva error: ",vCe="rgb(",Pw={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]},yCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const SCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_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)===lCe},_isNumber(e){return Object.prototype.toString.call(e)===uCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===cCe},_isBoolean(e){return Object.prototype.toString.call(e)===dCe},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){Xy.push(e),Xy.length===1&&SCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}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=fe.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(Ew,pCe);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=gCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===vCe?(t=yCe.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",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[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 p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=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.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)},cloneObject(e){var t={};for(var n in e)this._isPlainObject(e[n])?t[n]=this.cloneObject(e[n]):this._isArray(e[n])?t[n]=this.cloneArray(e[n]):t[n]=e[n];return t},cloneArray(e){return e.slice(0)},degToRad(e){return e*fCe},radToDeg(e){return e*hCe},_degToRad(e){return fe.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),fe.degToRad(e)},_radToDeg(e){return fe.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),fe.radToDeg(e)},_getRotation(e){return lt.angleDeg?fe.radToDeg(e):e},_capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)},throw(e){throw new Error(kM+e)},error(e){console.error(kM+e)},warn(e){!lt.showWarnings||console.warn(mCe+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e<n},_getProjectionToSegment(e,t,n,r,i,o){var a,s,l,u=(e-n)*(e-n)+(t-r)*(t-r);if(u==0)a=e,s=t,l=(i-n)*(i-n)+(o-r)*(o-r);else{var h=((i-e)*(n-e)+(o-t)*(r-t))/u;h<0?(a=e,s=t,l=(e-i)*(e-i)+(t-o)*(t-o)):h>1?(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=fe.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=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];p<i&&(r.x=u,r.y=h,i=p)}}),r},_prepareArrayForTween(e,t,n){var r,i=[],o=[];if(e.length>t.length){var a=t;t=e,e=a}for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});var s=[];return o.forEach(function(l){var u=fe._getProjectionToLine(l,i,n);s.push(u.x),s.push(u.y)}),s},_prepareToStringify(e){var t;e.visitedByCircularReferenceRemoval=!0;for(var n in e)if(!!(e.hasOwnProperty(n)&&e[n]&&typeof e[n]=="object")){if(t=Object.getOwnPropertyDescriptor(e,n),e[n].visitedByCircularReferenceRemoval||fe._isElement(e[n]))if(t.configurable)delete e[n];else return null;else if(fe._prepareToStringify(e[n])===null)if(t.configurable)delete e[n];else return null}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var n in t)e[n]=t[n];return e},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId||999}};function wd(e){return fe._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||fe._isBoolean(e)?e:Object.prototype.toString.call(e)}function pW(e){return e>255?255:e<0?0:Math.round(e)}function Be(){if(lt.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function gW(e){if(lt.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}function ak(){if(lt.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function h1(){if(lt.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function mW(){if(lt.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function bCe(){if(lt.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function Ls(){if(lt.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(wd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function xCe(e){if(lt.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(wd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Wg="get",Vg="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=Wg+fe._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=Vg+fe._capitalize(t);e.prototype[i]||q.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Vg+fe._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=fe._capitalize,s=Wg+a(t),l=Vg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u<o;u++)h=n[u],m[h]=this.getAttr(t+a(h));return m};var p=xCe(n);e.prototype[l]=function(m){var v=this.attrs[t],S;r&&(m=r.call(this,m)),p&&p.call(this,m,t);for(S in m)!m.hasOwnProperty(S)||this._setAttr(t+a(S),m[S]);return m||n.forEach(w=>{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=fe._capitalize(t),r=Vg+n,i=Wg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Wg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},q.addSetter(e,t,r,function(){fe.error(o)}),q.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Wg+fe._capitalize(n),a=Vg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.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 wCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;i<n;i++)o=e[i],r._isNumber(o)?o=Math.round(o*1e3)/1e3:r._isString(o)||(o=o+""),t.push(o);return t}var EM=",",CCe="(",_Ce=")",kCe="([",ECe="])",PCe=";",TCe="()",ACe="=",PM=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],LCe=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const MCe=100;class ab{constructor(t){this.canvas=t,lt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,n){var r=this.traceArr,i=r.length,o="",a,s,l,u;for(a=0;a<i;a++)s=r[a],l=s.method,l?(u=s.args,o+=l,t?o+=TCe:fe._isArray(u[0])?o+=kCe+u.join(EM)+ECe:(n&&(u=u.map(h=>typeof h=="number"?Math.floor(h):h)),o+=CCe+u.join(EM)+_Ce)):(o+=s.property,t||(o+=ACe+s.val)),o+=PCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=MCe&&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,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=PM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=wCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i<n;i++)a(PM[i]);t.setAttr=function(){r.apply(t,arguments);var s=arguments[0],l=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:s,val:l})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}LCe.forEach(function(e){Object.defineProperty(ab.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class OCe extends ab{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var n=t.fill();this.setAttr("fillStyle",n),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var n=t._getLinearGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fillRadialGradient(t){var n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){var n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}var i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}var o=t.getFillLinearGradientColorStops();if(o&&r==="linear-gradient"){this._fillLinearGradient(t);return}var a=t.getFillRadialGradientColorStops();if(a&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):i?this._fillPattern(t):o?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){var n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(t){var n=t.dash(),r=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!r){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),n&&t.dashEnabled()&&(this.setLineDash(n),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var o=t.getStrokeLinearGradientColorStops();o?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),r||this.restore()}}_applyShadow(t){var n,r,i,o=(n=t.getShadowRGBA())!==null&&n!==void 0?n:"black",a=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,s=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),h=l.x*u,p=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(p))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*p)}}class ICe extends ab{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var n=t.getStrokeScaleEnabled();if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),o=i==="auto"?t.strokeWidth():i;this.setAttr("lineWidth",o),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),n||this.restore()}}}var Zy;function RCe(){if(Zy)return Zy;var e=fe.createCanvasElement(),t=e.getContext("2d");return Zy=function(){var n=lt._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),Zy}class sb{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||lt.pixelRatio||RCe();this.pixelRatio=r,this._canvas=fe.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var n=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/n,this.getHeight()/n)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var n=this.pixelRatio,r=this.getContext()._context;r.scale(n,n)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,n){this.setWidth(t||0),this.setHeight(n||0)}toDataURL(t,n){try{return this._canvas.toDataURL(t,n)}catch{try{return this._canvas.toDataURL()}catch(i){return fe.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}q.addGetterSetter(sb,"pixelRatio",void 0,Be());class E0 extends sb{constructor(t={width:0,height:0}){super(t),this.context=new OCe(this),this.setSize(t.width,t.height)}}class sk extends sb{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new ICe(this),this.setSize(t.width,t.height)}}const dn={get isDragging(){var e=!1;return dn._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return dn._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];dn._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l<s||(i.startDrag({evt:e}),!i.isDragging()))return}i._setDragPosition(e,n),t.push(i)}}),t.forEach(n=>{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];dn._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")&&(dn.justDragged=!0,lt._mouseListenClick=!1,lt._touchListenClick=!1,lt._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof lt.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){dn._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&dn._dragElements.delete(n)})}};lt.isBrowser&&(window.addEventListener("mouseup",dn._endDragBefore,!0),window.addEventListener("touchend",dn._endDragBefore,!0),window.addEventListener("mousemove",dn._drag),window.addEventListener("touchmove",dn._drag),window.addEventListener("mouseup",dn._endDragAfter,!1),window.addEventListener("touchend",dn._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",su="absoluteTransform",TM="absoluteScale",Ug="canvas",NCe="Change",DCe="children",zCe="konva",s9="listening",AM="mouseenter",LM="mouseleave",MM="set",OM="Shape",Y3=" ",IM="stage",Tc="transform",BCe="Stage",l9="visible",FCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let $Ce=1;class Fe{constructor(t){this._id=$Ce++,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===Tc||t===su)&&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===Tc||t===su,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(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Ug)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===su&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Ug),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,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.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 E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new sk({pixelRatio:p,width:i,height:o}),w=m.getContext(),P=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Ug),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),P.save(),w.translate(-s,-l),P.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(TM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),P.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(Ug,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Ug)}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<a;l++){if(u=t[l],typeof u!="function"){fe.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,s),o.putImageData(s,0,0)}}catch(p){fe.error("Unable to apply filter. "+p.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return r}on(t,n){if(this._cache&&this._cache.delete(Qy),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(Y3),i=r.length,o,a,s,l,u;for(o=0;o<i;o++)a=r[o],s=a.split("."),l=s[0],u=s[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(Y3),i=r.length,o,a,s,l,u,h;if(this._cache&&this._cache.delete(Qy),!t)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=r[o],l=s.split("."),u=l[0],h=l[1],u)this.eventListeners[u]&&this._off(u,h,n);else for(a in this.eventListeners)this._off(a,h,n);return this}dispatchEvent(t){var n={target:this,type:t.type,evt:t};return this.fire(t.type,n),this}addEventListener(t,n){return this.on(t,function(r){n.call(this,r.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,n,r){var i=this;this.on(t,function(o){for(var a=o.target.findAncestors(n,!0,i),s=0;s<a.length;s++)o=fe.cloneObject(o),o.currentTarget=a[s],r.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),dn._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(su),this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(TM),this._clearSelfAndDescendantCache(IM),this._clearSelfAndDescendantCache(l9),this._clearSelfAndDescendantCache(s9)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(t){var n="get"+fe._capitalize(t);return fe._isFunction(this[n])?this[n]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),n=[];t;)n.push(t),t=t.getParent();return n}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var n,r;if(!t)return this;for(n in t)n!==DCe&&(r=MM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,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(l9,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;dn._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!lt.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a<o;a++)s=u[a],r++,s.nodeType!==OM&&(i=i.concat(s.getChildren().slice())),s._id===n._id&&(a=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==BCe&&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(Tc),this._clearSelfAndDescendantCache(su)),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 ia,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(Tc);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(Tc),this._clearSelfAndDescendantCache(su),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a<o;a++)t(r[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return fe.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return fe.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,n=this.parent.getChildren().length;return t<n-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return fe.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.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 fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.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(j3,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=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._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(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i<r;i++)if(o=n[i],fe.isValidSelector(o)||(fe.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),fe.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),fe.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(IM,this._getStage)}_getStage(){var t=this.getParent();if(t)return t.getStage()}fire(t,n={},r){return n.target=n.target||this,r?this._fireAndBubble(t,n):this._fire(t,n),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(su,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new ia,this._eachAncestorReverse(function(i){var o=i.transformsEnabled();o==="all"?n.multiply(i.getTransform()):o==="position"&&n.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),n;n=this._cache.get(su)||new ia,this.parent?this.parent.getAbsoluteTransform().copyInto(n):n.reset();var r=this.transformsEnabled();if(r==="all")n.multiply(this.getTransform());else if(r==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;n.translate(i-a,o-s)}return n.dirty=!1,n}getAbsoluteScale(t){for(var n=this;n;)n._isUnderCache&&(t=n),n=n.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Tc,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(Tc)||new ia;r.reset();var i=this.x(),o=this.y(),a=lt.getAngle(this.rotation()),s=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,l=(n=this.attrs.scaleY)!==null&&n!==void 0?n:1,u=this.attrs.skewX||0,h=this.attrs.skewY||0,p=this.attrs.offsetX||0,m=this.attrs.offsetY||0;return(i!==0||o!==0)&&r.translate(i,o),a!==0&&r.rotate(a),(u!==0||h!==0)&&r.skew(u,h),(s!==1||l!==1)&&r.scale(s,l),(p!==0||m!==0)&&r.translate(-1*p,-1*m),r.dirty=!1,r}clone(t){var n=fe.cloneObject(this.attrs),r,i,o,a,s;for(r in t)n[r]=t[r];var l=new this.constructor(n);for(r in this.eventListeners)for(i=this.eventListeners[r],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf(zCe)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(s));return l}_toKonvaCanvas(t){t=t||{};var n=this.getClientRect(),r=this.getStage(),i=t.x!==void 0?t.x:Math.floor(n.x),o=t.y!==void 0?t.y:Math.floor(n.y),a=t.pixelRatio||1,s=new E0({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:a}),l=s.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||o)&&l.translate(-1*i,-1*o),this.drawScene(s),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():lt.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||n==="konva")&&(!n||a===n)&&(!r||r===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[t];break}o--}}_fireChangeEvent(t,n,r){this._fire(t+NCe,{oldVal:n,newVal:r})}addName(t){if(!this.hasName(t)){var n=this.name(),r=n?n+" "+t:t;this.name(r)}return this}hasName(t){if(!t)return!1;const n=this.name();if(!n)return!1;var r=(n||"").split(/\s/g);return r.indexOf(t)!==-1}removeName(t){var n=(this.name()||"").split(/\s/g),r=n.indexOf(t);return r!==-1&&(n.splice(r,1),this.name(n.join(" "))),this}setAttr(t,n){var r=this[MM+fe._capitalize(t)];return fe._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(lt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!fe.isObject(n)||(n==null?delete this.attrs[t]:this.attrs[t]=n,this._shouldFireChangeEvents&&this._fireChangeEvent(t,r,n),this._requestDraw())}_setComponentAttr(t,n,r){var i;r!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][n]=r,this._fireChangeEvent(t,i,r))}_fireAndBubble(t,n,r){n&&this.nodeType===OM&&(n.target=this);var i=(t===AM||t===LM)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===AM||t===LM)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!o&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r):this._fireAndBubble.call(this.parent,t,n))}}_getProtoListeners(t){let n=this._cache.get(Qy);if(!n){n={};let i=Object.getPrototypeOf(this);for(;i;){if(!i.eventListeners){i=Object.getPrototypeOf(i);continue}for(var r in i.eventListeners){const o=i.eventListeners[r],a=n[r]||[];n[r]=o.concat(a)}i=Object.getPrototypeOf(i)}this._cache.set(Qy,n)}return n[t]}_fire(t,n){n=n||{},n.currentTarget=this,n.type=t;const r=this._getProtoListeners(t);if(r)for(var i=0;i<r.length;i++)r[i].handler.call(this,n);const o=this.eventListeners[t];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,n)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var n=t?t.pointerId:void 0,r=this.getStage(),i=this.getAbsolutePosition(),o=r._getPointerById(n)||r._changedPointerPositions[0]||i;dn._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:n})}startDrag(t,n=!0){dn._dragElements.has(this._id)||this._createDragElement(t);const r=dn._dragElements.get(this._id);r.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},n)}_setDragPosition(t,n){const r=this.getStage()._getPointerById(n.pointerId);if(!!r){var i={x:r.x-n.offset.x,y:r.y-n.offset.y},o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,t);a?i=a:fe.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const n=dn._dragElements.get(this._id);n&&(n.dragStatus="stopped"),dn._endDragBefore(t),dn._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=dn._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var n=t.evt.button!==void 0,r=!n||lt.dragButtons.indexOf(t.evt.button)>=0;if(!!r&&!this.isDragging()){var i=!1;dn._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=dn._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&dn._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 fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),lt[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=lt[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(Fe._createNode(i[s]));return o}}Fe.prototype.nodeType="Node";Fe.prototype._attrsAffectingSize=[];Fe.prototype.eventListeners={};Fe.prototype.on.call(Fe.prototype,FCe,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(Tc),this._clearSelfAndDescendantCache(su)});Fe.prototype.on.call(Fe.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(l9)});Fe.prototype.on.call(Fe.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(s9)});Fe.prototype.on.call(Fe.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(j3)});const Hn=q.addGetterSetter;Hn(Fe,"zIndex");Hn(Fe,"absolutePosition");Hn(Fe,"position");Hn(Fe,"x",0,Be());Hn(Fe,"y",0,Be());Hn(Fe,"globalCompositeOperation","source-over",h1());Hn(Fe,"opacity",1,Be());Hn(Fe,"name","",h1());Hn(Fe,"id","",h1());Hn(Fe,"rotation",0,Be());q.addComponentsGetterSetter(Fe,"scale",["x","y"]);Hn(Fe,"scaleX",1,Be());Hn(Fe,"scaleY",1,Be());q.addComponentsGetterSetter(Fe,"skew",["x","y"]);Hn(Fe,"skewX",0,Be());Hn(Fe,"skewY",0,Be());q.addComponentsGetterSetter(Fe,"offset",["x","y"]);Hn(Fe,"offsetX",0,Be());Hn(Fe,"offsetY",0,Be());Hn(Fe,"dragDistance",null,Be());Hn(Fe,"width",0,Be());Hn(Fe,"height",0,Be());Hn(Fe,"listening",!0,Ls());Hn(Fe,"preventDefault",!0,Ls());Hn(Fe,"filters",null,function(e){return this._filterUpToDate=!1,e});Hn(Fe,"visible",!0,Ls());Hn(Fe,"transformsEnabled","all",h1());Hn(Fe,"size");Hn(Fe,"dragBoundFunc");Hn(Fe,"draggable",!1,Ls());q.backCompat(Fe,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class ua extends Fe{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const n=this.children||[];var r=[];return n.forEach(function(i){t(i)&&r.push(i)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}var r=t[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var n=this._generalFind(t,!0);return n.length>0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.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=Fe.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 p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.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(P){P[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 P=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});P.width===0&&P.height===0||(o===void 0?(o=P.x,a=P.y,s=P.x+P.width,l=P.y+P.height):(o=Math.min(o,P.x),a=Math.min(a,P.y),s=Math.max(s,P.x+P.width),l=Math.max(l,P.y+P.height)))}});for(var p=this.find("Shape"),m=!1,v=0;v<p.length;v++){var S=p[v];if(S._isVisible(this)){m=!0;break}}return m&&o!==void 0?u={x:o,y:a,width:s-o,height:l-a}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,i)}}q.addComponentsGetterSetter(ua,"clip",["x","y","width","height"]);q.addGetterSetter(ua,"clipX",void 0,Be());q.addGetterSetter(ua,"clipY",void 0,Be());q.addGetterSetter(ua,"clipWidth",void 0,Be());q.addGetterSetter(ua,"clipHeight",void 0,Be());q.addGetterSetter(ua,"clipFunc");const Rv=new Map,vW=lt._global.PointerEvent!==void 0;function Tw(e){return Rv.get(e)}function lk(e){return{evt:e,pointerId:e.pointerId}}function yW(e,t){return Rv.get(e)===t}function SW(e,t){Wm(e),t.getStage()&&(Rv.set(e,t),vW&&t._fire("gotpointercapture",lk(new PointerEvent("gotpointercapture"))))}function Wm(e,t){const n=Rv.get(e);if(!n)return;const r=n.getStage();r&&r.content,Rv.delete(e),vW&&n._fire("lostpointercapture",lk(new PointerEvent("lostpointercapture")))}var HCe="Stage",WCe="string",RM="px",VCe="mouseout",bW="mouseleave",xW="mouseover",wW="mouseenter",CW="mousemove",_W="mousedown",kW="mouseup",cm="pointermove",dm="pointerdown",Qp="pointerup",fm="pointercancel",UCe="lostpointercapture",Jy="pointerout",e3="pointerleave",t3="pointerover",n3="pointerenter",u9="contextmenu",EW="touchstart",PW="touchend",TW="touchmove",AW="touchcancel",c9="wheel",GCe=5,jCe=[[wW,"_pointerenter"],[_W,"_pointerdown"],[CW,"_pointermove"],[kW,"_pointerup"],[bW,"_pointerleave"],[EW,"_pointerdown"],[TW,"_pointermove"],[PW,"_pointerup"],[AW,"_pointercancel"],[xW,"_pointerover"],[c9,"_wheel"],[u9,"_contextmenu"],[dm,"_pointerdown"],[cm,"_pointermove"],[Qp,"_pointerup"],[fm,"_pointercancel"],[UCe,"_lostpointercapture"]];const Aw={mouse:{[Jy]:VCe,[e3]:bW,[t3]:xW,[n3]:wW,[cm]:CW,[dm]:_W,[Qp]:kW,[fm]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Jy]:"touchout",[e3]:"touchleave",[t3]:"touchover",[n3]:"touchenter",[cm]:TW,[dm]:EW,[Qp]:PW,[fm]:AW,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Jy]:Jy,[e3]:e3,[t3]:t3,[n3]:n3,[cm]:cm,[dm]:dm,[Qp]:Qp,[fm]:fm,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},hm=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=hm(e);if(t==="pointer")return lt.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function NM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const YCe="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);",q3=[];class lb extends ua{constructor(t){super(NM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{NM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.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===WCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r<n;r++)t[r].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),ua.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&fe._isInDocument(t)&&this.container().removeChild(t);var n=q3.indexOf(this);return n>-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(YCe),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 E0({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+RM,this.content.style.height=n+RM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(t);var i=this.children.length;return i>GCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),lt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}getLayers(){return this.children}_bindContentEvents(){!lt.isBrowser||jCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(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=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!dn.isDragging||lt.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=hm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(dn.justDragged=!1,lt["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;lt.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=hm(t.type);if(!n)return;dn.isDragging&&dn.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!dn.isDragging||lt.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId: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=Lp(t.type),r=hm(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=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;lt["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):dn.justDragged||(lt["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){lt["_"+r+"InDblClickWindow"]=!1},lt.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),lt["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,lt["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId: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}),lt["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,lk(t)),Wm(t.pointerId)}_lostpointercapture(t){Wm(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:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.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 E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new sk({pixelRatio:1,width:this.width(),height:this.height()}),!!lt.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.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}}lb.prototype.nodeType=HCe;pr(lb);q.addGetterSetter(lb,"container");var LW="hasShadow",MW="shadowRGBA",OW="patternImage",IW="linearGradient",RW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Vm={};function qCe(e){e.fill()}function KCe(e){e.stroke()}function XCe(e){e.fill()}function ZCe(e){e.stroke()}function QCe(){this._clearCache(LW)}function JCe(){this._clearCache(MW)}function e9e(){this._clearCache(OW)}function t9e(){this._clearCache(IW)}function n9e(){this._clearCache(RW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Vm)););this.colorKey=n,Vm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.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(LW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(OW,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(lt.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(IW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}_getRadialGradient(){return this._getCache(RW,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var n=Lw(),r=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),o=n.createRadialGradient(r.x,r.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)o.addColorStop(t[a],t[a+1]);return o}}getShadowRGBA(){return this._getCache(MW,this._getShadowRGBA)}_getShadowRGBA(){if(!!this.hasShadow()){var t=fe.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete Vm[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){fe.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,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,P=v+S*2,E={width:w,height:P,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?E:this._transformedRect(E,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,p,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,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var P=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/P,h.height/P)}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||fe.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,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;m<h;m+=4)v=u[m+3],v>t?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return yW(t,this)}setPointerCapture(t){SW(t,this)}releaseCapture(t){Wm(t)}}Me.prototype._fillFunc=qCe;Me.prototype._strokeFunc=KCe;Me.prototype._fillFuncHit=XCe;Me.prototype._strokeFuncHit=ZCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",QCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",JCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",e9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",t9e);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",n9e);q.addGetterSetter(Me,"stroke",void 0,mW());q.addGetterSetter(Me,"strokeWidth",2,Be());q.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);q.addGetterSetter(Me,"hitStrokeWidth","auto",ak());q.addGetterSetter(Me,"strokeHitEnabled",!0,Ls());q.addGetterSetter(Me,"perfectDrawEnabled",!0,Ls());q.addGetterSetter(Me,"shadowForStrokeEnabled",!0,Ls());q.addGetterSetter(Me,"lineJoin");q.addGetterSetter(Me,"lineCap");q.addGetterSetter(Me,"sceneFunc");q.addGetterSetter(Me,"hitFunc");q.addGetterSetter(Me,"dash");q.addGetterSetter(Me,"dashOffset",0,Be());q.addGetterSetter(Me,"shadowColor",void 0,h1());q.addGetterSetter(Me,"shadowBlur",0,Be());q.addGetterSetter(Me,"shadowOpacity",1,Be());q.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);q.addGetterSetter(Me,"shadowOffsetX",0,Be());q.addGetterSetter(Me,"shadowOffsetY",0,Be());q.addGetterSetter(Me,"fillPatternImage");q.addGetterSetter(Me,"fill",void 0,mW());q.addGetterSetter(Me,"fillPatternX",0,Be());q.addGetterSetter(Me,"fillPatternY",0,Be());q.addGetterSetter(Me,"fillLinearGradientColorStops");q.addGetterSetter(Me,"strokeLinearGradientColorStops");q.addGetterSetter(Me,"fillRadialGradientStartRadius",0);q.addGetterSetter(Me,"fillRadialGradientEndRadius",0);q.addGetterSetter(Me,"fillRadialGradientColorStops");q.addGetterSetter(Me,"fillPatternRepeat","repeat");q.addGetterSetter(Me,"fillEnabled",!0);q.addGetterSetter(Me,"strokeEnabled",!0);q.addGetterSetter(Me,"shadowEnabled",!0);q.addGetterSetter(Me,"dashEnabled",!0);q.addGetterSetter(Me,"strokeScaleEnabled",!0);q.addGetterSetter(Me,"fillPriority","color");q.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);q.addGetterSetter(Me,"fillPatternOffsetX",0,Be());q.addGetterSetter(Me,"fillPatternOffsetY",0,Be());q.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);q.addGetterSetter(Me,"fillPatternScaleX",1,Be());q.addGetterSetter(Me,"fillPatternScaleY",1,Be());q.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientStartPointX",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);q.addGetterSetter(Me,"fillLinearGradientStartPointY",0);q.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);q.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillLinearGradientEndPointX",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);q.addGetterSetter(Me,"fillLinearGradientEndPointY",0);q.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientStartPointX",0);q.addGetterSetter(Me,"fillRadialGradientStartPointY",0);q.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);q.addGetterSetter(Me,"fillRadialGradientEndPointX",0);q.addGetterSetter(Me,"fillRadialGradientEndPointY",0);q.addGetterSetter(Me,"fillPatternRotation",0);q.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var r9e="#",i9e="beforeDraw",o9e="draw",NW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],a9e=NW.length;class gh extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new sk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[t+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Fe.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=Fe.prototype.moveUp.call(this);if(!t)return!1;var n=this.getStage();return!n||!n.content?!1:(n.content.removeChild(this.getNativeCanvasElement()),this.index<n.children.length-1?n.content.insertBefore(this.getNativeCanvasElement(),n.children[this.index+1].getCanvas()._canvas):n.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Fe.prototype.moveDown.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Fe.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var n=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),n[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return Fe.prototype.remove.call(this),t&&t.parentNode&&fe._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:n}){return this.canvas.setSize(t,n),this.hitCanvas.setSize(t,n),this._setSmoothEnabled(),this}_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Fe.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){fe.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){fe.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,fe.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i<a9e;i++){const o=NW[i],a=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),s=a.shape;if(s)return s;if(r=!!a.antialiased,!a.antialiased)break}if(r)n+=1;else return null}}_getIntersection(t){const n=this.hitCanvas.pixelRatio,r=this.hitCanvas.context.getImageData(Math.round(t.x*n),Math.round(t.y*n),1,1).data,i=r[3];if(i===255){const o=fe._rgbToHex(r[0],r[1],r[2]),a=Vm[r9e+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(i9e,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(o9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.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)}}}gh.prototype.nodeType="Layer";pr(gh);q.addGetterSetter(gh,"imageSmoothingEnabled",!0);q.addGetterSetter(gh,"clearBeforeDraw",!0);q.addGetterSetter(gh,"hitGraphEnabled",!0,Ls());class uk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}uk.prototype.nodeType="FastLayer";pr(uk);class K0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Oa{constructor(t,n){this.id=Oa.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;i<r;i++)if(n[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t=Oa,n=t.animations,r=n.length,i;for(i=0;i<r;i++)if(n[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=Mw(),Oa._addAnimation(this),this}stop(){return Oa._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var n=t.id,r=this.animations,i=r.length,o;for(o=0;o<i;o++)if(r[o].id===n){this.animations.splice(o,1);break}}static _runFrames(){var t={},n=this.animations,r,i,o,a,s,l,u,h,p;for(a=0;a<n.length;a++)if(r=n[a],i=r.layers,o=r.func,r._updateFrameObject(Mw()),l=i.length,o?p=o.call(r,r.frame)!==!1:p=!0,!!p)for(s=0;s<l;s++)u=i[s],u._id!==void 0&&(t[u._id]=u);for(h in t)!t.hasOwnProperty(h)||t[h].batchDraw()}static _animationLoop(){var t=Oa;t.animations.length?(t._runFrames(),fe.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,fe.requestAnimFrame(this._animationLoop))}}Oa.animations=[];Oa.animIdCounter=0;Oa.animRunning=!1;var s9e={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l9e=1,DM=2,zM=3,u9e=0,BM=["fill","stroke","shadowColor"];class c9e{constructor(t,n,r,i,o,a,s){this.prop=t,this.propFunc=n,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=o-this.begin,this.pause()}fire(t){var n=this[t];n&&n()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=DM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=zM,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===DM?this.setTime(t):this.state===zM&&this.setTime(this.duration-t)}pause(){this.state=l9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Or{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Um.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=u9e++;var u=r.getLayer()||(r instanceof lt.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Oa(function(){n.tween.onEnterFrame()},u),this.tween=new c9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Or.attrs[i]||(Or.attrs[i]={}),Or.attrs[i][this._id]||(Or.attrs[i][this._id]={}),Or.tweens[i]||(Or.tweens[i]={});for(l in t)s9e[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,p,m;if(s=Or.tweens[i][t],s&&delete Or.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l<u;l++)if(l%2===0)a.push(n[l]-o[l]);else{var v=fe.colorToRGBA(o[l]);m=fe.colorToRGBA(n[l]),o[l]=v,a.push({r:m.r-v.r,g:m.g-v.g,b:m.b-v.b,a:m.a-v.a})}else for(l=0;l<u;l++)a.push(n[l]-o[l]);else BM.indexOf(t)!==-1?(o=fe.colorToRGBA(o),m=fe.colorToRGBA(n),a={r:m.r-o.r,g:m.g-o.g,b:m.b-o.b,a:m.a-o.a}):a=n-o;Or.attrs[i][this._id][t]={start:o,diff:a,end:n,trueEnd:h,trueStart:p},Or.tweens[i][t]=this._id}_tweenFunc(t){var n=this.node,r=Or.attrs[n._id][this._id],i,o,a,s,l,u,h,p;for(i in r){if(o=r[i],a=o.start,s=o.diff,p=o.end,fe._isArray(a))if(l=[],h=Math.max(a.length,p.length),i.indexOf("fill")===0)for(u=0;u<h;u++)u%2===0?l.push((a[u]||0)+s[u]*t):l.push("rgba("+Math.round(a[u].r+s[u].r*t)+","+Math.round(a[u].g+s[u].g*t)+","+Math.round(a[u].b+s[u].b*t)+","+(a[u].a+s[u].a*t)+")");else for(u=0;u<h;u++)l.push((a[u]||0)+s[u]*t);else BM.indexOf(i)!==-1?l="rgba("+Math.round(a.r+s.r*t)+","+Math.round(a.g+s.g*t)+","+Math.round(a.b+s.b*t)+","+(a.a+s.a*t)+")":l=a+s*t;n.setAttr(i,l)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Or.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=Or.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=Or.tweens[t],i;this.pause();for(i in r)delete Or.tweens[t][i];delete Or.attrs[t][n]}}Or.attrs={};Or.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Or(e);n.play()};const Um={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t)},ElasticEaseOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/o)+n+t)},ElasticEaseInOut(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r/2)===2?t+n:(o||(o=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),e<1?-.5*(i*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o))+t:i*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/o)*.5+n+t)},BounceEaseOut(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t},BounceEaseIn(e,t,n,r){return n-Um.BounceEaseOut(r-e,0,n,r)+t},BounceEaseInOut(e,t,n,r){return e<r/2?Um.BounceEaseIn(e*2,0,n,r)*.5+t:Um.BounceEaseOut(e*2-r,0,n,r)*.5+n*.5+t},EaseIn(e,t,n,r){return n*(e/=r)*e+t},EaseOut(e,t,n,r){return-n*(e/=r)*(e-2)+t},EaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},StrongEaseIn(e,t,n,r){return n*(e/=r)*e*e*e*e+t},StrongEaseOut(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t},StrongEaseInOut(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t},Linear(e,t,n,r){return n*e/r+t}},rh=fe._assign(lt,{Util:fe,Transform:ia,Node:Fe,Container:ua,Stage:lb,stages:q3,Layer:gh,FastLayer:uk,Group:K0,DD:dn,Shape:Me,shapes:Vm,Animation:Oa,Tween:Or,Easings:Um,Context:ab,Canvas:sb});class Iu extends Me{_sceneFunc(t){var n=lt.getAngle(this.angle()),r=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,n,r),t.arc(0,0,this.innerRadius(),n,0,!r),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),n=this.outerRadius(),r=this.clockwise(),i=lt.getAngle(r?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),l=Math.sin(Math.min(i,Math.PI/2)),u=o*(o>0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Iu.prototype._centroid=!0;Iu.prototype.className="Arc";Iu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Iu);q.addGetterSetter(Iu,"innerRadius",0,Be());q.addGetterSetter(Iu,"outerRadius",0,Be());q.addGetterSetter(Iu,"angle",0,Be());q.addGetterSetter(Iu,"clockwise",!1,Ls());function d9(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),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function FM(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=d9(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(o[0])&&(r.push(o[0]),r.push(o[1]),r.push(e[i]),r.push(e[i+1]),r.push(o[2]),r.push(o[3]));return r}class Ru extends Me{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var n=this.points(),r=n.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,l,u;if(!!r){if(t.beginPath(),t.moveTo(n[0],n[1]),i!==0&&r>4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);u<l-2;)t.bezierCurveTo(s[u++],s[u++],s[u++],s[u++],s[u++],s[u++]);o||t.quadraticCurveTo(s[l-2],s[l-1],n[r-2],n[r-1])}else if(a)for(u=2;u<r;)t.bezierCurveTo(n[u++],n[u++],n[u++],n[u++],n[u++],n[u++]);else for(u=2;u<r;u+=2)t.lineTo(n[u],n[u+1]);o?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():FM(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=d9(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=d9(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),a=FM(t,r),s=[i[2],i[3]].concat(a).concat([o[0],o[1],t[n-2],t[n-1],o[2],o[3],i[0],i[1],t[0],t[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);return{x:n,y:i,width:r-n,height:o-i}}}Ru.prototype.className="Line";Ru.prototype._attrsAffectingSize=["points","bezier","tension"];pr(Ru);q.addGetterSetter(Ru,"closed",!1);q.addGetterSetter(Ru,"bezier",!1);q.addGetterSetter(Ru,"tension",0,Be());q.addGetterSetter(Ru,"points",[],bCe());class In extends Me{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=In.parsePathData(this.data()),this.pathLength=0;for(var n=0;n<this.dataArray.length;++n)this.pathLength+=this.dataArray[n].pathLength;this.on("dataChange.konva",function(){this.dataArray=In.parsePathData(this.data()),this.pathLength=0;for(var r=0;r<this.dataArray.length;++r)this.pathLength+=this.dataArray[r].pathLength})}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;i<n.length;i++){var o=n[i].command,a=n[i].points;switch(o){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6],S=a[7],w=u>h?u:h,P=u>h?1:u/h,E=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(P,E),t.arc(0,0,w,p,p+m,1-S),t.scale(1/P,1/E),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],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)<v&&(v=Math.abs(h-m)),p<0)for(let S=h-v;S>m;S-=v){const w=In.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;S<m;S+=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}}else if(u.command==="C")for(let S=0;S<=1;S+=.01){const w=In.getPointOnCubicBezier(S,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);t.push(w.x,w.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],i=t[1],o=t[1],a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],isNaN(a)||(n=Math.min(n,a),r=Math.max(r,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:n,y:i,width:r-n,height:o-i}}getLength(){return this.pathLength}getPointAtLength(t){var n,r=0,i=this.dataArray.length;if(!i)return null;for(;r<i&&t>this.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.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 In.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],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i<n&&(u*=-1);var h=l*u,p;if(i===n)p={x:a,y:s+h};else if((s-r)/(a-n+1e-8)===l)p={x:a+u,y:s+h};else{var m,v,S=this.getLineLength(n,r,i,o),w=(a-n)*(i-n)+(s-r)*(o-r);w=w/(S*S),m=n+w*(i-n),v=r+w*(o-r);var P=this.getLineLength(a,s,m,v),E=Math.sqrt(t*t-P*P);u=Math.sqrt(E*E/(1+l*l)),i<n&&(u*=-1),h=l*u,p={x:m+u,y:v+h}}return p}static getPointOnCubicBezier(t,n,r,i,o,a,s,l,u){function h(P){return P*P*P}function p(P){return 3*P*P*(1-P)}function m(P){return 3*P*(1-P)*(1-P)}function v(P){return(1-P)*(1-P)*(1-P)}var S=l*h(t)+a*p(t)+i*m(t)+n*v(t),w=u*h(t)+s*p(t)+o*m(t)+r*v(t);return{x:S,y:w}}static getPointOnQuadraticBezier(t,n,r,i,o,a,s){function l(v){return v*v}function u(v){return 2*v*(1-v)}function h(v){return(1-v)*(1-v)}var p=a*l(t)+i*u(t)+n*h(t),m=s*l(t)+o*u(t)+r*h(t);return{x:p,y:m}}static getPointOnEllipticalArc(t,n,r,i,o,a){var s=Math.cos(a),l=Math.sin(a),u={x:r*Math.cos(o),y:i*Math.sin(o)};return{x:t+(u.x*s-u.y*l),y:n+(u.x*l+u.y*s)}}static parsePathData(t){if(!t)return[];var n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(new RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(new RegExp(r[i],"g"),"|"+r[i]);var o=n.split("|"),a=[],s=[],l=0,u=0,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,p;for(i=1;i<o.length;i++){var m=o[i],v=m.charAt(0);for(m=m.slice(1),s.length=0;p=h.exec(m);)s.push(p[0]);for(var S=[],w=0,P=s.length;w<P;w++){if(s[w]==="00"){S.push(0,0);continue}var E=parseFloat(s[w]);isNaN(E)?S.push(0):S.push(E)}for(;S.length>0&&!isNaN(S[0]);){var _=null,T=[],M=l,I=u,R,N,z,H,$,j,de,V,J,ie;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 Q=S.shift(),K=S.shift();if(l+=Q,u+=K,_="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]+Q,u=a[G].points[1]+K;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":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),_="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,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":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),_="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),_="Q",T.push(N,z,l,u);break;case"A":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,j);break;case"a":H=S.shift(),$=S.shift(),j=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),_="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,H,$,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=In;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],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)<v&&(v=Math.abs(h-m)),a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),p<0)for(l=h-v;l>m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l<m;l+=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],m,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(t,n,r,i,o,a,s,l,u){var h=u*(Math.PI/180),p=Math.cos(h)*(t-r)/2+Math.sin(h)*(n-i)/2,m=-1*Math.sin(h)*(t-r)/2+Math.cos(h)*(n-i)/2,v=p*p/(s*s)+m*m/(l*l);v>1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,P=S*-l*p/s,E=(t+r)/2+Math.cos(h)*w-Math.sin(h)*P,_=(n+i)/2+Math.sin(h)*w+Math.cos(h)*P,T=function($){return Math.sqrt($[0]*$[0]+$[1]*$[1])},M=function($,j){return($[0]*j[0]+$[1]*j[1])/(T($)*T(j))},I=function($,j){return($[0]*j[1]<$[1]*j[0]?-1:1)*Math.acos(M($,j))},R=I([1,0],[(p-w)/s,(m-P)/l]),N=[(p-w)/s,(m-P)/l],z=[(-1*p-w)/s,(-1*m-P)/l],H=I(N,z);return M(N,z)<=-1&&(H=Math.PI),M(N,z)>=1&&(H=0),a===0&&H>0&&(H=H-2*Math.PI),a===1&&H<0&&(H=H+2*Math.PI),[E,_,s,l,R,H,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);q.addGetterSetter(In,"data");class mh extends Ru{_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=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.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,p=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,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);q.addGetterSetter(mh,"pointerLength",10,Be());q.addGetterSetter(mh,"pointerWidth",10,Be());q.addGetterSetter(mh,"pointerAtBeginning",!1);q.addGetterSetter(mh,"pointerAtEnding",!0);class p1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}p1.prototype._centroid=!0;p1.prototype.className="Circle";p1.prototype._attrsAffectingSize=["radius"];pr(p1);q.addGetterSetter(p1,"radius",0,Be());class Cd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Cd.prototype.className="Ellipse";Cd.prototype._centroid=!0;Cd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(Cd);q.addComponentsGetterSetter(Cd,"radius",["x","y"]);q.addGetterSetter(Cd,"radiusX",0,Be());q.addGetterSetter(Cd,"radiusY",0,Be());class Ms extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ms({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ms.prototype.className="Image";pr(Ms);q.addGetterSetter(Ms,"image");q.addComponentsGetterSetter(Ms,"crop",["x","y","width","height"]);q.addGetterSetter(Ms,"cropX",0,Be());q.addGetterSetter(Ms,"cropY",0,Be());q.addGetterSetter(Ms,"cropWidth",0,Be());q.addGetterSetter(Ms,"cropHeight",0,Be());var DW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],d9e="Change.konva",f9e="none",f9="up",h9="right",p9="down",g9="left",h9e=DW.length;class ck extends K0{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<h9e;r++)t.on(DW[r]+d9e,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),n=this.getTag(),r,i,o,a,s,l,u;if(t&&n){switch(r=t.width(),i=t.height(),o=n.pointerDirection(),a=n.pointerWidth(),u=n.pointerHeight(),s=0,l=0,o){case f9:s=r/2,l=-1*u;break;case h9:s=r+a,l=i/2;break;case p9:s=r/2,l=i+u;break;case g9:s=-1*a,l=i/2;break}n.setAttrs({x:-1*s,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*s,y:-1*l})}}}ck.prototype.className="Label";pr(ck);class vh extends Me{_sceneFunc(t){var n=this.width(),r=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let l=0,u=0,h=0,p=0;typeof s=="number"?l=u=h=p=Math.min(s,n/2,r/2):(l=Math.min(s[0]||0,n/2,r/2),u=Math.min(s[1]||0,n/2,r/2),p=Math.min(s[2]||0,n/2,r/2),h=Math.min(s[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===f9&&(t.lineTo((n-o)/2,0),t.lineTo(n/2,-1*a),t.lineTo((n+o)/2,0)),t.lineTo(n-u,0),t.arc(n-u,u,u,Math.PI*3/2,0,!1),i===h9&&(t.lineTo(n,(r-a)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+a)/2)),t.lineTo(n,r-p),t.arc(n-p,r-p,p,0,Math.PI/2,!1),i===p9&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+a),t.lineTo((n-o)/2,r)),t.lineTo(h,r),t.arc(h,r-h,h,Math.PI/2,Math.PI,!1),i===g9&&(t.lineTo(0,(r+a)/2),t.lineTo(-1*o,r/2),t.lineTo(0,(r-a)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,n=0,r=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===f9?(n-=i,s+=i):o===p9?s+=i:o===g9?(t-=r*1.5,a+=r):o===h9&&(a+=r*1.5),{x:t,y:n,width:a,height:s}}}vh.prototype.className="Tag";pr(vh);q.addGetterSetter(vh,"pointerDirection",f9e);q.addGetterSetter(vh,"pointerWidth",0,Be());q.addGetterSetter(vh,"pointerHeight",0,Be());q.addGetterSetter(vh,"cornerRadius",0,gW(4));class c2 extends Me{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),i=this.height();if(t.beginPath(),!n)t.rect(0,0,r,i);else{let o=0,a=0,s=0,l=0;typeof n=="number"?o=a=s=l=Math.min(n,r/2,i/2):(o=Math.min(n[0]||0,r/2,i/2),a=Math.min(n[1]||0,r/2,i/2),l=Math.min(n[2]||0,r/2,i/2),s=Math.min(n[3]||0,r/2,i/2)),t.moveTo(o,0),t.lineTo(r-a,0),t.arc(r-a,a,a,Math.PI*3/2,0,!1),t.lineTo(r,i-l),t.arc(r-l,i-l,l,0,Math.PI/2,!1),t.lineTo(s,i),t.arc(s,i-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,o),t.arc(o,o,o,Math.PI,Math.PI*3/2,!1)}t.closePath(),t.fillStrokeShape(this)}}c2.prototype.className="Rect";pr(c2);q.addGetterSetter(c2,"cornerRadius",0,gW(4));class yh extends Me{_sceneFunc(t){const n=this._getPoints();t.beginPath(),t.moveTo(n[0].x,n[0].y);for(var r=1;r<n.length;r++)t.lineTo(n[r].x,n[r].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,n=this.attrs.radius||0,r=[];for(var i=0;i<t;i++)r.push({x:n*Math.sin(i*2*Math.PI/t),y:-1*n*Math.cos(i*2*Math.PI/t)});return r}getSelfRect(){const t=this._getPoints();var n=t[0].x,r=t[0].y,i=t[0].x,o=t[0].y;return t.forEach(a=>{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);q.addGetterSetter(yh,"radius",0,Be());q.addGetterSetter(yh,"sides",0,Be());var $M=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,$M,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),$M,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)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);q.addGetterSetter(Sh,"innerRadius",0,Be());q.addGetterSetter(Sh,"outerRadius",0,Be());class zl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Oa(()=>{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],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,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<o-1?this.frameIndex(t+1):this.frameIndex(0)}}zl.prototype.className="Sprite";pr(zl);q.addGetterSetter(zl,"animation");q.addGetterSetter(zl,"animations");q.addGetterSetter(zl,"frameOffsets");q.addGetterSetter(zl,"image");q.addGetterSetter(zl,"frameIndex",0,Be());q.addGetterSetter(zl,"frameRate",17,Be());q.backCompat(zl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class _d extends Me{_sceneFunc(t){var n=this.innerRadius(),r=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-r);for(var o=1;o<i*2;o++){var a=o%2===0?r:n,s=a*Math.sin(o*Math.PI/i),l=-1*a*Math.cos(o*Math.PI/i);t.lineTo(s,l)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}_d.prototype.className="Star";_d.prototype._centroid=!0;_d.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(_d);q.addGetterSetter(_d,"numPoints",5,Be());q.addGetterSetter(_d,"innerRadius",0,Be());q.addGetterSetter(_d,"outerRadius",0,Be());function zW(e){return Array.from(e)}var Mp="auto",p9e="center",Gg="justify",g9e="Change.konva",m9e="2d",HM="-",BW="left",v9e="text",y9e="Text",S9e="top",b9e="bottom",WM="middle",FW="normal",x9e="px ",i3=" ",w9e="right",C9e="word",_9e="char",VM="none",Ow="\u2026",$W=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],k9e=$W.length;function E9e(e){return e.split(",").map(t=>{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Iw(){return o3||(o3=fe.createCanvasElement().getContext(m9e),o3)}function P9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function T9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function A9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(A9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<k9e;n++)this.on($W[n]+g9e,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(),p=this.letterSpacing(),m=this.fill(),v=this.textDecoration(),S=v.indexOf("underline")!==-1,w=v.indexOf("line-through")!==-1,P,E=0,E=a/2,_=0,T=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",WM),t.setAttr("textAlign",BW),s===WM?l=(this.getHeight()-r*a-i*2)/2:s===b9e&&(l=this.getHeight()-r*a-i*2),t.translate(i,l+i),P=0;P<r;P++){var _=0,T=0,M=n[P],I=M.text,R=M.width,N=M.lastInParagraph,z,H,$;if(t.save(),u===w9e?_+=h-R-i*2:u===p9e&&(_+=(h-R-i*2)/2),S&&(t.save(),t.beginPath(),t.moveTo(_,E+T+Math.round(o/2)),z=I.split(" ").length-1,H=z===0,$=u===Gg&&N&&!H?h-i*2:R,t.lineTo(_+Math.round($),E+T+Math.round(o/2)),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),w&&(t.save(),t.beginPath(),t.moveTo(_,E+T),z=I.split(" ").length-1,H=z===0,$=u===Gg&&N&&!H?h-i*2:R,t.lineTo(_+Math.round($),E+T),t.lineWidth=o/15,t.strokeStyle=m,t.stroke(),t.restore()),p!==0||u===Gg){z=I.split(" ").length-1;for(var j=zW(I),de=0;de<j.length;de++){var V=j[de];V===" "&&!N&&u===Gg&&(_+=(h-i*2-R)/z),this._partialTextX=_,this._partialTextY=E+T,this._partialText=V,t.fillStrokeShape(this),_+=this.measureSize(V).width+p}}else this._partialTextX=_,this._partialTextY=E+T,this._partialText=I,t.fillStrokeShape(this);t.restore(),r>1&&(E+=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=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(v9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||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 fe.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=Iw(),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()+i3+this.fontVariant()+i3+(this.fontSize()+x9e)+E9e(this.fontFamily())}_addTextLine(t){this.align()===Gg&&(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 Iw().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!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==VM,w=v!==_9e&&S,P=this.ellipsis();this.textArr=[],Iw().font=this._getContextFont();for(var E=P?this._getTextWidth(Ow):0,_=0,T=t.length;_<T;++_){var M=t[_],I=this._getTextWidth(M);if(s&&I>h)for(;M.length>0;){for(var R=0,N=M.length,z="",H=0;R<N;){var $=R+N>>>1,j=M.slice(0,$+1),de=this._getTextWidth(j)+E;de<=h?(R=$+1,z=j,H=de):N=$}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===HM;ie&&H<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(HM))+1,V>0&&(R=V,z=z.slice(0,R),H=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,H),m+=i;var Q=this._shouldHandleEllipsis(m);if(Q){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),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)&&_<T-1&&this._tryToAddEllipsisToLastLine();if(l&&m+i>p)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==VM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&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+Ow)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+Ow)}}getStrokeScaleEnabled(){return!0}}hr.prototype._fillFunc=P9e;hr.prototype._strokeFunc=T9e;hr.prototype.className=y9e;hr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];pr(hr);q.overWriteSetter(hr,"width",ak());q.overWriteSetter(hr,"height",ak());q.addGetterSetter(hr,"fontFamily","Arial");q.addGetterSetter(hr,"fontSize",12,Be());q.addGetterSetter(hr,"fontStyle",FW);q.addGetterSetter(hr,"fontVariant",FW);q.addGetterSetter(hr,"padding",0,Be());q.addGetterSetter(hr,"align",BW);q.addGetterSetter(hr,"verticalAlign",S9e);q.addGetterSetter(hr,"lineHeight",1,Be());q.addGetterSetter(hr,"wrap",C9e);q.addGetterSetter(hr,"ellipsis",!1,Ls());q.addGetterSetter(hr,"letterSpacing",0,Be());q.addGetterSetter(hr,"text","",h1());q.addGetterSetter(hr,"textDecoration","");var L9e="",HW="normal";function WW(e){e.fillText(this.partialText,0,0)}function VW(e){e.strokeText(this.partialText,0,0)}class ti extends Me{constructor(t){super(t),this.dummyCanvas=fe.createCanvasElement(),this.dataArray=[],this.dataArray=In.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=In.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),i=this.fontSize(),o=this.glyphInfo;n==="underline"&&t.beginPath();for(var a=0;a<o.length;a++){t.save();var s=o[a].p0;t.translate(s.x,s.y),t.rotate(o[a].rotation),this.partialText=o[a].text,t.fillStrokeShape(this),n==="underline"&&(a===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}n==="underline"&&(t.strokeStyle=r,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var n=this.glyphInfo;if(n.length>=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i<n.length;i++){var o=n[i].p1;t.lineTo(o.x,o.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return hr.prototype.setText.call(this,t)}_getContextFont(){return hr.prototype._getContextFont.call(this)}_getTextSize(t){var n=this.dummyCanvas,r=n.getContext("2d");r.save(),r.font=this._getContextFont();var i=r.measureText(t);return r.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,n=this._getTextSize(this.attrs.text),r=this.letterSpacing(),i=this.align(),o=this.kerningFunc();this.textWidth=n.width,this.textHeight=n.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);this.glyphInfo=[];for(var s=0,l=0;l<t.dataArray.length;l++)t.dataArray[l].pathLength>0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=zW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,P=0,E=function(){P=0;for(var de=t.dataArray,V=w+1;V<de.length;V++){if(de[V].pathLength>0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},_=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var Q=J;S===void 0;)S=E(),S&&Q+S.pathLength<V&&(Q+=S.pathLength,S=void 0);if(Object.keys(S).length===0||m===void 0)return;var K=!1;switch(S.command){case"L":In.getLineLength(m.x,m.y,S.points[0],S.points[1])>V?v=In.getPointOnLine(V,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],te=S.points[4]+Z;P===0?P=G+1e-8:V>J?P+=Math.PI/180*Z/Math.abs(Z):P-=Math.PI/360*Z/Math.abs(Z),(Z<0&&P<te||Z>=0&&P>te)&&(P=te,K=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],P,S.points[6]);break;case"C":P===0?V>S.pathLength?P=1e-8:P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength/2:P=Math.max(P-(J-V)/S.pathLength/2,0),P>1&&(P=1,K=!0),v=In.getPointOnCubicBezier(P,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":P===0?P=V/S.pathLength:V>J?P+=(V-J)/S.pathLength:P-=(J-V)/S.pathLength,P>1&&(P=1,K=!0),v=In.getPointOnQuadraticBezier(P,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),K&&(K=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;R<I&&(_(T),!(m===void 0||v===void 0));R++)m=v;for(var N=0;N<h.length&&(_(h[N]),!(m===void 0||v===void 0));N++){var z=In.getLineLength(m.x,m.y,v.x,v.y),H=0;if(o)try{H=o(h[N-1],h[N])*this.fontSize()}catch{H=0}m.x+=H,v.x+=H,this.textWidth+=H;var $=In.getPointOnLine(H+z/2,m.x,m.y,v.x,v.y),j=Math.atan2(v.y-m.y,v.x-m.x);this.glyphInfo.push({transposeX:$.x,transposeY:$.y,text:h[N],rotation:j,p0:m,p1:v}),m=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(h){t.push(h.p0.x),t.push(h.p0.y),t.push(h.p1.x),t.push(h.p1.y)});for(var n=t[0]||0,r=t[0]||0,i=t[1]||0,o=t[1]||0,a,s,l=0;l<t.length/2;l++)a=t[l*2],s=t[l*2+1],n=Math.min(n,a),r=Math.max(r,a),i=Math.min(i,s),o=Math.max(o,s);var u=this.fontSize();return{x:n-u/2,y:i-u/2,width:r-n+u,height:o-i+u}}}ti.prototype._fillFunc=WW;ti.prototype._strokeFunc=VW;ti.prototype._fillFuncHit=WW;ti.prototype._strokeFuncHit=VW;ti.prototype.className="TextPath";ti.prototype._attrsAffectingSize=["text","fontSize","data"];pr(ti);q.addGetterSetter(ti,"data");q.addGetterSetter(ti,"fontFamily","Arial");q.addGetterSetter(ti,"fontSize",12,Be());q.addGetterSetter(ti,"fontStyle",HW);q.addGetterSetter(ti,"align","left");q.addGetterSetter(ti,"letterSpacing",0,Be());q.addGetterSetter(ti,"textBaseline","middle");q.addGetterSetter(ti,"fontVariant",HW);q.addGetterSetter(ti,"text",L9e);q.addGetterSetter(ti,"textDecoration",null);q.addGetterSetter(ti,"kerningFunc",null);var UW="tr-konva",M9e=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(e=>e+`.${UW}`).join(" "),UM="nodesRect",O9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],I9e={"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 R9e="ontouchstart"in lt._global;function N9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(I9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],GM=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 GW(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 z9e(e,t){const n=D9e(e);return GW(e,t,n)}function B9e(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=lt.getAngle(e[i]),a=Math.abs(o-t)%(Math.PI*2);Math.min(a,Math.PI*2-a)<n&&(r=o)}return r}class _n extends K0{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(M9e,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return fe.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return UW+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(r=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(O9e.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(UM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(UM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(lt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),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 GW(h,-lt.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-GM,y:-GM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{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();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-lt.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:lt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new c2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:R9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=lt.getAngle(this.rotation()),o=N9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._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 p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=lt.getAngle(this.rotation());const V=m+de,J=lt.getAngle(this.rotationSnapTolerance()),Q=B9e(this.rotationSnaps(),V,J)-p.rotation,K=z9e(p,Q);this._fitNodesInto(K,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,P=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,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.x?-1:1,P=this.findOne(".top-right").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var E=o.position();this.findOne(".top-left").y(E.y),this.findOne(".bottom-right").x(E.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<o.x()?-1:1,P=o.y()<S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,o.x(S.x-n),o.y(S.y+r)}E=o.position(),this.findOne(".top-left").x(E.x),this.findOne(".bottom-right").y(E.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var S=_?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(o.y()-S.y,2));var w=this.findOne(".bottom-right").x()<S.x?-1:1,P=this.findOne(".bottom-right").y()<S.y?-1:1;n=i*this.cos*w,r=i*this.sin*P,this.findOne(".bottom-right").x(S.x+n),this.findOne(".bottom-right").y(S.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var _=this.centeredScaling()||t.altKey;if(_){var T=this.findOne(".top-left"),M=this.findOne(".bottom-right"),I=T.x(),R=T.y(),N=this.getWidth()-M.x(),z=this.getHeight()-M.y();M.move({x:-I,y:-R}),T.move({x:N,y:z})}var H=this.findOne(".top-left").getAbsolutePosition();n=H.x,r=H.y;var $=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),j=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:$,height:j,rotation:lt.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var n=this.getNode();this._fire("transformend",{evt:t,target:n}),n&&this._nodes.forEach(r=>{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(lt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;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(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const P=w.decompose();p.setAttrs(P),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._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(fe._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()*fe._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=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function F9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p5.join(", "))}),e||[]}_n.prototype.className="Transformer";pr(_n);q.addGetterSetter(_n,"enabledAnchors",p5,F9e);q.addGetterSetter(_n,"flipEnabled",!0,Ls());q.addGetterSetter(_n,"resizeEnabled",!0);q.addGetterSetter(_n,"anchorSize",10,Be());q.addGetterSetter(_n,"rotateEnabled",!0);q.addGetterSetter(_n,"rotationSnaps",[]);q.addGetterSetter(_n,"rotateAnchorOffset",50,Be());q.addGetterSetter(_n,"rotationSnapTolerance",5,Be());q.addGetterSetter(_n,"borderEnabled",!0);q.addGetterSetter(_n,"anchorStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"anchorStrokeWidth",1,Be());q.addGetterSetter(_n,"anchorFill","white");q.addGetterSetter(_n,"anchorCornerRadius",0,Be());q.addGetterSetter(_n,"borderStroke","rgb(0, 161, 255)");q.addGetterSetter(_n,"borderStrokeWidth",1,Be());q.addGetterSetter(_n,"borderDash");q.addGetterSetter(_n,"keepRatio",!0);q.addGetterSetter(_n,"centeredScaling",!1);q.addGetterSetter(_n,"ignoreStroke",!1);q.addGetterSetter(_n,"padding",0,Be());q.addGetterSetter(_n,"node");q.addGetterSetter(_n,"nodes");q.addGetterSetter(_n,"boundBoxFunc");q.addGetterSetter(_n,"anchorDragBoundFunc");q.addGetterSetter(_n,"shouldOverdrawWholeArea",!1);q.addGetterSetter(_n,"useSingleNodeRotation",!0);q.backCompat(_n,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Nu extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,lt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Nu.prototype.className="Wedge";Nu.prototype._centroid=!0;Nu.prototype._attrsAffectingSize=["radius"];pr(Nu);q.addGetterSetter(Nu,"radius",0,Be());q.addGetterSetter(Nu,"angle",0,Be());q.addGetterSetter(Nu,"clockwise",!1);q.backCompat(Nu,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function jM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var $9e=[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],H9e=[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 W9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,P,E,_,T,M,I,R,N,z,H,$,j,de,V=t+t+1,J=r-1,ie=i-1,Q=t+1,K=Q*(Q+1)/2,G=new jM,Z=null,te=G,X=null,he=null,ye=$9e[t],Se=H9e[t];for(s=1;s<V;s++)te=te.next=new jM,s===Q&&(Z=te);for(te.next=G,p=h=0,a=0;a<i;a++){for(M=I=R=N=m=v=S=w=0,P=Q*(z=n[h]),E=Q*(H=n[h+1]),_=Q*($=n[h+2]),T=Q*(j=n[h+3]),m+=K*z,v+=K*H,S+=K*$,w+=K*j,te=G,s=0;s<Q;s++)te.r=z,te.g=H,te.b=$,te.a=j,te=te.next;for(s=1;s<Q;s++)l=h+((J<s?J:s)<<2),m+=(te.r=z=n[l])*(de=Q-s),v+=(te.g=H=n[l+1])*de,S+=(te.b=$=n[l+2])*de,w+=(te.a=j=n[l+3])*de,M+=z,I+=H,R+=$,N+=j,te=te.next;for(X=G,he=Z,o=0;o<r;o++)n[h+3]=j=w*ye>>Se,j!==0?(j=255/j,n[h]=(m*ye>>Se)*j,n[h+1]=(v*ye>>Se)*j,n[h+2]=(S*ye>>Se)*j):n[h]=n[h+1]=n[h+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=p+((l=o+t+1)<J?l:J)<<2,M+=X.r=n[l],I+=X.g=n[l+1],R+=X.b=n[l+2],N+=X.a=n[l+3],m+=M,v+=I,S+=R,w+=N,X=X.next,P+=z=he.r,E+=H=he.g,_+=$=he.b,T+=j=he.a,M-=z,I-=H,R-=$,N-=j,he=he.next,h+=4;p+=r}for(o=0;o<r;o++){for(I=R=N=M=v=S=w=m=0,h=o<<2,P=Q*(z=n[h]),E=Q*(H=n[h+1]),_=Q*($=n[h+2]),T=Q*(j=n[h+3]),m+=K*z,v+=K*H,S+=K*$,w+=K*j,te=G,s=0;s<Q;s++)te.r=z,te.g=H,te.b=$,te.a=j,te=te.next;for(u=r,s=1;s<=t;s++)h=u+o<<2,m+=(te.r=z=n[h])*(de=Q-s),v+=(te.g=H=n[h+1])*de,S+=(te.b=$=n[h+2])*de,w+=(te.a=j=n[h+3])*de,M+=z,I+=H,R+=$,N+=j,te=te.next,s<ie&&(u+=r);for(h=o,X=G,he=Z,a=0;a<i;a++)l=h<<2,n[l+3]=j=w*ye>>Se,j>0?(j=255/j,n[l]=(m*ye>>Se)*j,n[l+1]=(v*ye>>Se)*j,n[l+2]=(S*ye>>Se)*j):n[l]=n[l+1]=n[l+2]=0,m-=P,v-=E,S-=_,w-=T,P-=X.r,E-=X.g,_-=X.b,T-=X.a,l=o+((l=a+Q)<ie?l:ie)*r<<2,m+=M+=X.r=n[l],v+=I+=X.g=n[l+1],S+=R+=X.b=n[l+2],w+=N+=X.a=n[l+3],X=X.next,P+=z=he.r,E+=H=he.g,_+=$=he.b,T+=j=he.a,M-=z,I-=H,R-=$,N-=j,he=he.next,h+=r}}const V9e=function(t){var n=Math.round(this.blurRadius());n>0&&W9e(t,n)};q.addGetterSetter(Fe,"blurRadius",0,Be(),q.afterSetFilter);const U9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=4)n[i]+=t,n[i+1]+=t,n[i+2]+=t};q.addGetterSetter(Fe,"brightness",0,Be(),q.afterSetFilter);const G9e=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,i=150,o=150,a=150,s;for(s=0;s<r;s+=4)i=n[s],o=n[s+1],a=n[s+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};q.addGetterSetter(Fe,"contrast",0,Be(),q.afterSetFilter);const j9e=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,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var P=m+(w-1)*4,E=a;w+E<1&&(E=0),w+E>l&&(E=0);var _=S+(w-1+E)*4,T=s[P]-s[_],M=s[P+1]-s[_+1],I=s[P+2]-s[_+2],R=T,N=R>0?R:-R,z=M>0?M:-M,H=I>0?I:-I;if(z>N&&(R=M),H>N&&(R=I),R*=t,i){var $=s[P]+R,j=s[P+1]+R,de=s[P+2]+R;s[P]=$>255?255:$<0?0:$,s[P+1]=j>255?255:j<0?0:j,s[P+2]=de>255?255:de<0?0:de}else{var V=n-R;V<0?V=0:V>255&&(V=255),s[P]=s[P+1]=s[P+2]=V}}while(--w)}while(--p)};q.addGetterSetter(Fe,"embossStrength",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossWhiteLevel",.5,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"embossDirection","top-left",null,q.afterSetFilter);q.addGetterSetter(Fe,"embossBlend",!1,null,q.afterSetFilter);function Rw(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 Y9e=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,p,m,v=this.enhance();if(v!==0){for(m=0;m<n;m+=4)o=t[m+0],o<r?r=o:o>i&&(i=o),l=t[m+1],l<a?a=l:l>s&&(s=l),p=t[m+2],p<u?u=p:p>h&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,P,E,_,T,M,I,R;for(v>0?(w=i+v*(255-i),P=r-v*(r-0),_=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),P=r+v*(r-S),E=(s+a)*.5,_=s+v*(s-E),T=a+v*(a-E),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;m<n;m+=4)t[m+0]=Rw(t[m+0],r,i,P,w),t[m+1]=Rw(t[m+1],a,s,T,_),t[m+2]=Rw(t[m+2],u,h,R,I)}};q.addGetterSetter(Fe,"enhance",0,Be(),q.afterSetFilter);const q9e=function(e){var t=e.data,n=t.length,r,i;for(r=0;r<n;r+=4)i=.34*t[r]+.5*t[r+1]+.16*t[r+2],t[r]=i,t[r+1]=i,t[r+2]=i};q.addGetterSetter(Fe,"hue",0,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"saturation",0,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"luminance",0,Be(),q.afterSetFilter);const K9e=function(e){var t=e.data,n=t.length,r=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s,l=r*i*Math.cos(o*Math.PI/180),u=r*i*Math.sin(o*Math.PI/180),h=.299*r+.701*l+.167*u,p=.587*r-.587*l+.33*u,m=.114*r-.114*l-.497*u,v=.299*r-.299*l-.328*u,S=.587*r+.413*l+.035*u,w=.114*r-.114*l+.293*u,P=.299*r-.3*l+1.25*u,E=.587*r-.586*l-1.05*u,_=.114*r+.886*l-.2*u,T,M,I,R;for(s=0;s<n;s+=4)T=t[s+0],M=t[s+1],I=t[s+2],R=t[s+3],t[s+0]=h*T+p*M+m*I+a,t[s+1]=v*T+S*M+w*I+a,t[s+2]=P*T+E*M+_*I+a,t[s+3]=R},X9e=function(e){var t=e.data,n=t.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a,s=r*i*Math.cos(o*Math.PI/180),l=r*i*Math.sin(o*Math.PI/180),u=.299*r+.701*s+.167*l,h=.587*r-.587*s+.33*l,p=.114*r-.114*s-.497*l,m=.299*r-.299*s-.328*l,v=.587*r+.413*s+.035*l,S=.114*r-.114*s+.293*l,w=.299*r-.3*s+1.25*l,P=.587*r-.586*s-1.05*l,E=.114*r+.886*s-.2*l,_,T,M,I;for(a=0;a<n;a+=4)_=t[a+0],T=t[a+1],M=t[a+2],I=t[a+3],t[a+0]=u*_+h*T+p*M,t[a+1]=m*_+v*T+S*M,t[a+2]=w*_+P*T+E*M,t[a+3]=I};q.addGetterSetter(Fe,"hue",0,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"saturation",0,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"value",0,Be(),q.afterSetFilter);const Z9e=function(e){var t=e.data,n=t.length,r;for(r=0;r<n;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]};var Q9e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,h,p,m=0,v=0,S=0,w=0,P,E=Math.sqrt(s*s+l*l);h=o-s,p=a-l,P=Math.sqrt(h*h+p*p),E=P>E?P:E;var _=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;I<T;I+=1)for(N=Math.sin(I*R),z=Math.cos(I*R),M=0;M<_;M+=1)h=Math.floor(s+E*M/_*z),p=Math.floor(l+E*M/_*N),u=(p*o+h)*4,m=r[u+0],v=r[u+1],S=r[u+2],w=r[u+3],u=(I+M*o)*4,i[u+0]=m,i[u+1]=v,i[u+2]=S,i[u+3]=w},J9e=function(e,t,n){var r=e.data,i=t.data,o=e.width,a=e.height,s=n.polarCenterX||o/2,l=n.polarCenterY||a/2,u,h,p,m,v,S=0,w=0,P=0,E=0,_,T=Math.sqrt(s*s+l*l);h=o-s,p=a-l,_=Math.sqrt(h*h+p*p),T=_>T?_:T;var M=a,I=o,R,N,z=n.polarRotation||0,H,$;for(h=0;h<o;h+=1)for(p=0;p<a;p+=1)m=h-s,v=p-l,R=Math.sqrt(m*m+v*v)*M/T,N=(Math.atan2(v,m)*180/Math.PI+360+z)%360,N=N*I/360,H=Math.floor(N),$=Math.floor(R),u=($*o+H)*4,S=r[u+0],w=r[u+1],P=r[u+2],E=r[u+3],u=(p*o+h)*4,i[u+0]=S,i[u+1]=w,i[u+2]=P,i[u+3]=E};const e7e=function(e){var t=e.width,n=e.height,r,i,o,a,s,l,u,h,p,m,v=Math.round(this.kaleidoscopePower()),S=Math.round(this.kaleidoscopeAngle()),w=Math.floor(t*(S%360)/360);if(!(v<1)){var P=fe.createCanvasElement();P.width=t,P.height=n;var E=P.getContext("2d").getImageData(0,0,t,n);Q9e(e,E,{polarCenterX:t/2,polarCenterY:n/2});for(var _=t/Math.pow(2,v);_<=8;)_=_*2,v-=1;_=Math.ceil(_);var T=_,M=0,I=T,R=1;for(w+_>t&&(M=T,I=0,R=-1),i=0;i<n;i+=1)for(r=M;r!==I;r+=R)o=Math.round(r+w)%t,p=(t*i+o)*4,s=E.data[p+0],l=E.data[p+1],u=E.data[p+2],h=E.data[p+3],m=(t*i+r)*4,E.data[m+0]=s,E.data[m+1]=l,E.data[m+2]=u,E.data[m+3]=h;for(i=0;i<n;i+=1)for(T=Math.floor(_),a=0;a<v;a+=1){for(r=0;r<T+1;r+=1)p=(t*i+r)*4,s=E.data[p+0],l=E.data[p+1],u=E.data[p+2],h=E.data[p+3],m=(t*i+T*2-r-1)*4,E.data[m+0]=s,E.data[m+1]=l,E.data[m+2]=u,E.data[m+3]=h;T*=2}J9e(E,e,{polarRotation:0})}};q.addGetterSetter(Fe,"kaleidoscopePower",2,Be(),q.afterSetFilter);q.addGetterSetter(Fe,"kaleidoscopeAngle",0,Be(),q.afterSetFilter);function a3(e,t,n){var r=(n*e.width+t)*4,i=[];return i.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),i}function jg(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function t7e(e){for(var t=[0,0,0],n=0;n<e.length;n++)t[0]+=e[n][0],t[1]+=e[n][1],t[2]+=e[n][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function n7e(e,t){var n=a3(e,0,0),r=a3(e,e.width-1,0),i=a3(e,0,e.height-1),o=a3(e,e.width-1,e.height-1),a=t||10;if(jg(n,r)<a&&jg(r,o)<a&&jg(o,i)<a&&jg(i,n)<a){for(var s=t7e([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var h=jg(s,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=h<a?0:255}return l}}function r7e(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function i7e(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,h=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,S=l+m-o;if(v>=0&&v<n&&S>=0&&S<t){var w=v*t+S,P=r[p*i+m];h+=e[w]*P}}a[u]=h===255*8?255:0}return a}function o7e(e,t,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,h=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,S=l+m-o;if(v>=0&&v<n&&S>=0&&S<t){var w=v*t+S,P=r[p*i+m];h+=e[w]*P}}a[u]=h>=255*4?255:0}return a}function a7e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s<n;s++)for(var l=0;l<t;l++){for(var u=s*t+l,h=0,p=0;p<i;p++)for(var m=0;m<i;m++){var v=s+p-o,S=l+m-o;if(v>=0&&v<n&&S>=0&&S<t){var w=v*t+S,P=r[p*i+m];h+=e[w]*P}}a[u]=h}return a}const s7e=function(e){var t=this.threshold(),n=n7e(e,t);return n&&(n=i7e(n,e.width,e.height),n=o7e(n,e.width,e.height),n=a7e(n,e.width,e.height),r7e(e,n)),e};q.addGetterSetter(Fe,"threshold",0,Be(),q.afterSetFilter);const l7e=function(e){var t=this.noise()*255,n=e.data,r=n.length,i=t/2,o;for(o=0;o<r;o+=4)n[o+0]+=i-2*i*Math.random(),n[o+1]+=i-2*i*Math.random(),n[o+2]+=i-2*i*Math.random()};q.addGetterSetter(Fe,"noise",.2,Be(),q.afterSetFilter);const u7e=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,a,s,l,u,h,p=Math.ceil(n/t),m=Math.ceil(r/t),v,S,w,P,E,_,T,M=e.data;if(t<=0){fe.error("pixelSize value can not be <= 0");return}for(E=0;E<p;E+=1)for(_=0;_<m;_+=1){for(s=0,l=0,u=0,h=0,v=E*t,S=v+t,w=_*t,P=w+t,T=0,i=v;i<S;i+=1)if(!(i>=n))for(o=w;o<P;o+=1)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<S;i+=1)if(!(i>=n))for(o=w;o<P;o+=1)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(Fe,"pixelSize",8,Be(),q.afterSetFilter);const c7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o<r;o+=1)n[o]=Math.floor(n[o]/i)*i};q.addGetterSetter(Fe,"levels",.5,Be(),q.afterSetFilter);const d7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a,s;for(a=0;a<n;a+=4)s=(.34*t[a]+.5*t[a+1]+.16*t[a+2])/255,t[a]=s*r,t[a+1]=s*i,t[a+2]=s*o,t[a+3]=t[a+3]};q.addGetterSetter(Fe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);const f7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s<n;s+=4)l=1-a,t[s]=r*a+t[s]*l,t[s+1]=i*a+t[s+1]*l,t[s+2]=o*a+t[s+2]*l};q.addGetterSetter(Fe,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});q.addGetterSetter(Fe,"blue",0,pW,q.afterSetFilter);q.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const h7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r<n;r+=4)i=t[r+0],o=t[r+1],a=t[r+2],t[r+0]=Math.min(255,i*.393+o*.769+a*.189),t[r+1]=Math.min(255,i*.349+o*.686+a*.168),t[r+2]=Math.min(255,i*.272+o*.534+a*.131)},p7e=function(e){var t=e.data,n=e.width,r=e.height,i=n*4,o=r;do{var a=(o-1)*i,s=n;do{var l=a+(s-1)*4,u=t[l],h=t[l+1],p=t[l+2];u>127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},g7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;i<r;i+=1)n[i]=n[i]<t?0:255};q.addGetterSetter(Fe,"threshold",.5,Be(),q.afterSetFilter);const Yg=rh.Util._assign(rh,{Arc:Iu,Arrow:mh,Circle:p1,Ellipse:Cd,Image:Ms,Label:ck,Tag:vh,Line:Ru,Path:In,Rect:c2,RegularPolygon:yh,Ring:Sh,Sprite:zl,Star:_d,Text:hr,TextPath:ti,Transformer:_n,Wedge:Nu,Filters:{Blur:V9e,Brighten:U9e,Contrast:G9e,Emboss:j9e,Enhance:Y9e,Grayscale:q9e,HSL:K9e,HSV:X9e,Invert:Z9e,Kaleidoscope:e7e,Mask:s7e,Noise:l7e,Pixelate:u7e,Posterize:c7e,RGB:d7e,RGBA:f7e,Sepia:h7e,Solarize:p7e,Threshold:g7e}});var jW={exports:{}};/**
|
|
* @license React
|
|
* react-reconciler.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var m7e=function(t){var n={},r=C.exports,i=e0.exports,o=Object.assign;function a(d){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+d,y=1;y<arguments.length;y++)f+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),S=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),I=Symbol.iterator;function R(d){return d===null||typeof d!="object"?null:(d=I&&d[I]||d["@@iterator"],typeof d=="function"?d:null)}function N(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case h:return"Fragment";case u:return"Portal";case m:return"Profiler";case p:return"StrictMode";case P:return"Suspense";case E:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case S:return(d.displayName||"Context")+".Consumer";case v:return(d._context.displayName||"Context")+".Provider";case w:var f=d.render;return d=d.displayName,d||(d=f.displayName||f.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case _:return f=d.displayName||null,f!==null?f:N(d.type)||"Memo";case T:f=d._payload,d=d._init;try{return N(d(f))}catch{}}return null}function z(d){var f=d.type;switch(d.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=f.render,d=d.displayName||d.name||"",f.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return N(f);case 8:return f===p?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function H(d){var f=d,y=d;if(d.alternate)for(;f.return;)f=f.return;else{d=f;do f=d,(f.flags&4098)!==0&&(y=f.return),d=f.return;while(d)}return f.tag===3?y:null}function $(d){if(H(d)!==d)throw Error(a(188))}function j(d){var f=d.alternate;if(!f){if(f=H(d),f===null)throw Error(a(188));return f!==d?null:d}for(var y=d,k=f;;){var A=y.return;if(A===null)break;var O=A.alternate;if(O===null){if(k=A.return,k!==null){y=k;continue}break}if(A.child===O.child){for(O=A.child;O;){if(O===y)return $(A),d;if(O===k)return $(A),f;O=O.sibling}throw Error(a(188))}if(y.return!==k.return)y=A,k=O;else{for(var W=!1,se=A.child;se;){if(se===y){W=!0,y=A,k=O;break}if(se===k){W=!0,k=A,y=O;break}se=se.sibling}if(!W){for(se=O.child;se;){if(se===y){W=!0,y=O,k=A;break}if(se===k){W=!0,k=O,y=A;break}se=se.sibling}if(!W)throw Error(a(189))}}if(y.alternate!==k)throw Error(a(190))}if(y.tag!==3)throw Error(a(188));return y.stateNode.current===y?d:f}function de(d){return d=j(d),d!==null?V(d):null}function V(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var f=V(d);if(f!==null)return f;d=d.sibling}return null}function J(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){if(d.tag!==4){var f=J(d);if(f!==null)return f}d=d.sibling}return null}var ie=Array.isArray,Q=t.getPublicInstance,K=t.getRootHostContext,G=t.getChildHostContext,Z=t.prepareForCommit,te=t.resetAfterCommit,X=t.createInstance,he=t.appendInitialChild,ye=t.finalizeInitialChildren,Se=t.prepareUpdate,De=t.shouldSetTextContent,$e=t.createTextInstance,He=t.scheduleTimeout,qe=t.cancelTimeout,tt=t.noTimeout,Ze=t.isPrimaryRenderer,nt=t.supportsMutation,Tt=t.supportsPersistence,xt=t.supportsHydration,Le=t.getInstanceFromNode,at=t.preparePortalMount,At=t.getCurrentEventPriority,st=t.detachDeletedInstance,gt=t.supportsMicrotasks,an=t.scheduleMicrotask,Ct=t.supportsTestSelectors,Ut=t.findFiberRoot,sn=t.getBoundingRect,yn=t.getTextContent,Oe=t.isHiddenSubtree,et=t.matchAccessibilityRole,Xt=t.setFocusIfFocusable,Yt=t.setupIntersectionObserver,ke=t.appendChild,Ot=t.appendChildToContainer,Ne=t.commitTextUpdate,ut=t.commitMount,ln=t.commitUpdate,Nn=t.insertBefore,We=t.insertInContainerBefore,ht=t.removeChild,it=t.removeChildFromContainer,Nt=t.resetTextContent,Zt=t.hideInstance,Qn=t.hideTextInstance,lo=t.unhideInstance,gi=t.unhideTextInstance,Os=t.clearContainer,m1=t.cloneInstance,va=t.createContainerChildSet,xh=t.appendChildToContainerChildSet,v1=t.finalizeContainerChildren,Du=t.replaceContainerChildren,wh=t.cloneHiddenInstance,Ch=t.cloneHiddenTextInstance,Ro=t.canHydrateInstance,Ed=t.canHydrateTextInstance,y1=t.canHydrateSuspenseInstance,zu=t.isSuspenseInstancePending,Pd=t.isSuspenseInstanceFallback,S1=t.getSuspenseInstanceFallbackErrorDetails,Is=t.registerSuspenseInstanceRetry,Bu=t.getNextHydratableSibling,b1=t.getFirstHydratableChild,x1=t.getFirstHydratableChildWithinContainer,w1=t.getFirstHydratableChildWithinSuspenseInstance,C1=t.hydrateInstance,Ya=t.hydrateTextInstance,_1=t.hydrateSuspenseInstance,k1=t.getNextHydratableInstanceAfterSuspenseInstance,E1=t.commitHydratedContainer,P1=t.commitHydratedSuspenseInstance,T1=t.clearSuspenseBoundary,A1=t.clearSuspenseBoundaryFromContainer,Rs=t.shouldDeleteUnhydratedTailInstances,L1=t.didNotMatchHydratedContainerTextInstance,qa=t.didNotMatchHydratedTextInstance,Bl;function Fl(d){if(Bl===void 0)try{throw Error()}catch(y){var f=y.stack.trim().match(/\n( *(at )?)/);Bl=f&&f[1]||""}return`
|
|
`+Bl+d}var Ns=!1;function $l(d,f){if(!d||Ns)return"";Ns=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(Re){var k=Re}Reflect.construct(d,[],f)}else{try{f.call()}catch(Re){k=Re}d.call(f.prototype)}else{try{throw Error()}catch(Re){k=Re}d()}}catch(Re){if(Re&&k&&typeof Re.stack=="string"){for(var A=Re.stack.split(`
|
|
`),O=k.stack.split(`
|
|
`),W=A.length-1,se=O.length-1;1<=W&&0<=se&&A[W]!==O[se];)se--;for(;1<=W&&0<=se;W--,se--)if(A[W]!==O[se]){if(W!==1||se!==1)do if(W--,se--,0>se||A[W]!==O[se]){var pe=`
|
|
`+A[W].replace(" at new "," at ");return d.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",d.displayName)),pe}while(1<=W&&0<=se);break}}}finally{Ns=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?Fl(d):""}var _h=Object.prototype.hasOwnProperty,Fu=[],Ds=-1;function No(d){return{current:d}}function kn(d){0>Ds||(d.current=Fu[Ds],Fu[Ds]=null,Ds--)}function Sn(d,f){Ds++,Fu[Ds]=d.current,d.current=f}var Do={},_r=No(Do),Ur=No(!1),zo=Do;function zs(d,f){var y=d.type.contextTypes;if(!y)return Do;var k=d.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===f)return k.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ka(){kn(Ur),kn(_r)}function Td(d,f,y){if(_r.current!==Do)throw Error(a(168));Sn(_r,f),Sn(Ur,y)}function Hl(d,f,y){var k=d.stateNode;if(f=f.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var A in k)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,k)}function Xa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=_r.current,Sn(_r,d),Sn(Ur,Ur.current),!0}function Ad(d,f,y){var k=d.stateNode;if(!k)throw Error(a(169));y?(d=Hl(d,f,zo),k.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(_r),Sn(_r,d)):kn(Ur),Sn(Ur,y)}var mi=Math.clz32?Math.clz32:Ld,kh=Math.log,Eh=Math.LN2;function Ld(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var Bs=64,uo=4194304;function Fs(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 Wl(d,f){var y=d.pendingLanes;if(y===0)return 0;var k=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?k=Fs(se):(O&=W,O!==0&&(k=Fs(O)))}else W=y&~A,W!==0?k=Fs(W):O!==0&&(k=Fs(O));if(k===0)return 0;if(f!==0&&f!==k&&(f&A)===0&&(A=k&-k,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((k&4)!==0&&(k|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=k;0<f;)y=31-mi(f),A=1<<y,k|=d[y],f&=~A;return k}function M1(d,f){switch(d){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $u(d,f){for(var y=d.suspendedLanes,k=d.pingedLanes,A=d.expirationTimes,O=d.pendingLanes;0<O;){var W=31-mi(O),se=1<<W,pe=A[W];pe===-1?((se&y)===0||(se&k)!==0)&&(A[W]=M1(se,f)):pe<=f&&(d.expiredLanes|=se),O&=~se}}function Hu(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function Md(){var d=Bs;return Bs<<=1,(Bs&4194240)===0&&(Bs=64),d}function Wu(d){for(var f=[],y=0;31>y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-mi(f),d[f]=y}function Od(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<y;){var A=31-mi(y),O=1<<A;f[A]=0,k[A]=-1,d[A]=-1,y&=~O}}function Vl(d,f){var y=d.entangledLanes|=f;for(d=d.entanglements;y;){var k=31-mi(y),A=1<<k;A&f|d[k]&f&&(d[k]|=f),y&=~A}}var Ht=0;function Ph(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var Vu=i.unstable_scheduleCallback,Uu=i.unstable_cancelCallback,Th=i.unstable_shouldYield,Bo=i.unstable_requestPaint,Wn=i.unstable_now,Id=i.unstable_ImmediatePriority,Ah=i.unstable_UserBlockingPriority,Rd=i.unstable_NormalPriority,Lh=i.unstable_IdlePriority,un=null,Wt=null;function Mh(d){if(Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(un,d,void 0,(d.current.flags&128)===128)}catch{}}function O1(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var U=typeof Object.is=="function"?Object.is:O1,ne=null,ge=!1,Ke=!1;function zt(d){ne===null?ne=[d]:ne.push(d)}function fn(d){ge=!0,zt(d)}function yt(){if(!Ke&&ne!==null){Ke=!0;var d=0,f=Ht;try{var y=ne;for(Ht=1;d<y.length;d++){var k=y[d];do k=k(!0);while(k!==null)}ne=null,ge=!1}catch(A){throw ne!==null&&(ne=ne.slice(d+1)),Vu(Id,yt),A}finally{Ht=f,Ke=!1}}return null}var Pt=[],Vt=0,Nr=null,gr=0,hn=[],jr=0,co=null,Gi=1,Sa="";function $s(d,f){Pt[Vt++]=gr,Pt[Vt++]=Nr,Nr=d,gr=f}function I1(d,f,y){hn[jr++]=Gi,hn[jr++]=Sa,hn[jr++]=co,co=d;var k=Gi;d=Sa;var A=32-mi(k)-1;k&=~(1<<A),y+=1;var O=32-mi(f)+A;if(30<O){var W=A-A%5;O=(k&(1<<W)-1).toString(32),k>>=W,A-=W,Gi=1<<32-mi(f)+A|y<<A|k,Sa=O+d}else Gi=1<<O|y<<A|k,Sa=d}function vi(d){d.return!==null&&($s(d,1),I1(d,1,0))}function R1(d){for(;d===Nr;)Nr=Pt[--Vt],Pt[Vt]=null,gr=Pt[--Vt],Pt[Vt]=null;for(;d===co;)co=hn[--jr],hn[jr]=null,Sa=hn[--jr],hn[jr]=null,Gi=hn[--jr],hn[jr]=null}var Vn=null,fo=null,Dn=!1,ho=!1,Ri=null;function Oh(d,f){var y=yo(5,null,null,0);y.elementType="DELETED",y.stateNode=f,y.return=d,f=d.deletions,f===null?(d.deletions=[y],d.flags|=16):f.push(y)}function zn(d,f){switch(d.tag){case 5:return f=Ro(f,d.type,d.pendingProps),f!==null?(d.stateNode=f,Vn=d,fo=b1(f),!0):!1;case 6:return f=Ed(f,d.pendingProps),f!==null?(d.stateNode=f,Vn=d,fo=null,!0):!1;case 13:if(f=y1(f),f!==null){var y=co!==null?{id:Gi,overflow:Sa}:null;return d.memoizedState={dehydrated:f,treeContext:y,retryLane:1073741824},y=yo(18,null,null,0),y.stateNode=f,y.return=d,d.child=y,Vn=d,fo=null,!0}return!1;default:return!1}}function ba(d){return(d.mode&1)!==0&&(d.flags&128)===0}function Nd(d){if(Dn){var f=fo;if(f){var y=f;if(!zn(d,f)){if(ba(d))throw Error(a(418));f=Bu(y);var k=Vn;f&&zn(d,f)?Oh(k,y):(d.flags=d.flags&-4097|2,Dn=!1,Vn=d)}}else{if(ba(d))throw Error(a(418));d.flags=d.flags&-4097|2,Dn=!1,Vn=d}}}function p2(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Vn=d}function Gu(d){if(!xt||d!==Vn)return!1;if(!Dn)return p2(d),Dn=!0,!1;if(d.tag!==3&&(d.tag!==5||Rs(d.type)&&!De(d.type,d.memoizedProps))){var f=fo;if(f){if(ba(d))throw g2(),Error(a(418));for(;f;)Oh(d,f),f=Bu(f)}}if(p2(d),d.tag===13){if(!xt)throw Error(a(316));if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));fo=k1(d)}else fo=Vn?Bu(d.stateNode):null;return!0}function g2(){for(var d=fo;d;)d=Bu(d)}function ju(){xt&&(fo=Vn=null,ho=Dn=!1)}function N1(d){Ri===null?Ri=[d]:Ri.push(d)}var m2=s.ReactCurrentBatchConfig;function Ul(d,f){if(U(d,f))return!0;if(typeof d!="object"||d===null||typeof f!="object"||f===null)return!1;var y=Object.keys(d),k=Object.keys(f);if(y.length!==k.length)return!1;for(k=0;k<y.length;k++){var A=y[k];if(!_h.call(f,A)||!U(d[A],f[A]))return!1}return!0}function Yu(d){switch(d.tag){case 5:return Fl(d.type);case 16:return Fl("Lazy");case 13:return Fl("Suspense");case 19:return Fl("SuspenseList");case 0:case 2:case 15:return d=$l(d.type,!1),d;case 11:return d=$l(d.type.render,!1),d;case 1:return d=$l(d.type,!0),d;default:return""}}function Fo(d,f){if(d&&d.defaultProps){f=o({},f),d=d.defaultProps;for(var y in d)f[y]===void 0&&(f[y]=d[y]);return f}return f}var Dd=No(null),zd=null,Hs=null,Bd=null;function Ih(){Bd=Hs=zd=null}function v2(d,f,y){Ze?(Sn(Dd,f._currentValue),f._currentValue=y):(Sn(Dd,f._currentValue2),f._currentValue2=y)}function Fd(d){var f=Dd.current;kn(Dd),Ze?d._currentValue=f:d._currentValue2=f}function $d(d,f,y){for(;d!==null;){var k=d.alternate;if((d.childLanes&f)!==f?(d.childLanes|=f,k!==null&&(k.childLanes|=f)):k!==null&&(k.childLanes&f)!==f&&(k.childLanes|=f),d===y)break;d=d.return}}function qu(d,f){zd=d,Bd=Hs=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&f)!==0&&(Di=!0),d.firstContext=null)}function ji(d){var f=Ze?d._currentValue:d._currentValue2;if(Bd!==d)if(d={context:d,memoizedValue:f,next:null},Hs===null){if(zd===null)throw Error(a(308));Hs=d,zd.dependencies={lanes:0,firstContext:d}}else Hs=Hs.next=d;return f}var kr=null;function Hd(d){kr===null?kr=[d]:kr.push(d)}function Ku(d,f,y,k){var A=f.interleaved;return A===null?(y.next=y,Hd(f)):(y.next=A.next,A.next=y),f.interleaved=y,$o(d,k)}function $o(d,f){d.lanes|=f;var y=d.alternate;for(y!==null&&(y.lanes|=f),y=d,d=d.return;d!==null;)d.childLanes|=f,y=d.alternate,y!==null&&(y.childLanes|=f),y=d,d=d.return;return y.tag===3?y.stateNode:null}var Za=!1;function D1(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y2(d,f){d=d.updateQueue,f.updateQueue===d&&(f.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function Qa(d,f){return{eventTime:d,lane:f,tag:0,payload:null,callback:null,next:null}}function Ws(d,f,y){var k=d.updateQueue;if(k===null)return null;if(k=k.shared,(Bt&2)!==0){var A=k.pending;return A===null?f.next=f:(f.next=A.next,A.next=f),k.pending=f,$o(d,y)}return A=k.interleaved,A===null?(f.next=f,Hd(k)):(f.next=A.next,A.next=f),k.interleaved=f,$o(d,y)}function Rh(d,f,y){if(f=f.updateQueue,f!==null&&(f=f.shared,(y&4194240)!==0)){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Vl(d,y)}}function Gl(d,f){var y=d.updateQueue,k=d.alternate;if(k!==null&&(k=k.updateQueue,y===k)){var A=null,O=null;if(y=y.firstBaseUpdate,y!==null){do{var W={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};O===null?A=O=W:O=O.next=W,y=y.next}while(y!==null);O===null?A=O=f:O=O.next=f}else A=O=f;y={baseState:k.baseState,firstBaseUpdate:A,lastBaseUpdate:O,shared:k.shared,effects:k.effects},d.updateQueue=y;return}d=y.lastBaseUpdate,d===null?y.firstBaseUpdate=f:d.next=f,y.lastBaseUpdate=f}function Nh(d,f,y,k){var A=d.updateQueue;Za=!1;var O=A.firstBaseUpdate,W=A.lastBaseUpdate,se=A.shared.pending;if(se!==null){A.shared.pending=null;var pe=se,Re=pe.next;pe.next=null,W===null?O=Re:W.next=Re,W=pe;var rt=d.alternate;rt!==null&&(rt=rt.updateQueue,se=rt.lastBaseUpdate,se!==W&&(se===null?rt.firstBaseUpdate=Re:se.next=Re,rt.lastBaseUpdate=pe))}if(O!==null){var Lt=A.baseState;W=0,rt=Re=pe=null,se=O;do{var Ye=se.lane,Bn=se.eventTime;if((k&Ye)===Ye){rt!==null&&(rt=rt.next={eventTime:Bn,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var En=d,er=se;switch(Ye=f,Bn=y,er.tag){case 1:if(En=er.payload,typeof En=="function"){Lt=En.call(Bn,Lt,Ye);break e}Lt=En;break e;case 3:En.flags=En.flags&-65537|128;case 0:if(En=er.payload,Ye=typeof En=="function"?En.call(Bn,Lt,Ye):En,Ye==null)break e;Lt=o({},Lt,Ye);break e;case 2:Za=!0}}se.callback!==null&&se.lane!==0&&(d.flags|=64,Ye=A.effects,Ye===null?A.effects=[se]:Ye.push(se))}else Bn={eventTime:Bn,lane:Ye,tag:se.tag,payload:se.payload,callback:se.callback,next:null},rt===null?(Re=rt=Bn,pe=Lt):rt=rt.next=Bn,W|=Ye;if(se=se.next,se===null){if(se=A.shared.pending,se===null)break;Ye=se,se=Ye.next,Ye.next=null,A.lastBaseUpdate=Ye,A.shared.pending=null}}while(1);if(rt===null&&(pe=Lt),A.baseState=pe,A.firstBaseUpdate=Re,A.lastBaseUpdate=rt,f=A.shared.interleaved,f!==null){A=f;do W|=A.lane,A=A.next;while(A!==f)}else O===null&&(A.shared.lanes=0);qs|=W,d.lanes=W,d.memoizedState=Lt}}function S2(d,f,y){if(d=f.effects,f.effects=null,d!==null)for(f=0;f<d.length;f++){var k=d[f],A=k.callback;if(A!==null){if(k.callback=null,k=y,typeof A!="function")throw Error(a(191,A));A.call(k)}}}var Dh=new r.Component().refs;function zh(d,f,y,k){f=d.memoizedState,y=y(k,f),y=y==null?f:o({},f,y),d.memoizedState=y,d.lanes===0&&(d.updateQueue.baseState=y)}var Ho={isMounted:function(d){return(d=d._reactInternals)?H(d)===d:!1},enqueueSetState:function(d,f,y){d=d._reactInternals;var k=ai(),A=Ar(d),O=Qa(k,A);O.payload=f,y!=null&&(O.callback=y),f=Ws(d,O,A),f!==null&&(vo(f,d,A,k),Rh(f,d,A))},enqueueReplaceState:function(d,f,y){d=d._reactInternals;var k=ai(),A=Ar(d),O=Qa(k,A);O.tag=1,O.payload=f,y!=null&&(O.callback=y),f=Ws(d,O,A),f!==null&&(vo(f,d,A,k),Rh(f,d,A))},enqueueForceUpdate:function(d,f){d=d._reactInternals;var y=ai(),k=Ar(d),A=Qa(y,k);A.tag=2,f!=null&&(A.callback=f),f=Ws(d,A,k),f!==null&&(vo(f,d,k,y),Rh(f,d,k))}};function Wd(d,f,y,k,A,O,W){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(k,O,W):f.prototype&&f.prototype.isPureReactComponent?!Ul(y,k)||!Ul(A,O):!0}function b2(d,f,y){var k=!1,A=Do,O=f.contextType;return typeof O=="object"&&O!==null?O=ji(O):(A=Gr(f)?zo:_r.current,k=f.contextTypes,O=(k=k!=null)?zs(d,A):Do),f=new f(y,O),d.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Ho,d.stateNode=f,f._reactInternals=d,k&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=A,d.__reactInternalMemoizedMaskedChildContext=O),f}function x2(d,f,y,k){d=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(y,k),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(y,k),f.state!==d&&Ho.enqueueReplaceState(f,f.state,null)}function z1(d,f,y,k){var A=d.stateNode;A.props=y,A.state=d.memoizedState,A.refs=Dh,D1(d);var O=f.contextType;typeof O=="object"&&O!==null?A.context=ji(O):(O=Gr(f)?zo:_r.current,A.context=zs(d,O)),A.state=d.memoizedState,O=f.getDerivedStateFromProps,typeof O=="function"&&(zh(d,f,O,y),A.state=d.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(f=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),f!==A.state&&Ho.enqueueReplaceState(A,A.state,null),Nh(d,y,A,k),A.state=d.memoizedState),typeof A.componentDidMount=="function"&&(d.flags|=4194308)}function xa(d,f,y){if(d=y.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(a(309));var k=y.stateNode}if(!k)throw Error(a(147,d));var A=k,O=""+d;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===O?f.ref:(f=function(W){var se=A.refs;se===Dh&&(se=A.refs={}),W===null?delete se[O]:se[O]=W},f._stringRef=O,f)}if(typeof d!="string")throw Error(a(284));if(!y._owner)throw Error(a(290,d))}return d}function Ni(d,f){throw d=Object.prototype.toString.call(f),Error(a(31,d==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":d))}function B1(d){var f=d._init;return f(d._payload)}function w2(d){function f(me,ue){if(d){var be=me.deletions;be===null?(me.deletions=[ue],me.flags|=16):be.push(ue)}}function y(me,ue){if(!d)return null;for(;ue!==null;)f(me,ue),ue=ue.sibling;return null}function k(me,ue){for(me=new Map;ue!==null;)ue.key!==null?me.set(ue.key,ue):me.set(ue.index,ue),ue=ue.sibling;return me}function A(me,ue){return me=Xi(me,ue),me.index=0,me.sibling=null,me}function O(me,ue,be){return me.index=be,d?(be=me.alternate,be!==null?(be=be.index,be<ue?(me.flags|=2,ue):be):(me.flags|=2,ue)):(me.flags|=1048576,ue)}function W(me){return d&&me.alternate===null&&(me.flags|=2),me}function se(me,ue,be,Ve){return ue===null||ue.tag!==6?(ue=hp(be,me.mode,Ve),ue.return=me,ue):(ue=A(ue,be),ue.return=me,ue)}function pe(me,ue,be,Ve){var Te=be.type;return Te===h?rt(me,ue,be.props.children,Ve,be.key):ue!==null&&(ue.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&B1(Te)===ue.type)?(Ve=A(ue,be.props),Ve.ref=xa(me,ue,be),Ve.return=me,Ve):(Ve=sf(be.type,be.key,be.props,null,me.mode,Ve),Ve.ref=xa(me,ue,be),Ve.return=me,Ve)}function Re(me,ue,be,Ve){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==be.containerInfo||ue.stateNode.implementation!==be.implementation?(ue=tl(be,me.mode,Ve),ue.return=me,ue):(ue=A(ue,be.children||[]),ue.return=me,ue)}function rt(me,ue,be,Ve,Te){return ue===null||ue.tag!==7?(ue=el(be,me.mode,Ve,Te),ue.return=me,ue):(ue=A(ue,be),ue.return=me,ue)}function Lt(me,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=hp(""+ue,me.mode,be),ue.return=me,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case l:return be=sf(ue.type,ue.key,ue.props,null,me.mode,be),be.ref=xa(me,null,ue),be.return=me,be;case u:return ue=tl(ue,me.mode,be),ue.return=me,ue;case T:var Ve=ue._init;return Lt(me,Ve(ue._payload),be)}if(ie(ue)||R(ue))return ue=el(ue,me.mode,be,null),ue.return=me,ue;Ni(me,ue)}return null}function Ye(me,ue,be,Ve){var Te=ue!==null?ue.key:null;if(typeof be=="string"&&be!==""||typeof be=="number")return Te!==null?null:se(me,ue,""+be,Ve);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case l:return be.key===Te?pe(me,ue,be,Ve):null;case u:return be.key===Te?Re(me,ue,be,Ve):null;case T:return Te=be._init,Ye(me,ue,Te(be._payload),Ve)}if(ie(be)||R(be))return Te!==null?null:rt(me,ue,be,Ve,null);Ni(me,be)}return null}function Bn(me,ue,be,Ve,Te){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return me=me.get(be)||null,se(ue,me,""+Ve,Te);if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case l:return me=me.get(Ve.key===null?be:Ve.key)||null,pe(ue,me,Ve,Te);case u:return me=me.get(Ve.key===null?be:Ve.key)||null,Re(ue,me,Ve,Te);case T:var Mt=Ve._init;return Bn(me,ue,be,Mt(Ve._payload),Te)}if(ie(Ve)||R(Ve))return me=me.get(be)||null,rt(ue,me,Ve,Te,null);Ni(ue,Ve)}return null}function En(me,ue,be,Ve){for(var Te=null,Mt=null,Et=ue,Ft=ue=0,zr=null;Et!==null&&Ft<be.length;Ft++){Et.index>Ft?(zr=Et,Et=null):zr=Et.sibling;var qt=Ye(me,Et,be[Ft],Ve);if(qt===null){Et===null&&(Et=zr);break}d&&Et&&qt.alternate===null&&f(me,Et),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt,Et=zr}if(Ft===be.length)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;Ft<be.length;Ft++)Et=Lt(me,be[Ft],Ve),Et!==null&&(ue=O(Et,ue,Ft),Mt===null?Te=Et:Mt.sibling=Et,Mt=Et);return Dn&&$s(me,Ft),Te}for(Et=k(me,Et);Ft<be.length;Ft++)zr=Bn(Et,me,Ft,be[Ft],Ve),zr!==null&&(d&&zr.alternate!==null&&Et.delete(zr.key===null?Ft:zr.key),ue=O(zr,ue,Ft),Mt===null?Te=zr:Mt.sibling=zr,Mt=zr);return d&&Et.forEach(function(os){return f(me,os)}),Dn&&$s(me,Ft),Te}function er(me,ue,be,Ve){var Te=R(be);if(typeof Te!="function")throw Error(a(150));if(be=Te.call(be),be==null)throw Error(a(151));for(var Mt=Te=null,Et=ue,Ft=ue=0,zr=null,qt=be.next();Et!==null&&!qt.done;Ft++,qt=be.next()){Et.index>Ft?(zr=Et,Et=null):zr=Et.sibling;var os=Ye(me,Et,qt.value,Ve);if(os===null){Et===null&&(Et=zr);break}d&&Et&&os.alternate===null&&f(me,Et),ue=O(os,ue,Ft),Mt===null?Te=os:Mt.sibling=os,Mt=os,Et=zr}if(qt.done)return y(me,Et),Dn&&$s(me,Ft),Te;if(Et===null){for(;!qt.done;Ft++,qt=be.next())qt=Lt(me,qt.value,Ve),qt!==null&&(ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return Dn&&$s(me,Ft),Te}for(Et=k(me,Et);!qt.done;Ft++,qt=be.next())qt=Bn(Et,me,Ft,qt.value,Ve),qt!==null&&(d&&qt.alternate!==null&&Et.delete(qt.key===null?Ft:qt.key),ue=O(qt,ue,Ft),Mt===null?Te=qt:Mt.sibling=qt,Mt=qt);return d&&Et.forEach(function(si){return f(me,si)}),Dn&&$s(me,Ft),Te}function qo(me,ue,be,Ve){if(typeof be=="object"&&be!==null&&be.type===h&&be.key===null&&(be=be.props.children),typeof be=="object"&&be!==null){switch(be.$$typeof){case l:e:{for(var Te=be.key,Mt=ue;Mt!==null;){if(Mt.key===Te){if(Te=be.type,Te===h){if(Mt.tag===7){y(me,Mt.sibling),ue=A(Mt,be.props.children),ue.return=me,me=ue;break e}}else if(Mt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&B1(Te)===Mt.type){y(me,Mt.sibling),ue=A(Mt,be.props),ue.ref=xa(me,Mt,be),ue.return=me,me=ue;break e}y(me,Mt);break}else f(me,Mt);Mt=Mt.sibling}be.type===h?(ue=el(be.props.children,me.mode,Ve,be.key),ue.return=me,me=ue):(Ve=sf(be.type,be.key,be.props,null,me.mode,Ve),Ve.ref=xa(me,ue,be),Ve.return=me,me=Ve)}return W(me);case u:e:{for(Mt=be.key;ue!==null;){if(ue.key===Mt)if(ue.tag===4&&ue.stateNode.containerInfo===be.containerInfo&&ue.stateNode.implementation===be.implementation){y(me,ue.sibling),ue=A(ue,be.children||[]),ue.return=me,me=ue;break e}else{y(me,ue);break}else f(me,ue);ue=ue.sibling}ue=tl(be,me.mode,Ve),ue.return=me,me=ue}return W(me);case T:return Mt=be._init,qo(me,ue,Mt(be._payload),Ve)}if(ie(be))return En(me,ue,be,Ve);if(R(be))return er(me,ue,be,Ve);Ni(me,be)}return typeof be=="string"&&be!==""||typeof be=="number"?(be=""+be,ue!==null&&ue.tag===6?(y(me,ue.sibling),ue=A(ue,be),ue.return=me,me=ue):(y(me,ue),ue=hp(be,me.mode,Ve),ue.return=me,me=ue),W(me)):y(me,ue)}return qo}var Xu=w2(!0),C2=w2(!1),Vd={},po=No(Vd),wa=No(Vd),oe=No(Vd);function xe(d){if(d===Vd)throw Error(a(174));return d}function ve(d,f){Sn(oe,f),Sn(wa,d),Sn(po,Vd),d=K(f),kn(po),Sn(po,d)}function je(){kn(po),kn(wa),kn(oe)}function kt(d){var f=xe(oe.current),y=xe(po.current);f=G(y,d.type,f),y!==f&&(Sn(wa,d),Sn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var It=No(0);function cn(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||zu(y)||Pd(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 Ud=[];function F1(){for(var d=0;d<Ud.length;d++){var f=Ud[d];Ze?f._workInProgressVersionPrimary=null:f._workInProgressVersionSecondary=null}Ud.length=0}var yi=s.ReactCurrentDispatcher,Zu=s.ReactCurrentBatchConfig,jl=0,bn=null,Jn=null,ir=null,tn=!1,Gd=!1,Qu=0,Bh=0;function ni(){throw Error(a(321))}function $1(d,f){if(f===null)return!1;for(var y=0;y<f.length&&y<d.length;y++)if(!U(d[y],f[y]))return!1;return!0}function H1(d,f,y,k,A,O){if(jl=O,bn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,yi.current=d===null||d.memoizedState===null?vb:yb,d=y(k,A),Gd){O=0;do{if(Gd=!1,Qu=0,25<=O)throw Error(a(301));O+=1,ir=Jn=null,f.updateQueue=null,yi.current=Sb,d=y(k,A)}while(Gd)}if(yi.current=Ja,f=Jn!==null&&Jn.next!==null,jl=0,ir=Jn=bn=null,tn=!1,f)throw Error(a(300));return d}function Ju(){var d=Qu!==0;return Qu=0,d}function Yr(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ir===null?bn.memoizedState=ir=d:ir=ir.next=d,ir}function Si(){if(Jn===null){var d=bn.alternate;d=d!==null?d.memoizedState:null}else d=Jn.next;var f=ir===null?bn.memoizedState:ir.next;if(f!==null)ir=f,Jn=d;else{if(d===null)throw Error(a(310));Jn=d,d={memoizedState:Jn.memoizedState,baseState:Jn.baseState,baseQueue:Jn.baseQueue,queue:Jn.queue,next:null},ir===null?bn.memoizedState=ir=d:ir=ir.next=d}return ir}function ec(d,f){return typeof f=="function"?f(d):f}function tc(d){var f=Si(),y=f.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=d;var k=Jn,A=k.baseQueue,O=y.pending;if(O!==null){if(A!==null){var W=A.next;A.next=O.next,O.next=W}k.baseQueue=A=O,y.pending=null}if(A!==null){O=A.next,k=k.baseState;var se=W=null,pe=null,Re=O;do{var rt=Re.lane;if((jl&rt)===rt)pe!==null&&(pe=pe.next={lane:0,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),k=Re.hasEagerState?Re.eagerState:d(k,Re.action);else{var Lt={lane:rt,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null};pe===null?(se=pe=Lt,W=k):pe=pe.next=Lt,bn.lanes|=rt,qs|=rt}Re=Re.next}while(Re!==null&&Re!==O);pe===null?W=k:pe.next=se,U(k,f.memoizedState)||(Di=!0),f.memoizedState=k,f.baseState=W,f.baseQueue=pe,y.lastRenderedState=k}if(d=y.interleaved,d!==null){A=d;do O=A.lane,bn.lanes|=O,qs|=O,A=A.next;while(A!==d)}else A===null&&(y.lanes=0);return[f.memoizedState,y.dispatch]}function Fh(d){var f=Si(),y=f.queue;if(y===null)throw Error(a(311));y.lastRenderedReducer=d;var k=y.dispatch,A=y.pending,O=f.memoizedState;if(A!==null){y.pending=null;var W=A=A.next;do O=d(O,W.action),W=W.next;while(W!==A);U(O,f.memoizedState)||(Di=!0),f.memoizedState=O,f.baseQueue===null&&(f.baseState=O),y.lastRenderedState=O}return[O,k]}function W1(){}function jd(d,f){var y=bn,k=Si(),A=f(),O=!U(k.memoizedState,A);if(O&&(k.memoizedState=A,Di=!0),k=k.queue,$h(Vs.bind(null,y,k,d),[d]),k.getSnapshot!==f||O||ir!==null&&ir.memoizedState.tag&1){if(y.flags|=2048,qd(9,nc.bind(null,y,k,A,f),void 0,null),Dr===null)throw Error(a(349));(jl&30)!==0||V1(y,f,A)}return A}function V1(d,f,y){d.flags|=16384,d={getSnapshot:f,value:y},f=bn.updateQueue,f===null?(f={lastEffect:null,stores:null},bn.updateQueue=f,f.stores=[d]):(y=f.stores,y===null?f.stores=[d]:y.push(d))}function nc(d,f,y,k){f.value=y,f.getSnapshot=k,Yd(f)&&_2(d)}function Vs(d,f,y){return y(function(){Yd(f)&&_2(d)})}function Yd(d){var f=d.getSnapshot;d=d.value;try{var y=f();return!U(d,y)}catch{return!0}}function _2(d){var f=$o(d,1);f!==null&&vo(f,d,1,-1)}function k2(d){var f=Yr();return typeof d=="function"&&(d=d()),f.memoizedState=f.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ec,lastRenderedState:d},f.queue=d,d=d.dispatch=oc.bind(null,bn,d),[f.memoizedState,d]}function qd(d,f,y,k){return d={tag:d,create:f,destroy:y,deps:k,next:null},f=bn.updateQueue,f===null?(f={lastEffect:null,stores:null},bn.updateQueue=f,f.lastEffect=d.next=d):(y=f.lastEffect,y===null?f.lastEffect=d.next=d:(k=y.next,y.next=d,d.next=k,f.lastEffect=d)),d}function Kd(){return Si().memoizedState}function Yl(d,f,y,k){var A=Yr();bn.flags|=d,A.memoizedState=qd(1|f,y,void 0,k===void 0?null:k)}function rc(d,f,y,k){var A=Si();k=k===void 0?null:k;var O=void 0;if(Jn!==null){var W=Jn.memoizedState;if(O=W.destroy,k!==null&&$1(k,W.deps)){A.memoizedState=qd(f,y,O,k);return}}bn.flags|=d,A.memoizedState=qd(1|f,y,O,k)}function E2(d,f){return Yl(8390656,8,d,f)}function $h(d,f){return rc(2048,8,d,f)}function P2(d,f){return rc(4,2,d,f)}function T2(d,f){return rc(4,4,d,f)}function mr(d,f){if(typeof f=="function")return d=d(),f(d),function(){f(null)};if(f!=null)return d=d(),f.current=d,function(){f.current=null}}function qr(d,f,y){return y=y!=null?y.concat([d]):null,rc(4,4,mr.bind(null,f,d),y)}function U1(){}function A2(d,f){var y=Si();f=f===void 0?null:f;var k=y.memoizedState;return k!==null&&f!==null&&$1(f,k[1])?k[0]:(y.memoizedState=[d,f],d)}function G1(d,f){var y=Si();f=f===void 0?null:f;var k=y.memoizedState;return k!==null&&f!==null&&$1(f,k[1])?k[0]:(d=d(),y.memoizedState=[d,f],d)}function L2(d,f,y){return(jl&21)===0?(d.baseState&&(d.baseState=!1,Di=!0),d.memoizedState=y):(U(y,f)||(y=Md(),bn.lanes|=y,qs|=y,d.baseState=!0),f)}function j1(d,f){var y=Ht;Ht=y!==0&&4>y?y:4,d(!0);var k=Zu.transition;Zu.transition={};try{d(!1),f()}finally{Ht=y,Zu.transition=k}}function ic(){return Si().memoizedState}function Y1(d,f,y){var k=Ar(d);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},ac(d))sc(f,y);else if(y=Ku(d,f,y,k),y!==null){var A=ai();vo(y,d,k,A),Xd(y,f,k)}}function oc(d,f,y){var k=Ar(d),A={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(ac(d))sc(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var pe=f.interleaved;pe===null?(A.next=A,Hd(f)):(A.next=pe.next,pe.next=A),f.interleaved=A;return}}catch{}finally{}y=Ku(d,f,A,k),y!==null&&(A=ai(),vo(y,d,k,A),Xd(y,f,k))}}function ac(d){var f=d.alternate;return d===bn||f!==null&&f===bn}function sc(d,f){Gd=tn=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Xd(d,f,y){if((y&4194240)!==0){var k=f.lanes;k&=d.pendingLanes,y|=k,f.lanes=y,Vl(d,y)}}var Ja={readContext:ji,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:ji,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:ji,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Yl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Yl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Yl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var k=Yr();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=Y1.bind(null,bn,d),[k.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:U1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=j1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var k=bn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(jl&30)!==0||V1(k,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Vs.bind(null,k,O,d),[d]),k.flags|=2048,qd(9,nc.bind(null,k,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,k=Gi;y=(k&~(1<<32-mi(k)-1)).toString(32)+y,f=":"+f+"R"+y,y=Qu++,0<y&&(f+="H"+y.toString(32)),f+=":"}else y=Bh++,f=":"+f+"r"+y.toString(32)+":";return d.memoizedState=f},unstable_isNewReconciler:!1},yb={readContext:ji,useCallback:A2,useContext:ji,useEffect:$h,useImperativeHandle:qr,useInsertionEffect:P2,useLayoutEffect:T2,useMemo:G1,useReducer:tc,useRef:Kd,useState:function(){return tc(ec)},useDebugValue:U1,useDeferredValue:function(d){var f=Si();return L2(f,Jn.memoizedState,d)},useTransition:function(){var d=tc(ec)[0],f=Si().memoizedState;return[d,f]},useMutableSource:W1,useSyncExternalStore:jd,useId:ic,unstable_isNewReconciler:!1},Sb={readContext:ji,useCallback:A2,useContext:ji,useEffect:$h,useImperativeHandle:qr,useInsertionEffect:P2,useLayoutEffect:T2,useMemo:G1,useReducer:Fh,useRef:Kd,useState:function(){return Fh(ec)},useDebugValue:U1,useDeferredValue:function(d){var f=Si();return Jn===null?f.memoizedState=d:L2(f,Jn.memoizedState,d)},useTransition:function(){var d=Fh(ec)[0],f=Si().memoizedState;return[d,f]},useMutableSource:W1,useSyncExternalStore:jd,useId:ic,unstable_isNewReconciler:!1};function lc(d,f){try{var y="",k=f;do y+=Yu(k),k=k.return;while(k);var A=y}catch(O){A=`
|
|
Error generating stack: `+O.message+`
|
|
`+O.stack}return{value:d,source:f,stack:A,digest:null}}function q1(d,f,y){return{value:d,source:null,stack:y??null,digest:f??null}}function uc(d,f){try{console.error(f.value)}catch(y){setTimeout(function(){throw y})}}var Zd=typeof WeakMap=="function"?WeakMap:Map;function K1(d,f,y){y=Qa(-1,y),y.tag=3,y.payload={element:null};var k=f.value;return y.callback=function(){tf||(tf=!0,nf=k),uc(d,f)},y}function B(d,f,y){y=Qa(-1,y),y.tag=3;var k=d.type.getDerivedStateFromError;if(typeof k=="function"){var A=f.value;y.payload=function(){return k(A)},y.callback=function(){uc(d,f)}}var O=d.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(y.callback=function(){uc(d,f),typeof k!="function"&&(Xs===null?Xs=new Set([this]):Xs.add(this));var W=f.stack;this.componentDidCatch(f.value,{componentStack:W!==null?W:""})}),y}function ql(d,f,y){var k=d.pingCache;if(k===null){k=d.pingCache=new Zd;var A=new Set;k.set(f,A)}else A=k.get(f),A===void 0&&(A=new Set,k.set(f,A));A.has(y)||(A.add(y),d=V2.bind(null,d,f,y),f.then(d,d))}function Qd(d){do{var f;if((f=d.tag===13)&&(f=d.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return d;d=d.return}while(d!==null);return null}function Yi(d,f,y,k,A){return(d.mode&1)===0?(d===f?d.flags|=65536:(d.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(f=Qa(-1,1),f.tag=2,Ws(y,f,1))),y.lanes|=1),d):(d.flags|=65536,d.lanes=A,d)}var Gt=s.ReactCurrentOwner,Di=!1;function bi(d,f,y,k){f.child=d===null?C2(f,null,y,k):Xu(f,d.child,y,k)}function M2(d,f,y,k,A){y=y.render;var O=f.ref;return qu(f,A),k=H1(d,f,y,k,O,A),y=Ju(),d!==null&&!Di?(f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~A,es(d,f,A)):(Dn&&y&&vi(f),f.flags|=1,bi(d,f,k,A),f.child)}function Us(d,f,y,k,A){if(d===null){var O=y.type;return typeof O=="function"&&!mg(O)&&O.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(f.tag=15,f.type=O,O2(d,f,O,k,A)):(d=sf(y.type,null,k,f,f.mode,A),d.ref=f.ref,d.return=f,f.child=d)}if(O=d.child,(d.lanes&A)===0){var W=O.memoizedProps;if(y=y.compare,y=y!==null?y:Ul,y(W,k)&&d.ref===f.ref)return es(d,f,A)}return f.flags|=1,d=Xi(O,k),d.ref=f.ref,d.return=f,f.child=d}function O2(d,f,y,k,A){if(d!==null){var O=d.memoizedProps;if(Ul(O,k)&&d.ref===f.ref)if(Di=!1,f.pendingProps=k=O,(d.lanes&A)!==0)(d.flags&131072)!==0&&(Di=!0);else return f.lanes=d.lanes,es(d,f,A)}return X1(d,f,y,k,A)}function I2(d,f,y){var k=f.pendingProps,A=k.children,O=d!==null?d.memoizedState:null;if(k.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Sn(Ys,qi),qi|=y;else{if((y&1073741824)===0)return d=O!==null?O.baseLanes|y:y,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:d,cachePool:null,transitions:null},f.updateQueue=null,Sn(Ys,qi),qi|=d,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},k=O!==null?O.baseLanes:y,Sn(Ys,qi),qi|=k}else O!==null?(k=O.baseLanes|y,f.memoizedState=null):k=y,Sn(Ys,qi),qi|=k;return bi(d,f,A,y),f.child}function R2(d,f){var y=f.ref;(d===null&&y!==null||d!==null&&d.ref!==y)&&(f.flags|=512,f.flags|=2097152)}function X1(d,f,y,k,A){var O=Gr(y)?zo:_r.current;return O=zs(f,O),qu(f,A),y=H1(d,f,y,k,O,A),k=Ju(),d!==null&&!Di?(f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~A,es(d,f,A)):(Dn&&k&&vi(f),f.flags|=1,bi(d,f,y,A),f.child)}function N2(d,f,y,k,A){if(Gr(y)){var O=!0;Xa(f)}else O=!1;if(qu(f,A),f.stateNode===null)Ca(d,f),b2(f,y,k),z1(f,y,k,A),k=!0;else if(d===null){var W=f.stateNode,se=f.memoizedProps;W.props=se;var pe=W.context,Re=y.contextType;typeof Re=="object"&&Re!==null?Re=ji(Re):(Re=Gr(y)?zo:_r.current,Re=zs(f,Re));var rt=y.getDerivedStateFromProps,Lt=typeof rt=="function"||typeof W.getSnapshotBeforeUpdate=="function";Lt||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(se!==k||pe!==Re)&&x2(f,W,k,Re),Za=!1;var Ye=f.memoizedState;W.state=Ye,Nh(f,k,W,A),pe=f.memoizedState,se!==k||Ye!==pe||Ur.current||Za?(typeof rt=="function"&&(zh(f,y,rt,k),pe=f.memoizedState),(se=Za||Wd(f,y,se,k,Ye,pe,Re))?(Lt||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"&&(f.flags|=4194308)):(typeof W.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=k,f.memoizedState=pe),W.props=k,W.state=pe,W.context=Re,k=se):(typeof W.componentDidMount=="function"&&(f.flags|=4194308),k=!1)}else{W=f.stateNode,y2(d,f),se=f.memoizedProps,Re=f.type===f.elementType?se:Fo(f.type,se),W.props=Re,Lt=f.pendingProps,Ye=W.context,pe=y.contextType,typeof pe=="object"&&pe!==null?pe=ji(pe):(pe=Gr(y)?zo:_r.current,pe=zs(f,pe));var Bn=y.getDerivedStateFromProps;(rt=typeof Bn=="function"||typeof W.getSnapshotBeforeUpdate=="function")||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(se!==Lt||Ye!==pe)&&x2(f,W,k,pe),Za=!1,Ye=f.memoizedState,W.state=Ye,Nh(f,k,W,A);var En=f.memoizedState;se!==Lt||Ye!==En||Ur.current||Za?(typeof Bn=="function"&&(zh(f,y,Bn,k),En=f.memoizedState),(Re=Za||Wd(f,y,Re,k,Ye,En,pe)||!1)?(rt||typeof W.UNSAFE_componentWillUpdate!="function"&&typeof W.componentWillUpdate!="function"||(typeof W.componentWillUpdate=="function"&&W.componentWillUpdate(k,En,pe),typeof W.UNSAFE_componentWillUpdate=="function"&&W.UNSAFE_componentWillUpdate(k,En,pe)),typeof W.componentDidUpdate=="function"&&(f.flags|=4),typeof W.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof W.componentDidUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=1024),f.memoizedProps=k,f.memoizedState=En),W.props=k,W.state=En,W.context=pe,k=Re):(typeof W.componentDidUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||se===d.memoizedProps&&Ye===d.memoizedState||(f.flags|=1024),k=!1)}return Wo(d,f,y,k,O,A)}function Wo(d,f,y,k,A,O){R2(d,f);var W=(f.flags&128)!==0;if(!k&&!W)return A&&Ad(f,y,!1),es(d,f,O);k=f.stateNode,Gt.current=f;var se=W&&typeof y.getDerivedStateFromError!="function"?null:k.render();return f.flags|=1,d!==null&&W?(f.child=Xu(f,d.child,null,O),f.child=Xu(f,null,se,O)):bi(d,f,se,O),f.memoizedState=k.state,A&&Ad(f,y,!0),f.child}function D2(d){var f=d.stateNode;f.pendingContext?Td(d,f.pendingContext,f.pendingContext!==f.context):f.context&&Td(d,f.context,!1),ve(d,f.containerInfo)}function z2(d,f,y,k,A){return ju(),N1(A),f.flags|=256,bi(d,f,y,k),f.child}var Z1={dehydrated:null,treeContext:null,retryLane:0};function Q1(d){return{baseLanes:d,cachePool:null,transitions:null}}function B2(d,f,y){var k=f.pendingProps,A=It.current,O=!1,W=(f.flags&128)!==0,se;if((se=W)||(se=d!==null&&d.memoizedState===null?!1:(A&2)!==0),se?(O=!0,f.flags&=-129):(d===null||d.memoizedState!==null)&&(A|=1),Sn(It,A&1),d===null)return Nd(f),d=f.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((f.mode&1)===0?f.lanes=1:Pd(d)?f.lanes=8:f.lanes=1073741824,null):(W=k.children,d=k.fallback,O?(k=f.mode,O=f.child,W={mode:"hidden",children:W},(k&1)===0&&O!==null?(O.childLanes=0,O.pendingProps=W):O=fp(W,k,0,null),d=el(d,k,y,null),O.return=f,d.return=f,O.sibling=d,f.child=O,f.child.memoizedState=Q1(y),f.memoizedState=Z1,d):Vo(f,W));if(A=d.memoizedState,A!==null&&(se=A.dehydrated,se!==null))return bb(d,f,W,k,se,A,y);if(O){O=k.fallback,W=f.mode,A=d.child,se=A.sibling;var pe={mode:"hidden",children:k.children};return(W&1)===0&&f.child!==A?(k=f.child,k.childLanes=0,k.pendingProps=pe,f.deletions=null):(k=Xi(A,pe),k.subtreeFlags=A.subtreeFlags&14680064),se!==null?O=Xi(se,O):(O=el(O,W,y,null),O.flags|=2),O.return=f,k.return=f,k.sibling=O,f.child=k,k=O,O=f.child,W=d.child.memoizedState,W=W===null?Q1(y):{baseLanes:W.baseLanes|y,cachePool:null,transitions:W.transitions},O.memoizedState=W,O.childLanes=d.childLanes&~y,f.memoizedState=Z1,k}return O=d.child,d=O.sibling,k=Xi(O,{mode:"visible",children:k.children}),(f.mode&1)===0&&(k.lanes=y),k.return=f,k.sibling=null,d!==null&&(y=f.deletions,y===null?(f.deletions=[d],f.flags|=16):y.push(d)),f.child=k,f.memoizedState=null,k}function Vo(d,f){return f=fp({mode:"visible",children:f},d.mode,0,null),f.return=d,d.child=f}function Hh(d,f,y,k){return k!==null&&N1(k),Xu(f,d.child,null,y),d=Vo(f,f.pendingProps.children),d.flags|=2,f.memoizedState=null,d}function bb(d,f,y,k,A,O,W){if(y)return f.flags&256?(f.flags&=-257,k=q1(Error(a(422))),Hh(d,f,W,k)):f.memoizedState!==null?(f.child=d.child,f.flags|=128,null):(O=k.fallback,A=f.mode,k=fp({mode:"visible",children:k.children},A,0,null),O=el(O,A,W,null),O.flags|=2,k.return=f,O.return=f,k.sibling=O,f.child=k,(f.mode&1)!==0&&Xu(f,d.child,null,W),f.child.memoizedState=Q1(W),f.memoizedState=Z1,O);if((f.mode&1)===0)return Hh(d,f,W,null);if(Pd(A))return k=S1(A).digest,O=Error(a(419)),k=q1(O,k,void 0),Hh(d,f,W,k);if(y=(W&d.childLanes)!==0,Di||y){if(k=Dr,k!==null){switch(W&-W){case 4:A=2;break;case 16:A=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:A=32;break;case 536870912:A=268435456;break;default:A=0}A=(A&(k.suspendedLanes|W))!==0?0:A,A!==0&&A!==O.retryLane&&(O.retryLane=A,$o(d,A),vo(k,d,A,-1))}return af(),k=q1(Error(a(421))),Hh(d,f,W,k)}return zu(A)?(f.flags|=128,f.child=d.child,f=Eb.bind(null,d),Is(A,f),null):(d=O.treeContext,xt&&(fo=w1(A),Vn=f,Dn=!0,Ri=null,ho=!1,d!==null&&(hn[jr++]=Gi,hn[jr++]=Sa,hn[jr++]=co,Gi=d.id,Sa=d.overflow,co=f)),f=Vo(f,k.children),f.flags|=4096,f)}function F2(d,f,y){d.lanes|=f;var k=d.alternate;k!==null&&(k.lanes|=f),$d(d.return,f,y)}function J1(d,f,y,k,A){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:k,tail:y,tailMode:A}:(O.isBackwards=f,O.rendering=null,O.renderingStartTime=0,O.last=k,O.tail=y,O.tailMode=A)}function $2(d,f,y){var k=f.pendingProps,A=k.revealOrder,O=k.tail;if(bi(d,f,k.children,y),k=It.current,(k&2)!==0)k=k&1|2,f.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=f.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&F2(d,y,f);else if(d.tag===19)F2(d,y,f);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===f)break e;for(;d.sibling===null;){if(d.return===null||d.return===f)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}k&=1}if(Sn(It,k),(f.mode&1)===0)f.memoizedState=null;else switch(A){case"forwards":for(y=f.child,A=null;y!==null;)d=y.alternate,d!==null&&cn(d)===null&&(A=y),y=y.sibling;y=A,y===null?(A=f.child,f.child=null):(A=y.sibling,y.sibling=null),J1(f,!1,A,y,O);break;case"backwards":for(y=null,A=f.child,f.child=null;A!==null;){if(d=A.alternate,d!==null&&cn(d)===null){f.child=A;break}d=A.sibling,A.sibling=y,y=A,A=d}J1(f,!0,y,null,O);break;case"together":J1(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Ca(d,f){(f.mode&1)===0&&d!==null&&(d.alternate=null,f.alternate=null,f.flags|=2)}function es(d,f,y){if(d!==null&&(f.dependencies=d.dependencies),qs|=f.lanes,(y&f.childLanes)===0)return null;if(d!==null&&f.child!==d.child)throw Error(a(153));if(f.child!==null){for(d=f.child,y=Xi(d,d.pendingProps),f.child=y,y.return=f;d.sibling!==null;)d=d.sibling,y=y.sibling=Xi(d,d.pendingProps),y.return=f;y.sibling=null}return f.child}function xb(d,f,y){switch(f.tag){case 3:D2(f),ju();break;case 5:kt(f);break;case 1:Gr(f.type)&&Xa(f);break;case 4:ve(f,f.stateNode.containerInfo);break;case 10:v2(f,f.type._context,f.memoizedProps.value);break;case 13:var k=f.memoizedState;if(k!==null)return k.dehydrated!==null?(Sn(It,It.current&1),f.flags|=128,null):(y&f.child.childLanes)!==0?B2(d,f,y):(Sn(It,It.current&1),d=es(d,f,y),d!==null?d.sibling:null);Sn(It,It.current&1);break;case 19:if(k=(y&f.childLanes)!==0,(d.flags&128)!==0){if(k)return $2(d,f,y);f.flags|=128}var A=f.memoizedState;if(A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),Sn(It,It.current),k)break;return null;case 22:case 23:return f.lanes=0,I2(d,f,y)}return es(d,f,y)}function vr(d){d.flags|=4}function H2(d,f){if(d!==null&&d.child===f.child)return!0;if((f.flags&16)!==0)return!1;for(d=f.child;d!==null;){if((d.flags&12854)!==0||(d.subtreeFlags&12854)!==0)return!1;d=d.sibling}return!0}var Jd,ef,Wh,Vh;if(nt)Jd=function(d,f){for(var y=f.child;y!==null;){if(y.tag===5||y.tag===6)he(d,y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===f)break;for(;y.sibling===null;){if(y.return===null||y.return===f)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},ef=function(){},Wh=function(d,f,y,k,A){if(d=d.memoizedProps,d!==k){var O=f.stateNode,W=xe(po.current);y=Se(O,y,d,k,A,W),(f.updateQueue=y)&&vr(f)}},Vh=function(d,f,y,k){y!==k&&vr(f)};else if(Tt){Jd=function(d,f,y,k){for(var A=f.child;A!==null;){if(A.tag===5){var O=A.stateNode;y&&k&&(O=wh(O,A.type,A.memoizedProps,A)),he(d,O)}else if(A.tag===6)O=A.stateNode,y&&k&&(O=Ch(O,A.memoizedProps,A)),he(d,O);else if(A.tag!==4){if(A.tag===22&&A.memoizedState!==null)O=A.child,O!==null&&(O.return=A),Jd(d,A,!0,!0);else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===f)break;for(;A.sibling===null;){if(A.return===null||A.return===f)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};var eg=function(d,f,y,k){for(var A=f.child;A!==null;){if(A.tag===5){var O=A.stateNode;y&&k&&(O=wh(O,A.type,A.memoizedProps,A)),xh(d,O)}else if(A.tag===6)O=A.stateNode,y&&k&&(O=Ch(O,A.memoizedProps,A)),xh(d,O);else if(A.tag!==4){if(A.tag===22&&A.memoizedState!==null)O=A.child,O!==null&&(O.return=A),eg(d,A,!0,!0);else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===f)break;for(;A.sibling===null;){if(A.return===null||A.return===f)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};ef=function(d,f){var y=f.stateNode;if(!H2(d,f)){d=y.containerInfo;var k=va(d);eg(k,f,!1,!1),y.pendingChildren=k,vr(f),v1(d,k)}},Wh=function(d,f,y,k,A){var O=d.stateNode,W=d.memoizedProps;if((d=H2(d,f))&&W===k)f.stateNode=O;else{var se=f.stateNode,pe=xe(po.current),Re=null;W!==k&&(Re=Se(se,y,W,k,A,pe)),d&&Re===null?f.stateNode=O:(O=m1(O,Re,y,W,k,f,d,se),ye(O,y,k,A,pe)&&vr(f),f.stateNode=O,d?vr(f):Jd(O,f,!1,!1))}},Vh=function(d,f,y,k){y!==k?(d=xe(oe.current),y=xe(po.current),f.stateNode=$e(k,d,y,f),vr(f)):f.stateNode=d.stateNode}}else ef=function(){},Wh=function(){},Vh=function(){};function cc(d,f){if(!Dn)switch(d.tailMode){case"hidden":f=d.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?d.tail=null:y.sibling=null;break;case"collapsed":y=d.tail;for(var k=null;y!==null;)y.alternate!==null&&(k=y),y=y.sibling;k===null?f||d.tail===null?d.tail=null:d.tail.sibling=null:k.sibling=null}}function ri(d){var f=d.alternate!==null&&d.alternate.child===d.child,y=0,k=0;if(f)for(var A=d.child;A!==null;)y|=A.lanes|A.childLanes,k|=A.subtreeFlags&14680064,k|=A.flags&14680064,A.return=d,A=A.sibling;else for(A=d.child;A!==null;)y|=A.lanes|A.childLanes,k|=A.subtreeFlags,k|=A.flags,A.return=d,A=A.sibling;return d.subtreeFlags|=k,d.childLanes=y,f}function wb(d,f,y){var k=f.pendingProps;switch(R1(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ri(f),null;case 1:return Gr(f.type)&&Ka(),ri(f),null;case 3:return y=f.stateNode,je(),kn(Ur),kn(_r),F1(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(d===null||d.child===null)&&(Gu(f)?vr(f):d===null||d.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Ri!==null&&(lp(Ri),Ri=null))),ef(d,f),ri(f),null;case 5:Qt(f),y=xe(oe.current);var A=f.type;if(d!==null&&f.stateNode!=null)Wh(d,f,A,k,y),d.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!k){if(f.stateNode===null)throw Error(a(166));return ri(f),null}if(d=xe(po.current),Gu(f)){if(!xt)throw Error(a(175));d=C1(f.stateNode,f.type,f.memoizedProps,y,d,f,!ho),f.updateQueue=d,d!==null&&vr(f)}else{var O=X(A,k,y,d,f);Jd(O,f,!1,!1),f.stateNode=O,ye(O,A,k,y,d)&&vr(f)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return ri(f),null;case 6:if(d&&f.stateNode!=null)Vh(d,f,d.memoizedProps,k);else{if(typeof k!="string"&&f.stateNode===null)throw Error(a(166));if(d=xe(oe.current),y=xe(po.current),Gu(f)){if(!xt)throw Error(a(176));if(d=f.stateNode,y=f.memoizedProps,(k=Ya(d,y,f,!ho))&&(A=Vn,A!==null))switch(A.tag){case 3:L1(A.stateNode.containerInfo,d,y,(A.mode&1)!==0);break;case 5:qa(A.type,A.memoizedProps,A.stateNode,d,y,(A.mode&1)!==0)}k&&vr(f)}else f.stateNode=$e(k,d,y,f)}return ri(f),null;case 13:if(kn(It),k=f.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(Dn&&fo!==null&&(f.mode&1)!==0&&(f.flags&128)===0)g2(),ju(),f.flags|=98560,A=!1;else if(A=Gu(f),k!==null&&k.dehydrated!==null){if(d===null){if(!A)throw Error(a(318));if(!xt)throw Error(a(344));if(A=f.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(a(317));_1(A,f)}else ju(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;ri(f),A=!1}else Ri!==null&&(lp(Ri),Ri=null),A=!0;if(!A)return f.flags&65536?f:null}return(f.flags&128)!==0?(f.lanes=y,f):(y=k!==null,y!==(d!==null&&d.memoizedState!==null)&&y&&(f.child.flags|=8192,(f.mode&1)!==0&&(d===null||(It.current&1)!==0?Sr===0&&(Sr=3):af())),f.updateQueue!==null&&(f.flags|=4),ri(f),null);case 4:return je(),ef(d,f),d===null&&at(f.stateNode.containerInfo),ri(f),null;case 10:return Fd(f.type._context),ri(f),null;case 17:return Gr(f.type)&&Ka(),ri(f),null;case 19:if(kn(It),A=f.memoizedState,A===null)return ri(f),null;if(k=(f.flags&128)!==0,O=A.rendering,O===null)if(k)cc(A,!1);else{if(Sr!==0||d!==null&&(d.flags&128)!==0)for(d=f.child;d!==null;){if(O=cn(d),O!==null){for(f.flags|=128,cc(A,!1),d=O.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),f.subtreeFlags=0,d=y,y=f.child;y!==null;)k=y,A=d,k.flags&=14680066,O=k.alternate,O===null?(k.childLanes=0,k.lanes=A,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=O.childLanes,k.lanes=O.lanes,k.child=O.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=O.memoizedProps,k.memoizedState=O.memoizedState,k.updateQueue=O.updateQueue,k.type=O.type,A=O.dependencies,k.dependencies=A===null?null:{lanes:A.lanes,firstContext:A.firstContext}),y=y.sibling;return Sn(It,It.current&1|2),f.child}d=d.sibling}A.tail!==null&&Wn()>rp&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304)}else{if(!k)if(d=cn(O),d!==null){if(f.flags|=128,k=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),cc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,k=!0,cc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,Sn(It,k?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return Sc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(qi&1073741824)!==0&&(ri(f),nt&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function tg(d,f){switch(R1(f),f.tag){case 1:return Gr(f.type)&&Ka(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return je(),kn(Ur),kn(_r),F1(),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(kn(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));ju()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(It),null;case 4:return je(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var Gs=!1,Er=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function dc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Un(d,f,k)}else y.current=null}function Uo(d,f,y){try{y()}catch(k){Un(d,f,k)}}var Uh=!1;function Kl(d,f){for(Z(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;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,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?k:Fo(d.type,k),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:nt&&Os(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ii(d,f,y){var k=f.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var A=k=k.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==k)}}function Gh(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 jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=Q(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ng(d){var f=d.alternate;f!==null&&(d.alternate=null,ng(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&st(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 fc(d){return d.tag===5||d.tag===3||d.tag===4}function ts(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||fc(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 Yh(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?We(y,d,f):Ot(y,d);else if(k!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function rg(d,f,y){var k=d.tag;if(k===5||k===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(k!==4&&(d=d.child,d!==null))for(rg(d,f,y),d=d.sibling;d!==null;)rg(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Pr(d,f,y),y=y.sibling}function Pr(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(un,y)}catch{}switch(y.tag){case 5:Er||dc(y,f);case 6:if(nt){var k=yr,A=Go;yr=null,jo(d,f,y),yr=k,Go=A,yr!==null&&(Go?it(yr,y.stateNode):ht(yr,y.stateNode))}else jo(d,f,y);break;case 18:nt&&yr!==null&&(Go?A1(yr,y.stateNode):T1(yr,y.stateNode));break;case 4:nt?(k=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=k,Go=A):(Tt&&(k=y.stateNode.containerInfo,A=va(k),Du(k,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!Er&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){A=k=k.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==k)}jo(d,f,y);break;case 1:if(!Er&&(dc(y,f),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(Er=(k=Er)||y.memoizedState!==null,jo(d,f,y),Er=k):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(k){var A=U2.bind(null,d,k);y.has(k)||(y.add(k),k.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var k=0;k<y.length;k++){var A=y[k];try{var O=d,W=f;if(nt){var se=W;e:for(;se!==null;){switch(se.tag){case 5:yr=se.stateNode,Go=!1;break e;case 3:yr=se.stateNode.containerInfo,Go=!0;break e;case 4:yr=se.stateNode.containerInfo,Go=!0;break e}se=se.return}if(yr===null)throw Error(a(160));Pr(O,W,A),yr=null,Go=!1}else Pr(O,W,A);var pe=A.alternate;pe!==null&&(pe.return=null),A.return=null}catch(Re){Un(A,f,Re)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Yo(f,d),f=f.sibling}function Yo(d,f){var y=d.alternate,k=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(go(f,d),mo(d),k&4){try{ii(3,d,d.return),Gh(3,d)}catch(Ye){Un(d,d.return,Ye)}try{ii(5,d,d.return)}catch(Ye){Un(d,d.return,Ye)}}break;case 1:go(f,d),mo(d),k&512&&y!==null&&dc(y,y.return);break;case 5:if(go(f,d),mo(d),k&512&&y!==null&&dc(y,y.return),nt){if(d.flags&32){var A=d.stateNode;try{Nt(A)}catch(Ye){Un(d,d.return,Ye)}}if(k&4&&(A=d.stateNode,A!=null)){var O=d.memoizedProps;if(y=y!==null?y.memoizedProps:O,k=d.type,f=d.updateQueue,d.updateQueue=null,f!==null)try{ln(A,f,k,y,O,d)}catch(Ye){Un(d,d.return,Ye)}}}break;case 6:if(go(f,d),mo(d),k&4&&nt){if(d.stateNode===null)throw Error(a(162));A=d.stateNode,O=d.memoizedProps,y=y!==null?y.memoizedProps:O;try{Ne(A,y,O)}catch(Ye){Un(d,d.return,Ye)}}break;case 3:if(go(f,d),mo(d),k&4){if(nt&&xt&&y!==null&&y.memoizedState.isDehydrated)try{E1(f.containerInfo)}catch(Ye){Un(d,d.return,Ye)}if(Tt){A=f.containerInfo,O=f.pendingChildren;try{Du(A,O)}catch(Ye){Un(d,d.return,Ye)}}}break;case 4:if(go(f,d),mo(d),k&4&&Tt){O=d.stateNode,A=O.containerInfo,O=O.pendingChildren;try{Du(A,O)}catch(Ye){Un(d,d.return,Ye)}}break;case 13:go(f,d),mo(d),A=d.child,A.flags&8192&&(O=A.memoizedState!==null,A.stateNode.isHidden=O,!O||A.alternate!==null&&A.alternate.memoizedState!==null||(ug=Wn())),k&4&&qh(d);break;case 22:var W=y!==null&&y.memoizedState!==null;if(d.mode&1?(Er=(y=Er)||W,go(f,d),Er=y):go(f,d),mo(d),k&8192){if(y=d.memoizedState!==null,(d.stateNode.isHidden=y)&&!W&&(d.mode&1)!==0)for(Qe=d,k=d.child;k!==null;){for(f=Qe=k;Qe!==null;){W=Qe;var se=W.child;switch(W.tag){case 0:case 11:case 14:case 15:ii(4,W,W.return);break;case 1:dc(W,W.return);var pe=W.stateNode;if(typeof pe.componentWillUnmount=="function"){var Re=W,rt=W.return;try{var Lt=Re;pe.props=Lt.memoizedProps,pe.state=Lt.memoizedState,pe.componentWillUnmount()}catch(Ye){Un(Re,rt,Ye)}}break;case 5:dc(W,W.return);break;case 22:if(W.memoizedState!==null){oi(f);continue}}se!==null?(se.return=W,Qe=se):oi(f)}k=k.sibling}if(nt){e:if(k=null,nt)for(f=d;;){if(f.tag===5){if(k===null){k=f;try{A=f.stateNode,y?Zt(A):lo(f.stateNode,f.memoizedProps)}catch(Ye){Un(d,d.return,Ye)}}}else if(f.tag===6){if(k===null)try{O=f.stateNode,y?Qn(O):gi(O,f.memoizedProps)}catch(Ye){Un(d,d.return,Ye)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===d)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break e;for(;f.sibling===null;){if(f.return===null||f.return===d)break e;k===f&&(k=null),f=f.return}k===f&&(k=null),f.sibling.return=f.return,f=f.sibling}}}break;case 19:go(f,d),mo(d),k&4&&qh(d);break;case 21:break;default:go(f,d),mo(d)}}function mo(d){var f=d.flags;if(f&2){try{if(nt){e:{for(var y=d.return;y!==null;){if(fc(y)){var k=y;break e}y=y.return}throw Error(a(160))}switch(k.tag){case 5:var A=k.stateNode;k.flags&32&&(Nt(A),k.flags&=-33);var O=ts(d);rg(d,O,A);break;case 3:case 4:var W=k.stateNode.containerInfo,se=ts(d);Yh(d,se,W);break;default:throw Error(a(161))}}}catch(pe){Un(d,d.return,pe)}d.flags&=-3}f&4096&&(d.flags&=-4097)}function Kh(d,f,y){Qe=d,js(d)}function js(d,f,y){for(var k=(d.mode&1)!==0;Qe!==null;){var A=Qe,O=A.child;if(A.tag===22&&k){var W=A.memoizedState!==null||Gs;if(!W){var se=A.alternate,pe=se!==null&&se.memoizedState!==null||Er;se=Gs;var Re=Er;if(Gs=W,(Er=pe)&&!Re)for(Qe=A;Qe!==null;)W=Qe,pe=W.child,W.tag===22&&W.memoizedState!==null?Xh(A):pe!==null?(pe.return=W,Qe=pe):Xh(A);for(;O!==null;)Qe=O,js(O),O=O.sibling;Qe=A,Gs=se,Er=Re}ig(d)}else(A.subtreeFlags&8772)!==0&&O!==null?(O.return=A,Qe=O):ig(d)}}function ig(d){for(;Qe!==null;){var f=Qe;if((f.flags&8772)!==0){var y=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:Er||Gh(5,f);break;case 1:var k=f.stateNode;if(f.flags&4&&!Er)if(y===null)k.componentDidMount();else{var A=f.elementType===f.type?y.memoizedProps:Fo(f.type,y.memoizedProps);k.componentDidUpdate(A,y.memoizedState,k.__reactInternalSnapshotBeforeUpdate)}var O=f.updateQueue;O!==null&&S2(f,O,k);break;case 3:var W=f.updateQueue;if(W!==null){if(y=null,f.child!==null)switch(f.child.tag){case 5:y=Q(f.child.stateNode);break;case 1:y=f.child.stateNode}S2(f,W,y)}break;case 5:var se=f.stateNode;y===null&&f.flags&4&&ut(se,f.type,f.memoizedProps,f);break;case 6:break;case 4:break;case 12:break;case 13:if(xt&&f.memoizedState===null){var pe=f.alternate;if(pe!==null){var Re=pe.memoizedState;if(Re!==null){var rt=Re.dehydrated;rt!==null&&P1(rt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Er||f.flags&512&&jh(f)}catch(Lt){Un(f,f.return,Lt)}}if(f===d){Qe=null;break}if(y=f.sibling,y!==null){y.return=f.return,Qe=y;break}Qe=f.return}}function oi(d){for(;Qe!==null;){var f=Qe;if(f===d){Qe=null;break}var y=f.sibling;if(y!==null){y.return=f.return,Qe=y;break}Qe=f.return}}function Xh(d){for(;Qe!==null;){var f=Qe;try{switch(f.tag){case 0:case 11:case 15:var y=f.return;try{Gh(4,f)}catch(pe){Un(f,y,pe)}break;case 1:var k=f.stateNode;if(typeof k.componentDidMount=="function"){var A=f.return;try{k.componentDidMount()}catch(pe){Un(f,A,pe)}}var O=f.return;try{jh(f)}catch(pe){Un(f,O,pe)}break;case 5:var W=f.return;try{jh(f)}catch(pe){Un(f,W,pe)}}}catch(pe){Un(f,f.return,pe)}if(f===d){Qe=null;break}var se=f.sibling;if(se!==null){se.return=f.return,Qe=se;break}Qe=f.return}}var Zh=0,Qh=1,Jh=2,hc=3,ep=4;if(typeof Symbol=="function"&&Symbol.for){var ns=Symbol.for;Zh=ns("selector.component"),Qh=ns("selector.has_pseudo_class"),Jh=ns("selector.role"),hc=ns("selector.test_id"),ep=ns("selector.text")}function tp(d){var f=Le(d);if(f!=null){if(typeof f.memoizedProps["data-testname"]!="string")throw Error(a(364));return f}if(d=Ut(d),d===null)throw Error(a(362));return d.stateNode.current}function og(d,f){switch(f.$$typeof){case Zh:if(d.type===f.value)return!0;break;case Qh:e:{f=f.value,d=[d,0];for(var y=0;y<d.length;){var k=d[y++],A=d[y++],O=f[A];if(k.tag!==5||!Oe(k)){for(;O!=null&&og(k,O);)A++,O=f[A];if(A===f.length){f=!0;break e}else for(k=k.child;k!==null;)d.push(k,A),k=k.sibling}}f=!1}return f;case Jh:if(d.tag===5&&et(d.stateNode,f.value))return!0;break;case ep:if((d.tag===5||d.tag===6)&&(d=yn(d),d!==null&&0<=d.indexOf(f.value)))return!0;break;case hc:if(d.tag===5&&(d=d.memoizedProps["data-testname"],typeof d=="string"&&d.toLowerCase()===f.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function ag(d){switch(d.$$typeof){case Zh:return"<"+(N(d.value)||"Unknown")+">";case Qh:return":has("+(ag(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case hc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function pc(d,f){var y=[];d=[d,0];for(var k=0;k<d.length;){var A=d[k++],O=d[k++],W=f[O];if(A.tag!==5||!Oe(A)){for(;W!=null&&og(A,W);)O++,W=f[O];if(O===f.length)y.push(A);else for(A=A.child;A!==null;)d.push(A,O),A=A.sibling}}return y}function sg(d,f){if(!Ct)throw Error(a(363));d=tp(d),d=pc(d,f),f=[],d=Array.from(d);for(var y=0;y<d.length;){var k=d[y++];if(k.tag===5)Oe(k)||f.push(k.stateNode);else for(k=k.child;k!==null;)d.push(k),k=k.sibling}return f}var _b=Math.ceil,gc=s.ReactCurrentDispatcher,np=s.ReactCurrentOwner,or=s.ReactCurrentBatchConfig,Bt=0,Dr=null,ar=null,Tr=0,qi=0,Ys=No(0),Sr=0,mc=null,qs=0,Xl=0,lg=0,vc=null,xi=null,ug=0,rp=1/0,rs=null;function Ks(){rp=Wn()+500}var tf=!1,nf=null,Xs=null,yc=!1,_t=null,ip=0,rf=0,Zl=null,of=-1,op=0;function ai(){return(Bt&6)!==0?Wn():of!==-1?of:of=Wn()}function Ar(d){return(d.mode&1)===0?1:(Bt&2)!==0&&Tr!==0?Tr&-Tr:m2.transition!==null?(op===0&&(op=Md()),op):(d=Ht,d!==0?d:At())}function vo(d,f,y,k){if(50<rf)throw rf=0,Zl=null,Error(a(185));ya(d,y,k),((Bt&2)===0||d!==Dr)&&(d===Dr&&((Bt&2)===0&&(Xl|=y),Sr===4&&wi(d,Tr)),Kr(d,k),y===1&&Bt===0&&(f.mode&1)===0&&(Ks(),ge&&yt()))}function Kr(d,f){var y=d.callbackNode;$u(d,f);var k=Wl(d,d===Dr?Tr:0);if(k===0)y!==null&&Uu(y),d.callbackNode=null,d.callbackPriority=0;else if(f=k&-k,d.callbackPriority!==f){if(y!=null&&Uu(y),f===1)d.tag===0?fn(up.bind(null,d)):zt(up.bind(null,d)),gt?an(function(){(Bt&6)===0&&yt()}):Vu(Id,yt),y=null;else{switch(Ph(k)){case 1:y=Id;break;case 4:y=Ah;break;case 16:y=Rd;break;case 536870912:y=Lh;break;default:y=Rd}y=Ci(y,ap.bind(null,d))}d.callbackPriority=f,d.callbackNode=y}}function ap(d,f){if(of=-1,op=0,(Bt&6)!==0)throw Error(a(327));var y=d.callbackNode;if(Ql()&&d.callbackNode!==y)return null;var k=Wl(d,d===Dr?Tr:0);if(k===0)return null;if((k&30)!==0||(k&d.expiredLanes)!==0||f)f=bc(d,k);else{f=k;var A=Bt;Bt|=2;var O=dg();(Dr!==d||Tr!==f)&&(rs=null,Ks(),Zs(d,f));do try{kb();break}catch(se){cp(d,se)}while(1);Ih(),gc.current=O,Bt=A,ar!==null?f=0:(Dr=null,Tr=0,f=Sr)}if(f!==0){if(f===2&&(A=Hu(d),A!==0&&(k=A,f=sp(d,A))),f===1)throw y=mc,Zs(d,0),wi(d,k),Kr(d,Wn()),y;if(f===6)wi(d,k);else{if(A=d.current.alternate,(k&30)===0&&!Ki(A)&&(f=bc(d,k),f===2&&(O=Hu(d),O!==0&&(k=O,f=sp(d,O))),f===1))throw y=mc,Zs(d,0),wi(d,k),Kr(d,Wn()),y;switch(d.finishedWork=A,d.finishedLanes=k,f){case 0:case 1:throw Error(a(345));case 2:Js(d,xi,rs);break;case 3:if(wi(d,k),(k&130023424)===k&&(f=ug+500-Wn(),10<f)){if(Wl(d,0)!==0)break;if(A=d.suspendedLanes,(A&k)!==k){ai(),d.pingedLanes|=d.suspendedLanes&A;break}d.timeoutHandle=He(Js.bind(null,d,xi,rs),f);break}Js(d,xi,rs);break;case 4:if(wi(d,k),(k&4194240)===k)break;for(f=d.eventTimes,A=-1;0<k;){var W=31-mi(k);O=1<<W,W=f[W],W>A&&(A=W),k&=~O}if(k=A,k=Wn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*_b(k/1960))-k,10<k){d.timeoutHandle=He(Js.bind(null,d,xi,rs),k);break}Js(d,xi,rs);break;case 5:Js(d,xi,rs);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?ap.bind(null,d):null}function sp(d,f){var y=vc;return d.current.memoizedState.isDehydrated&&(Zs(d,f).flags|=256),d=bc(d,f),d!==2&&(f=xi,xi=y,f!==null&&lp(f)),d}function lp(d){xi===null?xi=d:xi.push.apply(xi,d)}function Ki(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var k=0;k<y.length;k++){var A=y[k],O=A.getSnapshot;A=A.value;try{if(!U(O(),A))return!1}catch{return!1}}}if(y=f.child,f.subtreeFlags&16384&&y!==null)y.return=f,f=y;else{if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function wi(d,f){for(f&=~lg,f&=~Xl,d.suspendedLanes|=f,d.pingedLanes&=~f,d=d.expirationTimes;0<f;){var y=31-mi(f),k=1<<y;d[y]=-1,f&=~k}}function up(d){if((Bt&6)!==0)throw Error(a(327));Ql();var f=Wl(d,0);if((f&1)===0)return Kr(d,Wn()),null;var y=bc(d,f);if(d.tag!==0&&y===2){var k=Hu(d);k!==0&&(f=k,y=sp(d,k))}if(y===1)throw y=mc,Zs(d,0),wi(d,f),Kr(d,Wn()),y;if(y===6)throw Error(a(345));return d.finishedWork=d.current.alternate,d.finishedLanes=f,Js(d,xi,rs),Kr(d,Wn()),null}function cg(d){_t!==null&&_t.tag===0&&(Bt&6)===0&&Ql();var f=Bt;Bt|=1;var y=or.transition,k=Ht;try{if(or.transition=null,Ht=1,d)return d()}finally{Ht=k,or.transition=y,Bt=f,(Bt&6)===0&&yt()}}function Sc(){qi=Ys.current,kn(Ys)}function Zs(d,f){d.finishedWork=null,d.finishedLanes=0;var y=d.timeoutHandle;if(y!==tt&&(d.timeoutHandle=tt,qe(y)),ar!==null)for(y=ar.return;y!==null;){var k=y;switch(R1(k),k.tag){case 1:k=k.type.childContextTypes,k!=null&&Ka();break;case 3:je(),kn(Ur),kn(_r),F1();break;case 5:Qt(k);break;case 4:je();break;case 13:kn(It);break;case 19:kn(It);break;case 10:Fd(k.type._context);break;case 22:case 23:Sc()}y=y.return}if(Dr=d,ar=d=Xi(d.current,null),Tr=qi=f,Sr=0,mc=null,lg=Xl=qs=0,xi=vc=null,kr!==null){for(f=0;f<kr.length;f++)if(y=kr[f],k=y.interleaved,k!==null){y.interleaved=null;var A=k.next,O=y.pending;if(O!==null){var W=O.next;O.next=A,k.next=W}y.pending=k}kr=null}return d}function cp(d,f){do{var y=ar;try{if(Ih(),yi.current=Ja,tn){for(var k=bn.memoizedState;k!==null;){var A=k.queue;A!==null&&(A.pending=null),k=k.next}tn=!1}if(jl=0,ir=Jn=bn=null,Gd=!1,Qu=0,np.current=null,y===null||y.return===null){Sr=1,mc=f,ar=null;break}e:{var O=d,W=y.return,se=y,pe=f;if(f=Tr,se.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Re=pe,rt=se,Lt=rt.tag;if((rt.mode&1)===0&&(Lt===0||Lt===11||Lt===15)){var Ye=rt.alternate;Ye?(rt.updateQueue=Ye.updateQueue,rt.memoizedState=Ye.memoizedState,rt.lanes=Ye.lanes):(rt.updateQueue=null,rt.memoizedState=null)}var Bn=Qd(W);if(Bn!==null){Bn.flags&=-257,Yi(Bn,W,se,O,f),Bn.mode&1&&ql(O,Re,f),f=Bn,pe=Re;var En=f.updateQueue;if(En===null){var er=new Set;er.add(pe),f.updateQueue=er}else En.add(pe);break e}else{if((f&1)===0){ql(O,Re,f),af();break e}pe=Error(a(426))}}else if(Dn&&se.mode&1){var qo=Qd(W);if(qo!==null){(qo.flags&65536)===0&&(qo.flags|=256),Yi(qo,W,se,O,f),N1(lc(pe,se));break e}}O=pe=lc(pe,se),Sr!==4&&(Sr=2),vc===null?vc=[O]:vc.push(O),O=W;do{switch(O.tag){case 3:O.flags|=65536,f&=-f,O.lanes|=f;var me=K1(O,pe,f);Gl(O,me);break e;case 1:se=pe;var ue=O.type,be=O.stateNode;if((O.flags&128)===0&&(typeof ue.getDerivedStateFromError=="function"||be!==null&&typeof be.componentDidCatch=="function"&&(Xs===null||!Xs.has(be)))){O.flags|=65536,f&=-f,O.lanes|=f;var Ve=B(O,se,f);Gl(O,Ve);break e}}O=O.return}while(O!==null)}fg(y)}catch(Te){f=Te,ar===y&&y!==null&&(ar=y=y.return);continue}break}while(1)}function dg(){var d=gc.current;return gc.current=Ja,d===null?Ja:d}function af(){(Sr===0||Sr===3||Sr===2)&&(Sr=4),Dr===null||(qs&268435455)===0&&(Xl&268435455)===0||wi(Dr,Tr)}function bc(d,f){var y=Bt;Bt|=2;var k=dg();(Dr!==d||Tr!==f)&&(rs=null,Zs(d,f));do try{Qs();break}catch(A){cp(d,A)}while(1);if(Ih(),Bt=y,gc.current=k,ar!==null)throw Error(a(261));return Dr=null,Tr=0,Sr}function Qs(){for(;ar!==null;)is(ar)}function kb(){for(;ar!==null&&!Th();)is(ar)}function is(d){var f=gg(d.alternate,d,qi);d.memoizedProps=d.pendingProps,f===null?fg(d):ar=f,np.current=null}function fg(d){var f=d;do{var y=f.alternate;if(d=f.return,(f.flags&32768)===0){if(y=wb(y,f,qi),y!==null){ar=y;return}}else{if(y=tg(y,f),y!==null){y.flags&=32767,ar=y;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{Sr=6,ar=null;return}}if(f=f.sibling,f!==null){ar=f;return}ar=f=d}while(f!==null);Sr===0&&(Sr=5)}function Js(d,f,y){var k=Ht,A=or.transition;try{or.transition=null,Ht=1,hg(d,f,y,k)}finally{or.transition=A,Ht=k}return null}function hg(d,f,y,k){do Ql();while(_t!==null);if((Bt&6)!==0)throw Error(a(327));y=d.finishedWork;var A=d.finishedLanes;if(y===null)return null;if(d.finishedWork=null,d.finishedLanes=0,y===d.current)throw Error(a(177));d.callbackNode=null,d.callbackPriority=0;var O=y.lanes|y.childLanes;if(Od(d,O),d===Dr&&(ar=Dr=null,Tr=0),(y.subtreeFlags&2064)===0&&(y.flags&2064)===0||yc||(yc=!0,Ci(Rd,function(){return Ql(),null})),O=(y.flags&15990)!==0,(y.subtreeFlags&15990)!==0||O){O=or.transition,or.transition=null;var W=Ht;Ht=1;var se=Bt;Bt|=4,np.current=null,Kl(d,y),Yo(y,d),te(d.containerInfo),d.current=y,Kh(y),Bo(),Bt=se,Ht=W,or.transition=O}else d.current=y;if(yc&&(yc=!1,_t=d,ip=A),O=d.pendingLanes,O===0&&(Xs=null),Mh(y.stateNode),Kr(d,Wn()),f!==null)for(k=d.onRecoverableError,y=0;y<f.length;y++)A=f[y],k(A.value,{componentStack:A.stack,digest:A.digest});if(tf)throw tf=!1,d=nf,nf=null,d;return(ip&1)!==0&&d.tag!==0&&Ql(),O=d.pendingLanes,(O&1)!==0?d===Zl?rf++:(rf=0,Zl=d):rf=0,yt(),null}function Ql(){if(_t!==null){var d=Ph(ip),f=or.transition,y=Ht;try{if(or.transition=null,Ht=16>d?16:d,_t===null)var k=!1;else{if(d=_t,_t=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var pe=0;pe<se.length;pe++){var Re=se[pe];for(Qe=Re;Qe!==null;){var rt=Qe;switch(rt.tag){case 0:case 11:case 15:ii(8,rt,O)}var Lt=rt.child;if(Lt!==null)Lt.return=rt,Qe=Lt;else for(;Qe!==null;){rt=Qe;var Ye=rt.sibling,Bn=rt.return;if(ng(rt),rt===Re){Qe=null;break}if(Ye!==null){Ye.return=Bn,Qe=Ye;break}Qe=Bn}}}var En=O.alternate;if(En!==null){var er=En.child;if(er!==null){En.child=null;do{var qo=er.sibling;er.sibling=null,er=qo}while(er!==null)}}Qe=O}}if((O.subtreeFlags&2064)!==0&&W!==null)W.return=O,Qe=W;else e:for(;Qe!==null;){if(O=Qe,(O.flags&2048)!==0)switch(O.tag){case 0:case 11:case 15:ii(9,O,O.return)}var me=O.sibling;if(me!==null){me.return=O.return,Qe=me;break e}Qe=O.return}}var ue=d.current;for(Qe=ue;Qe!==null;){W=Qe;var be=W.child;if((W.subtreeFlags&2064)!==0&&be!==null)be.return=W,Qe=be;else e:for(W=ue;Qe!==null;){if(se=Qe,(se.flags&2048)!==0)try{switch(se.tag){case 0:case 11:case 15:Gh(9,se)}}catch(Te){Un(se,se.return,Te)}if(se===W){Qe=null;break e}var Ve=se.sibling;if(Ve!==null){Ve.return=se.return,Qe=Ve;break e}Qe=se.return}}if(Bt=A,yt(),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(un,d)}catch{}k=!0}return k}finally{Ht=y,or.transition=f}}return!1}function W2(d,f,y){f=lc(y,f),f=K1(d,f,1),d=Ws(d,f,1),f=ai(),d!==null&&(ya(d,1,f),Kr(d,f))}function Un(d,f,y){if(d.tag===3)W2(d,d,y);else for(;f!==null;){if(f.tag===3){W2(f,d,y);break}else if(f.tag===1){var k=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(Xs===null||!Xs.has(k))){d=lc(y,d),d=B(f,d,1),f=Ws(f,d,1),d=ai(),f!==null&&(ya(f,1,d),Kr(f,d));break}}f=f.return}}function V2(d,f,y){var k=d.pingCache;k!==null&&k.delete(f),f=ai(),d.pingedLanes|=d.suspendedLanes&y,Dr===d&&(Tr&y)===y&&(Sr===4||Sr===3&&(Tr&130023424)===Tr&&500>Wn()-ug?Zs(d,0):lg|=y),Kr(d,f)}function pg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),pg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var k=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:k=d.stateNode;break;default:throw Error(a(314))}k!==null&&k.delete(f),pg(d,y)}var gg;gg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&I1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var k=f.type;Ca(d,f),d=f.pendingProps;var A=zs(f,_r.current);qu(f,y),A=H1(null,f,k,d,A,y);var O=Ju();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(k)?(O=!0,Xa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,D1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,z1(f,k,d,y),f=Wo(null,f,k,!0,O,y)):(f.tag=0,Dn&&O&&vi(f),bi(null,f,A,y),f=f.child),f;case 16:k=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=k._init,k=A(k._payload),f.type=k,A=f.tag=dp(k),d=Fo(k,d),A){case 0:f=X1(null,f,k,d,y);break e;case 1:f=N2(null,f,k,d,y);break e;case 11:f=M2(null,f,k,d,y);break e;case 14:f=Us(null,f,k,Fo(k.type,d),y);break e}throw Error(a(306,k,""))}return f;case 0:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),X1(d,f,k,A,y);case 1:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),N2(d,f,k,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));k=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Nh(f,k,null,y);var W=f.memoizedState;if(k=W.element,xt&&O.isDehydrated)if(O={element:k,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=lc(Error(a(423)),f),f=z2(d,f,k,y,A);break e}else if(k!==A){A=lc(Error(a(424)),f),f=z2(d,f,k,y,A);break e}else for(xt&&(fo=x1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ri=null,ho=!1),y=C2(f,null,k,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(ju(),k===A){f=es(d,f,y);break e}bi(d,f,k,y)}f=f.child}return f;case 5:return kt(f),d===null&&Nd(f),k=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,De(k,A)?W=null:O!==null&&De(k,O)&&(f.flags|=32),R2(d,f),bi(d,f,W,y),f.child;case 6:return d===null&&Nd(f),null;case 13:return B2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),k=f.pendingProps,d===null?f.child=Xu(f,null,k,y):bi(d,f,k,y),f.child;case 11:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),M2(d,f,k,A,y);case 7:return bi(d,f,f.pendingProps,y),f.child;case 8:return bi(d,f,f.pendingProps.children,y),f.child;case 12:return bi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(k=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,k,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=es(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var pe=se.firstContext;pe!==null;){if(pe.context===k){if(O.tag===1){pe=Qa(-1,y&-y),pe.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var rt=Re.pending;rt===null?pe.next=pe:(pe.next=rt.next,rt.next=pe),Re.pending=pe}}O.lanes|=y,pe=O.alternate,pe!==null&&(pe.lanes|=y),$d(O.return,y,f),se.lanes|=y;break}pe=pe.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),$d(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}bi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,k=f.pendingProps.children,qu(f,y),A=ji(A),k=k(A),f.flags|=1,bi(d,f,k,y),f.child;case 14:return k=f.type,A=Fo(k,f.pendingProps),A=Fo(k.type,A),Us(d,f,k,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return k=f.type,A=f.pendingProps,A=f.elementType===k?A:Fo(k,A),Ca(d,f),f.tag=1,Gr(k)?(d=!0,Xa(f)):d=!1,qu(f,y),b2(f,k,A),z1(f,k,A,y),Wo(null,f,k,!0,d,y);case 19:return $2(d,f,y);case 22:return I2(d,f,y)}throw Error(a(156,f.tag))};function Ci(d,f){return Vu(d,f)}function _a(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 yo(d,f,y,k){return new _a(d,f,y,k)}function mg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return mg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===_)return 14}return 2}function Xi(d,f){var y=d.alternate;return y===null?(y=yo(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 sf(d,f,y,k,A,O){var W=2;if(k=d,typeof d=="function")mg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return el(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case P:return d=yo(13,y,f,A),d.elementType=P,d.lanes=O,d;case E:return d=yo(19,y,f,A),d.elementType=E,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case _:W=14;break e;case T:W=16,k=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=k,f.lanes=O,f}function el(d,f,y,k){return d=yo(7,d,k,f),d.lanes=y,d}function fp(d,f,y,k){return d=yo(22,d,k,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function tl(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function lf(d,f,y,k,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=tt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=k,this.onRecoverableError=A,xt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,k,A,O,W,se,pe){return d=new lf(d,f,y,se,pe),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},D1(O),d}function vg(d){if(!d)return Do;d=d._reactInternals;e:{if(H(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(Gr(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(Gr(y))return Hl(d,y,f)}return f}function yg(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=de(f),d===null?null:d.stateNode}function uf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y<f?y:f}}function cf(d,f){uf(d,f),(d=d.alternate)&&uf(d,f)}function pp(d){return d=de(d),d===null?null:d.stateNode}function Sg(){return null}return n.attemptContinuousHydration=function(d){if(d.tag===13){var f=$o(d,134217728);if(f!==null){var y=ai();vo(f,d,134217728,y)}cf(d,134217728)}},n.attemptDiscreteHydration=function(d){if(d.tag===13){var f=$o(d,1);if(f!==null){var y=ai();vo(f,d,1,y)}cf(d,1)}},n.attemptHydrationAtCurrentPriority=function(d){if(d.tag===13){var f=Ar(d),y=$o(d,f);if(y!==null){var k=ai();vo(y,d,f,k)}cf(d,f)}},n.attemptSynchronousHydration=function(d){switch(d.tag){case 3:var f=d.stateNode;if(f.current.memoizedState.isDehydrated){var y=Fs(f.pendingLanes);y!==0&&(Vl(f,y|1),Kr(f,Wn()),(Bt&6)===0&&(Ks(),yt()))}break;case 13:cg(function(){var k=$o(d,1);if(k!==null){var A=ai();vo(k,d,1,A)}}),cf(d,1)}},n.batchedUpdates=function(d,f){var y=Bt;Bt|=1;try{return d(f)}finally{Bt=y,Bt===0&&(Ks(),ge&&yt())}},n.createComponentSelector=function(d){return{$$typeof:Zh,value:d}},n.createContainer=function(d,f,y,k,A,O,W){return G2(d,f,!1,null,y,k,A,O,W)},n.createHasPseudoClassSelector=function(d){return{$$typeof:Qh,value:d}},n.createHydrationContainer=function(d,f,y,k,A,O,W,se,pe){return d=G2(y,k,!0,d,A,O,W,se,pe),d.context=vg(null),y=d.current,k=ai(),A=Ar(y),O=Qa(k,A),O.callback=f??null,Ws(y,O,A),d.current.lanes=A,ya(d,A,k),Kr(d,k),d},n.createPortal=function(d,f,y){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:k==null?null:""+k,children:d,containerInfo:f,implementation:y}},n.createRoleSelector=function(d){return{$$typeof:Jh,value:d}},n.createTestNameSelector=function(d){return{$$typeof:hc,value:d}},n.createTextSelector=function(d){return{$$typeof:ep,value:d}},n.deferredUpdates=function(d){var f=Ht,y=or.transition;try{return or.transition=null,Ht=16,d()}finally{Ht=f,or.transition=y}},n.discreteUpdates=function(d,f,y,k,A){var O=Ht,W=or.transition;try{return or.transition=null,Ht=1,d(f,y,k,A)}finally{Ht=O,or.transition=W,Bt===0&&Ks()}},n.findAllNodes=sg,n.findBoundingRects=function(d,f){if(!Ct)throw Error(a(363));f=sg(d,f),d=[];for(var y=0;y<f.length;y++)d.push(sn(f[y]));for(f=d.length-1;0<f;f--){y=d[f];for(var k=y.x,A=k+y.width,O=y.y,W=O+y.height,se=f-1;0<=se;se--)if(f!==se){var pe=d[se],Re=pe.x,rt=Re+pe.width,Lt=pe.y,Ye=Lt+pe.height;if(k>=Re&&O>=Lt&&A<=rt&&W<=Ye){d.splice(f,1);break}else if(k!==Re||y.width!==pe.width||Ye<O||Lt>W){if(!(O!==Lt||y.height!==pe.height||rt<k||Re>A)){Re>k&&(pe.width+=Re-k,pe.x=k),rt<A&&(pe.width=A-Re),d.splice(f,1);break}}else{Lt>O&&(pe.height+=Lt-O,pe.y=O),Ye<W&&(pe.height=W-Lt),d.splice(f,1);break}}}return d},n.findHostInstance=yg,n.findHostInstanceWithNoPortals=function(d){return d=j(d),d=d!==null?J(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return yg(d)},n.flushControlled=function(d){var f=Bt;Bt|=1;var y=or.transition,k=Ht;try{or.transition=null,Ht=1,d()}finally{Ht=k,or.transition=y,Bt=f,Bt===0&&(Ks(),yt())}},n.flushPassiveEffects=Ql,n.flushSync=cg,n.focusWithin=function(d,f){if(!Ct)throw Error(a(363));for(d=tp(d),f=pc(d,f),f=Array.from(f),d=0;d<f.length;){var y=f[d++];if(!Oe(y)){if(y.tag===5&&Xt(y.stateNode))return!0;for(y=y.child;y!==null;)f.push(y),y=y.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Ht},n.getFindAllNodesFailureDescription=function(d,f){if(!Ct)throw Error(a(363));var y=0,k=[];d=[tp(d),0];for(var A=0;A<d.length;){var O=d[A++],W=d[A++],se=f[W];if((O.tag!==5||!Oe(O))&&(og(O,se)&&(k.push(ag(se)),W++,W>y&&(y=W)),W<f.length))for(O=O.child;O!==null;)d.push(O,W),O=O.sibling}if(y<f.length){for(d=[];y<f.length;y++)d.push(ag(f[y]));return`findAllNodes was able to match part of the selector:
|
|
`+(k.join(" > ")+`
|
|
|
|
No matching component was found for:
|
|
`)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return Q(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||Sg,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{un=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,k){if(!Ct)throw Error(a(363));d=sg(d,f);var A=Yt(d,y,k).disconnect;return{disconnect:function(){A()}}},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=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,k){var A=f.current,O=ai(),W=Ar(A);return y=vg(y),f.context===null?f.context=y:f.pendingContext=y,f=Qa(O,W),f.payload={element:d},k=k===void 0?null:k,k!==null&&(f.callback=k),d=Ws(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=m7e})(jW);const v7e=R9(jW.exports);var dk={exports:{}},bh={};/**
|
|
* @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.
|
|
*/bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(dk);const YM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let qM=!1,KM=!1;const fk=".react-konva-event",y7e=`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
|
|
`,S7e=`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
|
|
`,b7e={};function ub(e,t,n=b7e){if(!qM&&"zIndex"in t&&(console.warn(S7e),qM=!0),!KM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(y7e),KM=!0)}for(var o in n)if(!YM[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,p={},m=!1;const v={};for(var o in t)if(!YM[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,p[o]=t[o])}m&&(e.setAttrs(p),kd(e));for(var l in v)e.on(l+fk,v[l])}function kd(e){if(!lt.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const YW={},x7e={};rh.Node.prototype._applyProps=ub;function w7e(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),kd(e)}function C7e(e,t,n){let r=rh[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=rh.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 ub(l,o),l}function _7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function k7e(e,t,n){return!1}function E7e(e){return e}function P7e(){return null}function T7e(){return null}function A7e(e,t,n,r){return x7e}function L7e(){}function M7e(e){}function O7e(e,t){return!1}function I7e(){return YW}function R7e(){return YW}const N7e=setTimeout,D7e=clearTimeout,z7e=-1;function B7e(e,t){return!1}const F7e=!1,$7e=!0,H7e=!0;function W7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function V7e(e,t){t.parent===e?t.moveToTop():e.add(t),kd(e)}function qW(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),kd(e)}function U7e(e,t,n){qW(e,t,n)}function G7e(e,t){t.destroy(),t.off(fk),kd(e)}function j7e(e,t){t.destroy(),t.off(fk),kd(e)}function Y7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function q7e(e,t,n){}function K7e(e,t,n,r,i){ub(e,i,r)}function X7e(e){e.hide(),kd(e)}function Z7e(e){}function Q7e(e,t){(t.visible==null||t.visible)&&e.show()}function J7e(e,t){}function e_e(e){}function t_e(){}const n_e=()=>dk.exports.DefaultEventPriority,r_e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:w7e,createInstance:C7e,createTextInstance:_7e,finalizeInitialChildren:k7e,getPublicInstance:E7e,prepareForCommit:P7e,preparePortalMount:T7e,prepareUpdate:A7e,resetAfterCommit:L7e,resetTextContent:M7e,shouldDeprioritizeSubtree:O7e,getRootHostContext:I7e,getChildHostContext:R7e,scheduleTimeout:N7e,cancelTimeout:D7e,noTimeout:z7e,shouldSetTextContent:B7e,isPrimaryRenderer:F7e,warnsIfNotActing:$7e,supportsMutation:H7e,appendChild:W7e,appendChildToContainer:V7e,insertBefore:qW,insertInContainerBefore:U7e,removeChild:G7e,removeChildFromContainer:j7e,commitTextUpdate:Y7e,commitMount:q7e,commitUpdate:K7e,hideInstance:X7e,hideTextInstance:Z7e,unhideInstance:Q7e,unhideTextInstance:J7e,clearContainer:e_e,detachDeletedInstance:t_e,getCurrentEventPriority:n_e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var i_e=Object.defineProperty,o_e=Object.defineProperties,a_e=Object.getOwnPropertyDescriptors,XM=Object.getOwnPropertySymbols,s_e=Object.prototype.hasOwnProperty,l_e=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?i_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,QM=(e,t)=>{for(var n in t||(t={}))s_e.call(t,n)&&ZM(e,n,t[n]);if(XM)for(var n of XM(t))l_e.call(t,n)&&ZM(e,n,t[n]);return e},u_e=(e,t)=>o_e(e,a_e(t));function hk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=hk(r,t,n);if(i)return i;r=t?null:r.sibling}}function KW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const pk=KW(C.exports.createContext(null));class XW extends C.exports.Component{render(){return x(pk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:c_e,ReactCurrentDispatcher:d_e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f_e(){const e=C.exports.useContext(pk);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=c_e.current)!=null?r:hk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const qg=[],JM=new WeakMap;function h_e(){var e;const t=f_e();qg.splice(0,qg.length),hk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==pk&&qg.push(KW(i))});for(const n of qg){const r=(e=d_e.current)==null?void 0:e.readContext(n);JM.set(n,r)}return C.exports.useMemo(()=>qg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,u_e(QM({},i),{value:JM.get(r)}))),n=>x(XW,{...QM({},n)})),[])}function p_e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const g_e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=p_e(e),o=h_e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new rh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=pm.createContainer(n.current,dk.exports.LegacyRoot,!1,null),pm.updateContainer(x(o,{children:e.children}),r.current),()=>{!rh.isBrowser||(a(null),pm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),ub(n.current,e,i),pm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",ih="Group",P0="Rect",Kg="Circle",g5="Line",ZW="Image",m_e="Transformer",pm=v7e(r_e);pm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const v_e=le.forwardRef((e,t)=>x(XW,{children:x(g_e,{...e,forwardedRef:t})})),y_e=ft([Rn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),S_e=e=>{const{...t}=e,{objects:n}=Ee(y_e);return x(ih,{listening:!1,...t,children:n.filter(W8).map((r,i)=>x(g5,{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))})},cb=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},b_e=ft(Rn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:cb(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),x_e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(b_e);return l?re(ih,{listening:!1,...t,children:[x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Kg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},w_e=ft(Rn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),C_e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:P}=Ee(w_e),E=C.exports.useRef(null),_=C.exports.useRef(null);C.exports.useEffect(()=>{!E.current||!_.current||(E.current.nodes([_.current]),E.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),Q=Wc(J,64),K=Wc(ie,64);V.target.x(Q),V.target.y(K),n(gw({x:Q,y:K}))},[n,v]),I=C.exports.useCallback(()=>{if(!_.current)return;const V=_.current,J=V.scaleX(),ie=V.scaleY(),Q=Math.round(V.width()*J),K=Math.round(V.height()*ie),G=Math.round(V.x()),Z=Math.round(V.y());n(um({width:Q,height:K})),n(gw({x:v?hl(G,64):G,y:v?hl(Z,64):Z})),V.scaleX(1),V.scaleY(1)},[n,v]),R=C.exports.useCallback((V,J,ie)=>{const Q=V.x%T,K=V.y%T;return{x:hl(J.x,T)+Q,y:hl(J.y,T)+K}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},H=()=>{n(UL(!0))},$=()=>{n(vw(!1)),n(UL(!1)),n(Hy(!1))},j=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(ih,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:P,listening:!o&&S==="move",onDragEnd:$,onDragMove:M,onMouseDown:H,onMouseOut:de,onMouseOver:j,onMouseUp:$,onTransform:I,onTransformEnd:z,ref:_,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(m_e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:$,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:E,rotateEnabled:!1})]})};let QW=null,JW=null;const __e=e=>{QW=e},m5=()=>QW,k_e=e=>{JW=e},E_e=()=>JW,P_e=ft([Rn,Cr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),T_e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(P_e),i=C.exports.useRef(null),o=E_e();vt("esc",()=>{e(nSe())},{enabled:()=>!0,preventDefault:!0}),vt("shift+h",()=>{e(hSe(!n))},{preventDefault:!0},[t,n]),vt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},A_e=ft(Rn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:cb(t)}}),eO=e=>`data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
|
<g transform="matrix(0.5,0,0,0.5,0,0)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,10)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,15)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,20)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,25)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,30)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-10)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-15)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-20)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-25)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
<g transform="matrix(0.5,0,0,0.5,0,-30)">
|
|
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
|
</g>
|
|
</svg>`.replaceAll("black",e),L_e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(A_e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=eO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=eO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},M_e=ft([Rn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),O_e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(M_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=Je.clamp(r*G5e**s,j5e,Y5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(bSe(l)),t(hH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},I_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),R_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(I_e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a5(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},N_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),D_e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(N_e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a5(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(aH([a.x,a.y]))}else t.current=!1;n(XS(!1))},[t,n,i,o,e,r])},z_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),B_e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(z_e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(cH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(aH([s.x,s.y]))))},[t,r,i,a,n,e,o])},F_e=ft([Cr,Rn,Lu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),$_e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(F_e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(XS(!0)),t(oH([o.x,o.y])))},[e,n,r,t])},H_e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(cH(null)),e(XS(!1))},[e])},W_e=ft([Rn,Lu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V_e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(W_e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(hH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a5(!1))},[e,n,t])}};var mf=C.exports,U_e=function(t,n,r){const i=mf.useRef("loading"),o=mf.useRef(),[a,s]=mf.useState(0),l=mf.useRef(),u=mf.useRef(),h=mf.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),mf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const eV=e=>{const{url:t,x:n,y:r}=e,[i]=U_e(t);return x(ZW,{x:n,y:r,image:i,listening:!1})},G_e=ft([Rn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),j_e=()=>{const{objects:e}=Ee(G_e);return e?x(ih,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o5(t))return x(eV,{x:t.x,y:t.y,url:t.image.url},n);if(E5e(t))return x(g5,{points:t.points,stroke:t.color?cb(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)})}):null},Y_e=ft([Rn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),q_e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},K_e=()=>{const{colorMode:e}=Hv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(Y_e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=q_e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},P={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)},E=P.x2-P.x1,_=P.y2-P.y1,T=Math.round(E/64)+1,M=Math.round(_/64)+1,I=Je.range(0,T).map(N=>x(g5,{x:P.x1+N*64,y:P.y1,points:[0,0,0,_],stroke:s,strokeWidth:1},`x_${N}`)),R=Je.range(0,M).map(N=>x(g5,{x:P.x1,y:P.y1+N*64,points:[0,0,E,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(ih,{children:i})},X_e=ft([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),Z_e=e=>{const{...t}=e,n=Ee(X_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?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(ZW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},Q_e=ft([Rn],e=>{const{cursorPosition:t}=e,{cursorX:n,cursorY:r}=t?{cursorX:t.x,cursorY:t.y}:{cursorX:-1,cursorY:-1};return{cursorCoordinatesString:`(${n}, ${r})`}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function J_e(){const{cursorCoordinatesString:e}=Ee(Q_e);return x("div",{children:`Cursor Position: ${e}`})}const l3=e=>Math.round(e*100)/100,e8e=ft([Rn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},stageScale:u,shouldShowCanvasDebugInfo:h,layer:p}=e;return{activeLayerColor:p==="mask"?"var(--status-working-color)":"inherit",activeLayerString:p.charAt(0).toUpperCase()+p.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(u*100),shouldShowCanvasDebugInfo:h}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),t8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,shouldShowCanvasDebugInfo:l}=Ee(e8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),l&&re($n,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x(J_e,{})]})]})},n8e=ft([Rn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),r8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee(n8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(ih,{...t,children:[r&&x(eV,{url:u,x:o,y:a}),i&&re(ih,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},i8e=ft([Rn],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:Je.isEqual}}),o8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(i8e),o=C.exports.useCallback(()=>{e(GL(!1))},[e]),a=C.exports.useCallback(()=>{e(GL(!0))},[e]);vt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),vt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),vt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(eSe()),l=()=>e(J5e()),u=()=>e(Z5e());return r?x(en,{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:re(ra,{isAttached:!0,children:[x(mt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(Q4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(mt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(J4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(mt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F8,{}),onClick:u,"data-selected":!0}),x(mt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(s5e,{}):x(a5e,{}),onClick:()=>e(vSe(!i)),"data-selected":!0}),x(mt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x(j$,{}),onClick:()=>e(I5e(r.image.url)),"data-selected":!0}),x(mt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(c1,{}),onClick:()=>e(Q5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},a8e=ft([Rn,Lu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),s8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(a8e);T_e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback($=>{k_e($),p.current=$},[]),S=C.exports.useCallback($=>{__e($),m.current=$},[]),w=C.exports.useRef({x:0,y:0}),P=C.exports.useRef(!1),E=O_e(p),_=R_e(p),T=D_e(p,P),M=B_e(p,P,w),I=$_e(p),R=H_e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:H}=V_e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(v_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:_,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:H,onWheel:E,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(K_e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(j_e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(S_e,{visible:!0,listening:!1}),x(L_e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(x_e,{visible:l!=="move",listening:!1}),x(r8e,{visible:u}),h&&x(Z_e,{}),x(C_e,{visible:n&&!u})]})]}),x(t8e,{}),x(o8e,{})]})})},l8e=ft([Rn,Cr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function u8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(l8e),r=()=>{e(xSe())};return vt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(C5e,{}),onClick:r,isDisabled:!t})}const c8e=ft([Rn,Cr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}});function d8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(c8e),r=()=>{e(tSe())};return vt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(mt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(S5e,{}),onClick:r,isDisabled:!t})}const tV=Pe((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:p}=_v(),m=C.exports.useRef(null),v=()=>{r(),p()},S=()=>{o&&o(),p()};return re($n,{children:[C.exports.cloneElement(l,{onClick:h,ref:t}),x(lF,{isOpen:u,leastDestructiveRef:m,onClose:p,children:x(G0,{children:re(uF,{className:"modal",children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:s}),x(Av,{children:a}),re(kS,{children:[x($a,{ref:m,onClick:S,className:"modal-close-btn",children:i}),x($a,{colorScheme:"red",onClick:v,ml:3,children:n})]})]})})})]})}),f8e=()=>{const e=Xe();return re(tV,{title:"Empty Temp Image Folder",acceptCallback:()=>{e(R5e()),e(sH()),e(uH())},acceptButtonText:"Empty Folder",triggerComponent:x(ta,{leftIcon:x(c1,{}),size:"sm",children:"Empty Temp Image Folder"}),children:[x("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."}),x("br",{}),x("p",{children:"Are you sure you want to empty the temp folder?"})]})},h8e=()=>{const e=Xe();return re(tV,{title:"Clear Canvas History",acceptCallback:()=>e(uH()),acceptButtonText:"Clear History",triggerComponent:x(ta,{size:"sm",leftIcon:x(c1,{}),children:"Clear Canvas History"}),children:[x("p",{children:"Clearing the canvas history leaves your current canvas intact, but irreversibly clears the undo and redo history."}),x("br",{}),x("p",{children:"Are you sure you want to clear the canvas history?"})]})},p8e=ft([Rn],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),g8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(p8e);return x(ed,{trigger:"hover",triggerComponent:x(mt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(H8,{})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Show Intermediates",isChecked:a,onChange:l=>e(mSe(l.target.checked))}),x(gs,{label:"Show Grid",isChecked:o,onChange:l=>e(gSe(l.target.checked))}),x(gs,{label:"Snap to Grid",isChecked:s,onChange:l=>e(ySe(l.target.checked))}),x(gs,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(dSe(l.target.checked))}),x(gs,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(uSe(l.target.checked))}),x(gs,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(cSe(l.target.checked))}),x(gs,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(pSe(l.target.checked))}),x(h8e,{}),x(f8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nV(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function m9(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 X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Gm=function(e){return"touches"in e},v9=function(e){return e&&e.ownerDocument.defaultView||self},tO=function(e,t,n){var r=e.getBoundingClientRect(),i=Gm(t)?function(o,a){for(var s=0;s<o.length;s++)if(o[s].identifier===a)return o[s];return o[0]}(t.touches,n):t;return{left:X0((i.pageX-(r.left+v9(e).pageXOffset))/r.width),top:X0((i.pageY-(r.top+v9(e).pageYOffset))/r.height)}},nO=function(e){!Gm(e)&&e.preventDefault()},gk=le.memo(function(e){var t=e.onMove,n=e.onKey,r=nV(e,["onMove","onKey"]),i=C.exports.useRef(null),o=m9(t),a=m9(n),s=C.exports.useRef(null),l=C.exports.useRef(!1),u=C.exports.useMemo(function(){var v=function(P){nO(P),(Gm(P)?P.touches.length>0:P.buttons>0)&&i.current?o(tO(i.current,P,s.current)):w(!1)},S=function(){return w(!1)};function w(P){var E=l.current,_=v9(i.current),T=P?_.addEventListener:_.removeEventListener;T(E?"touchmove":"mousemove",v),T(E?"touchend":"mouseup",S)}return[function(P){var E=P.nativeEvent,_=i.current;if(_&&(nO(E),!function(M,I){return I&&!Gm(M)}(E,l.current)&&_)){if(Gm(E)){l.current=!0;var T=E.changedTouches||[];T.length&&(s.current=T[0].identifier)}_.focus(),o(tO(_,E,s.current)),w(!0)}},function(P){var E=P.which||P.keyCode;E<37||E>40||(P.preventDefault(),a({left:E===39?.05:E===37?-.05:0,top:E===40?.05:E===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},mk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},rV=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ro(e.h),s:ro(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ro(i/2),a:ro(r,2)}},y9=function(e){var t=rV(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=rV(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},m8e=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:ro(255*[r,s,a,a,l,r][u]),g:ro(255*[l,r,r,s,a,a][u]),b:ro(255*[a,a,l,r,r,s][u]),a:ro(i,2)}},v8e=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:ro(60*(s<0?s+6:s)),s:ro(o?a/o*100:0),v:ro(o/255*100),a:i}},y8e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(gk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ro(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(mk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),S8e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(gk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ro(t.s)+"%, Brightness "+ro(t.v)+"%"},le.createElement(mk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),iV=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function b8e(e,t,n){var r=m9(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;iV(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 x8e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,w8e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},rO=new Map,C8e=function(e){x8e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!rO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,rO.set(t,n);var r=w8e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},_8e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=ro(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(gk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(mk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},k8e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=nV(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);C8e(s);var l=b8e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(S8e,{hsva:u,onChange:h}),x(y8e,{hue:u.h,onChange:h}),le.createElement(_8e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},E8e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:v8e,fromHsva:m8e,equal:iV},P8e=function(e){return le.createElement(k8e,fb({},e,{colorModel:E8e}))};const oV=e=>{const{styleClass:t,...n}=e;return x(P8e,{className:`invokeai__color-picker ${t}`,...n})},T8e=ft([Rn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:cb(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),A8e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(T8e);vt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),vt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(fH(t==="mask"?"base":"mask"))},a=()=>e(X5e()),s=()=>e(dH(!r));return x(ed,{trigger:"hover",triggerComponent:x(ra,{children:x(mt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(f5e,{}),style:t==="mask"?{backgroundColor:"var(--accent-color)"}:{backgroundColor:"var(--btn-base-color)"}})}),children:re(en,{direction:"column",gap:"0.5rem",children:[x(gs,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(gs,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(fSe(l.target.checked))}),x(oV,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(sSe(l))}),x(ta,{size:"sm",leftIcon:x(c1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})};let u3;const L8e=new Uint8Array(16);function M8e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(L8e)}const ki=[];for(let e=0;e<256;++e)ki.push((e+256).toString(16).slice(1));function O8e(e,t=0){return(ki[e[t+0]]+ki[e[t+1]]+ki[e[t+2]]+ki[e[t+3]]+"-"+ki[e[t+4]]+ki[e[t+5]]+"-"+ki[e[t+6]]+ki[e[t+7]]+"-"+ki[e[t+8]]+ki[e[t+9]]+"-"+ki[e[t+10]]+ki[e[t+11]]+ki[e[t+12]]+ki[e[t+13]]+ki[e[t+14]]+ki[e[t+15]]).toLowerCase()}const I8e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iO={randomUUID:I8e};function Jp(e,t,n){if(iO.randomUUID&&!t&&!e)return iO.randomUUID();e=e||{};const r=e.random||(e.rng||M8e)();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 O8e(r)}const R8e=(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)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},N8e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},D8e=(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},z8e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=z8e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(F4e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m5();if(!S){t(gu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:P}=R8e(S,h,v,i?{...p,...m}:void 0);if(!w){t(gu(!1)),t(Kp(!0));return}const E=new FormData;E.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:E})).json(),{url:M,width:I,height:R}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(N8e(M),t(am({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(D8e(M,I,R),t(am({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(am({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(lSe({kind:"image",layer:"base",...P,image:N})),t(am({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(gu(!1)),t(G3("Connected")),t(Kp(!0))},B8e=ft([Rn,Lu,u2],(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:Je.isEqual}}),F8e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,isStaging:i}=Ee(B8e);vt(["b"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[]),vt(["e"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[t]),vt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),vt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>e(C0("brush")),a=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(p5e,{}),"data-selected":t==="brush"&&!i,onClick:o,isDisabled:i}),x(mt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(i5e,{}),"data-selected":t==="eraser"&&!i,isDisabled:i,onClick:()=>e(C0("eraser"))}),x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(Y$,{})}),children:re(en,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(en,{gap:"1rem",justifyContent:"space-between",children:x(bs,{label:"Size",value:r,withInput:!0,onChange:s=>e(mw(s)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(oV,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:s=>e(oSe(s))})]})})]})};let oO;const aV=()=>({setOpenUploader:e=>{e&&(oO=e)},openUploader:oO}),$8e=ft([u2,Rn,Lu],(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:Je.isEqual}}),H8e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,isMaskEnabled:r,layer:i,tool:o,shouldCropToBoundingBoxOnSave:a}=Ee($8e),s=m5(),{openUploader:l}=aV();vt(["v"],()=>{u()},{enabled:()=>!0,preventDefault:!0},[]),vt(["r"],()=>{h()},{enabled:()=>!0,preventDefault:!0},[s]),vt(["shift+m"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+s"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["meta+c","ctrl+c"],()=>{S()},{enabled:()=>!t,preventDefault:!0},[s,t]),vt(["shift+d"],()=>{w()},{enabled:()=>!t,preventDefault:!0},[s,t]);const u=()=>e(C0("move")),h=()=>{const E=m5();if(!E)return;const _=E.getClientRect({skipTransform:!0});e(rSe({contentRect:_}))},p=()=>{e(sH()),e(lH())},m=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},v=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldSaveToGallery:!0}))},S=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldCopy:!0}))},w=()=>{e(c3({cropVisible:!a,cropToBoundingBox:a,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(Au,{tooltip:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:i,validValues:k5e,onChange:E=>{const _=E.target.value;e(fH(_)),_==="mask"&&!r&&e(dH(!0))}}),x(A8e,{}),x(F8e,{}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(e5e,{}),"data-selected":o==="move"||n,onClick:u}),x(mt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(r5e,{}),onClick:h})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(d5e,{}),onClick:m,isDisabled:t}),x(mt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(j$,{}),onClick:v,isDisabled:t}),x(mt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(KS,{}),onClick:S,isDisabled:t}),x(mt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(G$,{}),onClick:w,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(u8e,{}),x(d8e,{})]}),re(ra,{isAttached:!0,children:[x(mt,{"aria-label":"Upload",tooltip:"Upload",icon:x($8,{}),onClick:l}),x(mt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(c1,{}),onClick:p,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(g8e,{})})]})},W8e=ft([Rn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),V8e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(W8e);return C.exports.useLayoutEffect(()=>{const n=Je.debounce(()=>{e(Wi(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(H8e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(oCe,{}):x(s8e,{})})]})})})};function U8e(){const e=Xe();return C.exports.useEffect(()=>{e(Wi(!0))},[e]),x(rk,{optionsPanel:x(rCe,{}),styleClass:"inpainting-workarea-overrides",children:x(V8e,{})})}const G8e=ct({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("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"})}),Ef={txt2img:{title:x(W3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Rwe,{}),tooltip:"Text To Image"},img2img:{title:x(F3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(Mwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(G8e,{fill:"black",boxSize:"2.5rem"}),workarea:x(U8e,{}),tooltip:"Unified Canvas"},nodes:{title:x($3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(z3e,{}),tooltip:"Nodes"},postprocess:{title:x(H3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(B3e,{}),tooltip:"Post Processing"}},pb=Je.map(Ef,(e,t)=>t);[...pb];function j8e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();vt("1",()=>{a(na(0))}),vt("2",()=>{a(na(1))}),vt("3",()=>{a(na(2))}),vt("4",()=>{a(na(3))}),vt("5",()=>{a(na(4))}),vt("z",()=>{a(cd(!t))},[t]),vt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(Wi(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(hi,{hasArrow:!0,label:Ef[h].tooltip,placement:"right",children:x(zF,{children:Ef[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(Ef).forEach(h=>{u.push(x(NF,{className:"app-tabs-panel",children:Ef[h].workarea},h))}),u};return re(RF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(Wi(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(DF,{className:"app-tabs-panels",children:t?x(Y6e,{}):l()})]})}const sV={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,shouldForceOutpaint:!1,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},Y8e=sV,lV=MS({name:"options",initialState:Y8e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(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},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:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(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 p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:P,init_image_path:E,mask_image_path:_}=t.payload.image;n==="img2img"&&(E&&(e.initialImage=E),_&&(e.maskPath=_),w&&(e.img2imgStrength=w),typeof P=="boolean"&&(e.shouldFitToWidthHeight=P)),a&&a.length>0?(e.seedWeights=i5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(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 p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...sV}),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=pb.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},setShouldForceOutpaint:(e,t)=>{e.shouldForceOutpaint=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload}}}),{clearInitialImage:uV,resetOptionsState:uTe,resetSeed:cTe,setActiveTab:na,setAllImageToImageParameters:q8e,setAllParameters:K8e,setAllTextToImageParameters:X8e,setCfgScale:cV,setCodeformerFidelity:dV,setCurrentTheme:Z8e,setFacetoolStrength:K3,setFacetoolType:X3,setHeight:fV,setHiresFix:hV,setImg2imgStrength:S9,setInfillMethod:pV,setInitialImage:d2,setIsLightBoxOpen:cd,setIterations:Q8e,setMaskPath:gV,setOptionsPanelScrollPosition:J8e,setParameter:dTe,setPerlin:eke,setPrompt:gb,setSampler:mV,setSeamBlur:aO,setSeamless:vV,setSeamSize:sO,setSeamSteps:lO,setSeamStrength:uO,setSeed:f2,setSeedWeights:yV,setShouldFitToWidthHeight:SV,setShouldForceOutpaint:tke,setShouldGenerateVariations:nke,setShouldHoldOptionsPanelOpen:rke,setShouldLoopback:ike,setShouldPinOptionsPanel:oke,setShouldRandomizeSeed:ake,setShouldRunESRGAN:ske,setShouldRunFacetool:lke,setShouldShowImageDetails:bV,setShouldShowOptionsPanel:T0,setShowAdvancedOptions:fTe,setShowDualDisplay:uke,setSteps:xV,setThreshold:cke,setTileSize:cO,setUpscalingLevel:b9,setUpscalingStrength:x9,setVariationAmount:dke,setWidth:wV}=lV.actions,fke=lV.reducer,Ol=Object.create(null);Ol.open="0";Ol.close="1";Ol.ping="2";Ol.pong="3";Ol.message="4";Ol.upgrade="5";Ol.noop="6";const Z3=Object.create(null);Object.keys(Ol).forEach(e=>{Z3[Ol[e]]=e});const hke={type:"error",data:"parser error"},pke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",gke=typeof ArrayBuffer=="function",mke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,CV=({type:e,data:t},n,r)=>pke&&t instanceof Blob?n?r(t):dO(t,r):gke&&(t instanceof ArrayBuffer||mke(t))?n?r(t):dO(new Blob([t]),r):r(Ol[e]+(t||"")),dO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},fO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<fO.length;e++)gm[fO.charCodeAt(e)]=e;const vke=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<n;r+=4)o=gm[e.charCodeAt(r)],a=gm[e.charCodeAt(r+1)],s=gm[e.charCodeAt(r+2)],l=gm[e.charCodeAt(r+3)],h[i++]=o<<2|a>>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},yke=typeof ArrayBuffer=="function",_V=(e,t)=>{if(typeof e!="string")return{type:"message",data:kV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ske(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:hke},Ske=(e,t)=>{if(yke){const n=vke(e);return kV(n,t)}else return{base64:!0,data:e}},kV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},EV=String.fromCharCode(30),bke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{CV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(EV))})})},xke=(e,t)=>{const n=e.split(EV),r=[];for(let i=0;i<n.length;i++){const o=_V(n[i],t);if(r.push(o),o.type==="error")break}return r},PV=4;function Vr(e){if(e)return wke(e)}function wke(e){for(var t in Vr.prototype)e[t]=Vr.prototype[t];return e}Vr.prototype.on=Vr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Vr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Vr.prototype.off=Vr.prototype.removeListener=Vr.prototype.removeAllListeners=Vr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Vr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Vr.prototype.emitReserved=Vr.prototype.emit;Vr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Vr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Vc=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function TV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Cke=setTimeout,_ke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=Cke.bind(Vc),e.clearTimeoutFn=_ke.bind(Vc)):(e.setTimeoutFn=setTimeout.bind(Vc),e.clearTimeoutFn=clearTimeout.bind(Vc))}const kke=1.33;function Eke(e){return typeof e=="string"?Pke(e):Math.ceil((e.byteLength||e.size)*kke)}function Pke(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class Tke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class AV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Tke(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=_V(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const LV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,Ake={};let hO=0,d3=0,pO;function gO(e){let t="";do t=LV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function MV(){const e=gO(+new Date);return e!==pO?(hO=0,pO=e):e+"."+gO(hO++)}for(;d3<w9;d3++)Ake[LV[d3]]=d3;function OV(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Lke(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let IV=!1;try{IV=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Mke=IV;function RV(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Mke))return new XMLHttpRequest}catch{}if(!t)try{return new Vc[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Oke(){}const Ike=function(){return new RV({xdomain:!1}).responseType!=null}();class Rke extends AV{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=Ike&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};xke(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,bke(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]=MV()),!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=OV(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 Tl(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 Tl extends Vr{constructor(t,n){super(),mb(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=TV(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 RV(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{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"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=Tl.requestsCount++,Tl.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=Oke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Tl.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()}}Tl.requestsCount=0;Tl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mO);else if(typeof addEventListener=="function"){const e="onpagehide"in Vc?"pagehide":"unload";addEventListener(e,mO,!1)}}function mO(){for(let e in Tl.requests)Tl.requests.hasOwnProperty(e)&&Tl.requests[e].abort()}const NV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=Vc.WebSocket||Vc.MozWebSocket,vO=!0,Nke="arraybuffer",yO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Dke extends AV{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=yO?{}:TV(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=vO&&!yO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Nke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;CV(r,this.supportsBinary,o=>{const a={};try{vO&&this.ws.send(o)}catch{}i&&NV(()=>{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]=MV()),this.supportsBinary||(t.b64=1);const i=OV(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!!f3}}const zke={websocket:Dke,polling:Rke},Bke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(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=Bke.exec(e||""),o={},a=14;for(;a--;)o[Fke[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=$ke(o,o.path),o.queryKey=Hke(o,o.query),o}function $ke(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 Hke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Dc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(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=C9(n.host).host),mb(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=Lke(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=PV,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 zke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Dc.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{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;Dc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Dc.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=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const 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",Dc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Eke(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Dc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}Dc.protocol=PV;function Wke(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=C9(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Vke=typeof ArrayBuffer=="function",Uke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,DV=Object.prototype.toString,Gke=typeof Blob=="function"||typeof Blob<"u"&&DV.call(Blob)==="[object BlobConstructor]",jke=typeof File=="function"||typeof File<"u"&&DV.call(File)==="[object FileConstructor]";function vk(e){return Vke&&(e instanceof ArrayBuffer||Uke(e))||Gke&&e instanceof Blob||jke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Q3(e[n]))return!0;return!1}if(vk(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Q3(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Q3(e[n]))return!0;return!1}function Yke(e){const t=[],n=e.data,r=e;return r.data=_9(n,t),r.attachments=t.length,{packet:r,buffers:t}}function _9(e,t){if(!e)return e;if(vk(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=_9(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=_9(e[r],t));return n}return e}function qke(e,t){return e.data=k9(e.data,t),e.attachments=void 0,e}function k9(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=k9(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=k9(e[n],t));return e}const Kke=5;var nn;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(nn||(nn={}));class Xke{constructor(t){this.replacer=t}encode(t){return(t.type===nn.EVENT||t.type===nn.ACK)&&Q3(t)?(t.type=t.type===nn.EVENT?nn.BINARY_EVENT:nn.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nn.BINARY_EVENT||t.type===nn.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Yke(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class yk extends Vr{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t),n.type===nn.BINARY_EVENT||n.type===nn.BINARY_ACK?(this.reconstructor=new Zke(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(vk(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(nn[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nn.BINARY_EVENT||r.type===nn.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(o,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(yk.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case nn.CONNECT:return typeof n=="object";case nn.DISCONNECT:return n===void 0;case nn.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case nn.EVENT:case nn.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case nn.ACK:case nn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Zke{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=qke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Kke,get PacketType(){return nn},Encoder:Xke,Decoder:yk},Symbol.toStringTag,{value:"Module"}));function ms(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Jke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zV extends Vr{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=[ms(t,"open",this.onopen.bind(this)),ms(t,"packet",this.onpacket.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(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(Jke.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.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type: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;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function g1(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}g1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};g1.prototype.reset=function(){this.attempts=0};g1.prototype.setMin=function(e){this.ms=e};g1.prototype.setMax=function(e){this.max=e};g1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{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,mb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new g1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Qke;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 Dc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ms(n,"open",function(){r.onopen(),t&&t()}),o=ms(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(ms(t,"ping",this.onping.bind(this)),ms(t,"data",this.ondata.bind(this)),ms(t,"error",this.onerror.bind(this)),ms(t,"close",this.onclose.bind(this)),ms(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){NV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new zV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Xg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Wke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Xg[i]&&o in Xg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Xg[i]||(Xg[i]=new E9(r,t)),l=Xg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:zV,io:J3,connect:J3});var eEe=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,tEe=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,nEe=/[^-+\dA-Z]/g;function _o(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(SO[t]||t||SO.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"]()},p=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 rEe(e)},P=function(){return iEe(e)},E={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return bO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":oEe(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(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 Qo(w())},N:function(){return P()}};return t.replace(eEe,function(_){return _ in E?E[_]():_.slice(1,_.length-1)})}var SO={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"},wo={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"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},bO=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 p=new Date;p.setDate(p[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"]()},P=function(){return h[o+"Month"]()},E=function(){return h[o+"FullYear"]()},_=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":E()===n&&P()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&_()===i?l?"Tmw":"Tomorrow":a},rEe=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)},iEe=function(t){var n=t.getDay();return n===0&&(n=7),n},oEe=function(t){return(String(t).match(tEe)||[""]).pop().replace(nEe,"").replace(/GMT\+0000/g,"UTC")};const aEe=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(NL(!0)),t(G3("Connected")),t(O5e());const r=n().gallery;r.categories.user.latest_mtime?t(FL("user")):t(jC("user")),r.categories.result.latest_mtime?t(FL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(NL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(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:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(K5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(d2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(MSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(gu(!0)),t(L4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(DL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(LSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(I4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(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?.url===i||o===i)&&t(uV()),a===i&&t(gV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(M4e(r)),r.infill_methods.includes("patchmatch")||t(pV(r.infill_methods[0]))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(G3("Model Changed")),t(gu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t(zL(o)),t(gu(!1)),t(Kp(!0)),t(DL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(am({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},sEe=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new Yg.Stage({container:i,width:n,height:r}),a=new Yg.Layer,s=new Yg.Layer;a.add(new Yg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new Yg.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},lEe=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("</br>"),t.document.write(r.outerHTML),t.document.write("</br></br>")})},uEe=e=>{const t=m5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{cfgScale:s,codeformerFidelity:l,facetoolStrength:u,facetoolType:h,height:p,hiresFix:m,img2imgStrength:v,infillMethod:S,initialImage:w,iterations:P,perlin:E,prompt:_,sampler:T,seamBlur:M,seamless:I,seamSize:R,seamSteps:N,seamStrength:z,seed:H,seedWeights:$,shouldFitToWidthHeight:j,shouldForceOutpaint:de,shouldGenerateVariations:V,shouldRandomizeSeed:J,shouldRunESRGAN:ie,shouldRunFacetool:Q,steps:K,threshold:G,tileSize:Z,upscalingLevel:te,upscalingStrength:X,variationAmount:he,width:ye}=r,{shouldDisplayInProgressType:Se,saveIntermediatesInterval:De,enableImageDebugging:$e}=o,He={prompt:_,iterations:J||V?P:1,steps:K,cfg_scale:s,threshold:G,perlin:E,height:p,width:ye,sampler_name:T,seed:H,progress_images:Se==="full-res",progress_latents:Se==="latents",save_intermediates:De,generation_mode:n,init_mask:""};if(He.seed=J?N$(P8,T8):H,["txt2img","img2img"].includes(n)&&(He.seamless=I,He.hires_fix=m),n==="img2img"&&w&&(He.init_img=typeof w=="string"?w:w.url,He.strength=v,He.fit=j),n==="unifiedCanvas"&&t){const{layerState:{objects:Ze},boundingBoxCoordinates:nt,boundingBoxDimensions:Tt,inpaintReplace:xt,shouldUseInpaintReplace:Le,stageScale:at,isMaskEnabled:At,shouldPreserveMaskedArea:st}=i,gt={...nt,...Tt},an=sEe(At?Ze.filter(W8):[],gt);He.init_mask=an,He.fit=!1,He.init_img=a,He.strength=v,He.invert_mask=st,Le&&(He.inpaint_replace=xt),He.bounding_box=gt;const Ct=t.scale();t.scale({x:1/at,y:1/at});const Ut=t.getAbsolutePosition(),sn=t.toDataURL({x:gt.x+Ut.x,y:gt.y+Ut.y,width:gt.width,height:gt.height});$e&&lEe([{base64:an,caption:"mask sent as init_mask"},{base64:sn,caption:"image sent as init_img"}]),t.scale(Ct),He.init_img=sn,He.progress_images=!1,He.seam_size=R,He.seam_blur=M,He.seam_strength=z,He.seam_steps=N,He.tile_size=Z,He.force_outpaint=de,He.infill_method=S}V?(He.variation_amount=he,$&&(He.with_variations=nye($))):He.variation_amount=0;let qe=!1,tt=!1;return ie&&(qe={level:te,strength:X}),Q&&(tt={type:h,strength:u},h==="codeformer"&&(tt.codeformer_fidelity=l)),$e&&(He.enable_image_debugging=$e),{generationParameters:He,esrganParameters:qe,facetoolParameters:tt}},cEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(gu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(z4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=uEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(gu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(gu(!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(Co({timestamp:_o(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(R4e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},dEe=()=>{const{origin:e}=new URL(window.location.href),t=J3(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:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:P,onSystemConfig:E,onModelChanged:_,onModelChangeFailed:T,onTempFolderEmptied:M}=aEe(i),{emitGenerateImage:I,emitRunESRGAN:R,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:H,emitRequestNewImages:$,emitCancelProcessing:j,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=cEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",Q=>u(Q)),t.on("generationResult",Q=>p(Q)),t.on("postprocessingResult",Q=>h(Q)),t.on("intermediateResult",Q=>m(Q)),t.on("progressUpdate",Q=>v(Q)),t.on("galleryImages",Q=>S(Q)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",Q=>{P(Q)}),t.on("systemConfig",Q=>{E(Q)}),t.on("modelChanged",Q=>{_(Q)}),t.on("modelChangeFailed",Q=>{T(Q)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{I(a.payload);break}case"socketio/runESRGAN":{R(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{H(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{j();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},fEe=["cursorPosition"].map(e=>`canvas.${e}`),hEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),pEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),BV=YF({options:fke,gallery:zSe,system:$4e,canvas:wSe}),gEe=h$.getPersistConfig({key:"root",storage:f$,rootReducer:BV,blacklist:[...fEe,...hEe,...pEe],debounce:300}),mEe=F2e(gEe,BV),FV=Ive({reducer:mEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(dEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=_2e,Ee=h2e;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 vEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yEe(e,t,n){return t&&xO(e.prototype,t),n&&xO(e,n),e}function SEe(e,t){return t&&(e4(t)==="object"||typeof t=="function")?t:t4(e)}function P9(e){return P9=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},P9(e)}function t4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T9(e,t)}function T9(e,t){return T9=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},T9(e,t)}function n4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $V=function(e){bEe(t,e);function t(){var n,r;vEe(this,t);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=SEe(this,(n=P9(t)).call.apply(n,[this].concat(o))),n4(t4(r),"state",{bootstrapped:!1}),n4(t4(r),"_unsubscribe",void 0),n4(t4(r),"handlePersistorState",function(){var s=r.props.persistor,l=s.getState(),u=l.bootstrapped;u&&(r.props.onBeforeLift?Promise.resolve(r.props.onBeforeLift()).finally(function(){return r.setState({bootstrapped:!0})}):r.setState({bootstrapped:!0}),r._unsubscribe&&r._unsubscribe())}),r}return yEe(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(C.exports.PureComponent);n4($V,"defaultProps",{children:null,loading:null});const xEe=()=>x(en,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Qv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),wEe=ft(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(wEe),i=t?Math.round(t*100/n):0;return x(mF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function _Ee(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function kEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=_v(),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 inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",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((p,m)=>{h.push(x(_Ee,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re($n,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Lv,{className:" modal hotkeys-modal",children:[x(K_,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(i)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(o)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(a)})]}),re(zf,{children:[re(Nf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Df,{})]}),x(Bf,{children:l(s)})]})]})})]})]})]})}const EEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(X$(i))};return re("div",{className:"model-list-item",children:[x(hi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},PEe=ft(e=>e.system,e=>{const t=Je.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),TEe=()=>{const{models:e}=Ee(PEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(zf,{children:[x(Nf,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Df,{})]})}),x(Bf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(EEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},AEe=ft([u2,z$],e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:Je.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),LEe=({children:e})=>{const t=Xe(),n=Ee(P=>P.options.steps),{isOpen:r,onOpen:i,onClose:o}=_v(),{isOpen:a,onOpen:s,onClose:l}=_v(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(AEe),S=()=>{QV.purge().then(()=>{o(),s()})},w=P=>{P>n&&(P=n),P<1&&(P=1),t(N4e(P))};return re($n,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Lv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K_,{className:"modal-close-btn"}),re(Av,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(TEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(Au,{label:"Display In-Progress Images",validValues:K3e,value:u,onChange:P=>t(T4e(P.target.value))}),u==="full-res"&&x(As,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(za,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:P=>t(F$(P.target.checked))}),x(za,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:P=>t(O4e(P.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(za,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:P=>t(D4e(P.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Gf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{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."}),x(Eo,{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."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Lv,{children:x(Av,{pb:6,pt:6,children:x(en,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},MEe=ft(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:Zr.exports.isEqual}}),OEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(MEe),s=Xe();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})`),x(hi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s($$())},className:`status ${l}`,children:u})})},IEe=["dark","light","green"];function REe(){const{setColorMode:e}=Hv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(Z8e(i))};return x(ed,{trigger:"hover",triggerComponent:x(mt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(g5e,{})}),children:x(jz,{align:"stretch",children:IEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x(F8,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const NEe=ft([u2],e=>{const{isProcessing:t,model_list:n}=e,r=Je.map(n,(o,a)=>a),i=Je.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),DEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(NEe);return x(en,{style:{paddingLeft:"0.3rem"},children:x(Au,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(X$(o.target.value))}})})},zEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:pH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(OEe,{}),x(DEe,{}),x(kEe,{children:x(mt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(c5e,{})})}),x(REe,{}),x(mt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(n5e,{})})}),x(mt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(X4e,{})})}),x(mt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(jf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(K4e,{})})}),x(LEe,{children:x(mt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(H8,{})})})]})]}),BEe=ft(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),FEe=ft(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),$Ee=()=>{const e=Xe(),t=Ee(BEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(FEe),[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($$()),e(hw(!n))};return vt("`",()=>{e(hw(!n))},[n]),vt("esc",()=>{e(hw(!1))}),re($n,{children:[n&&x(CH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop<s.current.scrollHeight-s.current.clientHeight&&a(!1)},children:t.map((h,p)=>{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(hi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ha,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(Z4e,{}),onClick:()=>a(!o)})}),x(hi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ha,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(h5e,{}):x(U$,{}),onClick:l})})]})};function HEe(){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 WEe=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 h2(e,t){var n=VEe(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 VEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=WEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var UEe=[".DS_Store","Thumbs.db"];function GEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return v5(e)&&jEe(e.dataTransfer)?[2,XEe(e.dataTransfer,e.type)]:YEe(e)?[2,qEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,KEe(e)]:[2,[]]})})}function jEe(e){return v5(e)}function YEe(e){return v5(e)&&v5(e.target)}function v5(e){return typeof e=="object"&&e!==null}function qEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function KEe(e){return r1(this,void 0,void 0,function(){var t;return i1(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 h2(r)})]}})})}function XEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(ZEe))]):[3,2];case 1:return r=i.sent(),[2,wO(HV(r))];case 2:return[2,wO(A9(e.files).map(function(o){return h2(o)}))]}})})}function wO(e){return e.filter(function(t){return UEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function ZEe(e){if(typeof e.webkitGetAsEntry!="function")return CO(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?WV(t):CO(e)}function HV(e){return e.reduce(function(t,n){return gC(gC([],_A(t),!1),_A(Array.isArray(n)?HV(n):[n]),!1)},[])}function CO(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=h2(t);return Promise.resolve(n)}function QEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return[2,e.isDirectory?WV(e):JEe(e)]})})}function WV(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return r1(a,void 0,void 0,function(){var l,u,h;return i1(this,function(p){switch(p.label){case 0:if(s.length)return[3,5];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=p.sent(),n(l),[3,4];case 3:return u=p.sent(),r(u),[3,4];case 4:return[3,6];case 5:h=Promise.all(s.map(QEe)),i.push(h),o(),p.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function JEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=h2(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var ePe=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function _O(e){return rPe(e)||nPe(e)||UV(e)||tPe()}function tPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rPe(e){if(Array.isArray(e))return L9(e)}function kO(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 EO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kO(Object(n),!0).forEach(function(r){VV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nv(e,t){return aPe(e)||oPe(e,t)||UV(e,t)||iPe()}function iPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UV(e,t){if(!!e){if(typeof e=="string")return L9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L9(e,t)}}function L9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function aPe(e){if(Array.isArray(e))return e}var sPe="file-invalid-type",lPe="file-too-large",uPe="file-too-small",cPe="too-many-files",dPe=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:sPe,message:"File type must be ".concat(n)}},PO=function(t){return{code:lPe,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},TO=function(t){return{code:uPe,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},fPe={code:cPe,message:"Too many files"};function GV(e,t){var n=e.type==="application/x-moz-file"||ePe(e,t);return[n,n?null:dPe(t)]}function jV(e,t,n){if(Pf(e.size))if(Pf(t)&&Pf(n)){if(e.size>n)return[!1,PO(n)];if(e.size<t)return[!1,TO(t)]}else{if(Pf(t)&&e.size<t)return[!1,TO(t)];if(Pf(n)&&e.size>n)return[!1,PO(n)]}return[!0,null]}function Pf(e){return e!=null}function hPe(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=GV(l,n),h=Nv(u,1),p=h[0],m=jV(l,r,i),v=Nv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(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 AO(e){e.preventDefault()}function pPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gPe(e){return e.indexOf("Edge/")!==-1}function mPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pPe(e)||gPe(e)}function sl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!y5(r)&&s&&s.apply(void 0,[r].concat(o)),y5(r)})}}function vPe(){return"showOpenFilePicker"in window}function yPe(e){if(Pf(e)){var t=Object.entries(e).filter(function(n){var r=Nv(n,2),i=r[0],o=r[1],a=!0;return YV(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(qV))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=Nv(r,2),o=i[0],a=i[1];return EO(EO({},n),{},VV({},o,a))},{});return[{description:"Files",accept:t}]}return e}function SPe(e){if(Pf(e))return Object.entries(e).reduce(function(t,n){var r=Nv(n,2),i=r[0],o=r[1];return[].concat(_O(t),[i],_O(o))},[]).filter(function(t){return YV(t)||qV(t)}).join(",")}function bPe(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function xPe(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function YV(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function qV(e){return/^.*\.[\w]+$/.test(e)}var wPe=["children"],CPe=["open"],_Pe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],kPe=["refKey","onChange","onClick"];function EPe(e){return APe(e)||TPe(e)||KV(e)||PPe()}function PPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function APe(e){if(Array.isArray(e))return M9(e)}function Dw(e,t){return OPe(e)||MPe(e,t)||KV(e,t)||LPe()}function LPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KV(e,t){if(!!e){if(typeof e=="string")return M9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M9(e,t)}}function M9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function OPe(e){if(Array.isArray(e))return e}function LO(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 lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LO(Object(n),!0).forEach(function(r){O9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S5(e,t){if(e==null)return{};var n=IPe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function IPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Sk=C.exports.forwardRef(function(e,t){var n=e.children,r=S5(e,wPe),i=ZV(r),o=i.open,a=S5(i,CPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});Sk.displayName="Dropzone";var XV={disabled:!1,getFilesFromEvent:GEe,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};Sk.defaultProps=XV;Sk.propTypes={children:On.exports.func,accept:On.exports.objectOf(On.exports.arrayOf(On.exports.string)),multiple:On.exports.bool,preventDropOnDocument:On.exports.bool,noClick:On.exports.bool,noKeyboard:On.exports.bool,noDrag:On.exports.bool,noDragEventsBubbling:On.exports.bool,minSize:On.exports.number,maxSize:On.exports.number,maxFiles:On.exports.number,disabled:On.exports.bool,getFilesFromEvent:On.exports.func,onFileDialogCancel:On.exports.func,onFileDialogOpen:On.exports.func,useFsAccessApi:On.exports.bool,autoFocus:On.exports.bool,onDragEnter:On.exports.func,onDragLeave:On.exports.func,onDragOver:On.exports.func,onDrop:On.exports.func,onDropAccepted:On.exports.func,onDropRejected:On.exports.func,onError:On.exports.func,validator:On.exports.func};var I9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ZV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},XV),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,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,P=t.onFileDialogOpen,E=t.useFsAccessApi,_=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,H=t.validator,$=C.exports.useMemo(function(){return SPe(n)},[n]),j=C.exports.useMemo(function(){return yPe(n)},[n]),de=C.exports.useMemo(function(){return typeof P=="function"?P:MO},[P]),V=C.exports.useMemo(function(){return typeof w=="function"?w:MO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),Q=C.exports.useReducer(RPe,I9),K=Dw(Q,2),G=K[0],Z=K[1],te=G.isFocused,X=G.isFileDialogActive,he=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&E&&vPe()),ye=function(){!he.current&&X&&setTimeout(function(){if(ie.current){var et=ie.current.files;et.length||(Z({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",ye,!1),function(){window.removeEventListener("focus",ye,!1)}},[ie,X,V,he]);var Se=C.exports.useRef([]),De=function(et){J.current&&J.current.contains(et.target)||(et.preventDefault(),Se.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",AO,!1),document.addEventListener("drop",De,!1)),function(){T&&(document.removeEventListener("dragover",AO),document.removeEventListener("drop",De))}},[J,T]),C.exports.useEffect(function(){return!r&&_&&J.current&&J.current.focus(),function(){}},[J,_,r]);var $e=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),He=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[].concat(EPe(Se.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){if(!(y5(Oe)&&!N)){var Xt=et.length,Yt=Xt>0&&hPe({files:et,accept:$,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:H}),ke=Xt>0&&!Yt;Z({isDragAccept:Yt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(et){return $e(et)})},[i,u,$e,N,$,a,o,s,l,H]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=h3(Oe);if(et&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return et&&p&&p(Oe),!1},[p,N]),tt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe);var et=Se.current.filter(function(Yt){return J.current&&J.current.contains(Yt)}),Xt=et.indexOf(Oe.target);Xt!==-1&&et.splice(Xt,1),Se.current=et,!(et.length>0)&&(Z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,et){var Xt=[],Yt=[];Oe.forEach(function(ke){var Ot=GV(ke,$),Ne=Dw(Ot,2),ut=Ne[0],ln=Ne[1],Nn=jV(ke,a,o),We=Dw(Nn,2),ht=We[0],it=We[1],Nt=H?H(ke):null;if(ut&&ht&&!Nt)Xt.push(ke);else{var Zt=[ln,it];Nt&&(Zt=Zt.concat(Nt)),Yt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){Yt.push({file:ke,errors:[fPe]})}),Xt.splice(0)),Z({acceptedFiles:Xt,fileRejections:Yt,type:"setFiles"}),m&&m(Xt,Yt,et),Yt.length>0&&S&&S(Yt,et),Xt.length>0&&v&&v(Xt,et)},[Z,s,$,a,o,l,m,v,S,H]),nt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Ct(Oe),Se.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(et){y5(Oe)&&!N||Ze(et,Oe)}).catch(function(et){return $e(et)}),Z({type:"reset"})},[i,Ze,$e,N]),Tt=C.exports.useCallback(function(){if(he.current){Z({type:"openDialog"}),de();var Oe={multiple:s,types:j};window.showOpenFilePicker(Oe).then(function(et){return i(et)}).then(function(et){Ze(et,null),Z({type:"closeDialog"})}).catch(function(et){bPe(et)?(V(et),Z({type:"closeDialog"})):xPe(et)?(he.current=!1,ie.current?(ie.current.value=null,ie.current.click()):$e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):$e(et)});return}ie.current&&(Z({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Z,de,V,E,Ze,$e,j,s]),xt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Tt())},[J,Tt]),Le=C.exports.useCallback(function(){Z({type:"focus"})},[]),at=C.exports.useCallback(function(){Z({type:"blur"})},[]),At=C.exports.useCallback(function(){M||(mPe()?setTimeout(Tt,0):Tt())},[M,Tt]),st=function(et){return r?null:et},gt=function(et){return I?null:st(et)},an=function(et){return R?null:st(et)},Ct=function(et){N&&et.stopPropagation()},Ut=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.role,ke=Oe.onKeyDown,Ot=Oe.onFocus,Ne=Oe.onBlur,ut=Oe.onClick,ln=Oe.onDragEnter,Nn=Oe.onDragOver,We=Oe.onDragLeave,ht=Oe.onDrop,it=S5(Oe,_Pe);return lr(lr(O9({onKeyDown:gt(sl(ke,xt)),onFocus:gt(sl(Ot,Le)),onBlur:gt(sl(Ne,at)),onClick:st(sl(ut,At)),onDragEnter:an(sl(ln,He)),onDragOver:an(sl(Nn,qe)),onDragLeave:an(sl(We,tt)),onDrop:an(sl(ht,nt)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),it)}},[J,xt,Le,at,At,He,qe,tt,nt,I,R,r]),sn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),yn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=Oe.refKey,Xt=et===void 0?"ref":et,Yt=Oe.onChange,ke=Oe.onClick,Ot=S5(Oe,kPe),Ne=O9({accept:$,multiple:s,type:"file",style:{display:"none"},onChange:st(sl(Yt,nt)),onClick:st(sl(ke,sn)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Ot)}},[ie,n,s,nt,r]);return lr(lr({},G),{},{isFocused:te&&!r,getRootProps:Ut,getInputProps:yn,rootRef:J,inputRef:ie,open:st(Tt)})}function RPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},I9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},I9);default:return e}}function MO(){}const NPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return vt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Gf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Gf,{size:"lg",children:"Invalid Upload"}),x(Gf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},OO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Cr(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:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(j8(u)):o==="img2img"&&t(d2(u))},DPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Cr),i=o2({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=aV(),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(OO({imageFile:_}))},[n]),h=C.exports.useCallback((_,T)=>{T.forEach(M=>{l(M)}),_.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:P}=ZV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(P),C.exports.useEffect(()=>{const _=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);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 R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(OO({imageFile:R}))};return document.addEventListener("paste",_),()=>{document.removeEventListener("paste",_)}},[n,i,r]);const E=["img2img","unifiedCanvas"].includes(r)?` to ${Ef[r].tooltip}`:"";return x(q8.Provider,{value:P,children:re("div",{...p({style:{}}),onKeyDown:_=>{_.key},children:[x("input",{...m()}),t,w&&o&&x(NPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:E,setIsHandlingUpload:a})]})})},zPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(mt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(Wi(!0))},children:x(H$,{})})},BPe=ft(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),FPe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(BPe);return re("div",{className:"show-hide-button-options",children:[x(mt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(Wi(!0)),400)},children:x(Y$,{})}),t&&re($n,{children:[x(Z$,{iconButton:!0}),x(Q$,{})]})]})},$Pe=()=>{const e=Xe(),t=Ee(Z6e),n=o2();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(B4e())},[e,n,t])};HEe();const HPe=ft([e=>e.gallery,e=>e.options,e=>e.system,Cr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=Je.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:Je.isEqual}}),WPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(HPe);return $Pe(),x("div",{className:"App",children:re(DPe,{children:[x(CEe,{}),re("div",{className:"app-content",children:[x(zEe,{}),x(j8e,{})]}),x("div",{className:"app-console",children:x($Ee,{})}),e&&x(zPe,{}),t&&x(FPe,{})]})})};const QV=G2e(FV),VPe=oN({key:"invokeai-style-cache",prepend:!0});Bw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(x2e,{store:FV,children:x($V,{loading:x(xEe,{}),persistor:QV,children:x(aJ,{value:VPe,children:x(Zme,{children:x(WPe,{})})})})})}));
|