mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
152 lines
1.2 MiB
152 lines
1.2 MiB
function v7(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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).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 He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jY(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var _7={exports:{}},x_={},b7={exports:{}},ft={};/**
|
||
* @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 Yg=Symbol.for("react.element"),GY=Symbol.for("react.portal"),HY=Symbol.for("react.fragment"),WY=Symbol.for("react.strict_mode"),qY=Symbol.for("react.profiler"),KY=Symbol.for("react.provider"),XY=Symbol.for("react.context"),YY=Symbol.for("react.forward_ref"),QY=Symbol.for("react.suspense"),ZY=Symbol.for("react.memo"),JY=Symbol.for("react.lazy"),xP=Symbol.iterator;function eQ(e){return e===null||typeof e!="object"?null:(e=xP&&e[xP]||e["@@iterator"],typeof e=="function"?e:null)}var S7={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w7=Object.assign,x7={};function Lf(e,t,n){this.props=e,this.context=t,this.refs=x7,this.updater=n||S7}Lf.prototype.isReactComponent={};Lf.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")};Lf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function C7(){}C7.prototype=Lf.prototype;function Q5(e,t,n){this.props=e,this.context=t,this.refs=x7,this.updater=n||S7}var Z5=Q5.prototype=new C7;Z5.constructor=Q5;w7(Z5,Lf.prototype);Z5.isPureReactComponent=!0;var CP=Array.isArray,T7=Object.prototype.hasOwnProperty,J5={current:null},E7={key:!0,ref:!0,__self:!0,__source:!0};function A7(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)T7.call(t,r)&&!E7.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Yg,type:e,key:o,ref:s,props:i,_owner:J5.current}}function tQ(e,t){return{$$typeof:Yg,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function e4(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yg}function nQ(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var TP=/\/+/g;function Aw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nQ(""+e.key):t.toString(36)}function Y0(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Yg:case GY:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Aw(s,0):r,CP(i)?(n="",e!=null&&(n=e.replace(TP,"$&/")+"/"),Y0(i,t,n,"",function(u){return u})):i!=null&&(e4(i)&&(i=tQ(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(TP,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",CP(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+Aw(o,a);s+=Y0(o,t,n,l,i)}else if(l=eQ(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+Aw(o,a++),s+=Y0(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 s}function Ky(e,t,n){if(e==null)return e;var r=[],i=0;return Y0(e,r,"","",function(o){return t.call(n,o,i++)}),r}function rQ(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 ui={current:null},Q0={transition:null},iQ={ReactCurrentDispatcher:ui,ReactCurrentBatchConfig:Q0,ReactCurrentOwner:J5};ft.Children={map:Ky,forEach:function(e,t,n){Ky(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ky(e,function(){t++}),t},toArray:function(e){return Ky(e,function(t){return t})||[]},only:function(e){if(!e4(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ft.Component=Lf;ft.Fragment=HY;ft.Profiler=qY;ft.PureComponent=Q5;ft.StrictMode=WY;ft.Suspense=QY;ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iQ;ft.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=w7({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=J5.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)T7.call(t,l)&&!E7.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Yg,type:e.type,key:i,ref:o,props:r,_owner:s}};ft.createContext=function(e){return e={$$typeof:XY,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:KY,_context:e},e.Consumer=e};ft.createElement=A7;ft.createFactory=function(e){var t=A7.bind(null,e);return t.type=e,t};ft.createRef=function(){return{current:null}};ft.forwardRef=function(e){return{$$typeof:YY,render:e}};ft.isValidElement=e4;ft.lazy=function(e){return{$$typeof:JY,_payload:{_status:-1,_result:e},_init:rQ}};ft.memo=function(e,t){return{$$typeof:ZY,type:e,compare:t===void 0?null:t}};ft.startTransition=function(e){var t=Q0.transition;Q0.transition={};try{e()}finally{Q0.transition=t}};ft.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ft.useCallback=function(e,t){return ui.current.useCallback(e,t)};ft.useContext=function(e){return ui.current.useContext(e)};ft.useDebugValue=function(){};ft.useDeferredValue=function(e){return ui.current.useDeferredValue(e)};ft.useEffect=function(e,t){return ui.current.useEffect(e,t)};ft.useId=function(){return ui.current.useId()};ft.useImperativeHandle=function(e,t,n){return ui.current.useImperativeHandle(e,t,n)};ft.useInsertionEffect=function(e,t){return ui.current.useInsertionEffect(e,t)};ft.useLayoutEffect=function(e,t){return ui.current.useLayoutEffect(e,t)};ft.useMemo=function(e,t){return ui.current.useMemo(e,t)};ft.useReducer=function(e,t,n){return ui.current.useReducer(e,t,n)};ft.useRef=function(e){return ui.current.useRef(e)};ft.useState=function(e){return ui.current.useState(e)};ft.useSyncExternalStore=function(e,t,n){return ui.current.useSyncExternalStore(e,t,n)};ft.useTransition=function(){return ui.current.useTransition()};ft.version="18.2.0";b7.exports=ft;var L=b7.exports;const Lt=dc(L),EP=v7({__proto__:null,default:Lt},[L]);/**
|
||
* @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 oQ=L,sQ=Symbol.for("react.element"),aQ=Symbol.for("react.fragment"),lQ=Object.prototype.hasOwnProperty,uQ=oQ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cQ={key:!0,ref:!0,__self:!0,__source:!0};function P7(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)lQ.call(t,r)&&!cQ.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:sQ,type:e,key:o,ref:s,props:i,_owner:uQ.current}}x_.Fragment=aQ;x_.jsx=P7;x_.jsxs=P7;_7.exports=x_;var ue=_7.exports,mC={},R7={exports:{}},Yi={},O7={exports:{}},k7={};/**
|
||
* @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(D,V){var j=D.length;D.push(V);e:for(;0<j;){var q=j-1>>>1,Z=D[q];if(0<i(Z,V))D[q]=V,D[j]=Z,j=q;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var V=D[0],j=D.pop();if(j!==V){D[0]=j;e:for(var q=0,Z=D.length,ee=Z>>>1;q<ee;){var ie=2*(q+1)-1,se=D[ie],le=ie+1,W=D[le];if(0>i(se,j))le<Z&&0>i(W,se)?(D[q]=W,D[le]=j,q=le):(D[q]=se,D[ie]=j,q=ie);else if(le<Z&&0>i(W,j))D[q]=W,D[le]=j,q=le;else break e}}return V}function i(D,V){var j=D.sortIndex-V.sortIndex;return j!==0?j:D.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],d=1,f=null,p=3,g=!1,m=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(D){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=D)r(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(u)}}function S(D){if(v=!1,y(D),!m)if(n(l)!==null)m=!0,F(C);else{var V=n(u);V!==null&&B(S,V.startTime-D)}}function C(D,V){m=!1,v&&(v=!1,_(P),P=-1),g=!0;var j=p;try{for(y(V),f=n(l);f!==null&&(!(f.expirationTime>V)||D&&!M());){var q=f.callback;if(typeof q=="function"){f.callback=null,p=f.priorityLevel;var Z=q(f.expirationTime<=V);V=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(l)&&r(l),y(V)}else r(l);f=n(l)}if(f!==null)var ee=!0;else{var ie=n(u);ie!==null&&B(S,ie.startTime-V),ee=!1}return ee}finally{f=null,p=j,g=!1}}var T=!1,E=null,P=-1,k=5,O=-1;function M(){return!(e.unstable_now()-O<k)}function G(){if(E!==null){var D=e.unstable_now();O=D;var V=!0;try{V=E(!0,D)}finally{V?U():(T=!1,E=null)}}else T=!1}var U;if(typeof b=="function")U=function(){b(G)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,N=A.port2;A.port1.onmessage=G,U=function(){N.postMessage(null)}}else U=function(){x(G,0)};function F(D){E=D,T||(T=!0,U())}function B(D,V){P=x(function(){D(e.unstable_now())},V)}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(D){D.callback=null},e.unstable_continueExecution=function(){m||g||(m=!0,F(C))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(p){case 1:case 2:case 3:var V=3;break;default:V=p}var j=p;p=V;try{return D()}finally{p=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,V){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var j=p;p=D;try{return V()}finally{p=j}},e.unstable_scheduleCallback=function(D,V,j){var q=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?q+j:q):j=q,D){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=j+Z,D={id:d++,callback:V,priorityLevel:D,startTime:j,expirationTime:Z,sortIndex:-1},j>q?(D.sortIndex=j,t(u,D),n(l)===null&&D===n(u)&&(v?(_(P),P=-1):v=!0,B(S,j-q))):(D.sortIndex=Z,t(l,D),m||g||(m=!0,F(C))),D},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(D){var V=p;return function(){var j=p;p=V;try{return D.apply(this,arguments)}finally{p=j}}}})(k7);O7.exports=k7;var dQ=O7.exports;/**
|
||
* @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 I7=L,Wi=dQ;function ge(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 M7=new Set,$p={};function fc(e,t){cf(e,t),cf(e+"Capture",t)}function cf(e,t){for($p[e]=t,e=0;e<t.length;e++)M7.add(t[e])}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yC=Object.prototype.hasOwnProperty,fQ=/^[: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]*$/,AP={},PP={};function hQ(e){return yC.call(PP,e)?!0:yC.call(AP,e)?!1:fQ.test(e)?PP[e]=!0:(AP[e]=!0,!1)}function pQ(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"||pQ(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 ci(e,t,n,r,i,o,s){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=s}var Ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ir[e]=new ci(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ir[t]=new ci(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ir[e]=new ci(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ir[e]=new ci(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){Ir[e]=new ci(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ir[e]=new ci(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ir[e]=new ci(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ir[e]=new ci(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ir[e]=new ci(e,5,!1,e.toLowerCase(),null,!1,!1)});var t4=/[\-:]([a-z])/g;function n4(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(t4,n4);Ir[t]=new ci(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(t4,n4);Ir[t]=new ci(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(t4,n4);Ir[t]=new ci(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ir[e]=new ci(e,1,!1,e.toLowerCase(),null,!1,!1)});Ir.xlinkHref=new ci("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ir[e]=new ci(e,1,!1,e.toLowerCase(),null,!0,!0)});function r4(e,t,n,r){var i=Ir.hasOwnProperty(t)?Ir[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?hQ(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 Ia=I7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xy=Symbol.for("react.element"),xd=Symbol.for("react.portal"),Cd=Symbol.for("react.fragment"),i4=Symbol.for("react.strict_mode"),vC=Symbol.for("react.profiler"),N7=Symbol.for("react.provider"),L7=Symbol.for("react.context"),o4=Symbol.for("react.forward_ref"),_C=Symbol.for("react.suspense"),bC=Symbol.for("react.suspense_list"),s4=Symbol.for("react.memo"),ll=Symbol.for("react.lazy"),D7=Symbol.for("react.offscreen"),RP=Symbol.iterator;function Ih(e){return e===null||typeof e!="object"?null:(e=RP&&e[RP]||e["@@iterator"],typeof e=="function"?e:null)}var bn=Object.assign,Pw;function sp(e){if(Pw===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Pw=t&&t[1]||""}return`
|
||
`+Pw+e}var Rw=!1;function Ow(e,t){if(!e||Rw)return"";Rw=!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(`
|
||
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
|
||
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Rw=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sp(e):""}function mQ(e){switch(e.tag){case 5:return sp(e.type);case 16:return sp("Lazy");case 13:return sp("Suspense");case 19:return sp("SuspenseList");case 0:case 2:case 15:return e=Ow(e.type,!1),e;case 11:return e=Ow(e.type.render,!1),e;case 1:return e=Ow(e.type,!0),e;default:return""}}function SC(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 Cd:return"Fragment";case xd:return"Portal";case vC:return"Profiler";case i4:return"StrictMode";case _C:return"Suspense";case bC:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L7:return(e.displayName||"Context")+".Consumer";case N7:return(e._context.displayName||"Context")+".Provider";case o4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case s4:return t=e.displayName||null,t!==null?t:SC(e.type)||"Memo";case ll:t=e._payload,e=e._init;try{return SC(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 SC(t);case 8:return t===i4?"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 Ll(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $7(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vQ(e){var t=$7(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(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yy(e){e._valueTracker||(e._valueTracker=vQ(e))}function F7(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$7(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mv(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 wC(e,t){var n=t.checked;return bn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function OP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ll(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 B7(e,t){t=t.checked,t!=null&&r4(e,"checked",t,!1)}function xC(e,t){B7(e,t);var n=Ll(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")?CC(e,t.type,n):t.hasOwnProperty("defaultValue")&&CC(e,t.type,Ll(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kP(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 CC(e,t,n){(t!=="number"||Mv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ap=Array.isArray;function zd(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=""+Ll(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 TC(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ge(91));return bn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function IP(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ge(92));if(ap(n)){if(1<n.length)throw Error(ge(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ll(n)}}function U7(e,t){var n=Ll(t.value),r=Ll(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 MP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function z7(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 EC(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?z7(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qy,V7=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(Qy=Qy||document.createElement("div"),Qy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mp={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},_Q=["Webkit","ms","Moz","O"];Object.keys(mp).forEach(function(e){_Q.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),mp[t]=mp[e]})});function j7(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||mp.hasOwnProperty(e)&&mp[e]?(""+t).trim():t+"px"}function G7(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=j7(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var bQ=bn({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 AC(e,t){if(t){if(bQ[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ge(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ge(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ge(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ge(62))}}function PC(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 RC=null;function a4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var OC=null,Vd=null,jd=null;function NP(e){if(e=Jg(e)){if(typeof OC!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=P_(t),OC(e.stateNode,e.type,t))}}function H7(e){Vd?jd?jd.push(e):jd=[e]:Vd=e}function W7(){if(Vd){var e=Vd,t=jd;if(jd=Vd=null,NP(e),t)for(e=0;e<t.length;e++)NP(t[e])}}function q7(e,t){return e(t)}function K7(){}var kw=!1;function X7(e,t,n){if(kw)return e(t,n);kw=!0;try{return q7(e,t,n)}finally{kw=!1,(Vd!==null||jd!==null)&&(K7(),W7())}}function Bp(e,t){var n=e.stateNode;if(n===null)return null;var r=P_(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(ge(231,t,typeof n));return n}var kC=!1;if(Ca)try{var Mh={};Object.defineProperty(Mh,"passive",{get:function(){kC=!0}}),window.addEventListener("test",Mh,Mh),window.removeEventListener("test",Mh,Mh)}catch{kC=!1}function SQ(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var yp=!1,Nv=null,Lv=!1,IC=null,wQ={onError:function(e){yp=!0,Nv=e}};function xQ(e,t,n,r,i,o,s,a,l){yp=!1,Nv=null,SQ.apply(wQ,arguments)}function CQ(e,t,n,r,i,o,s,a,l){if(xQ.apply(this,arguments),yp){if(yp){var u=Nv;yp=!1,Nv=null}else throw Error(ge(198));Lv||(Lv=!0,IC=u)}}function hc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Y7(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 LP(e){if(hc(e)!==e)throw Error(ge(188))}function TQ(e){var t=e.alternate;if(!t){if(t=hc(e),t===null)throw Error(ge(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 LP(i),e;if(o===r)return LP(i),t;o=o.sibling}throw Error(ge(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(ge(189))}}if(n.alternate!==r)throw Error(ge(190))}if(n.tag!==3)throw Error(ge(188));return n.stateNode.current===n?e:t}function Q7(e){return e=TQ(e),e!==null?Z7(e):null}function Z7(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Z7(e);if(t!==null)return t;e=e.sibling}return null}var J7=Wi.unstable_scheduleCallback,DP=Wi.unstable_cancelCallback,EQ=Wi.unstable_shouldYield,AQ=Wi.unstable_requestPaint,In=Wi.unstable_now,PQ=Wi.unstable_getCurrentPriorityLevel,l4=Wi.unstable_ImmediatePriority,eM=Wi.unstable_UserBlockingPriority,Dv=Wi.unstable_NormalPriority,RQ=Wi.unstable_LowPriority,tM=Wi.unstable_IdlePriority,C_=null,Es=null;function OQ(e){if(Es&&typeof Es.onCommitFiberRoot=="function")try{Es.onCommitFiberRoot(C_,e,void 0,(e.current.flags&128)===128)}catch{}}var Ho=Math.clz32?Math.clz32:MQ,kQ=Math.log,IQ=Math.LN2;function MQ(e){return e>>>=0,e===0?32:31-(kQ(e)/IQ|0)|0}var Zy=64,Jy=4194304;function lp(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 $v(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=lp(a):(o&=s,o!==0&&(r=lp(o)))}else s=n&~i,s!==0?r=lp(s):o!==0&&(r=lp(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ho(t),i=1<<n,r|=e[n],t&=~i;return r}function NQ(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 LQ(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ho(o),a=1<<s,l=i[s];l===-1?(!(a&n)||a&r)&&(i[s]=NQ(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function MC(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function nM(){var e=Zy;return Zy<<=1,!(Zy&4194240)&&(Zy=64),e}function Iw(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qg(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ho(t),e[t]=n}function DQ(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-Ho(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function u4(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ho(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Dt=0;function rM(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var iM,c4,oM,sM,aM,NC=!1,e0=[],wl=null,xl=null,Cl=null,Up=new Map,zp=new Map,pl=[],$Q="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 $P(e,t){switch(e){case"focusin":case"focusout":wl=null;break;case"dragenter":case"dragleave":xl=null;break;case"mouseover":case"mouseout":Cl=null;break;case"pointerover":case"pointerout":Up.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zp.delete(t.pointerId)}}function Nh(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=Jg(t),t!==null&&c4(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function FQ(e,t,n,r,i){switch(t){case"focusin":return wl=Nh(wl,e,t,n,r,i),!0;case"dragenter":return xl=Nh(xl,e,t,n,r,i),!0;case"mouseover":return Cl=Nh(Cl,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Up.set(o,Nh(Up.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,zp.set(o,Nh(zp.get(o)||null,e,t,n,r,i)),!0}return!1}function lM(e){var t=Iu(e.target);if(t!==null){var n=hc(t);if(n!==null){if(t=n.tag,t===13){if(t=Y7(n),t!==null){e.blockedOn=t,aM(e.priority,function(){oM(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 Z0(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=LC(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);RC=r,n.target.dispatchEvent(r),RC=null}else return t=Jg(n),t!==null&&c4(t),e.blockedOn=n,!1;t.shift()}return!0}function FP(e,t,n){Z0(e)&&n.delete(t)}function BQ(){NC=!1,wl!==null&&Z0(wl)&&(wl=null),xl!==null&&Z0(xl)&&(xl=null),Cl!==null&&Z0(Cl)&&(Cl=null),Up.forEach(FP),zp.forEach(FP)}function Lh(e,t){e.blockedOn===t&&(e.blockedOn=null,NC||(NC=!0,Wi.unstable_scheduleCallback(Wi.unstable_NormalPriority,BQ)))}function Vp(e){function t(i){return Lh(i,e)}if(0<e0.length){Lh(e0[0],e);for(var n=1;n<e0.length;n++){var r=e0[n];r.blockedOn===e&&(r.blockedOn=null)}}for(wl!==null&&Lh(wl,e),xl!==null&&Lh(xl,e),Cl!==null&&Lh(Cl,e),Up.forEach(t),zp.forEach(t),n=0;n<pl.length;n++)r=pl[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pl.length&&(n=pl[0],n.blockedOn===null);)lM(n),n.blockedOn===null&&pl.shift()}var Gd=Ia.ReactCurrentBatchConfig,Fv=!0;function UQ(e,t,n,r){var i=Dt,o=Gd.transition;Gd.transition=null;try{Dt=1,d4(e,t,n,r)}finally{Dt=i,Gd.transition=o}}function zQ(e,t,n,r){var i=Dt,o=Gd.transition;Gd.transition=null;try{Dt=4,d4(e,t,n,r)}finally{Dt=i,Gd.transition=o}}function d4(e,t,n,r){if(Fv){var i=LC(e,t,n,r);if(i===null)Vw(e,t,r,Bv,n),$P(e,r);else if(FQ(i,e,t,n,r))r.stopPropagation();else if($P(e,r),t&4&&-1<$Q.indexOf(e)){for(;i!==null;){var o=Jg(i);if(o!==null&&iM(o),o=LC(e,t,n,r),o===null&&Vw(e,t,r,Bv,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Vw(e,t,r,null,n)}}var Bv=null;function LC(e,t,n,r){if(Bv=null,e=a4(r),e=Iu(e),e!==null)if(t=hc(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Y7(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 Bv=e,null}function uM(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(PQ()){case l4:return 1;case eM:return 4;case Dv:case RQ:return 16;case tM:return 536870912;default:return 16}default:return 16}}var vl=null,f4=null,J0=null;function cM(){if(J0)return J0;var e,t=f4,n=t.length,r,i="value"in vl?vl.value:vl.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return J0=i.slice(e,1<r?1-r:void 0)}function ev(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 t0(){return!0}function BP(){return!1}function Qi(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?t0:BP,this.isPropagationStopped=BP,this}return bn(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=t0)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=t0)},persist:function(){},isPersistent:t0}),t}var Df={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},h4=Qi(Df),Zg=bn({},Df,{view:0,detail:0}),VQ=Qi(Zg),Mw,Nw,Dh,T_=bn({},Zg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:p4,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!==Dh&&(Dh&&e.type==="mousemove"?(Mw=e.screenX-Dh.screenX,Nw=e.screenY-Dh.screenY):Nw=Mw=0,Dh=e),Mw)},movementY:function(e){return"movementY"in e?e.movementY:Nw}}),UP=Qi(T_),jQ=bn({},T_,{dataTransfer:0}),GQ=Qi(jQ),HQ=bn({},Zg,{relatedTarget:0}),Lw=Qi(HQ),WQ=bn({},Df,{animationName:0,elapsedTime:0,pseudoElement:0}),qQ=Qi(WQ),KQ=bn({},Df,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),XQ=Qi(KQ),YQ=bn({},Df,{data:0}),zP=Qi(YQ),QQ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZQ={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"},JQ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eZ(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JQ[e])?!!t[e]:!1}function p4(){return eZ}var tZ=bn({},Zg,{key:function(e){if(e.key){var t=QQ[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ev(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZQ[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:p4,charCode:function(e){return e.type==="keypress"?ev(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ev(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nZ=Qi(tZ),rZ=bn({},T_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),VP=Qi(rZ),iZ=bn({},Zg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:p4}),oZ=Qi(iZ),sZ=bn({},Df,{propertyName:0,elapsedTime:0,pseudoElement:0}),aZ=Qi(sZ),lZ=bn({},T_,{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}),uZ=Qi(lZ),cZ=[9,13,27,32],g4=Ca&&"CompositionEvent"in window,vp=null;Ca&&"documentMode"in document&&(vp=document.documentMode);var dZ=Ca&&"TextEvent"in window&&!vp,dM=Ca&&(!g4||vp&&8<vp&&11>=vp),jP=String.fromCharCode(32),GP=!1;function fM(e,t){switch(e){case"keyup":return cZ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Td=!1;function fZ(e,t){switch(e){case"compositionend":return hM(t);case"keypress":return t.which!==32?null:(GP=!0,jP);case"textInput":return e=t.data,e===jP&&GP?null:e;default:return null}}function hZ(e,t){if(Td)return e==="compositionend"||!g4&&fM(e,t)?(e=cM(),J0=f4=vl=null,Td=!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 dM&&t.locale!=="ko"?null:t.data;default:return null}}var pZ={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 HP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pZ[e.type]:t==="textarea"}function pM(e,t,n,r){H7(r),t=Uv(t,"onChange"),0<t.length&&(n=new h4("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _p=null,jp=null;function gZ(e){TM(e,0)}function E_(e){var t=Pd(e);if(F7(t))return e}function mZ(e,t){if(e==="change")return t}var gM=!1;if(Ca){var Dw;if(Ca){var $w="oninput"in document;if(!$w){var WP=document.createElement("div");WP.setAttribute("oninput","return;"),$w=typeof WP.oninput=="function"}Dw=$w}else Dw=!1;gM=Dw&&(!document.documentMode||9<document.documentMode)}function qP(){_p&&(_p.detachEvent("onpropertychange",mM),jp=_p=null)}function mM(e){if(e.propertyName==="value"&&E_(jp)){var t=[];pM(t,jp,e,a4(e)),X7(gZ,t)}}function yZ(e,t,n){e==="focusin"?(qP(),_p=t,jp=n,_p.attachEvent("onpropertychange",mM)):e==="focusout"&&qP()}function vZ(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return E_(jp)}function _Z(e,t){if(e==="click")return E_(t)}function bZ(e,t){if(e==="input"||e==="change")return E_(t)}function SZ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qo=typeof Object.is=="function"?Object.is:SZ;function Gp(e,t){if(Qo(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(!yC.call(t,i)||!Qo(e[i],t[i]))return!1}return!0}function KP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function XP(e,t){var n=KP(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=KP(n)}}function yM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vM(){for(var e=window,t=Mv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mv(e.document)}return t}function m4(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 wZ(e){var t=vM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yM(n.ownerDocument.documentElement,n)){if(r!==null&&m4(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=XP(n,o);var s=XP(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 xZ=Ca&&"documentMode"in document&&11>=document.documentMode,Ed=null,DC=null,bp=null,$C=!1;function YP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$C||Ed==null||Ed!==Mv(r)||(r=Ed,"selectionStart"in r&&m4(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}),bp&&Gp(bp,r)||(bp=r,r=Uv(DC,"onSelect"),0<r.length&&(t=new h4("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ed)))}function n0(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ad={animationend:n0("Animation","AnimationEnd"),animationiteration:n0("Animation","AnimationIteration"),animationstart:n0("Animation","AnimationStart"),transitionend:n0("Transition","TransitionEnd")},Fw={},_M={};Ca&&(_M=document.createElement("div").style,"AnimationEvent"in window||(delete Ad.animationend.animation,delete Ad.animationiteration.animation,delete Ad.animationstart.animation),"TransitionEvent"in window||delete Ad.transitionend.transition);function A_(e){if(Fw[e])return Fw[e];if(!Ad[e])return e;var t=Ad[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _M)return Fw[e]=t[n];return e}var bM=A_("animationend"),SM=A_("animationiteration"),wM=A_("animationstart"),xM=A_("transitionend"),CM=new Map,QP="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 Xl(e,t){CM.set(e,t),fc(t,[e])}for(var Bw=0;Bw<QP.length;Bw++){var Uw=QP[Bw],CZ=Uw.toLowerCase(),TZ=Uw[0].toUpperCase()+Uw.slice(1);Xl(CZ,"on"+TZ)}Xl(bM,"onAnimationEnd");Xl(SM,"onAnimationIteration");Xl(wM,"onAnimationStart");Xl("dblclick","onDoubleClick");Xl("focusin","onFocus");Xl("focusout","onBlur");Xl(xM,"onTransitionEnd");cf("onMouseEnter",["mouseout","mouseover"]);cf("onMouseLeave",["mouseout","mouseover"]);cf("onPointerEnter",["pointerout","pointerover"]);cf("onPointerLeave",["pointerout","pointerover"]);fc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fc("onBeforeInput",["compositionend","keypress","textInput","paste"]);fc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var up="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(" "),EZ=new Set("cancel close invalid load scroll toggle".split(" ").concat(up));function ZP(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,CQ(r,t,void 0,e),e.currentTarget=null}function TM(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 s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;ZP(i,a,u),o=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;ZP(i,a,u),o=l}}}if(Lv)throw e=IC,Lv=!1,IC=null,e}function en(e,t){var n=t[VC];n===void 0&&(n=t[VC]=new Set);var r=e+"__bubble";n.has(r)||(EM(t,e,2,!1),n.add(r))}function zw(e,t,n){var r=0;t&&(r|=4),EM(n,e,r,t)}var r0="_reactListening"+Math.random().toString(36).slice(2);function Hp(e){if(!e[r0]){e[r0]=!0,M7.forEach(function(n){n!=="selectionchange"&&(EZ.has(n)||zw(n,!1,e),zw(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[r0]||(t[r0]=!0,zw("selectionchange",!1,t))}}function EM(e,t,n,r){switch(uM(t)){case 1:var i=UQ;break;case 4:i=zQ;break;default:i=d4}n=i.bind(null,t,n,e),i=void 0,!kC||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 Vw(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Iu(a),s===null)return;if(l=s.tag,l===5||l===6){r=o=s;continue e}a=a.parentNode}}r=r.return}X7(function(){var u=o,d=a4(n),f=[];e:{var p=CM.get(e);if(p!==void 0){var g=h4,m=e;switch(e){case"keypress":if(ev(n)===0)break e;case"keydown":case"keyup":g=nZ;break;case"focusin":m="focus",g=Lw;break;case"focusout":m="blur",g=Lw;break;case"beforeblur":case"afterblur":g=Lw;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":g=UP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=GQ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=oZ;break;case bM:case SM:case wM:g=qQ;break;case xM:g=aZ;break;case"scroll":g=VQ;break;case"wheel":g=uZ;break;case"copy":case"cut":case"paste":g=XQ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=VP}var v=(t&4)!==0,x=!v&&e==="scroll",_=v?p!==null?p+"Capture":null:p;v=[];for(var b=u,y;b!==null;){y=b;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,_!==null&&(S=Bp(b,_),S!=null&&v.push(Wp(b,S,y)))),x)break;b=b.return}0<v.length&&(p=new g(p,m,null,n,d),f.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",p&&n!==RC&&(m=n.relatedTarget||n.fromElement)&&(Iu(m)||m[Ta]))break e;if((g||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,g?(m=n.relatedTarget||n.toElement,g=u,m=m?Iu(m):null,m!==null&&(x=hc(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(g=null,m=u),g!==m)){if(v=UP,S="onMouseLeave",_="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(v=VP,S="onPointerLeave",_="onPointerEnter",b="pointer"),x=g==null?p:Pd(g),y=m==null?p:Pd(m),p=new v(S,b+"leave",g,n,d),p.target=x,p.relatedTarget=y,S=null,Iu(d)===u&&(v=new v(_,b+"enter",m,n,d),v.target=y,v.relatedTarget=x,S=v),x=S,g&&m)t:{for(v=g,_=m,b=0,y=v;y;y=ed(y))b++;for(y=0,S=_;S;S=ed(S))y++;for(;0<b-y;)v=ed(v),b--;for(;0<y-b;)_=ed(_),y--;for(;b--;){if(v===_||_!==null&&v===_.alternate)break t;v=ed(v),_=ed(_)}v=null}else v=null;g!==null&&JP(f,p,g,v,!1),m!==null&&x!==null&&JP(f,x,m,v,!0)}}e:{if(p=u?Pd(u):window,g=p.nodeName&&p.nodeName.toLowerCase(),g==="select"||g==="input"&&p.type==="file")var C=mZ;else if(HP(p))if(gM)C=bZ;else{C=vZ;var T=yZ}else(g=p.nodeName)&&g.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=_Z);if(C&&(C=C(e,u))){pM(f,C,n,d);break e}T&&T(e,p,u),e==="focusout"&&(T=p._wrapperState)&&T.controlled&&p.type==="number"&&CC(p,"number",p.value)}switch(T=u?Pd(u):window,e){case"focusin":(HP(T)||T.contentEditable==="true")&&(Ed=T,DC=u,bp=null);break;case"focusout":bp=DC=Ed=null;break;case"mousedown":$C=!0;break;case"contextmenu":case"mouseup":case"dragend":$C=!1,YP(f,n,d);break;case"selectionchange":if(xZ)break;case"keydown":case"keyup":YP(f,n,d)}var E;if(g4)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Td?fM(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(dM&&n.locale!=="ko"&&(Td||P!=="onCompositionStart"?P==="onCompositionEnd"&&Td&&(E=cM()):(vl=d,f4="value"in vl?vl.value:vl.textContent,Td=!0)),T=Uv(u,P),0<T.length&&(P=new zP(P,e,null,n,d),f.push({event:P,listeners:T}),E?P.data=E:(E=hM(n),E!==null&&(P.data=E)))),(E=dZ?fZ(e,n):hZ(e,n))&&(u=Uv(u,"onBeforeInput"),0<u.length&&(d=new zP("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=E))}TM(f,t)})}function Wp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Uv(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Bp(e,n),o!=null&&r.unshift(Wp(e,o,i)),o=Bp(e,t),o!=null&&r.push(Wp(e,o,i))),e=e.return}return r}function ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function JP(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Bp(n,o),l!=null&&s.unshift(Wp(n,l,a))):i||(l=Bp(n,o),l!=null&&s.push(Wp(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var AZ=/\r\n?/g,PZ=/\u0000|\uFFFD/g;function e8(e){return(typeof e=="string"?e:""+e).replace(AZ,`
|
||
`).replace(PZ,"")}function i0(e,t,n){if(t=e8(t),e8(e)!==t&&n)throw Error(ge(425))}function zv(){}var FC=null,BC=null;function UC(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 zC=typeof setTimeout=="function"?setTimeout:void 0,RZ=typeof clearTimeout=="function"?clearTimeout:void 0,t8=typeof Promise=="function"?Promise:void 0,OZ=typeof queueMicrotask=="function"?queueMicrotask:typeof t8<"u"?function(e){return t8.resolve(null).then(e).catch(kZ)}:zC;function kZ(e){setTimeout(function(){throw e})}function jw(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),Vp(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Vp(t)}function Tl(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 n8(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 $f=Math.random().toString(36).slice(2),_s="__reactFiber$"+$f,qp="__reactProps$"+$f,Ta="__reactContainer$"+$f,VC="__reactEvents$"+$f,IZ="__reactListeners$"+$f,MZ="__reactHandles$"+$f;function Iu(e){var t=e[_s];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ta]||n[_s]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=n8(e);e!==null;){if(n=e[_s])return n;e=n8(e)}return t}e=n,n=e.parentNode}return null}function Jg(e){return e=e[_s]||e[Ta],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pd(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ge(33))}function P_(e){return e[qp]||null}var jC=[],Rd=-1;function Yl(e){return{current:e}}function rn(e){0>Rd||(e.current=jC[Rd],jC[Rd]=null,Rd--)}function Zt(e,t){Rd++,jC[Rd]=e.current,e.current=t}var Dl={},Hr=Yl(Dl),Ci=Yl(!1),Xu=Dl;function df(e,t){var n=e.type.contextTypes;if(!n)return Dl;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 Ti(e){return e=e.childContextTypes,e!=null}function Vv(){rn(Ci),rn(Hr)}function r8(e,t,n){if(Hr.current!==Dl)throw Error(ge(168));Zt(Hr,t),Zt(Ci,n)}function AM(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(ge(108,yQ(e)||"Unknown",i));return bn({},n,r)}function jv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dl,Xu=Hr.current,Zt(Hr,e),Zt(Ci,Ci.current),!0}function i8(e,t,n){var r=e.stateNode;if(!r)throw Error(ge(169));n?(e=AM(e,t,Xu),r.__reactInternalMemoizedMergedChildContext=e,rn(Ci),rn(Hr),Zt(Hr,e)):rn(Ci),Zt(Ci,n)}var ua=null,R_=!1,Gw=!1;function PM(e){ua===null?ua=[e]:ua.push(e)}function NZ(e){R_=!0,PM(e)}function Ql(){if(!Gw&&ua!==null){Gw=!0;var e=0,t=Dt;try{var n=ua;for(Dt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ua=null,R_=!1}catch(i){throw ua!==null&&(ua=ua.slice(e+1)),J7(l4,Ql),i}finally{Dt=t,Gw=!1}}return null}var Od=[],kd=0,Gv=null,Hv=0,go=[],mo=0,Yu=null,ha=1,pa="";function Cu(e,t){Od[kd++]=Hv,Od[kd++]=Gv,Gv=e,Hv=t}function RM(e,t,n){go[mo++]=ha,go[mo++]=pa,go[mo++]=Yu,Yu=e;var r=ha;e=pa;var i=32-Ho(r)-1;r&=~(1<<i),n+=1;var o=32-Ho(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,ha=1<<32-Ho(t)+i|n<<i|r,pa=o+e}else ha=1<<o|n<<i|r,pa=e}function y4(e){e.return!==null&&(Cu(e,1),RM(e,1,0))}function v4(e){for(;e===Gv;)Gv=Od[--kd],Od[kd]=null,Hv=Od[--kd],Od[kd]=null;for(;e===Yu;)Yu=go[--mo],go[mo]=null,pa=go[--mo],go[mo]=null,ha=go[--mo],go[mo]=null}var Gi=null,ji=null,cn=!1,zo=null;function OM(e,t){var n=vo(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 o8(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,Gi=e,ji=Tl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gi=e,ji=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yu!==null?{id:ha,overflow:pa}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vo(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Gi=e,ji=null,!0):!1;default:return!1}}function GC(e){return(e.mode&1)!==0&&(e.flags&128)===0}function HC(e){if(cn){var t=ji;if(t){var n=t;if(!o8(e,t)){if(GC(e))throw Error(ge(418));t=Tl(n.nextSibling);var r=Gi;t&&o8(e,t)?OM(r,n):(e.flags=e.flags&-4097|2,cn=!1,Gi=e)}}else{if(GC(e))throw Error(ge(418));e.flags=e.flags&-4097|2,cn=!1,Gi=e}}}function s8(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gi=e}function o0(e){if(e!==Gi)return!1;if(!cn)return s8(e),cn=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!UC(e.type,e.memoizedProps)),t&&(t=ji)){if(GC(e))throw kM(),Error(ge(418));for(;t;)OM(e,t),t=Tl(t.nextSibling)}if(s8(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ge(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ji=Tl(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ji=null}}else ji=Gi?Tl(e.stateNode.nextSibling):null;return!0}function kM(){for(var e=ji;e;)e=Tl(e.nextSibling)}function ff(){ji=Gi=null,cn=!1}function _4(e){zo===null?zo=[e]:zo.push(e)}var LZ=Ia.ReactCurrentBatchConfig;function $o(e,t){if(e&&e.defaultProps){t=bn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Wv=Yl(null),qv=null,Id=null,b4=null;function S4(){b4=Id=qv=null}function w4(e){var t=Wv.current;rn(Wv),e._currentValue=t}function WC(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 Hd(e,t){qv=e,b4=Id=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Si=!0),e.firstContext=null)}function So(e){var t=e._currentValue;if(b4!==e)if(e={context:e,memoizedValue:t,next:null},Id===null){if(qv===null)throw Error(ge(308));Id=e,qv.dependencies={lanes:0,firstContext:e}}else Id=Id.next=e;return t}var Mu=null;function x4(e){Mu===null?Mu=[e]:Mu.push(e)}function IM(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,x4(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ea(e,r)}function Ea(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 ul=!1;function C4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function MM(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 ya(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function El(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,yt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ea(e,n)}return i=r.interleaved,i===null?(t.next=t,x4(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ea(e,n)}function tv(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,u4(e,n)}}function a8(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 s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,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 Kv(e,t,n,r){var i=e.updateQueue;ul=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;s=0,d=u=l=null,a=o;do{var p=a.lane,g=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,v=a;switch(p=t,g=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(g,f,p);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,p=typeof m=="function"?m.call(g,f,p):m,p==null)break e;f=bn({},f,p);break e;case 2:ul=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else g={eventTime:g,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=g,l=f):d=d.next=g,s|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Zu|=s,e.lanes=s,e.memoizedState=f}}function l8(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(ge(191,i));i.call(r)}}}var NM=new I7.Component().refs;function qC(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:bn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var O_={isMounted:function(e){return(e=e._reactInternals)?hc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=oi(),i=Pl(e),o=ya(r,i);o.payload=t,n!=null&&(o.callback=n),t=El(e,o,i),t!==null&&(Wo(t,e,i,r),tv(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=oi(),i=Pl(e),o=ya(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=El(e,o,i),t!==null&&(Wo(t,e,i,r),tv(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=oi(),r=Pl(e),i=ya(n,r);i.tag=2,t!=null&&(i.callback=t),t=El(e,i,r),t!==null&&(Wo(t,e,r,n),tv(t,e,r))}};function u8(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Gp(n,r)||!Gp(i,o):!0}function LM(e,t,n){var r=!1,i=Dl,o=t.contextType;return typeof o=="object"&&o!==null?o=So(o):(i=Ti(t)?Xu:Hr.current,r=t.contextTypes,o=(r=r!=null)?df(e,i):Dl),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=O_,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function c8(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&&O_.enqueueReplaceState(t,t.state,null)}function KC(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=NM,C4(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=So(o):(o=Ti(t)?Xu:Hr.current,i.context=df(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(qC(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&&O_.enqueueReplaceState(i,i.state,null),Kv(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function $h(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(ge(309));var r=n.stateNode}if(!r)throw Error(ge(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(s){var a=i.refs;a===NM&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(ge(284));if(!n._owner)throw Error(ge(290,e))}return e}function s0(e,t){throw e=Object.prototype.toString.call(t),Error(ge(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function d8(e){var t=e._init;return t(e._payload)}function DM(e){function t(_,b){if(e){var y=_.deletions;y===null?(_.deletions=[b],_.flags|=16):y.push(b)}}function n(_,b){if(!e)return null;for(;b!==null;)t(_,b),b=b.sibling;return null}function r(_,b){for(_=new Map;b!==null;)b.key!==null?_.set(b.key,b):_.set(b.index,b),b=b.sibling;return _}function i(_,b){return _=Rl(_,b),_.index=0,_.sibling=null,_}function o(_,b,y){return _.index=y,e?(y=_.alternate,y!==null?(y=y.index,y<b?(_.flags|=2,b):y):(_.flags|=2,b)):(_.flags|=1048576,b)}function s(_){return e&&_.alternate===null&&(_.flags|=2),_}function a(_,b,y,S){return b===null||b.tag!==6?(b=Qw(y,_.mode,S),b.return=_,b):(b=i(b,y),b.return=_,b)}function l(_,b,y,S){var C=y.type;return C===Cd?d(_,b,y.props.children,S,y.key):b!==null&&(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ll&&d8(C)===b.type)?(S=i(b,y.props),S.ref=$h(_,b,y),S.return=_,S):(S=av(y.type,y.key,y.props,null,_.mode,S),S.ref=$h(_,b,y),S.return=_,S)}function u(_,b,y,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==y.containerInfo||b.stateNode.implementation!==y.implementation?(b=Zw(y,_.mode,S),b.return=_,b):(b=i(b,y.children||[]),b.return=_,b)}function d(_,b,y,S,C){return b===null||b.tag!==7?(b=zu(y,_.mode,S,C),b.return=_,b):(b=i(b,y),b.return=_,b)}function f(_,b,y){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Qw(""+b,_.mode,y),b.return=_,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Xy:return y=av(b.type,b.key,b.props,null,_.mode,y),y.ref=$h(_,null,b),y.return=_,y;case xd:return b=Zw(b,_.mode,y),b.return=_,b;case ll:var S=b._init;return f(_,S(b._payload),y)}if(ap(b)||Ih(b))return b=zu(b,_.mode,y,null),b.return=_,b;s0(_,b)}return null}function p(_,b,y,S){var C=b!==null?b.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:a(_,b,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Xy:return y.key===C?l(_,b,y,S):null;case xd:return y.key===C?u(_,b,y,S):null;case ll:return C=y._init,p(_,b,C(y._payload),S)}if(ap(y)||Ih(y))return C!==null?null:d(_,b,y,S,null);s0(_,y)}return null}function g(_,b,y,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return _=_.get(y)||null,a(b,_,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Xy:return _=_.get(S.key===null?y:S.key)||null,l(b,_,S,C);case xd:return _=_.get(S.key===null?y:S.key)||null,u(b,_,S,C);case ll:var T=S._init;return g(_,b,y,T(S._payload),C)}if(ap(S)||Ih(S))return _=_.get(y)||null,d(b,_,S,C,null);s0(b,S)}return null}function m(_,b,y,S){for(var C=null,T=null,E=b,P=b=0,k=null;E!==null&&P<y.length;P++){E.index>P?(k=E,E=null):k=E.sibling;var O=p(_,E,y[P],S);if(O===null){E===null&&(E=k);break}e&&E&&O.alternate===null&&t(_,E),b=o(O,b,P),T===null?C=O:T.sibling=O,T=O,E=k}if(P===y.length)return n(_,E),cn&&Cu(_,P),C;if(E===null){for(;P<y.length;P++)E=f(_,y[P],S),E!==null&&(b=o(E,b,P),T===null?C=E:T.sibling=E,T=E);return cn&&Cu(_,P),C}for(E=r(_,E);P<y.length;P++)k=g(E,_,P,y[P],S),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?P:k.key),b=o(k,b,P),T===null?C=k:T.sibling=k,T=k);return e&&E.forEach(function(M){return t(_,M)}),cn&&Cu(_,P),C}function v(_,b,y,S){var C=Ih(y);if(typeof C!="function")throw Error(ge(150));if(y=C.call(y),y==null)throw Error(ge(151));for(var T=C=null,E=b,P=b=0,k=null,O=y.next();E!==null&&!O.done;P++,O=y.next()){E.index>P?(k=E,E=null):k=E.sibling;var M=p(_,E,O.value,S);if(M===null){E===null&&(E=k);break}e&&E&&M.alternate===null&&t(_,E),b=o(M,b,P),T===null?C=M:T.sibling=M,T=M,E=k}if(O.done)return n(_,E),cn&&Cu(_,P),C;if(E===null){for(;!O.done;P++,O=y.next())O=f(_,O.value,S),O!==null&&(b=o(O,b,P),T===null?C=O:T.sibling=O,T=O);return cn&&Cu(_,P),C}for(E=r(_,E);!O.done;P++,O=y.next())O=g(E,_,P,O.value,S),O!==null&&(e&&O.alternate!==null&&E.delete(O.key===null?P:O.key),b=o(O,b,P),T===null?C=O:T.sibling=O,T=O);return e&&E.forEach(function(G){return t(_,G)}),cn&&Cu(_,P),C}function x(_,b,y,S){if(typeof y=="object"&&y!==null&&y.type===Cd&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Xy:e:{for(var C=y.key,T=b;T!==null;){if(T.key===C){if(C=y.type,C===Cd){if(T.tag===7){n(_,T.sibling),b=i(T,y.props.children),b.return=_,_=b;break e}}else if(T.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ll&&d8(C)===T.type){n(_,T.sibling),b=i(T,y.props),b.ref=$h(_,T,y),b.return=_,_=b;break e}n(_,T);break}else t(_,T);T=T.sibling}y.type===Cd?(b=zu(y.props.children,_.mode,S,y.key),b.return=_,_=b):(S=av(y.type,y.key,y.props,null,_.mode,S),S.ref=$h(_,b,y),S.return=_,_=S)}return s(_);case xd:e:{for(T=y.key;b!==null;){if(b.key===T)if(b.tag===4&&b.stateNode.containerInfo===y.containerInfo&&b.stateNode.implementation===y.implementation){n(_,b.sibling),b=i(b,y.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=Zw(y,_.mode,S),b.return=_,_=b}return s(_);case ll:return T=y._init,x(_,b,T(y._payload),S)}if(ap(y))return m(_,b,y,S);if(Ih(y))return v(_,b,y,S);s0(_,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,y),b.return=_,_=b):(n(_,b),b=Qw(y,_.mode,S),b.return=_,_=b),s(_)):n(_,b)}return x}var hf=DM(!0),$M=DM(!1),em={},As=Yl(em),Kp=Yl(em),Xp=Yl(em);function Nu(e){if(e===em)throw Error(ge(174));return e}function T4(e,t){switch(Zt(Xp,t),Zt(Kp,e),Zt(As,em),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:EC(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=EC(t,e)}rn(As),Zt(As,t)}function pf(){rn(As),rn(Kp),rn(Xp)}function FM(e){Nu(Xp.current);var t=Nu(As.current),n=EC(t,e.type);t!==n&&(Zt(Kp,e),Zt(As,n))}function E4(e){Kp.current===e&&(rn(As),rn(Kp))}var mn=Yl(0);function Xv(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)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 Hw=[];function A4(){for(var e=0;e<Hw.length;e++)Hw[e]._workInProgressVersionPrimary=null;Hw.length=0}var nv=Ia.ReactCurrentDispatcher,Ww=Ia.ReactCurrentBatchConfig,Qu=0,_n=null,Jn=null,dr=null,Yv=!1,Sp=!1,Yp=0,DZ=0;function Fr(){throw Error(ge(321))}function P4(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qo(e[n],t[n]))return!1;return!0}function R4(e,t,n,r,i,o){if(Qu=o,_n=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nv.current=e===null||e.memoizedState===null?UZ:zZ,e=n(r,i),Sp){o=0;do{if(Sp=!1,Yp=0,25<=o)throw Error(ge(301));o+=1,dr=Jn=null,t.updateQueue=null,nv.current=VZ,e=n(r,i)}while(Sp)}if(nv.current=Qv,t=Jn!==null&&Jn.next!==null,Qu=0,dr=Jn=_n=null,Yv=!1,t)throw Error(ge(300));return e}function O4(){var e=Yp!==0;return Yp=0,e}function hs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dr===null?_n.memoizedState=dr=e:dr=dr.next=e,dr}function wo(){if(Jn===null){var e=_n.alternate;e=e!==null?e.memoizedState:null}else e=Jn.next;var t=dr===null?_n.memoizedState:dr.next;if(t!==null)dr=t,Jn=e;else{if(e===null)throw Error(ge(310));Jn=e,e={memoizedState:Jn.memoizedState,baseState:Jn.baseState,baseQueue:Jn.baseQueue,queue:Jn.queue,next:null},dr===null?_n.memoizedState=dr=e:dr=dr.next=e}return dr}function Qp(e,t){return typeof t=="function"?t(e):t}function qw(e){var t=wo(),n=t.queue;if(n===null)throw Error(ge(311));n.lastRenderedReducer=e;var r=Jn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,l=null,u=o;do{var d=u.lane;if((Qu&d)===d)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 f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,s=r):l=l.next=f,_n.lanes|=d,Zu|=d}u=u.next}while(u!==null&&u!==o);l===null?s=r:l.next=a,Qo(r,t.memoizedState)||(Si=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,_n.lanes|=o,Zu|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kw(e){var t=wo(),n=t.queue;if(n===null)throw Error(ge(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Qo(o,t.memoizedState)||(Si=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function BM(){}function UM(e,t){var n=_n,r=wo(),i=t(),o=!Qo(r.memoizedState,i);if(o&&(r.memoizedState=i,Si=!0),r=r.queue,k4(jM.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||dr!==null&&dr.memoizedState.tag&1){if(n.flags|=2048,Zp(9,VM.bind(null,n,r,i,t),void 0,null),pr===null)throw Error(ge(349));Qu&30||zM(n,t,i)}return i}function zM(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_n.updateQueue,t===null?(t={lastEffect:null,stores:null},_n.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function VM(e,t,n,r){t.value=n,t.getSnapshot=r,GM(t)&&HM(e)}function jM(e,t,n){return n(function(){GM(t)&&HM(e)})}function GM(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qo(e,n)}catch{return!0}}function HM(e){var t=Ea(e,1);t!==null&&Wo(t,e,1,-1)}function f8(e){var t=hs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qp,lastRenderedState:e},t.queue=e,e=e.dispatch=BZ.bind(null,_n,e),[t.memoizedState,e]}function Zp(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=_n.updateQueue,t===null?(t={lastEffect:null,stores:null},_n.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 WM(){return wo().memoizedState}function rv(e,t,n,r){var i=hs();_n.flags|=e,i.memoizedState=Zp(1|t,n,void 0,r===void 0?null:r)}function k_(e,t,n,r){var i=wo();r=r===void 0?null:r;var o=void 0;if(Jn!==null){var s=Jn.memoizedState;if(o=s.destroy,r!==null&&P4(r,s.deps)){i.memoizedState=Zp(t,n,o,r);return}}_n.flags|=e,i.memoizedState=Zp(1|t,n,o,r)}function h8(e,t){return rv(8390656,8,e,t)}function k4(e,t){return k_(2048,8,e,t)}function qM(e,t){return k_(4,2,e,t)}function KM(e,t){return k_(4,4,e,t)}function XM(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 YM(e,t,n){return n=n!=null?n.concat([e]):null,k_(4,4,XM.bind(null,t,e),n)}function I4(){}function QM(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&P4(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ZM(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&P4(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function JM(e,t,n){return Qu&21?(Qo(n,t)||(n=nM(),_n.lanes|=n,Zu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Si=!0),e.memoizedState=n)}function $Z(e,t){var n=Dt;Dt=n!==0&&4>n?n:4,e(!0);var r=Ww.transition;Ww.transition={};try{e(!1),t()}finally{Dt=n,Ww.transition=r}}function eN(){return wo().memoizedState}function FZ(e,t,n){var r=Pl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tN(e))nN(t,n);else if(n=IM(e,t,n,r),n!==null){var i=oi();Wo(n,e,r,i),rN(n,t,r)}}function BZ(e,t,n){var r=Pl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tN(e))nN(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Qo(a,s)){var l=t.interleaved;l===null?(i.next=i,x4(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=IM(e,t,i,r),n!==null&&(i=oi(),Wo(n,e,r,i),rN(n,t,r))}}function tN(e){var t=e.alternate;return e===_n||t!==null&&t===_n}function nN(e,t){Sp=Yv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rN(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,u4(e,n)}}var Qv={readContext:So,useCallback:Fr,useContext:Fr,useEffect:Fr,useImperativeHandle:Fr,useInsertionEffect:Fr,useLayoutEffect:Fr,useMemo:Fr,useReducer:Fr,useRef:Fr,useState:Fr,useDebugValue:Fr,useDeferredValue:Fr,useTransition:Fr,useMutableSource:Fr,useSyncExternalStore:Fr,useId:Fr,unstable_isNewReconciler:!1},UZ={readContext:So,useCallback:function(e,t){return hs().memoizedState=[e,t===void 0?null:t],e},useContext:So,useEffect:h8,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rv(4194308,4,XM.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rv(4194308,4,e,t)},useInsertionEffect:function(e,t){return rv(4,2,e,t)},useMemo:function(e,t){var n=hs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=hs();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=FZ.bind(null,_n,e),[r.memoizedState,e]},useRef:function(e){var t=hs();return e={current:e},t.memoizedState=e},useState:f8,useDebugValue:I4,useDeferredValue:function(e){return hs().memoizedState=e},useTransition:function(){var e=f8(!1),t=e[0];return e=$Z.bind(null,e[1]),hs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_n,i=hs();if(cn){if(n===void 0)throw Error(ge(407));n=n()}else{if(n=t(),pr===null)throw Error(ge(349));Qu&30||zM(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,h8(jM.bind(null,r,o,e),[e]),r.flags|=2048,Zp(9,VM.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=hs(),t=pr.identifierPrefix;if(cn){var n=pa,r=ha;n=(r&~(1<<32-Ho(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yp++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=DZ++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},zZ={readContext:So,useCallback:QM,useContext:So,useEffect:k4,useImperativeHandle:YM,useInsertionEffect:qM,useLayoutEffect:KM,useMemo:ZM,useReducer:qw,useRef:WM,useState:function(){return qw(Qp)},useDebugValue:I4,useDeferredValue:function(e){var t=wo();return JM(t,Jn.memoizedState,e)},useTransition:function(){var e=qw(Qp)[0],t=wo().memoizedState;return[e,t]},useMutableSource:BM,useSyncExternalStore:UM,useId:eN,unstable_isNewReconciler:!1},VZ={readContext:So,useCallback:QM,useContext:So,useEffect:k4,useImperativeHandle:YM,useInsertionEffect:qM,useLayoutEffect:KM,useMemo:ZM,useReducer:Kw,useRef:WM,useState:function(){return Kw(Qp)},useDebugValue:I4,useDeferredValue:function(e){var t=wo();return Jn===null?t.memoizedState=e:JM(t,Jn.memoizedState,e)},useTransition:function(){var e=Kw(Qp)[0],t=wo().memoizedState;return[e,t]},useMutableSource:BM,useSyncExternalStore:UM,useId:eN,unstable_isNewReconciler:!1};function gf(e,t){try{var n="",r=t;do n+=mQ(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 Xw(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function XC(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var jZ=typeof WeakMap=="function"?WeakMap:Map;function iN(e,t,n){n=ya(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Jv||(Jv=!0,o3=r),XC(e,t)},n}function oN(e,t,n){n=ya(-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(){XC(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){XC(e,t),typeof r!="function"&&(Al===null?Al=new Set([this]):Al.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function p8(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jZ;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=rJ.bind(null,e,t,n),t.then(e,e))}function g8(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 m8(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ya(-1,1),t.tag=2,El(n,t,1))),n.lanes|=1),e)}var GZ=Ia.ReactCurrentOwner,Si=!1;function ri(e,t,n,r){t.child=e===null?$M(t,null,n,r):hf(t,e.child,n,r)}function y8(e,t,n,r,i){n=n.render;var o=t.ref;return Hd(t,i),r=R4(e,t,n,r,o,i),n=O4(),e!==null&&!Si?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Aa(e,t,i)):(cn&&n&&y4(t),t.flags|=1,ri(e,t,r,i),t.child)}function v8(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!U4(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,sN(e,t,o,r,i)):(e=av(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)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Gp,n(s,r)&&e.ref===t.ref)return Aa(e,t,i)}return t.flags|=1,e=Rl(o,r),e.ref=t.ref,e.return=t,t.child=e}function sN(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Gp(o,r)&&e.ref===t.ref)if(Si=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Si=!0);else return t.lanes=e.lanes,Aa(e,t,i)}return YC(e,t,n,r,i)}function aN(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(Nd,zi),zi|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Zt(Nd,zi),zi|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Zt(Nd,zi),zi|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Zt(Nd,zi),zi|=r;return ri(e,t,i,n),t.child}function lN(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function YC(e,t,n,r,i){var o=Ti(n)?Xu:Hr.current;return o=df(t,o),Hd(t,i),n=R4(e,t,n,r,o,i),r=O4(),e!==null&&!Si?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Aa(e,t,i)):(cn&&r&&y4(t),t.flags|=1,ri(e,t,n,i),t.child)}function _8(e,t,n,r,i){if(Ti(n)){var o=!0;jv(t)}else o=!1;if(Hd(t,i),t.stateNode===null)iv(e,t),LM(t,n,r),KC(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=So(u):(u=Ti(n)?Xu:Hr.current,u=df(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&c8(t,s,r,u),ul=!1;var p=t.memoizedState;s.state=p,Kv(t,r,s,i),l=t.memoizedState,a!==r||p!==l||Ci.current||ul?(typeof d=="function"&&(qC(t,n,d,r),l=t.memoizedState),(a=ul||u8(t,n,a,r,p,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,MM(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:$o(t.type,a),s.props=u,f=t.pendingProps,p=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=So(l):(l=Ti(n)?Xu:Hr.current,l=df(t,l));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||p!==l)&&c8(t,s,r,l),ul=!1,p=t.memoizedState,s.state=p,Kv(t,r,s,i);var m=t.memoizedState;a!==f||p!==m||Ci.current||ul?(typeof g=="function"&&(qC(t,n,g,r),m=t.memoizedState),(u=ul||u8(t,n,u,r,p,m,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return QC(e,t,n,r,o,i)}function QC(e,t,n,r,i,o){lN(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&i8(t,n,!1),Aa(e,t,o);r=t.stateNode,GZ.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=hf(t,e.child,null,o),t.child=hf(t,null,a,o)):ri(e,t,a,o),t.memoizedState=r.state,i&&i8(t,n,!0),t.child}function uN(e){var t=e.stateNode;t.pendingContext?r8(e,t.pendingContext,t.pendingContext!==t.context):t.context&&r8(e,t.context,!1),T4(e,t.containerInfo)}function b8(e,t,n,r,i){return ff(),_4(i),t.flags|=256,ri(e,t,n,r),t.child}var ZC={dehydrated:null,treeContext:null,retryLane:0};function JC(e){return{baseLanes:e,cachePool:null,transitions:null}}function cN(e,t,n){var r=t.pendingProps,i=mn.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Zt(mn,i&1),e===null)return HC(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=N_(s,r,0,null),e=zu(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=JC(n),t.memoizedState=ZC,e):M4(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return HZ(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Rl(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Rl(a,o):(o=zu(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?JC(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=ZC,r}return o=e.child,e=o.sibling,r=Rl(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(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 M4(e,t){return t=N_({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function a0(e,t,n,r){return r!==null&&_4(r),hf(t,e.child,null,n),e=M4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HZ(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Xw(Error(ge(422))),a0(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=N_({mode:"visible",children:r.children},i,0,null),o=zu(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&hf(t,e.child,null,s),t.child.memoizedState=JC(s),t.memoizedState=ZC,o);if(!(t.mode&1))return a0(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ge(419)),r=Xw(o,r,void 0),a0(e,t,s,r)}if(a=(s&e.childLanes)!==0,Si||a){if(r=pr,r!==null){switch(s&-s){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|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ea(e,i),Wo(r,e,i,-1))}return B4(),r=Xw(Error(ge(421))),a0(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=iJ.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ji=Tl(i.nextSibling),Gi=t,cn=!0,zo=null,e!==null&&(go[mo++]=ha,go[mo++]=pa,go[mo++]=Yu,ha=e.id,pa=e.overflow,Yu=t),t=M4(t,r.children),t.flags|=4096,t)}function S8(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),WC(e.return,t,n)}function Yw(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 dN(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ri(e,t,r.children,n),r=mn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&S8(e,n,t);else if(e.tag===19)S8(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(Zt(mn,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Xv(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Yw(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&&Xv(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Yw(t,!0,n,null,o);break;case"together":Yw(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function iv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Aa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zu|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ge(153));if(t.child!==null){for(e=t.child,n=Rl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function WZ(e,t,n){switch(t.tag){case 3:uN(t),ff();break;case 5:FM(t);break;case 1:Ti(t.type)&&jv(t);break;case 4:T4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Zt(Wv,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Zt(mn,mn.current&1),t.flags|=128,null):n&t.child.childLanes?cN(e,t,n):(Zt(mn,mn.current&1),e=Aa(e,t,n),e!==null?e.sibling:null);Zt(mn,mn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dN(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Zt(mn,mn.current),r)break;return null;case 22:case 23:return t.lanes=0,aN(e,t,n)}return Aa(e,t,n)}var fN,e3,hN,pN;fN=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}};e3=function(){};hN=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Nu(As.current);var o=null;switch(n){case"input":i=wC(e,i),r=wC(e,r),o=[];break;case"select":i=bn({},i,{value:void 0}),r=bn({},r,{value:void 0}),o=[];break;case"textarea":i=TC(e,i),r=TC(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=zv)}AC(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&($p.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&($p.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&en("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};pN=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fh(e,t){if(!cn)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 Br(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 qZ(e,t,n){var r=t.pendingProps;switch(v4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Br(t),null;case 1:return Ti(t.type)&&Vv(),Br(t),null;case 3:return r=t.stateNode,pf(),rn(Ci),rn(Hr),A4(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(o0(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zo!==null&&(l3(zo),zo=null))),e3(e,t),Br(t),null;case 5:E4(t);var i=Nu(Xp.current);if(n=t.type,e!==null&&t.stateNode!=null)hN(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ge(166));return Br(t),null}if(e=Nu(As.current),o0(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[_s]=t,r[qp]=o,e=(t.mode&1)!==0,n){case"dialog":en("cancel",r),en("close",r);break;case"iframe":case"object":case"embed":en("load",r);break;case"video":case"audio":for(i=0;i<up.length;i++)en(up[i],r);break;case"source":en("error",r);break;case"img":case"image":case"link":en("error",r),en("load",r);break;case"details":en("toggle",r);break;case"input":OP(r,o),en("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},en("invalid",r);break;case"textarea":IP(r,o),en("invalid",r)}AC(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&i0(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&i0(r.textContent,a,e),i=["children",""+a]):$p.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&en("scroll",r)}switch(n){case"input":Yy(r),kP(r,o,!0);break;case"textarea":Yy(r),MP(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=zv)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=z7(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[_s]=t,e[qp]=r,fN(e,t,!1,!1),t.stateNode=e;e:{switch(s=PC(n,r),n){case"dialog":en("cancel",e),en("close",e),i=r;break;case"iframe":case"object":case"embed":en("load",e),i=r;break;case"video":case"audio":for(i=0;i<up.length;i++)en(up[i],e);i=r;break;case"source":en("error",e),i=r;break;case"img":case"image":case"link":en("error",e),en("load",e),i=r;break;case"details":en("toggle",e),i=r;break;case"input":OP(e,r),i=wC(e,r),en("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=bn({},r,{value:void 0}),en("invalid",e);break;case"textarea":IP(e,r),i=TC(e,r),en("invalid",e);break;default:i=r}AC(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?G7(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&V7(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Fp(e,l):typeof l=="number"&&Fp(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&($p.hasOwnProperty(o)?l!=null&&o==="onScroll"&&en("scroll",e):l!=null&&r4(e,o,l,s))}switch(n){case"input":Yy(e),kP(e,r,!1);break;case"textarea":Yy(e),MP(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ll(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?zd(e,!!r.multiple,o,!1):r.defaultValue!=null&&zd(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=zv)}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 Br(t),null;case 6:if(e&&t.stateNode!=null)pN(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ge(166));if(n=Nu(Xp.current),Nu(As.current),o0(t)){if(r=t.stateNode,n=t.memoizedProps,r[_s]=t,(o=r.nodeValue!==n)&&(e=Gi,e!==null))switch(e.tag){case 3:i0(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&i0(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[_s]=t,t.stateNode=r}return Br(t),null;case 13:if(rn(mn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(cn&&ji!==null&&t.mode&1&&!(t.flags&128))kM(),ff(),t.flags|=98560,o=!1;else if(o=o0(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ge(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ge(317));o[_s]=t}else ff(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Br(t),o=!1}else zo!==null&&(l3(zo),zo=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||mn.current&1?tr===0&&(tr=3):B4())),t.updateQueue!==null&&(t.flags|=4),Br(t),null);case 4:return pf(),e3(e,t),e===null&&Hp(t.stateNode.containerInfo),Br(t),null;case 10:return w4(t.type._context),Br(t),null;case 17:return Ti(t.type)&&Vv(),Br(t),null;case 19:if(rn(mn),o=t.memoizedState,o===null)return Br(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Fh(o,!1);else{if(tr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Xv(e),s!==null){for(t.flags|=128,Fh(o,!1),r=s.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,s=o.alternate,s===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=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Zt(mn,mn.current&1|2),t.child}e=e.sibling}o.tail!==null&&In()>mf&&(t.flags|=128,r=!0,Fh(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xv(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fh(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!cn)return Br(t),null}else 2*In()-o.renderingStartTime>mf&&n!==1073741824&&(t.flags|=128,r=!0,Fh(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=In(),t.sibling=null,n=mn.current,Zt(mn,r?n&1|2:n&1),t):(Br(t),null);case 22:case 23:return F4(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zi&1073741824&&(Br(t),t.subtreeFlags&6&&(t.flags|=8192)):Br(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}function KZ(e,t){switch(v4(t),t.tag){case 1:return Ti(t.type)&&Vv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pf(),rn(Ci),rn(Hr),A4(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return E4(t),null;case 13:if(rn(mn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));ff()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rn(mn),null;case 4:return pf(),null;case 10:return w4(t.type._context),null;case 22:case 23:return F4(),null;case 24:return null;default:return null}}var l0=!1,Gr=!1,XZ=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function Md(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Cn(e,t,r)}else n.current=null}function t3(e,t,n){try{n()}catch(r){Cn(e,t,r)}}var w8=!1;function YZ(e,t){if(FC=Fv,e=vM(),m4(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 s=0,a=-1,l=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===n&&++u===i&&(a=s),p===o&&++d===r&&(l=s),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(BC={focusedElem:e,selectionRange:n},Fv=!1,Ae=t;Ae!==null;)if(t=Ae,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ae=e;else for(;Ae!==null;){t=Ae;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,x=m.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?v:$o(t.type,v),x);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ge(163))}}catch(S){Cn(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Ae=e;break}Ae=t.return}return m=w8,w8=!1,m}function wp(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&&t3(t,n,o)}i=i.next}while(i!==r)}}function I_(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 n3(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 gN(e){var t=e.alternate;t!==null&&(e.alternate=null,gN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_s],delete t[qp],delete t[VC],delete t[IZ],delete t[MZ])),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 mN(e){return e.tag===5||e.tag===3||e.tag===4}function x8(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mN(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 r3(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=zv));else if(r!==4&&(e=e.child,e!==null))for(r3(e,t,n),e=e.sibling;e!==null;)r3(e,t,n),e=e.sibling}function i3(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(i3(e,t,n),e=e.sibling;e!==null;)i3(e,t,n),e=e.sibling}var Ar=null,Bo=!1;function el(e,t,n){for(n=n.child;n!==null;)yN(e,t,n),n=n.sibling}function yN(e,t,n){if(Es&&typeof Es.onCommitFiberUnmount=="function")try{Es.onCommitFiberUnmount(C_,n)}catch{}switch(n.tag){case 5:Gr||Md(n,t);case 6:var r=Ar,i=Bo;Ar=null,el(e,t,n),Ar=r,Bo=i,Ar!==null&&(Bo?(e=Ar,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ar.removeChild(n.stateNode));break;case 18:Ar!==null&&(Bo?(e=Ar,n=n.stateNode,e.nodeType===8?jw(e.parentNode,n):e.nodeType===1&&jw(e,n),Vp(e)):jw(Ar,n.stateNode));break;case 4:r=Ar,i=Bo,Ar=n.stateNode.containerInfo,Bo=!0,el(e,t,n),Ar=r,Bo=i;break;case 0:case 11:case 14:case 15:if(!Gr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&t3(n,t,s),i=i.next}while(i!==r)}el(e,t,n);break;case 1:if(!Gr&&(Md(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Cn(n,t,a)}el(e,t,n);break;case 21:el(e,t,n);break;case 22:n.mode&1?(Gr=(r=Gr)||n.memoizedState!==null,el(e,t,n),Gr=r):el(e,t,n);break;default:el(e,t,n)}}function C8(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new XZ),t.forEach(function(r){var i=oJ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Lo(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,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Ar=a.stateNode,Bo=!1;break e;case 3:Ar=a.stateNode.containerInfo,Bo=!0;break e;case 4:Ar=a.stateNode.containerInfo,Bo=!0;break e}a=a.return}if(Ar===null)throw Error(ge(160));yN(o,s,i),Ar=null,Bo=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Cn(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vN(t,e),t=t.sibling}function vN(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Lo(t,e),us(e),r&4){try{wp(3,e,e.return),I_(3,e)}catch(v){Cn(e,e.return,v)}try{wp(5,e,e.return)}catch(v){Cn(e,e.return,v)}}break;case 1:Lo(t,e),us(e),r&512&&n!==null&&Md(n,n.return);break;case 5:if(Lo(t,e),us(e),r&512&&n!==null&&Md(n,n.return),e.flags&32){var i=e.stateNode;try{Fp(i,"")}catch(v){Cn(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&B7(i,o),PC(a,s);var u=PC(a,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d==="style"?G7(i,f):d==="dangerouslySetInnerHTML"?V7(i,f):d==="children"?Fp(i,f):r4(i,d,f,u)}switch(a){case"input":xC(i,o);break;case"textarea":U7(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?zd(i,!!o.multiple,g,!1):p!==!!o.multiple&&(o.defaultValue!=null?zd(i,!!o.multiple,o.defaultValue,!0):zd(i,!!o.multiple,o.multiple?[]:"",!1))}i[qp]=o}catch(v){Cn(e,e.return,v)}}break;case 6:if(Lo(t,e),us(e),r&4){if(e.stateNode===null)throw Error(ge(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){Cn(e,e.return,v)}}break;case 3:if(Lo(t,e),us(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Vp(t.containerInfo)}catch(v){Cn(e,e.return,v)}break;case 4:Lo(t,e),us(e);break;case 13:Lo(t,e),us(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(D4=In())),r&4&&C8(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Gr=(u=Gr)||d,Lo(t,e),Gr=u):Lo(t,e),us(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ae=e,d=e.child;d!==null;){for(f=Ae=d;Ae!==null;){switch(p=Ae,g=p.child,p.tag){case 0:case 11:case 14:case 15:wp(4,p,p.return);break;case 1:Md(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){Cn(r,n,v)}}break;case 5:Md(p,p.return);break;case 22:if(p.memoizedState!==null){E8(f);continue}}g!==null?(g.return=p,Ae=g):E8(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=j7("display",s))}catch(v){Cn(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){Cn(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Lo(t,e),us(e),r&4&&C8(e);break;case 21:break;default:Lo(t,e),us(e)}}function us(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mN(n)){var r=n;break e}n=n.return}throw Error(ge(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Fp(i,""),r.flags&=-33);var o=x8(e);i3(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=x8(e);r3(e,a,s);break;default:throw Error(ge(161))}}catch(l){Cn(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QZ(e,t,n){Ae=e,_N(e)}function _N(e,t,n){for(var r=(e.mode&1)!==0;Ae!==null;){var i=Ae,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||l0;if(!s){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Gr;a=l0;var u=Gr;if(l0=s,(Gr=l)&&!u)for(Ae=i;Ae!==null;)s=Ae,l=s.child,s.tag===22&&s.memoizedState!==null?A8(i):l!==null?(l.return=s,Ae=l):A8(i);for(;o!==null;)Ae=o,_N(o),o=o.sibling;Ae=i,l0=a,Gr=u}T8(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Ae=o):T8(e)}}function T8(e){for(;Ae!==null;){var t=Ae;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Gr||I_(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Gr)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:$o(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&l8(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}l8(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;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 d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Vp(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ge(163))}Gr||t.flags&512&&n3(t)}catch(p){Cn(t,t.return,p)}}if(t===e){Ae=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ae=n;break}Ae=t.return}}function E8(e){for(;Ae!==null;){var t=Ae;if(t===e){Ae=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ae=n;break}Ae=t.return}}function A8(e){for(;Ae!==null;){var t=Ae;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{I_(4,t)}catch(l){Cn(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Cn(t,i,l)}}var o=t.return;try{n3(t)}catch(l){Cn(t,o,l)}break;case 5:var s=t.return;try{n3(t)}catch(l){Cn(t,s,l)}}}catch(l){Cn(t,t.return,l)}if(t===e){Ae=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Ae=a;break}Ae=t.return}}var ZZ=Math.ceil,Zv=Ia.ReactCurrentDispatcher,N4=Ia.ReactCurrentOwner,bo=Ia.ReactCurrentBatchConfig,yt=0,pr=null,Vn=null,kr=0,zi=0,Nd=Yl(0),tr=0,Jp=null,Zu=0,M_=0,L4=0,xp=null,_i=null,D4=0,mf=1/0,la=null,Jv=!1,o3=null,Al=null,u0=!1,_l=null,e1=0,Cp=0,s3=null,ov=-1,sv=0;function oi(){return yt&6?In():ov!==-1?ov:ov=In()}function Pl(e){return e.mode&1?yt&2&&kr!==0?kr&-kr:LZ.transition!==null?(sv===0&&(sv=nM()),sv):(e=Dt,e!==0||(e=window.event,e=e===void 0?16:uM(e.type)),e):1}function Wo(e,t,n,r){if(50<Cp)throw Cp=0,s3=null,Error(ge(185));Qg(e,n,r),(!(yt&2)||e!==pr)&&(e===pr&&(!(yt&2)&&(M_|=n),tr===4&&gl(e,kr)),Ei(e,r),n===1&&yt===0&&!(t.mode&1)&&(mf=In()+500,R_&&Ql()))}function Ei(e,t){var n=e.callbackNode;LQ(e,t);var r=$v(e,e===pr?kr:0);if(r===0)n!==null&&DP(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&DP(n),t===1)e.tag===0?NZ(P8.bind(null,e)):PM(P8.bind(null,e)),OZ(function(){!(yt&6)&&Ql()}),n=null;else{switch(rM(r)){case 1:n=l4;break;case 4:n=eM;break;case 16:n=Dv;break;case 536870912:n=tM;break;default:n=Dv}n=AN(n,bN.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bN(e,t){if(ov=-1,sv=0,yt&6)throw Error(ge(327));var n=e.callbackNode;if(Wd()&&e.callbackNode!==n)return null;var r=$v(e,e===pr?kr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=t1(e,r);else{t=r;var i=yt;yt|=2;var o=wN();(pr!==e||kr!==t)&&(la=null,mf=In()+500,Uu(e,t));do try{tJ();break}catch(a){SN(e,a)}while(1);S4(),Zv.current=o,yt=i,Vn!==null?t=0:(pr=null,kr=0,t=tr)}if(t!==0){if(t===2&&(i=MC(e),i!==0&&(r=i,t=a3(e,i))),t===1)throw n=Jp,Uu(e,0),gl(e,r),Ei(e,In()),n;if(t===6)gl(e,r);else{if(i=e.current.alternate,!(r&30)&&!JZ(i)&&(t=t1(e,r),t===2&&(o=MC(e),o!==0&&(r=o,t=a3(e,o))),t===1))throw n=Jp,Uu(e,0),gl(e,r),Ei(e,In()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(ge(345));case 2:Tu(e,_i,la);break;case 3:if(gl(e,r),(r&130023424)===r&&(t=D4+500-In(),10<t)){if($v(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){oi(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=zC(Tu.bind(null,e,_i,la),t);break}Tu(e,_i,la);break;case 4:if(gl(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ho(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=In()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZZ(r/1960))-r,10<r){e.timeoutHandle=zC(Tu.bind(null,e,_i,la),r);break}Tu(e,_i,la);break;case 5:Tu(e,_i,la);break;default:throw Error(ge(329))}}}return Ei(e,In()),e.callbackNode===n?bN.bind(null,e):null}function a3(e,t){var n=xp;return e.current.memoizedState.isDehydrated&&(Uu(e,t).flags|=256),e=t1(e,t),e!==2&&(t=_i,_i=n,t!==null&&l3(t)),e}function l3(e){_i===null?_i=e:_i.push.apply(_i,e)}function JZ(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(!Qo(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 gl(e,t){for(t&=~L4,t&=~M_,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ho(t),r=1<<n;e[n]=-1,t&=~r}}function P8(e){if(yt&6)throw Error(ge(327));Wd();var t=$v(e,0);if(!(t&1))return Ei(e,In()),null;var n=t1(e,t);if(e.tag!==0&&n===2){var r=MC(e);r!==0&&(t=r,n=a3(e,r))}if(n===1)throw n=Jp,Uu(e,0),gl(e,t),Ei(e,In()),n;if(n===6)throw Error(ge(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tu(e,_i,la),Ei(e,In()),null}function $4(e,t){var n=yt;yt|=1;try{return e(t)}finally{yt=n,yt===0&&(mf=In()+500,R_&&Ql())}}function Ju(e){_l!==null&&_l.tag===0&&!(yt&6)&&Wd();var t=yt;yt|=1;var n=bo.transition,r=Dt;try{if(bo.transition=null,Dt=1,e)return e()}finally{Dt=r,bo.transition=n,yt=t,!(yt&6)&&Ql()}}function F4(){zi=Nd.current,rn(Nd)}function Uu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,RZ(n)),Vn!==null)for(n=Vn.return;n!==null;){var r=n;switch(v4(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Vv();break;case 3:pf(),rn(Ci),rn(Hr),A4();break;case 5:E4(r);break;case 4:pf();break;case 13:rn(mn);break;case 19:rn(mn);break;case 10:w4(r.type._context);break;case 22:case 23:F4()}n=n.return}if(pr=e,Vn=e=Rl(e.current,null),kr=zi=t,tr=0,Jp=null,L4=M_=Zu=0,_i=xp=null,Mu!==null){for(t=0;t<Mu.length;t++)if(n=Mu[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Mu=null}return e}function SN(e,t){do{var n=Vn;try{if(S4(),nv.current=Qv,Yv){for(var r=_n.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Yv=!1}if(Qu=0,dr=Jn=_n=null,Sp=!1,Yp=0,N4.current=null,n===null||n.return===null){tr=1,Jp=t,Vn=null;break}e:{var o=e,s=n.return,a=n,l=t;if(t=kr,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=g8(s);if(g!==null){g.flags&=-257,m8(g,s,a,o,t),g.mode&1&&p8(o,u,t),t=g,l=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(l),t.updateQueue=v}else m.add(l);break e}else{if(!(t&1)){p8(o,u,t),B4();break e}l=Error(ge(426))}}else if(cn&&a.mode&1){var x=g8(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),m8(x,s,a,o,t),_4(gf(l,a));break e}}o=l=gf(l,a),tr!==4&&(tr=2),xp===null?xp=[o]:xp.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var _=iN(o,l,t);a8(o,_);break e;case 1:a=l;var b=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof b.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Al===null||!Al.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=oN(o,a,t);a8(o,S);break e}}o=o.return}while(o!==null)}CN(n)}catch(C){t=C,Vn===n&&n!==null&&(Vn=n=n.return);continue}break}while(1)}function wN(){var e=Zv.current;return Zv.current=Qv,e===null?Qv:e}function B4(){(tr===0||tr===3||tr===2)&&(tr=4),pr===null||!(Zu&268435455)&&!(M_&268435455)||gl(pr,kr)}function t1(e,t){var n=yt;yt|=2;var r=wN();(pr!==e||kr!==t)&&(la=null,Uu(e,t));do try{eJ();break}catch(i){SN(e,i)}while(1);if(S4(),yt=n,Zv.current=r,Vn!==null)throw Error(ge(261));return pr=null,kr=0,tr}function eJ(){for(;Vn!==null;)xN(Vn)}function tJ(){for(;Vn!==null&&!EQ();)xN(Vn)}function xN(e){var t=EN(e.alternate,e,zi);e.memoizedProps=e.pendingProps,t===null?CN(e):Vn=t,N4.current=null}function CN(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KZ(n,t),n!==null){n.flags&=32767,Vn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tr=6,Vn=null;return}}else if(n=qZ(n,t,zi),n!==null){Vn=n;return}if(t=t.sibling,t!==null){Vn=t;return}Vn=t=e}while(t!==null);tr===0&&(tr=5)}function Tu(e,t,n){var r=Dt,i=bo.transition;try{bo.transition=null,Dt=1,nJ(e,t,n,r)}finally{bo.transition=i,Dt=r}return null}function nJ(e,t,n,r){do Wd();while(_l!==null);if(yt&6)throw Error(ge(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(ge(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(DQ(e,o),e===pr&&(Vn=pr=null,kr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||u0||(u0=!0,AN(Dv,function(){return Wd(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=bo.transition,bo.transition=null;var s=Dt;Dt=1;var a=yt;yt|=4,N4.current=null,YZ(e,n),vN(n,e),wZ(BC),Fv=!!FC,BC=FC=null,e.current=n,QZ(n),AQ(),yt=a,Dt=s,bo.transition=o}else e.current=n;if(u0&&(u0=!1,_l=e,e1=i),o=e.pendingLanes,o===0&&(Al=null),OQ(n.stateNode),Ei(e,In()),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(Jv)throw Jv=!1,e=o3,o3=null,e;return e1&1&&e.tag!==0&&Wd(),o=e.pendingLanes,o&1?e===s3?Cp++:(Cp=0,s3=e):Cp=0,Ql(),null}function Wd(){if(_l!==null){var e=rM(e1),t=bo.transition,n=Dt;try{if(bo.transition=null,Dt=16>e?16:e,_l===null)var r=!1;else{if(e=_l,_l=null,e1=0,yt&6)throw Error(ge(331));var i=yt;for(yt|=4,Ae=e.current;Ae!==null;){var o=Ae,s=o.child;if(Ae.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Ae=u;Ae!==null;){var d=Ae;switch(d.tag){case 0:case 11:case 15:wp(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ae=f;else for(;Ae!==null;){d=Ae;var p=d.sibling,g=d.return;if(gN(d),d===u){Ae=null;break}if(p!==null){p.return=g,Ae=p;break}Ae=g}}}var m=o.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}Ae=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Ae=s;else e:for(;Ae!==null;){if(o=Ae,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wp(9,o,o.return)}var _=o.sibling;if(_!==null){_.return=o.return,Ae=_;break e}Ae=o.return}}var b=e.current;for(Ae=b;Ae!==null;){s=Ae;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,Ae=y;else e:for(s=b;Ae!==null;){if(a=Ae,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:I_(9,a)}}catch(C){Cn(a,a.return,C)}if(a===s){Ae=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,Ae=S;break e}Ae=a.return}}if(yt=i,Ql(),Es&&typeof Es.onPostCommitFiberRoot=="function")try{Es.onPostCommitFiberRoot(C_,e)}catch{}r=!0}return r}finally{Dt=n,bo.transition=t}}return!1}function R8(e,t,n){t=gf(n,t),t=iN(e,t,1),e=El(e,t,1),t=oi(),e!==null&&(Qg(e,1,t),Ei(e,t))}function Cn(e,t,n){if(e.tag===3)R8(e,e,n);else for(;t!==null;){if(t.tag===3){R8(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Al===null||!Al.has(r))){e=gf(n,e),e=oN(t,e,1),t=El(t,e,1),e=oi(),t!==null&&(Qg(t,1,e),Ei(t,e));break}}t=t.return}}function rJ(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=oi(),e.pingedLanes|=e.suspendedLanes&n,pr===e&&(kr&n)===n&&(tr===4||tr===3&&(kr&130023424)===kr&&500>In()-D4?Uu(e,0):L4|=n),Ei(e,t)}function TN(e,t){t===0&&(e.mode&1?(t=Jy,Jy<<=1,!(Jy&130023424)&&(Jy=4194304)):t=1);var n=oi();e=Ea(e,t),e!==null&&(Qg(e,t,n),Ei(e,n))}function iJ(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),TN(e,n)}function oJ(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(ge(314))}r!==null&&r.delete(t),TN(e,n)}var EN;EN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ci.current)Si=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Si=!1,WZ(e,t,n);Si=!!(e.flags&131072)}else Si=!1,cn&&t.flags&1048576&&RM(t,Hv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;iv(e,t),e=t.pendingProps;var i=df(t,Hr.current);Hd(t,n),i=R4(null,t,r,e,i,n);var o=O4();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,Ti(r)?(o=!0,jv(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C4(t),i.updater=O_,t.stateNode=i,i._reactInternals=t,KC(t,r,e,n),t=QC(null,t,r,!0,o,n)):(t.tag=0,cn&&o&&y4(t),ri(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(iv(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aJ(r),e=$o(r,e),i){case 0:t=YC(null,t,r,e,n);break e;case 1:t=_8(null,t,r,e,n);break e;case 11:t=y8(null,t,r,e,n);break e;case 14:t=v8(null,t,r,$o(r.type,e),n);break e}throw Error(ge(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$o(r,i),YC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$o(r,i),_8(e,t,r,i,n);case 3:e:{if(uN(t),e===null)throw Error(ge(387));r=t.pendingProps,o=t.memoizedState,i=o.element,MM(e,t),Kv(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=gf(Error(ge(423)),t),t=b8(e,t,r,n,i);break e}else if(r!==i){i=gf(Error(ge(424)),t),t=b8(e,t,r,n,i);break e}else for(ji=Tl(t.stateNode.containerInfo.firstChild),Gi=t,cn=!0,zo=null,n=$M(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ff(),r===i){t=Aa(e,t,n);break e}ri(e,t,r,n)}t=t.child}return t;case 5:return FM(t),e===null&&HC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,UC(r,i)?s=null:o!==null&&UC(r,o)&&(t.flags|=32),lN(e,t),ri(e,t,s,n),t.child;case 6:return e===null&&HC(t),null;case 13:return cN(e,t,n);case 4:return T4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hf(t,null,r,n):ri(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$o(r,i),y8(e,t,r,i,n);case 7:return ri(e,t,t.pendingProps,n),t.child;case 8:return ri(e,t,t.pendingProps.children,n),t.child;case 12:return ri(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Zt(Wv,r._currentValue),r._currentValue=s,o!==null)if(Qo(o.value,s)){if(o.children===i.children&&!Ci.current){t=Aa(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ya(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),WC(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ge(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),WC(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ri(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hd(t,n),i=So(i),r=r(i),t.flags|=1,ri(e,t,r,n),t.child;case 14:return r=t.type,i=$o(r,t.pendingProps),i=$o(r.type,i),v8(e,t,r,i,n);case 15:return sN(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$o(r,i),iv(e,t),t.tag=1,Ti(r)?(e=!0,jv(t)):e=!1,Hd(t,n),LM(t,r,i),KC(t,r,i,n),QC(null,t,r,!0,e,n);case 19:return dN(e,t,n);case 22:return aN(e,t,n)}throw Error(ge(156,t.tag))};function AN(e,t){return J7(e,t)}function sJ(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 vo(e,t,n,r){return new sJ(e,t,n,r)}function U4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aJ(e){if(typeof e=="function")return U4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===o4)return 11;if(e===s4)return 14}return 2}function Rl(e,t){var n=e.alternate;return n===null?(n=vo(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 av(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")U4(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Cd:return zu(n.children,i,o,t);case i4:s=8,i|=8;break;case vC:return e=vo(12,n,t,i|2),e.elementType=vC,e.lanes=o,e;case _C:return e=vo(13,n,t,i),e.elementType=_C,e.lanes=o,e;case bC:return e=vo(19,n,t,i),e.elementType=bC,e.lanes=o,e;case D7:return N_(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N7:s=10;break e;case L7:s=9;break e;case o4:s=11;break e;case s4:s=14;break e;case ll:s=16,r=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=vo(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function zu(e,t,n,r){return e=vo(7,e,r,t),e.lanes=n,e}function N_(e,t,n,r){return e=vo(22,e,r,t),e.elementType=D7,e.lanes=n,e.stateNode={isHidden:!1},e}function Qw(e,t,n){return e=vo(6,e,null,t),e.lanes=n,e}function Zw(e,t,n){return t=vo(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lJ(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=Iw(0),this.expirationTimes=Iw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Iw(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function z4(e,t,n,r,i,o,s,a,l){return e=new lJ(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vo(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},C4(o),e}function uJ(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xd,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function PN(e){if(!e)return Dl;e=e._reactInternals;e:{if(hc(e)!==e||e.tag!==1)throw Error(ge(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ti(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ge(171))}if(e.tag===1){var n=e.type;if(Ti(n))return AM(e,n,t)}return t}function RN(e,t,n,r,i,o,s,a,l){return e=z4(n,r,!0,e,i,o,s,a,l),e.context=PN(null),n=e.current,r=oi(),i=Pl(n),o=ya(r,i),o.callback=t??null,El(n,o,i),e.current.lanes=i,Qg(e,i,r),Ei(e,r),e}function L_(e,t,n,r){var i=t.current,o=oi(),s=Pl(i);return n=PN(n),t.context===null?t.context=n:t.pendingContext=n,t=ya(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=El(i,t,s),e!==null&&(Wo(e,i,s,o),tv(e,i,s)),s}function n1(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 O8(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function V4(e,t){O8(e,t),(e=e.alternate)&&O8(e,t)}function cJ(){return null}var ON=typeof reportError=="function"?reportError:function(e){console.error(e)};function j4(e){this._internalRoot=e}D_.prototype.render=j4.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ge(409));L_(e,t,null,null)};D_.prototype.unmount=j4.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ju(function(){L_(null,e,null,null)}),t[Ta]=null}};function D_(e){this._internalRoot=e}D_.prototype.unstable_scheduleHydration=function(e){if(e){var t=sM();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pl.length&&t!==0&&t<pl[n].priority;n++);pl.splice(n,0,e),n===0&&lM(e)}};function G4(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function k8(){}function dJ(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=n1(s);o.call(u)}}var s=RN(t,r,e,0,null,!1,!1,"",k8);return e._reactRootContainer=s,e[Ta]=s.current,Hp(e.nodeType===8?e.parentNode:e),Ju(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=n1(l);a.call(u)}}var l=z4(e,0,!1,null,null,!1,!1,"",k8);return e._reactRootContainer=l,e[Ta]=l.current,Hp(e.nodeType===8?e.parentNode:e),Ju(function(){L_(t,l,n,r)}),l}function F_(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var l=n1(s);a.call(l)}}L_(t,s,e,i)}else s=dJ(n,t,e,i,r);return n1(s)}iM=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lp(t.pendingLanes);n!==0&&(u4(t,n|1),Ei(t,In()),!(yt&6)&&(mf=In()+500,Ql()))}break;case 13:Ju(function(){var r=Ea(e,1);if(r!==null){var i=oi();Wo(r,e,1,i)}}),V4(e,1)}};c4=function(e){if(e.tag===13){var t=Ea(e,134217728);if(t!==null){var n=oi();Wo(t,e,134217728,n)}V4(e,134217728)}};oM=function(e){if(e.tag===13){var t=Pl(e),n=Ea(e,t);if(n!==null){var r=oi();Wo(n,e,t,r)}V4(e,t)}};sM=function(){return Dt};aM=function(e,t){var n=Dt;try{return Dt=e,t()}finally{Dt=n}};OC=function(e,t,n){switch(t){case"input":if(xC(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=P_(r);if(!i)throw Error(ge(90));F7(r),xC(r,i)}}}break;case"textarea":U7(e,n);break;case"select":t=n.value,t!=null&&zd(e,!!n.multiple,t,!1)}};q7=$4;K7=Ju;var fJ={usingClientEntryPoint:!1,Events:[Jg,Pd,P_,H7,W7,$4]},Bh={findFiberByHostInstance:Iu,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},hJ={bundleType:Bh.bundleType,version:Bh.version,rendererPackageName:Bh.rendererPackageName,rendererConfig:Bh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ia.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Q7(e),e===null?null:e.stateNode},findFiberByHostInstance:Bh.findFiberByHostInstance||cJ,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 c0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!c0.isDisabled&&c0.supportsFiber)try{C_=c0.inject(hJ),Es=c0}catch{}}Yi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fJ;Yi.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!G4(t))throw Error(ge(200));return uJ(e,t,null,n)};Yi.createRoot=function(e,t){if(!G4(e))throw Error(ge(299));var n=!1,r="",i=ON;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=z4(e,1,!1,null,null,n,!1,r,i),e[Ta]=t.current,Hp(e.nodeType===8?e.parentNode:e),new j4(t)};Yi.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(ge(188)):(e=Object.keys(e).join(","),Error(ge(268,e)));return e=Q7(t),e=e===null?null:e.stateNode,e};Yi.flushSync=function(e){return Ju(e)};Yi.hydrate=function(e,t,n){if(!$_(t))throw Error(ge(200));return F_(null,e,t,!0,n)};Yi.hydrateRoot=function(e,t,n){if(!G4(e))throw Error(ge(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=ON;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=RN(t,null,e,1,n??null,i,!1,o,s),e[Ta]=t.current,Hp(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 D_(t)};Yi.render=function(e,t,n){if(!$_(t))throw Error(ge(200));return F_(null,e,t,!1,n)};Yi.unmountComponentAtNode=function(e){if(!$_(e))throw Error(ge(40));return e._reactRootContainer?(Ju(function(){F_(null,null,e,!1,function(){e._reactRootContainer=null,e[Ta]=null})}),!0):!1};Yi.unstable_batchedUpdates=$4;Yi.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$_(n))throw Error(ge(200));if(e==null||e._reactInternals===void 0)throw Error(ge(38));return F_(e,t,n,!1,r)};Yi.version="18.2.0-next-9e3b772b8-20220608";function kN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kN)}catch(e){console.error(e)}}kN(),R7.exports=Yi;var bs=R7.exports;const K9e=dc(bs);var I8=bs;mC.createRoot=I8.createRoot,mC.hydrateRoot=I8.hydrateRoot;const pJ="modulepreload",gJ=function(e,t){return new URL(e,t).href},M8={},IN=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=gJ(o,r),o in M8)return;M8[o]=!0;const s=o.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let d=i.length-1;d>=0;d--){const f=i[d];if(f.href===o&&(!s||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":pJ,s||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),s)return new Promise((d,f)=>{u.addEventListener("load",d),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};function hr(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 ai(e){return!!e&&!!e[Xe]}function Ai(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)===xJ}(e)||Array.isArray(e)||!!e[qd]||!!(!((t=e.constructor)===null||t===void 0)&&t[qd])||B_(e)||U_(e))}function H4(e){return ai(e)||hr(23,e),e[Xe].t}function Pa(e,t,n){n===void 0&&(n=!1),$l(e)===0?(n?Object.keys:Kd)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function $l(e){var t=e[Xe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:B_(e)?2:U_(e)?3:0}function Ol(e,t){return $l(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lv(e,t){return $l(e)===2?e.get(t):e[t]}function MN(e,t,n){var r=$l(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function NN(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function B_(e){return SJ&&e instanceof Map}function U_(e){return wJ&&e instanceof Set}function lr(e){return e.o||e.t}function W4(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=DN(e);delete t[Xe];for(var n=Kd(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 tm(e,t){return t===void 0&&(t=!1),q4(e)||ai(e)||!Ai(e)||($l(e)>1&&(e.set=e.add=e.clear=e.delete=mJ),Object.freeze(e),t&&Pa(e,function(n,r){return tm(r,!0)},!0)),e}function mJ(){hr(2)}function q4(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ps(e){var t=c3[e];return t||hr(18,e),t}function K4(e,t){c3[e]||(c3[e]=t)}function eg(){return ng}function Jw(e,t){t&&(Ps("Patches"),e.u=[],e.s=[],e.v=t)}function r1(e){u3(e),e.p.forEach(yJ),e.p=null}function u3(e){e===ng&&(ng=e.l)}function N8(e){return ng={p:[],l:ng,h:e,m:!0,_:0}}function yJ(e){var t=e[Xe];t.i===0||t.i===1?t.j():t.g=!0}function ex(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Ps("ES5").S(t,e,r),r?(n[Xe].P&&(r1(t),hr(4)),Ai(e)&&(e=i1(t,e),t.l||o1(t,e)),t.u&&Ps("Patches").M(n[Xe].t,e,t.u,t.s)):e=i1(t,n,[]),r1(t),t.u&&t.v(t.u,t.s),e!==V_?e:void 0}function i1(e,t,n){if(q4(t))return t;var r=t[Xe];if(!r)return Pa(t,function(a,l){return L8(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return o1(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=W4(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),Pa(o,function(a,l){return L8(e,r,i,a,l,n,s)}),o1(e,i,!1),n&&e.u&&Ps("Patches").N(r,n,e.u,e.s)}return r.o}function L8(e,t,n,r,i,o,s){if(ai(i)){var a=i1(e,i,o&&t&&t.i!==3&&!Ol(t.R,r)?o.concat(r):void 0);if(MN(n,r,a),!ai(a))return;e.m=!1}else s&&n.add(i);if(Ai(i)&&!q4(i)){if(!e.h.D&&e._<1)return;i1(e,i),t&&t.A.l||o1(e,i)}}function o1(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&tm(t,n)}function tx(e,t){var n=e[Xe];return(n?lr(n):e)[t]}function D8(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 bi(e){e.P||(e.P=!0,e.l&&bi(e.l))}function nx(e){e.o||(e.o=W4(e.t))}function tg(e,t,n){var r=B_(t)?Ps("MapSet").F(t,n):U_(t)?Ps("MapSet").T(t,n):e.O?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:eg(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,u=rg;s&&(l=[a],u=cp);var d=Proxy.revocable(l,u),f=d.revoke,p=d.proxy;return a.k=p,a.j=f,p}(t,n):Ps("ES5").J(t,n);return(n?n.A:eg()).p.push(r),r}function z_(e){return ai(e)||hr(22,e),function t(n){if(!Ai(n))return n;var r,i=n[Xe],o=$l(n);if(i){if(!i.P&&(i.i<4||!Ps("ES5").K(i)))return i.t;i.I=!0,r=$8(n,o),i.I=!1}else r=$8(n,o);return Pa(r,function(s,a){i&&lv(i.t,s)===a||MN(r,s,t(a))}),o===3?new Set(r):r}(e)}function $8(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return W4(e)}function X4(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[Xe];return rg.get(l,o)},set:function(l){var u=this[Xe];rg.set(u,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][Xe];if(!a.P)switch(a.i){case 5:r(a)&&bi(a);break;case 4:n(a)&&bi(a)}}}function n(o){for(var s=o.t,a=o.k,l=Kd(a),u=l.length-1;u>=0;u--){var d=l[u];if(d!==Xe){var f=s[d];if(f===void 0&&!Ol(s,d))return!0;var p=a[d],g=p&&p[Xe];if(g?g.t!==f:!NN(p,f))return!0}}var m=!!s[Xe];return l.length!==Kd(s).length+(m?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l<s.length;l++)if(!s.hasOwnProperty(l))return!0;return!1}var i={};K4("ES5",{J:function(o,s){var a=Array.isArray(o),l=function(d,f){if(d){for(var p=Array(f.length),g=0;g<f.length;g++)Object.defineProperty(p,""+g,e(g,!0));return p}var m=DN(f);delete m[Xe];for(var v=Kd(m),x=0;x<v.length;x++){var _=v[x];m[_]=e(_,d||!!m[_].enumerable)}return Object.create(Object.getPrototypeOf(f),m)}(a,o),u={i:a?5:4,A:s?s.A:eg(),P:!1,I:!1,R:{},l:s,t:o,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,Xe,{value:u,writable:!0}),l},S:function(o,s,a){a?ai(s)&&s[Xe].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var d=u[Xe];if(d){var f=d.t,p=d.k,g=d.R,m=d.i;if(m===4)Pa(p,function(y){y!==Xe&&(f[y]!==void 0||Ol(f,y)?g[y]||l(p[y]):(g[y]=!0,bi(d)))}),Pa(f,function(y){p[y]!==void 0||Ol(p,y)||(g[y]=!1,bi(d))});else if(m===5){if(r(d)&&(bi(d),g.length=!0),p.length<f.length)for(var v=p.length;v<f.length;v++)g[v]=!1;else for(var x=f.length;x<p.length;x++)g[x]=!0;for(var _=Math.min(p.length,f.length),b=0;b<_;b++)p.hasOwnProperty(b)||(g[b]=!0),g[b]===void 0&&l(p[b])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}function Y4(){function e(r){if(!Ai(r))return r;if(Array.isArray(r))return r.map(e);if(B_(r))return new Map(Array.from(r.entries()).map(function(s){return[s[0],e(s[1])]}));if(U_(r))return new Set(Array.from(r).map(e));var i=Object.create(Object.getPrototypeOf(r));for(var o in r)i[o]=e(r[o]);return Ol(r,qd)&&(i[qd]=r[qd]),i}function t(r){return ai(r)?e(r):r}var n="add";K4("Patches",{$:function(r,i){return i.forEach(function(o){for(var s=o.path,a=o.op,l=r,u=0;u<s.length-1;u++){var d=$l(l),f=s[u];typeof f!="string"&&typeof f!="number"&&(f=""+f),d!==0&&d!==1||f!=="__proto__"&&f!=="constructor"||hr(24),typeof l=="function"&&f==="prototype"&&hr(24),typeof(l=lv(l,f))!="object"&&hr(15,s.join("/"))}var p=$l(l),g=e(o.value),m=s[s.length-1];switch(a){case"replace":switch(p){case 2:return l.set(m,g);case 3:hr(16);default:return l[m]=g}case n:switch(p){case 1:return m==="-"?l.push(g):l.splice(m,0,g);case 2:return l.set(m,g);case 3:return l.add(g);default:return l[m]=g}case"remove":switch(p){case 1:return l.splice(m,1);case 2:return l.delete(m);case 3:return l.delete(o.value);default:return delete l[m]}default:hr(17,a)}}),r},N:function(r,i,o,s){switch(r.i){case 0:case 4:case 2:return function(a,l,u,d){var f=a.t,p=a.o;Pa(a.R,function(g,m){var v=lv(f,g),x=lv(p,g),_=m?Ol(f,g)?"replace":n:"remove";if(v!==x||_!=="replace"){var b=l.concat(g);u.push(_==="remove"?{op:_,path:b}:{op:_,path:b,value:x}),d.push(_===n?{op:"remove",path:b}:_==="remove"?{op:n,path:b,value:t(v)}:{op:"replace",path:b,value:t(v)})}})}(r,i,o,s);case 5:case 1:return function(a,l,u,d){var f=a.t,p=a.R,g=a.o;if(g.length<f.length){var m=[g,f];f=m[0],g=m[1];var v=[d,u];u=v[0],d=v[1]}for(var x=0;x<f.length;x++)if(p[x]&&g[x]!==f[x]){var _=l.concat([x]);u.push({op:"replace",path:_,value:t(g[x])}),d.push({op:"replace",path:_,value:t(f[x])})}for(var b=f.length;b<g.length;b++){var y=l.concat([b]);u.push({op:n,path:y,value:t(g[b])})}f.length<g.length&&d.push({op:"replace",path:l.concat(["length"]),value:f.length})}(r,i,o,s);case 3:return function(a,l,u,d){var f=a.t,p=a.o,g=0;f.forEach(function(m){if(!p.has(m)){var v=l.concat([g]);u.push({op:"remove",path:v,value:m}),d.unshift({op:n,path:v,value:m})}g++}),g=0,p.forEach(function(m){if(!f.has(m)){var v=l.concat([g]);u.push({op:n,path:v,value:m}),d.unshift({op:"remove",path:v,value:m})}g++})}(r,i,o,s)}},M:function(r,i,o,s){o.push({op:"replace",path:[],value:i===V_?void 0:i}),s.push({op:"replace",path:[],value:r})}})}function LN(){function e(a,l){function u(){this.constructor=a}i(a,l),a.prototype=(u.prototype=l.prototype,new u)}function t(a){a.o||(a.R=new Map,a.o=new Map(a.t))}function n(a){a.o||(a.o=new Set,a.t.forEach(function(l){if(Ai(l)){var u=tg(a.A.h,l,a);a.p.set(l,u),a.o.add(u)}else a.o.add(l)}))}function r(a){a.g&&hr(3,JSON.stringify(lr(a)))}var i=function(a,l){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)d.hasOwnProperty(f)&&(u[f]=d[f])})(a,l)},o=function(){function a(u,d){return this[Xe]={i:2,l:d,A:d?d.A:eg(),P:!1,I:!1,o:void 0,R:void 0,t:u,k:this,C:!1,g:!1},this}e(a,Map);var l=a.prototype;return Object.defineProperty(l,"size",{get:function(){return lr(this[Xe]).size}}),l.has=function(u){return lr(this[Xe]).has(u)},l.set=function(u,d){var f=this[Xe];return r(f),lr(f).has(u)&&lr(f).get(u)===d||(t(f),bi(f),f.R.set(u,!0),f.o.set(u,d),f.R.set(u,!0)),this},l.delete=function(u){if(!this.has(u))return!1;var d=this[Xe];return r(d),t(d),bi(d),d.t.has(u)?d.R.set(u,!1):d.R.delete(u),d.o.delete(u),!0},l.clear=function(){var u=this[Xe];r(u),lr(u).size&&(t(u),bi(u),u.R=new Map,Pa(u.t,function(d){u.R.set(d,!1)}),u.o.clear())},l.forEach=function(u,d){var f=this;lr(this[Xe]).forEach(function(p,g){u.call(d,f.get(g),g,f)})},l.get=function(u){var d=this[Xe];r(d);var f=lr(d).get(u);if(d.I||!Ai(f)||f!==d.t.get(u))return f;var p=tg(d.A.h,f,d);return t(d),d.o.set(u,p),p},l.keys=function(){return lr(this[Xe]).keys()},l.values=function(){var u,d=this,f=this.keys();return(u={})[d0]=function(){return d.values()},u.next=function(){var p=f.next();return p.done?p:{done:!1,value:d.get(p.value)}},u},l.entries=function(){var u,d=this,f=this.keys();return(u={})[d0]=function(){return d.entries()},u.next=function(){var p=f.next();if(p.done)return p;var g=d.get(p.value);return{done:!1,value:[p.value,g]}},u},l[d0]=function(){return this.entries()},a}(),s=function(){function a(u,d){return this[Xe]={i:3,l:d,A:d?d.A:eg(),P:!1,I:!1,o:void 0,t:u,k:this,p:new Map,g:!1,C:!1},this}e(a,Set);var l=a.prototype;return Object.defineProperty(l,"size",{get:function(){return lr(this[Xe]).size}}),l.has=function(u){var d=this[Xe];return r(d),d.o?!!d.o.has(u)||!(!d.p.has(u)||!d.o.has(d.p.get(u))):d.t.has(u)},l.add=function(u){var d=this[Xe];return r(d),this.has(u)||(n(d),bi(d),d.o.add(u)),this},l.delete=function(u){if(!this.has(u))return!1;var d=this[Xe];return r(d),n(d),bi(d),d.o.delete(u)||!!d.p.has(u)&&d.o.delete(d.p.get(u))},l.clear=function(){var u=this[Xe];r(u),lr(u).size&&(n(u),bi(u),u.o.clear())},l.values=function(){var u=this[Xe];return r(u),n(u),u.o.values()},l.entries=function(){var u=this[Xe];return r(u),n(u),u.o.entries()},l.keys=function(){return this.values()},l[d0]=function(){return this.values()},l.forEach=function(u,d){for(var f=this.values(),p=f.next();!p.done;)u.call(d,p.value,p.value,this),p=f.next()},a}();K4("MapSet",{F:function(a,l){return new o(a,l)},T:function(a,l){return new s(a,l)}})}function vJ(){X4(),LN(),Y4()}function _J(e){return e}function bJ(e){return e}var F8,ng,Q4=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",SJ=typeof Map<"u",wJ=typeof Set<"u",B8=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",V_=Q4?Symbol.for("immer-nothing"):((F8={})["immer-nothing"]=!0,F8),qd=Q4?Symbol.for("immer-draftable"):"__$immer_draftable",Xe=Q4?Symbol.for("immer-state"):"__$immer_state",d0=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",xJ=""+Object.prototype.constructor,Kd=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,DN=Object.getOwnPropertyDescriptors||function(e){var t={};return Kd(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},c3={},rg={get:function(e,t){if(t===Xe)return e;var n=lr(e);if(!Ol(n,t))return function(i,o,s){var a,l=D8(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Ai(r)?r:r===tx(e.t,t)?(nx(e),e.o[t]=tg(e.A.h,r,e)):r},has:function(e,t){return t in lr(e)},ownKeys:function(e){return Reflect.ownKeys(lr(e))},set:function(e,t,n){var r=D8(lr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=tx(lr(e),t),o=i==null?void 0:i[Xe];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(NN(n,i)&&(n!==void 0||Ol(e.t,t)))return!0;nx(e),bi(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return tx(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,nx(e),bi(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=lr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){hr(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){hr(12)}},cp={};Pa(rg,function(e,t){cp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),cp.deleteProperty=function(e,t){return cp.set.call(this,e,t,void 0)},cp.set=function(e,t,n){return rg.set.call(this,e[0],t,n,e[0])};var $N=function(){function e(n){var r=this;this.O=B8,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=r;return function(v){var x=this;v===void 0&&(v=a);for(var _=arguments.length,b=Array(_>1?_-1:0),y=1;y<_;y++)b[y-1]=arguments[y];return l.produce(v,function(S){var C;return(C=o).call.apply(C,[x,S].concat(b))})}}var u;if(typeof o!="function"&&hr(6),s!==void 0&&typeof s!="function"&&hr(7),Ai(i)){var d=N8(r),f=tg(r,i,void 0),p=!0;try{u=o(f),p=!1}finally{p?r1(d):u3(d)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Jw(d,s),ex(v,d)},function(v){throw r1(d),v}):(Jw(d,s),ex(u,d))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===V_&&(u=void 0),r.D&&tm(u,!0),s){var g=[],m=[];Ps("Patches").M(i,u,g,m),s(g,m)}return u}hr(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var d=arguments.length,f=Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];return r.produceWithPatches(u,function(g){return i.apply(void 0,[g].concat(f))})};var s,a,l=r.produce(i,o,function(u,d){s=u,a=d});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Ai(n)||hr(8),ai(n)&&(n=z_(n));var r=N8(this),i=tg(this,n,void 0);return i[Xe].C=!0,u3(r),i},t.finishDraft=function(n,r){var i=n&&n[Xe],o=i.A;return Jw(o,r),ex(void 0,o)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!B8&&hr(20),this.O=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 s=Ps("Patches").$;return ai(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),qi=new $N,FN=qi.produce,Z4=qi.produceWithPatches.bind(qi),CJ=qi.setAutoFreeze.bind(qi),TJ=qi.setUseProxies.bind(qi),d3=qi.applyPatches.bind(qi),EJ=qi.createDraft.bind(qi),AJ=qi.finishDraft.bind(qi);const Zl=FN,X9e=Object.freeze(Object.defineProperty({__proto__:null,Immer:$N,applyPatches:d3,castDraft:_J,castImmutable:bJ,createDraft:EJ,current:z_,default:Zl,enableAllPlugins:vJ,enableES5:X4,enableMapSet:LN,enablePatches:Y4,finishDraft:AJ,freeze:tm,immerable:qd,isDraft:ai,isDraftable:Ai,nothing:V_,original:H4,produce:FN,produceWithPatches:Z4,setAutoFreeze:CJ,setUseProxies:TJ},Symbol.toStringTag,{value:"Module"}));function ig(e){"@babel/helpers - typeof";return ig=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ig(e)}function PJ(e,t){if(ig(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ig(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RJ(e){var t=PJ(e,"string");return ig(t)==="symbol"?t:String(t)}function OJ(e,t,n){return t=RJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U8(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 z8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U8(Object(n),!0).forEach(function(r){OJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pr(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 V8=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),rx=function(){return Math.random().toString(36).substring(7).split("").join(".")},yf={INIT:"@@redux/INIT"+rx(),REPLACE:"@@redux/REPLACE"+rx(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+rx()}};function kJ(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 nm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Pr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Pr(1));return n(nm)(e,t)}if(typeof e!="function")throw new Error(Pr(2));var i=e,o=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function d(){if(l)throw new Error(Pr(3));return o}function f(v){if(typeof v!="function")throw new Error(Pr(4));if(l)throw new Error(Pr(5));var x=!0;return u(),a.push(v),function(){if(x){if(l)throw new Error(Pr(6));x=!1,u();var b=a.indexOf(v);a.splice(b,1),s=null}}}function p(v){if(!kJ(v))throw new Error(Pr(7));if(typeof v.type>"u")throw new Error(Pr(8));if(l)throw new Error(Pr(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var x=s=a,_=0;_<x.length;_++){var b=x[_];b()}return v}function g(v){if(typeof v!="function")throw new Error(Pr(10));i=v,p({type:yf.REPLACE})}function m(){var v,x=f;return v={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(Pr(11));function y(){b.next&&b.next(d())}y();var S=x(y);return{unsubscribe:S}}},v[V8]=function(){return this},v}return p({type:yf.INIT}),r={dispatch:p,subscribe:f,getState:d,replaceReducer:g},r[V8]=m,r}var BN=nm;function IJ(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:yf.INIT});if(typeof r>"u")throw new Error(Pr(12));if(typeof n(void 0,{type:yf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pr(13))})}function Ff(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),s;try{IJ(n)}catch(a){s=a}return function(l,u){if(l===void 0&&(l={}),s)throw s;for(var d=!1,f={},p=0;p<o.length;p++){var g=o[p],m=n[g],v=l[g],x=m(v,u);if(typeof x>"u")throw u&&u.type,new Error(Pr(14));f[g]=x,d=d||x!==v}return d=d||o.length!==Object.keys(l).length,d?f:l}}function j8(e,t){return function(){return t(e.apply(this,arguments))}}function UN(e,t){if(typeof e=="function")return j8(e,t);if(typeof e!="object"||e===null)throw new Error(Pr(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=j8(i,t))}return n}function vf(){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 J4(){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(Pr(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=vf.apply(void 0,a)(i.dispatch),z8(z8({},i),{},{dispatch:o})}}}const MJ=Object.freeze(Object.defineProperty({__proto__:null,__DO_NOT_USE__ActionTypes:yf,applyMiddleware:J4,bindActionCreators:UN,combineReducers:Ff,compose:vf,createStore:nm,legacy_createStore:BN},Symbol.toStringTag,{value:"Module"}));var s1="NOT_FOUND";function NJ(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:s1},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function LJ(e,t){var n=[];function r(a){var l=n.findIndex(function(d){return t(a,d.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return s1}function i(a,l){r(a)===s1&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function o(){return n}function s(){n=[]}return{get:r,put:i,getEntries:o,clear:s}}var zN=function(t,n){return t===n};function DJ(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 a1(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?zN:r,o=n.maxSize,s=o===void 0?1:o,a=n.resultEqualityCheck,l=DJ(i),u=s===1?NJ(l):LJ(s,l);function d(){var f=u.get(arguments);if(f===s1){if(f=e.apply(null,arguments),a){var p=u.getEntries(),g=p.find(function(m){return a(m.value,f)});g&&(f=g.value)}u.put(arguments,f)}return f}return d.clearCache=function(){return u.clear()},d}function $J(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 VN(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 s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];var u=0,d,f={memoizeOptions:void 0},p=a.pop();if(typeof p=="object"&&(f=p,p=a.pop()),typeof p!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof p+"]");var g=f,m=g.memoizeOptions,v=m===void 0?n:m,x=Array.isArray(v)?v:[v],_=$J(a),b=e.apply(void 0,[function(){return u++,p.apply(null,arguments)}].concat(x)),y=e(function(){for(var C=[],T=_.length,E=0;E<T;E++)C.push(_[E].apply(null,arguments));return d=b.apply(null,C),d});return Object.assign(y,{resultFunc:p,memoizedResultFunc:b,dependencies:_,lastResult:function(){return d},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),y};return i}var si=VN(a1),FJ=function(t,n){if(n===void 0&&(n=si),typeof t!="object")throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof t));var r=Object.keys(t),i=n(r.map(function(o){return t[o]}),function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return s.reduce(function(l,u,d){return l[r[d]]=u,l},{})});return i};const Y9e=Object.freeze(Object.defineProperty({__proto__:null,createSelector:si,createSelectorCreator:VN,createStructuredSelector:FJ,defaultEqualityCheck:zN,defaultMemoize:a1},Symbol.toStringTag,{value:"Module"}));function jN(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,e):s(a)}}};return t}var GN=jN();GN.withExtraArgument=jN;const G8=GN;var HN=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)}}(),rm=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,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return l([u,d])}}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(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Fl=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},BJ=Object.defineProperty,UJ=Object.defineProperties,zJ=Object.getOwnPropertyDescriptors,H8=Object.getOwnPropertySymbols,VJ=Object.prototype.hasOwnProperty,jJ=Object.prototype.propertyIsEnumerable,W8=function(e,t,n){return t in e?BJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},wi=function(e,t){for(var n in t||(t={}))VJ.call(t,n)&&W8(e,n,t[n]);if(H8)for(var r=0,i=H8(t);r<i.length;r++){var n=i[r];jJ.call(t,n)&&W8(e,n,t[n])}return e},ix=function(e,t){return UJ(e,zJ(t))},im=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{a(n.next(l))}catch(u){i(u)}},s=function(l){try{a(n.throw(l))}catch(u){i(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,s)};a((n=n.apply(e,t)).next())})},oa=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=si.apply(void 0,e),r=function(i){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return n.apply(void 0,Fl([ai(i)?z_(i):i],o))};return r},GJ=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vf:vf.apply(null,arguments)};function Zo(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 WN=function(e){HN(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,Fl([void 0],n[0].concat(this)))):new(t.bind.apply(t,Fl([void 0],n.concat(this))))},t}(Array),qN=function(e){HN(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,Fl([void 0],n[0].concat(this)))):new(t.bind.apply(t,Fl([void 0],n.concat(this))))},t}(Array);function f3(e){return Ai(e)?Zl(e,function(){}):e}function HJ(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function WJ(e){return function(){return function(t){return function(n){return t(n)}}}}function KN(e){var t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Zo(e)}function XN(e,t,n,r,i,o){t===void 0&&(t=""),n===void 0&&(n=KN),i===void 0&&(i=[]);var s;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||o!=null&&o.has(e))return!1;for(var a=r!=null?r(e):Object.entries(e),l=i.length>0,u=function(x,_){var b=t?t+"."+x:x;if(l){var y=i.some(function(S){return S instanceof RegExp?S.test(b):b===S});if(y)return"continue"}if(!n(_))return{value:{keyPath:b,value:_}};if(typeof _=="object"&&(s=XN(_,b,n,r,i,o),s))return{value:s}},d=0,f=a;d<f.length;d++){var p=f[d],g=p[0],m=p[1],v=u(g,m);if(typeof v=="object")return v.value}return o&&YN(e)&&o.add(e),!1}function YN(e){if(!Object.isFrozen(e))return!1;for(var t=0,n=Object.values(e);t<n.length;t++){var r=n[t];if(!(typeof r!="object"||r===null)&&!YN(r))return!1}return!0}function qJ(e){return function(){return function(t){return function(n){return t(n)}}}}function KJ(e){return typeof e=="boolean"}function XJ(){return function(t){return QN(t)}}function QN(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new WN;return n&&(KJ(n)?r.push(G8):r.push(G8.withExtraArgument(n.extraArgument))),r}var YJ=!0;function ZN(e){var t=XJ(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,s=o===void 0?t():o,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,d=u===void 0?void 0:u,f=n.enhancers,p=f===void 0?void 0:f,g;if(typeof i=="function")g=i;else if(Zo(i))g=Ff(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 m=s;typeof m=="function"&&(m=m(t));var v=J4.apply(void 0,m),x=vf;l&&(x=GJ(wi({trace:!YJ},typeof l=="object"&&l)));var _=new qN(v),b=_;Array.isArray(p)?b=Fl([v],p):typeof p=="function"&&(b=p(_));var y=x.apply(void 0,b);return nm(g,d,y)}function Re(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 wi(wi({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 eT(e){return Zo(e)&&"type"in e}function JN(e){return eT(e)&&typeof e.type=="string"&&Object.keys(e).every(QJ)}function QJ(e){return["type","payload","error","meta"].indexOf(e)>-1}function ZJ(e){return""+e}function eL(e){var t={},n=[],r,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(a in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[a]=s,i},addMatcher:function(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function JJ(e){return typeof e=="function"}function tL(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?eL(t):[t,n,r],o=i[0],s=i[1],a=i[2],l;if(JJ(e))l=function(){return f3(e())};else{var u=f3(e);l=function(){return u}}function d(f,p){f===void 0&&(f=l());var g=Fl([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return g.filter(function(m){return!!m}).length===0&&(g=[a]),g.reduce(function(m,v){if(v)if(ai(m)){var x=m,_=v(x,p);return _===void 0?m:_}else{if(Ai(m))return Zl(m,function(b){return v(b,p)});var _=v(m,p);if(_===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return m},f)}return d.getInitialState=l,d}function eee(e,t){return e+"/"+t}function yn(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:f3(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},s={},a={};i.forEach(function(d){var f=r[d],p=eee(t,d),g,m;"reducer"in f?(g=f.reducer,m=f.prepare):g=f,o[d]=g,s[p]=g,a[d]=m?Re(p,m):Re(p)});function l(){var d=typeof e.extraReducers=="function"?eL(e.extraReducers):[e.extraReducers],f=d[0],p=f===void 0?{}:f,g=d[1],m=g===void 0?[]:g,v=d[2],x=v===void 0?void 0:v,_=wi(wi({},p),s);return tL(n,function(b){for(var y in _)b.addCase(y,_[y]);for(var S=0,C=m;S<C.length;S++){var T=C[S];b.addMatcher(T.matcher,T.reducer)}x&&b.addDefaultCase(x)})}var u;return{name:t,reducer:function(d,f){return u||(u=l()),u(d,f)},actions:a,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}function tee(){return{ids:[],entities:{}}}function nee(){function e(t){return t===void 0&&(t={}),Object.assign(tee(),t)}return{getInitialState:e}}function ree(){function e(t){var n=function(u){return u.ids},r=function(u){return u.entities},i=oa(n,r,function(u,d){return u.map(function(f){return d[f]})}),o=function(u,d){return d},s=function(u,d){return u[d]},a=oa(n,function(u){return u.length});if(!t)return{selectIds:n,selectEntities:r,selectAll:i,selectTotal:a,selectById:oa(r,o,s)};var l=oa(t,r);return{selectIds:oa(t,n),selectEntities:l,selectAll:oa(t,i),selectTotal:oa(t,a),selectById:oa(l,o,s)}}return{getSelectors:e}}function iee(e){var t=On(function(n,r){return e(r)});return function(r){return t(r,void 0)}}function On(e){return function(n,r){function i(s){return JN(s)}var o=function(s){i(r)?e(r.payload,s):e(r,s)};return ai(n)?(o(n),n):Zl(n,o)}}function Tp(e,t){var n=t(e);return n}function Vu(e){return Array.isArray(e)||(e=Object.values(e)),e}function nL(e,t,n){e=Vu(e);for(var r=[],i=[],o=0,s=e;o<s.length;o++){var a=s[o],l=Tp(a,t);l in n.entities?i.push({id:l,changes:a}):r.push(a)}return[r,i]}function rL(e){function t(m,v){var x=Tp(m,e);x in v.entities||(v.ids.push(x),v.entities[x]=m)}function n(m,v){m=Vu(m);for(var x=0,_=m;x<_.length;x++){var b=_[x];t(b,v)}}function r(m,v){var x=Tp(m,e);x in v.entities||v.ids.push(x),v.entities[x]=m}function i(m,v){m=Vu(m);for(var x=0,_=m;x<_.length;x++){var b=_[x];r(b,v)}}function o(m,v){m=Vu(m),v.ids=[],v.entities={},n(m,v)}function s(m,v){return a([m],v)}function a(m,v){var x=!1;m.forEach(function(_){_ in v.entities&&(delete v.entities[_],x=!0)}),x&&(v.ids=v.ids.filter(function(_){return _ in v.entities}))}function l(m){Object.assign(m,{ids:[],entities:{}})}function u(m,v,x){var _=x.entities[v.id],b=Object.assign({},_,v.changes),y=Tp(b,e),S=y!==v.id;return S&&(m[v.id]=y,delete x.entities[v.id]),x.entities[y]=b,S}function d(m,v){return f([m],v)}function f(m,v){var x={},_={};m.forEach(function(S){S.id in v.entities&&(_[S.id]={id:S.id,changes:wi(wi({},_[S.id]?_[S.id].changes:null),S.changes)})}),m=Object.values(_);var b=m.length>0;if(b){var y=m.filter(function(S){return u(x,S,v)}).length>0;y&&(v.ids=Object.keys(v.entities))}}function p(m,v){return g([m],v)}function g(m,v){var x=nL(m,e,v),_=x[0],b=x[1];f(b,v),n(_,v)}return{removeAll:iee(l),addOne:On(t),addMany:On(n),setOne:On(r),setMany:On(i),setAll:On(o),updateOne:On(d),updateMany:On(f),upsertOne:On(p),upsertMany:On(g),removeOne:On(s),removeMany:On(a)}}function oee(e,t){var n=rL(e),r=n.removeOne,i=n.removeMany,o=n.removeAll;function s(b,y){return a([b],y)}function a(b,y){b=Vu(b);var S=b.filter(function(C){return!(Tp(C,e)in y.entities)});S.length!==0&&x(S,y)}function l(b,y){return u([b],y)}function u(b,y){b=Vu(b),b.length!==0&&x(b,y)}function d(b,y){b=Vu(b),y.entities={},y.ids=[],a(b,y)}function f(b,y){return p([b],y)}function p(b,y){for(var S=!1,C=0,T=b;C<T.length;C++){var E=T[C],P=y.entities[E.id];if(P){S=!0,Object.assign(P,E.changes);var k=e(P);E.id!==k&&(delete y.entities[E.id],y.entities[k]=P)}}S&&_(y)}function g(b,y){return m([b],y)}function m(b,y){var S=nL(b,e,y),C=S[0],T=S[1];p(T,y),a(C,y)}function v(b,y){if(b.length!==y.length)return!1;for(var S=0;S<b.length&&S<y.length;S++)if(b[S]!==y[S])return!1;return!0}function x(b,y){b.forEach(function(S){y.entities[e(S)]=S}),_(y)}function _(b){var y=Object.values(b.entities);y.sort(t);var S=y.map(e),C=b.ids;v(C,S)||(b.ids=S)}return{removeOne:r,removeMany:i,removeAll:o,addOne:On(s),updateOne:On(f),upsertOne:On(g),setOne:On(l),setMany:On(u),setAll:On(d),addMany:On(a),updateMany:On(p),upsertMany:On(m)}}function Jl(e){e===void 0&&(e={});var t=wi({sortComparer:!1,selectId:function(a){return a.id}},e),n=t.selectId,r=t.sortComparer,i=nee(),o=ree(),s=r?oee(n,r):rL(n);return wi(wi(wi({selectId:n,sortComparer:r},i),o),s)}var see="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",j_=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=see[Math.random()*64|0];return t},aee=["name","message","stack","code"],ox=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),q8=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),iL=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=aee;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},Bl=function(){function e(t,n,r){var i=Re(t+"/fulfilled",function(u,d,f,p){return{payload:u,meta:ix(wi({},p||{}),{arg:f,requestId:d,requestStatus:"fulfilled"})}}),o=Re(t+"/pending",function(u,d,f){return{payload:void 0,meta:ix(wi({},f||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Re(t+"/rejected",function(u,d,f,p,g){return{payload:p,error:(r&&r.serializeError||iL)(u||"Rejected"),meta:ix(wi({},g||{}),{arg:f,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),a=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(d,f,p){var g=r!=null&&r.idGenerator?r.idGenerator(u):j_(),m=new a,v;function x(b){v=b,m.abort()}var _=function(){return im(this,null,function(){var b,y,S,C,T,E,P;return rm(this,function(k){switch(k.label){case 0:return k.trys.push([0,4,,5]),C=(b=r==null?void 0:r.condition)==null?void 0:b.call(r,u,{getState:f,extra:p}),lee(C)?[4,C]:[3,2];case 1:C=k.sent(),k.label=2;case 2:if(C===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=new Promise(function(O,M){return m.signal.addEventListener("abort",function(){return M({name:"AbortError",message:v||"Aborted"})})}),d(o(g,u,(y=r==null?void 0:r.getPendingMeta)==null?void 0:y.call(r,{requestId:g,arg:u},{getState:f,extra:p}))),[4,Promise.race([T,Promise.resolve(n(u,{dispatch:d,getState:f,extra:p,requestId:g,signal:m.signal,abort:x,rejectWithValue:function(O,M){return new ox(O,M)},fulfillWithValue:function(O,M){return new q8(O,M)}})).then(function(O){if(O instanceof ox)throw O;return O instanceof q8?i(O.payload,g,u,O.meta):i(O,g,u)})])];case 3:return S=k.sent(),[3,5];case 4:return E=k.sent(),S=E instanceof ox?s(null,g,u,E.payload,E.meta):s(E,g,u),[3,5];case 5:return P=r&&!r.dispatchConditionRejection&&s.match(S)&&S.meta.condition,P||d(S),[2,S]}})})}();return Object.assign(_,{abort:x,requestId:g,arg:u,unwrap:function(){return _.then(oL)}})}}return Object.assign(l,{pending:o,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function oL(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function lee(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var uee=function(e){return e&&typeof e.match=="function"},sL=function(e,t){return uee(e)?e.match(t):e(t)};function Co(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return e.some(function(r){return sL(r,n)})}}function Xd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return e.every(function(r){return sL(r,n)})}}function G_(e,t){if(!e||!e.meta)return!1;var n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function om(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function H_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return G_(n,["pending"])}:om(e)?function(n){var r=e.map(function(o){return o.pending}),i=Co.apply(void 0,r);return i(n)}:H_()(e[0])}function _f(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return G_(n,["rejected"])}:om(e)?function(n){var r=e.map(function(o){return o.rejected}),i=Co.apply(void 0,r);return i(n)}:_f()(e[0])}function sm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(r){return r&&r.meta&&r.meta.rejectedWithValue};return e.length===0?function(r){var i=Xd(_f.apply(void 0,e),n);return i(r)}:om(e)?function(r){var i=Xd(_f.apply(void 0,e),n);return i(r)}:sm()(e[0])}function eu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return G_(n,["fulfilled"])}:om(e)?function(n){var r=e.map(function(o){return o.fulfilled}),i=Co.apply(void 0,r);return i(n)}:eu()(e[0])}function l1(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return G_(n,["pending","fulfilled","rejected"])}:om(e)?function(n){for(var r=[],i=0,o=e;i<o.length;i++){var s=o[i];r.push(s.pending,s.rejected,s.fulfilled)}var a=Co.apply(void 0,r);return a(n)}:l1()(e[0])}var tT=function(e,t){if(typeof e!="function")throw new TypeError(t+" is not a function")},h3=function(){},aL=function(e,t){return t===void 0&&(t=h3),e.catch(t),e},lL=function(e,t){return e.addEventListener("abort",t,{once:!0}),function(){return e.removeEventListener("abort",t)}},Yd=function(e,t){var n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},cee="task",uL="listener",cL="completed",nT="cancelled",dee="task-"+nT,fee="task-"+cL,dL=uL+"-"+nT,hee=uL+"-"+cL,am=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=cee+" "+nT+" (reason: "+t+")"}return e}(),Qd=function(e){if(e.aborted)throw new am(e.reason)};function fL(e,t){var n=h3;return new Promise(function(r,i){var o=function(){return i(new am(e.reason))};if(e.aborted){o();return}n=lL(e,o),t.finally(function(){return n()}).then(r,i)}).finally(function(){n=h3})}var pee=function(e,t){return im(void 0,null,function(){var n,r;return rm(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return i.sent(),[4,e()];case 2:return n=i.sent(),[2,{status:"ok",value:n}];case 3:return r=i.sent(),[2,{status:r instanceof am?"cancelled":"rejected",error:r}];case 4:return t==null||t(),[7];case 5:return[2]}})})},u1=function(e){return function(t){return aL(fL(e,t).then(function(n){return Qd(e),n}))}},hL=function(e){var t=u1(e);return function(n){return t(new Promise(function(r){return setTimeout(r,n)}))}},gee=Object.assign,K8={},lm="listenerMiddleware",mee=function(e){var t=function(n){return lL(e,function(){return Yd(n,e.reason)})};return function(n){tT(n,"taskExecutor");var r=new AbortController;t(r);var i=pee(function(){return im(void 0,null,function(){var o;return rm(this,function(s){switch(s.label){case 0:return Qd(e),Qd(r.signal),[4,n({pause:u1(r.signal),delay:hL(r.signal),signal:r.signal})];case 1:return o=s.sent(),Qd(r.signal),[2,o]}})})},function(){return Yd(r,fee)});return{result:u1(e)(i),cancel:function(){Yd(r,dee)}}}},yee=function(e,t){var n=function(r,i){return im(void 0,null,function(){var o,s,a,l;return rm(this,function(u){switch(u.label){case 0:Qd(t),o=function(){},s=new Promise(function(d,f){var p=e({predicate:r,effect:function(g,m){m.unsubscribe(),d([g,m.getState(),m.getOriginalState()])}});o=function(){p(),f()}}),a=[s],i!=null&&a.push(new Promise(function(d){return setTimeout(d,i,null)})),u.label=1;case 1:return u.trys.push([1,,3,4]),[4,fL(t,Promise.race(a))];case 2:return l=u.sent(),Qd(t),[2,l];case 3:return o(),[7];case 4:return[2]}})})};return function(r,i){return aL(n(r,i))}},pL=function(e){var t=e.type,n=e.actionCreator,r=e.matcher,i=e.predicate,o=e.effect;if(t)i=Re(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return tT(o,"options.listener"),{predicate:i,type:t,effect:o}},vee=function(e){var t=pL(e),n=t.type,r=t.predicate,i=t.effect,o=j_(),s={id:o,effect:i,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}};return s},p3=function(e){e.pending.forEach(function(t){Yd(t,dL)})},_ee=function(e){return function(){e.forEach(p3),e.clear()}},X8=function(e,t,n){try{e(t,n)}catch(r){setTimeout(function(){throw r},0)}},gL=Re(lm+"/add"),mL=Re(lm+"/removeAll"),yL=Re(lm+"/remove"),bee=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,Fl([lm+"/error"],e))};function vL(e){var t=this;e===void 0&&(e={});var n=new Map,r=e.extra,i=e.onError,o=i===void 0?bee:i;tT(o,"onError");var s=function(g){return g.unsubscribe=function(){return n.delete(g.id)},n.set(g.id,g),function(m){g.unsubscribe(),m!=null&&m.cancelActive&&p3(g)}},a=function(g){for(var m=0,v=Array.from(n.values());m<v.length;m++){var x=v[m];if(g(x))return x}},l=function(g){var m=a(function(v){return v.effect===g.effect});return m||(m=vee(g)),s(m)},u=function(g){var m=pL(g),v=m.type,x=m.effect,_=m.predicate,b=a(function(y){var S=typeof v=="string"?y.type===v:y.predicate===_;return S&&y.effect===x});return b&&(b.unsubscribe(),g.cancelActive&&p3(b)),!!b},d=function(g,m,v,x){return im(t,null,function(){var _,b,y;return rm(this,function(S){switch(S.label){case 0:_=new AbortController,b=yee(l,_.signal),S.label=1;case 1:return S.trys.push([1,3,4,5]),g.pending.add(_),[4,Promise.resolve(g.effect(m,gee({},v,{getOriginalState:x,condition:function(C,T){return b(C,T).then(Boolean)},take:b,delay:hL(_.signal),pause:u1(_.signal),extra:r,signal:_.signal,fork:mee(_.signal),unsubscribe:g.unsubscribe,subscribe:function(){n.set(g.id,g)},cancelActiveListeners:function(){g.pending.forEach(function(C,T,E){C!==_&&(Yd(C,dL),E.delete(C))})}})))];case 2:return S.sent(),[3,5];case 3:return y=S.sent(),y instanceof am||X8(o,y,{raisedBy:"effect"}),[3,5];case 4:return Yd(_,hee),g.pending.delete(_),[7];case 5:return[2]}})})},f=_ee(n),p=function(g){return function(m){return function(v){if(!eT(v))return m(v);if(gL.match(v))return l(v.payload);if(mL.match(v)){f();return}if(yL.match(v))return u(v.payload);var x=g.getState(),_=function(){if(x===K8)throw new Error(lm+": getOriginalState can only be called synchronously");return x},b;try{if(b=m(v),n.size>0)for(var y=g.getState(),S=Array.from(n.values()),C=0,T=S;C<T.length;C++){var E=T[C],P=!1;try{P=E.predicate(v,y,x)}catch(k){P=!1,X8(o,k,{raisedBy:"predicate"})}P&&d(E,v,g,_)}}finally{x=K8}return b}}};return{middleware:p,startListening:l,stopListening:u,clearListeners:f}}var Lu="RTK_autoBatch",uv=function(){return function(e){var t;return{payload:e,meta:(t={},t[Lu]=!0,t)}}},Y8,See=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Y8||(Y8=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},_L=function(e){return function(t){setTimeout(t,e)}},wee=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_L(10),bL=function(e){return e===void 0&&(e={type:"raf"}),function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(void 0,n),o=!0,s=!1,a=!1,l=new Set,u=e.type==="tick"?See:e.type==="raf"?wee:e.type==="callback"?e.queueNotification:_L(e.timeout),d=function(){a=!1,s&&(s=!1,l.forEach(function(f){return f()}))};return Object.assign({},i,{subscribe:function(f){var p=function(){return o&&f()},g=i.subscribe(p);return l.add(f),function(){g(),l.delete(f)}},dispatch:function(f){var p;try{return o=!((p=f==null?void 0:f.meta)!=null&&p[Lu]),s=!o,s&&(a||(a=!0,u(d))),i.dispatch(f)}finally{o=!0}}})}}};X4();const Q9e=Object.freeze(Object.defineProperty({__proto__:null,EnhancerArray:qN,MiddlewareArray:WN,SHOULD_AUTOBATCH:Lu,TaskAbortError:am,__DO_NOT_USE__ActionTypes:yf,addListener:gL,applyMiddleware:J4,autoBatchEnhancer:bL,bindActionCreators:UN,clearAllListeners:mL,combineReducers:Ff,compose:vf,configureStore:ZN,createAction:Re,createAsyncThunk:Bl,createDraftSafeSelector:oa,createEntityAdapter:Jl,createImmutableStateInvariantMiddleware:WJ,createListenerMiddleware:vL,createNextState:Zl,createReducer:tL,createSelector:si,createSerializableStateInvariantMiddleware:qJ,createSlice:yn,createStore:nm,current:z_,findNonSerializableValue:XN,freeze:tm,getDefaultMiddleware:QN,getType:ZJ,isAction:eT,isAllOf:Xd,isAnyOf:Co,isAsyncThunkAction:l1,isDraft:ai,isFluxStandardAction:JN,isFulfilled:eu,isImmutableDefault:HJ,isPending:H_,isPlain:KN,isPlainObject:Zo,isRejected:_f,isRejectedWithValue:sm,legacy_createStore:BN,miniSerializeError:iL,nanoid:j_,original:H4,prepareAutoBatched:uv,removeListener:yL,unwrapResult:oL},Symbol.toStringTag,{value:"Module"})),f0=(e,t)=>Math.floor(e/t)*t,Ss=(e,t)=>Math.round(e/t)*t;var xee=typeof global=="object"&&global&&global.Object===Object&&global;const SL=xee;var Cee=typeof self=="object"&&self&&self.Object===Object&&self,Tee=SL||Cee||Function("return this")();const Fs=Tee;var Eee=Fs.Symbol;const xo=Eee;var wL=Object.prototype,Aee=wL.hasOwnProperty,Pee=wL.toString,Uh=xo?xo.toStringTag:void 0;function Ree(e){var t=Aee.call(e,Uh),n=e[Uh];try{e[Uh]=void 0;var r=!0}catch{}var i=Pee.call(e);return r&&(t?e[Uh]=n:delete e[Uh]),i}var Oee=Object.prototype,kee=Oee.toString;function Iee(e){return kee.call(e)}var Mee="[object Null]",Nee="[object Undefined]",Q8=xo?xo.toStringTag:void 0;function tu(e){return e==null?e===void 0?Nee:Mee:Q8&&Q8 in Object(e)?Ree(e):Iee(e)}function Jo(e){return e!=null&&typeof e=="object"}var Lee="[object Symbol]";function W_(e){return typeof e=="symbol"||Jo(e)&&tu(e)==Lee}function xL(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Dee=Array.isArray;const gr=Dee;var $ee=1/0,Z8=xo?xo.prototype:void 0,J8=Z8?Z8.toString:void 0;function CL(e){if(typeof e=="string")return e;if(gr(e))return xL(e,CL)+"";if(W_(e))return J8?J8.call(e):"";var t=e+"";return t=="0"&&1/e==-$ee?"-0":t}var Fee=/\s/;function Bee(e){for(var t=e.length;t--&&Fee.test(e.charAt(t)););return t}var Uee=/^\s+/;function zee(e){return e&&e.slice(0,Bee(e)+1).replace(Uee,"")}function Pi(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var e9=0/0,Vee=/^[-+]0x[0-9a-f]+$/i,jee=/^0b[01]+$/i,Gee=/^0o[0-7]+$/i,Hee=parseInt;function sx(e){if(typeof e=="number")return e;if(W_(e))return e9;if(Pi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zee(e);var n=jee.test(e);return n||Gee.test(e)?Hee(e.slice(2),n?2:8):Vee.test(e)?e9:+e}function q_(e){return e}var Wee="[object AsyncFunction]",qee="[object Function]",Kee="[object GeneratorFunction]",Xee="[object Proxy]";function rT(e){if(!Pi(e))return!1;var t=tu(e);return t==qee||t==Kee||t==Wee||t==Xee}var Yee=Fs["__core-js_shared__"];const ax=Yee;var t9=function(){var e=/[^.]+$/.exec(ax&&ax.keys&&ax.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qee(e){return!!t9&&t9 in e}var Zee=Function.prototype,Jee=Zee.toString;function pc(e){if(e!=null){try{return Jee.call(e)}catch{}try{return e+""}catch{}}return""}var ete=/[\\^$.*+?()[\]{}|]/g,tte=/^\[object .+?Constructor\]$/,nte=Function.prototype,rte=Object.prototype,ite=nte.toString,ote=rte.hasOwnProperty,ste=RegExp("^"+ite.call(ote).replace(ete,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ate(e){if(!Pi(e)||Qee(e))return!1;var t=rT(e)?ste:tte;return t.test(pc(e))}function lte(e,t){return e==null?void 0:e[t]}function gc(e,t){var n=lte(e,t);return ate(n)?n:void 0}var ute=gc(Fs,"WeakMap");const g3=ute;var n9=Object.create,cte=function(){function e(){}return function(t){if(!Pi(t))return{};if(n9)return n9(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const dte=cte;function TL(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function fte(){}function EL(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var hte=800,pte=16,gte=Date.now;function mte(e){var t=0,n=0;return function(){var r=gte(),i=pte-(r-n);if(n=r,i>0){if(++t>=hte)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function yte(e){return function(){return e}}var vte=function(){try{var e=gc(Object,"defineProperty");return e({},"",{}),e}catch{}}();const c1=vte;var _te=c1?function(e,t){return c1(e,"toString",{configurable:!0,enumerable:!1,value:yte(t),writable:!0})}:q_;const bte=_te;var Ste=mte(bte);const AL=Ste;function PL(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function wte(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function xte(e){return e!==e}function Cte(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Tte(e,t,n){return t===t?Cte(e,t,n):wte(e,xte,n)}function Ete(e,t){var n=e==null?0:e.length;return!!n&&Tte(e,t,0)>-1}var Ate=9007199254740991,Pte=/^(?:0|[1-9]\d*)$/;function iT(e,t){var n=typeof e;return t=t??Ate,!!t&&(n=="number"||n!="symbol"&&Pte.test(e))&&e>-1&&e%1==0&&e<t}function oT(e,t,n){t=="__proto__"&&c1?c1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function um(e,t){return e===t||e!==e&&t!==t}var Rte=Object.prototype,Ote=Rte.hasOwnProperty;function RL(e,t,n){var r=e[t];(!(Ote.call(e,t)&&um(r,n))||n===void 0&&!(t in e))&&oT(e,t,n)}function Bf(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;l===void 0&&(l=e[a]),i?oT(n,a,l):RL(n,a,l)}return n}var r9=Math.max;function OL(e,t,n){return t=r9(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=r9(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),TL(e,this,a)}}function kL(e,t){return AL(OL(e,t,q_),e+"")}var kte=9007199254740991;function sT(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=kte}function Uf(e){return e!=null&&sT(e.length)&&!rT(e)}function IL(e,t,n){if(!Pi(n))return!1;var r=typeof t;return(r=="number"?Uf(n)&&iT(t,n.length):r=="string"&&t in n)?um(n[t],e):!1}function ML(e){return kL(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&IL(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t})}var Ite=Object.prototype;function aT(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ite;return e===n}function Mte(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Nte="[object Arguments]";function i9(e){return Jo(e)&&tu(e)==Nte}var NL=Object.prototype,Lte=NL.hasOwnProperty,Dte=NL.propertyIsEnumerable,$te=i9(function(){return arguments}())?i9:function(e){return Jo(e)&&Lte.call(e,"callee")&&!Dte.call(e,"callee")};const og=$te;function Fte(){return!1}var LL=typeof exports=="object"&&exports&&!exports.nodeType&&exports,o9=LL&&typeof module=="object"&&module&&!module.nodeType&&module,Bte=o9&&o9.exports===LL,s9=Bte?Fs.Buffer:void 0,Ute=s9?s9.isBuffer:void 0,zte=Ute||Fte;const sg=zte;var Vte="[object Arguments]",jte="[object Array]",Gte="[object Boolean]",Hte="[object Date]",Wte="[object Error]",qte="[object Function]",Kte="[object Map]",Xte="[object Number]",Yte="[object Object]",Qte="[object RegExp]",Zte="[object Set]",Jte="[object String]",ene="[object WeakMap]",tne="[object ArrayBuffer]",nne="[object DataView]",rne="[object Float32Array]",ine="[object Float64Array]",one="[object Int8Array]",sne="[object Int16Array]",ane="[object Int32Array]",lne="[object Uint8Array]",une="[object Uint8ClampedArray]",cne="[object Uint16Array]",dne="[object Uint32Array]",nn={};nn[rne]=nn[ine]=nn[one]=nn[sne]=nn[ane]=nn[lne]=nn[une]=nn[cne]=nn[dne]=!0;nn[Vte]=nn[jte]=nn[tne]=nn[Gte]=nn[nne]=nn[Hte]=nn[Wte]=nn[qte]=nn[Kte]=nn[Xte]=nn[Yte]=nn[Qte]=nn[Zte]=nn[Jte]=nn[ene]=!1;function fne(e){return Jo(e)&&sT(e.length)&&!!nn[tu(e)]}function lT(e){return function(t){return e(t)}}var DL=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ep=DL&&typeof module=="object"&&module&&!module.nodeType&&module,hne=Ep&&Ep.exports===DL,lx=hne&&SL.process,pne=function(){try{var e=Ep&&Ep.require&&Ep.require("util").types;return e||lx&&lx.binding&&lx.binding("util")}catch{}}();const bf=pne;var a9=bf&&bf.isTypedArray,gne=a9?lT(a9):fne;const uT=gne;var mne=Object.prototype,yne=mne.hasOwnProperty;function $L(e,t){var n=gr(e),r=!n&&og(e),i=!n&&!r&&sg(e),o=!n&&!r&&!i&&uT(e),s=n||r||i||o,a=s?Mte(e.length,String):[],l=a.length;for(var u in e)(t||yne.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||iT(u,l)))&&a.push(u);return a}function FL(e,t){return function(n){return e(t(n))}}var vne=FL(Object.keys,Object);const _ne=vne;var bne=Object.prototype,Sne=bne.hasOwnProperty;function BL(e){if(!aT(e))return _ne(e);var t=[];for(var n in Object(e))Sne.call(e,n)&&n!="constructor"&&t.push(n);return t}function cm(e){return Uf(e)?$L(e):BL(e)}function wne(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var xne=Object.prototype,Cne=xne.hasOwnProperty;function Tne(e){if(!Pi(e))return wne(e);var t=aT(e),n=[];for(var r in e)r=="constructor"&&(t||!Cne.call(e,r))||n.push(r);return n}function dm(e){return Uf(e)?$L(e,!0):Tne(e)}var Ene=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ane=/^\w*$/;function cT(e,t){if(gr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||W_(e)?!0:Ane.test(e)||!Ene.test(e)||t!=null&&e in Object(t)}var Pne=gc(Object,"create");const ag=Pne;function Rne(){this.__data__=ag?ag(null):{},this.size=0}function One(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kne="__lodash_hash_undefined__",Ine=Object.prototype,Mne=Ine.hasOwnProperty;function Nne(e){var t=this.__data__;if(ag){var n=t[e];return n===kne?void 0:n}return Mne.call(t,e)?t[e]:void 0}var Lne=Object.prototype,Dne=Lne.hasOwnProperty;function $ne(e){var t=this.__data__;return ag?t[e]!==void 0:Dne.call(t,e)}var Fne="__lodash_hash_undefined__";function Bne(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ag&&t===void 0?Fne:t,this}function ec(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ec.prototype.clear=Rne;ec.prototype.delete=One;ec.prototype.get=Nne;ec.prototype.has=$ne;ec.prototype.set=Bne;function Une(){this.__data__=[],this.size=0}function K_(e,t){for(var n=e.length;n--;)if(um(e[n][0],t))return n;return-1}var zne=Array.prototype,Vne=zne.splice;function jne(e){var t=this.__data__,n=K_(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Vne.call(t,n,1),--this.size,!0}function Gne(e){var t=this.__data__,n=K_(t,e);return n<0?void 0:t[n][1]}function Hne(e){return K_(this.__data__,e)>-1}function Wne(e,t){var n=this.__data__,r=K_(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ma(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ma.prototype.clear=Une;Ma.prototype.delete=jne;Ma.prototype.get=Gne;Ma.prototype.has=Hne;Ma.prototype.set=Wne;var qne=gc(Fs,"Map");const lg=qne;function Kne(){this.size=0,this.__data__={hash:new ec,map:new(lg||Ma),string:new ec}}function Xne(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function X_(e,t){var n=e.__data__;return Xne(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Yne(e){var t=X_(this,e).delete(e);return this.size-=t?1:0,t}function Qne(e){return X_(this,e).get(e)}function Zne(e){return X_(this,e).has(e)}function Jne(e,t){var n=X_(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Na(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Na.prototype.clear=Kne;Na.prototype.delete=Yne;Na.prototype.get=Qne;Na.prototype.has=Zne;Na.prototype.set=Jne;var ere="Expected a function";function dT(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ere);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(dT.Cache||Na),n}dT.Cache=Na;var tre=500;function nre(e){var t=dT(e,function(r){return n.size===tre&&n.clear(),r}),n=t.cache;return t}var rre=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ire=/\\(\\)?/g,ore=nre(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rre,function(n,r,i,o){t.push(i?o.replace(ire,"$1"):r||n)}),t});const sre=ore;function Y_(e){return e==null?"":CL(e)}function Q_(e,t){return gr(e)?e:cT(e,t)?[e]:sre(Y_(e))}var are=1/0;function fm(e){if(typeof e=="string"||W_(e))return e;var t=e+"";return t=="0"&&1/e==-are?"-0":t}function fT(e,t){t=Q_(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[fm(t[n++])];return n&&n==r?e:void 0}function lre(e,t,n){var r=e==null?void 0:fT(e,t);return r===void 0?n:r}function hT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var l9=xo?xo.isConcatSpreadable:void 0;function ure(e){return gr(e)||og(e)||!!(l9&&e&&e[l9])}function UL(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=ure),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?UL(a,t-1,n,r,i):hT(i,a):r||(i[i.length]=a)}return i}function cre(e){var t=e==null?0:e.length;return t?UL(e,1):[]}function dre(e){return AL(OL(e,void 0,cre),e+"")}var fre=FL(Object.getPrototypeOf,Object);const pT=fre;var hre="[object Object]",pre=Function.prototype,gre=Object.prototype,zL=pre.toString,mre=gre.hasOwnProperty,yre=zL.call(Object);function VL(e){if(!Jo(e)||tu(e)!=hre)return!1;var t=pT(e);if(t===null)return!0;var n=mre.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zL.call(n)==yre}function jL(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function vre(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:jL(e,t,n)}var _re="\\ud800-\\udfff",bre="\\u0300-\\u036f",Sre="\\ufe20-\\ufe2f",wre="\\u20d0-\\u20ff",xre=bre+Sre+wre,Cre="\\ufe0e\\ufe0f",Tre="\\u200d",Ere=RegExp("["+Tre+_re+xre+Cre+"]");function gT(e){return Ere.test(e)}function Are(e){return e.split("")}var GL="\\ud800-\\udfff",Pre="\\u0300-\\u036f",Rre="\\ufe20-\\ufe2f",Ore="\\u20d0-\\u20ff",kre=Pre+Rre+Ore,Ire="\\ufe0e\\ufe0f",Mre="["+GL+"]",m3="["+kre+"]",y3="\\ud83c[\\udffb-\\udfff]",Nre="(?:"+m3+"|"+y3+")",HL="[^"+GL+"]",WL="(?:\\ud83c[\\udde6-\\uddff]){2}",qL="[\\ud800-\\udbff][\\udc00-\\udfff]",Lre="\\u200d",KL=Nre+"?",XL="["+Ire+"]?",Dre="(?:"+Lre+"(?:"+[HL,WL,qL].join("|")+")"+XL+KL+")*",$re=XL+KL+Dre,Fre="(?:"+[HL+m3+"?",m3,WL,qL,Mre].join("|")+")",Bre=RegExp(y3+"(?="+y3+")|"+Fre+$re,"g");function Ure(e){return e.match(Bre)||[]}function zre(e){return gT(e)?Ure(e):Are(e)}function Vre(e){return function(t){t=Y_(t);var n=gT(t)?zre(t):void 0,r=n?n[0]:t.charAt(0),i=n?vre(n,1).join(""):t.slice(1);return r[e]()+i}}var jre=Vre("toUpperCase");const Gre=jre;function YL(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Hre(e){return function(t){return e==null?void 0:e[t]}}var Wre={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qre=Hre(Wre);const Kre=qre;var Xre=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yre="\\u0300-\\u036f",Qre="\\ufe20-\\ufe2f",Zre="\\u20d0-\\u20ff",Jre=Yre+Qre+Zre,eie="["+Jre+"]",tie=RegExp(eie,"g");function nie(e){return e=Y_(e),e&&e.replace(Xre,Kre).replace(tie,"")}var rie=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function iie(e){return e.match(rie)||[]}var oie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function sie(e){return oie.test(e)}var QL="\\ud800-\\udfff",aie="\\u0300-\\u036f",lie="\\ufe20-\\ufe2f",uie="\\u20d0-\\u20ff",cie=aie+lie+uie,ZL="\\u2700-\\u27bf",JL="a-z\\xdf-\\xf6\\xf8-\\xff",die="\\xac\\xb1\\xd7\\xf7",fie="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hie="\\u2000-\\u206f",pie=" \\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",eD="A-Z\\xc0-\\xd6\\xd8-\\xde",gie="\\ufe0e\\ufe0f",tD=die+fie+hie+pie,nD="['’]",u9="["+tD+"]",mie="["+cie+"]",rD="\\d+",yie="["+ZL+"]",iD="["+JL+"]",oD="[^"+QL+tD+rD+ZL+JL+eD+"]",vie="\\ud83c[\\udffb-\\udfff]",_ie="(?:"+mie+"|"+vie+")",bie="[^"+QL+"]",sD="(?:\\ud83c[\\udde6-\\uddff]){2}",aD="[\\ud800-\\udbff][\\udc00-\\udfff]",md="["+eD+"]",Sie="\\u200d",c9="(?:"+iD+"|"+oD+")",wie="(?:"+md+"|"+oD+")",d9="(?:"+nD+"(?:d|ll|m|re|s|t|ve))?",f9="(?:"+nD+"(?:D|LL|M|RE|S|T|VE))?",lD=_ie+"?",uD="["+gie+"]?",xie="(?:"+Sie+"(?:"+[bie,sD,aD].join("|")+")"+uD+lD+")*",Cie="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Tie="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Eie=uD+lD+xie,Aie="(?:"+[yie,sD,aD].join("|")+")"+Eie,Pie=RegExp([md+"?"+iD+"+"+d9+"(?="+[u9,md,"$"].join("|")+")",wie+"+"+f9+"(?="+[u9,md+c9,"$"].join("|")+")",md+"?"+c9+"+"+d9,md+"+"+f9,Tie,Cie,rD,Aie].join("|"),"g");function Rie(e){return e.match(Pie)||[]}function Oie(e,t,n){return e=Y_(e),t=n?void 0:t,t===void 0?sie(e)?Rie(e):iie(e):e.match(t)||[]}var kie="['’]",Iie=RegExp(kie,"g");function Mie(e){return function(t){return YL(Oie(nie(t).replace(Iie,"")),e,"")}}function Nie(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function bl(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=sx(n),n=n===n?n:0),t!==void 0&&(t=sx(t),t=t===t?t:0),Nie(sx(e),t,n)}function Lie(){this.__data__=new Ma,this.size=0}function Die(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function $ie(e){return this.__data__.get(e)}function Fie(e){return this.__data__.has(e)}var Bie=200;function Uie(e,t){var n=this.__data__;if(n instanceof Ma){var r=n.__data__;if(!lg||r.length<Bie-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Na(r)}return n.set(e,t),this.size=n.size,this}function qo(e){var t=this.__data__=new Ma(e);this.size=t.size}qo.prototype.clear=Lie;qo.prototype.delete=Die;qo.prototype.get=$ie;qo.prototype.has=Fie;qo.prototype.set=Uie;function zie(e,t){return e&&Bf(t,cm(t),e)}function Vie(e,t){return e&&Bf(t,dm(t),e)}var cD=typeof exports=="object"&&exports&&!exports.nodeType&&exports,h9=cD&&typeof module=="object"&&module&&!module.nodeType&&module,jie=h9&&h9.exports===cD,p9=jie?Fs.Buffer:void 0,g9=p9?p9.allocUnsafe:void 0;function dD(e,t){if(t)return e.slice();var n=e.length,r=g9?g9(n):new e.constructor(n);return e.copy(r),r}function fD(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function hD(){return[]}var Gie=Object.prototype,Hie=Gie.propertyIsEnumerable,m9=Object.getOwnPropertySymbols,Wie=m9?function(e){return e==null?[]:(e=Object(e),fD(m9(e),function(t){return Hie.call(e,t)}))}:hD;const mT=Wie;function qie(e,t){return Bf(e,mT(e),t)}var Kie=Object.getOwnPropertySymbols,Xie=Kie?function(e){for(var t=[];e;)hT(t,mT(e)),e=pT(e);return t}:hD;const pD=Xie;function Yie(e,t){return Bf(e,pD(e),t)}function gD(e,t,n){var r=t(e);return gr(e)?r:hT(r,n(e))}function v3(e){return gD(e,cm,mT)}function mD(e){return gD(e,dm,pD)}var Qie=gc(Fs,"DataView");const _3=Qie;var Zie=gc(Fs,"Promise");const b3=Zie;var Jie=gc(Fs,"Set");const Zd=Jie;var y9="[object Map]",eoe="[object Object]",v9="[object Promise]",_9="[object Set]",b9="[object WeakMap]",S9="[object DataView]",toe=pc(_3),noe=pc(lg),roe=pc(b3),ioe=pc(Zd),ooe=pc(g3),Eu=tu;(_3&&Eu(new _3(new ArrayBuffer(1)))!=S9||lg&&Eu(new lg)!=y9||b3&&Eu(b3.resolve())!=v9||Zd&&Eu(new Zd)!=_9||g3&&Eu(new g3)!=b9)&&(Eu=function(e){var t=tu(e),n=t==eoe?e.constructor:void 0,r=n?pc(n):"";if(r)switch(r){case toe:return S9;case noe:return y9;case roe:return v9;case ioe:return _9;case ooe:return b9}return t});const Sf=Eu;var soe=Object.prototype,aoe=soe.hasOwnProperty;function loe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&aoe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var uoe=Fs.Uint8Array;const d1=uoe;function yT(e){var t=new e.constructor(e.byteLength);return new d1(t).set(new d1(e)),t}function coe(e,t){var n=t?yT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var doe=/\w*$/;function foe(e){var t=new e.constructor(e.source,doe.exec(e));return t.lastIndex=e.lastIndex,t}var w9=xo?xo.prototype:void 0,x9=w9?w9.valueOf:void 0;function hoe(e){return x9?Object(x9.call(e)):{}}function yD(e,t){var n=t?yT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var poe="[object Boolean]",goe="[object Date]",moe="[object Map]",yoe="[object Number]",voe="[object RegExp]",_oe="[object Set]",boe="[object String]",Soe="[object Symbol]",woe="[object ArrayBuffer]",xoe="[object DataView]",Coe="[object Float32Array]",Toe="[object Float64Array]",Eoe="[object Int8Array]",Aoe="[object Int16Array]",Poe="[object Int32Array]",Roe="[object Uint8Array]",Ooe="[object Uint8ClampedArray]",koe="[object Uint16Array]",Ioe="[object Uint32Array]";function Moe(e,t,n){var r=e.constructor;switch(t){case woe:return yT(e);case poe:case goe:return new r(+e);case xoe:return coe(e,n);case Coe:case Toe:case Eoe:case Aoe:case Poe:case Roe:case Ooe:case koe:case Ioe:return yD(e,n);case moe:return new r;case yoe:case boe:return new r(e);case voe:return foe(e);case _oe:return new r;case Soe:return hoe(e)}}function vD(e){return typeof e.constructor=="function"&&!aT(e)?dte(pT(e)):{}}var Noe="[object Map]";function Loe(e){return Jo(e)&&Sf(e)==Noe}var C9=bf&&bf.isMap,Doe=C9?lT(C9):Loe;const $oe=Doe;var Foe="[object Set]";function Boe(e){return Jo(e)&&Sf(e)==Foe}var T9=bf&&bf.isSet,Uoe=T9?lT(T9):Boe;const zoe=Uoe;var Voe=1,joe=2,Goe=4,_D="[object Arguments]",Hoe="[object Array]",Woe="[object Boolean]",qoe="[object Date]",Koe="[object Error]",bD="[object Function]",Xoe="[object GeneratorFunction]",Yoe="[object Map]",Qoe="[object Number]",SD="[object Object]",Zoe="[object RegExp]",Joe="[object Set]",ese="[object String]",tse="[object Symbol]",nse="[object WeakMap]",rse="[object ArrayBuffer]",ise="[object DataView]",ose="[object Float32Array]",sse="[object Float64Array]",ase="[object Int8Array]",lse="[object Int16Array]",use="[object Int32Array]",cse="[object Uint8Array]",dse="[object Uint8ClampedArray]",fse="[object Uint16Array]",hse="[object Uint32Array]",Yt={};Yt[_D]=Yt[Hoe]=Yt[rse]=Yt[ise]=Yt[Woe]=Yt[qoe]=Yt[ose]=Yt[sse]=Yt[ase]=Yt[lse]=Yt[use]=Yt[Yoe]=Yt[Qoe]=Yt[SD]=Yt[Zoe]=Yt[Joe]=Yt[ese]=Yt[tse]=Yt[cse]=Yt[dse]=Yt[fse]=Yt[hse]=!0;Yt[Koe]=Yt[bD]=Yt[nse]=!1;function Ap(e,t,n,r,i,o){var s,a=t&Voe,l=t&joe,u=t&Goe;if(n&&(s=i?n(e,r,i,o):n(e)),s!==void 0)return s;if(!Pi(e))return e;var d=gr(e);if(d){if(s=loe(e),!a)return EL(e,s)}else{var f=Sf(e),p=f==bD||f==Xoe;if(sg(e))return dD(e,a);if(f==SD||f==_D||p&&!i){if(s=l||p?{}:vD(e),!a)return l?Yie(e,Vie(s,e)):qie(e,zie(s,e))}else{if(!Yt[f])return i?e:{};s=Moe(e,f,a)}}o||(o=new qo);var g=o.get(e);if(g)return g;o.set(e,s),zoe(e)?e.forEach(function(x){s.add(Ap(x,t,n,x,e,o))}):$oe(e)&&e.forEach(function(x,_){s.set(_,Ap(x,t,n,_,e,o))});var m=u?l?mD:v3:l?dm:cm,v=d?void 0:m(e);return PL(v||e,function(x,_){v&&(_=x,x=e[_]),RL(s,_,Ap(x,t,n,_,e,o))}),s}var pse=1,gse=4;function zr(e){return Ap(e,pse|gse)}var mse="__lodash_hash_undefined__";function yse(e){return this.__data__.set(e,mse),this}function vse(e){return this.__data__.has(e)}function ug(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Na;++t<n;)this.add(e[t])}ug.prototype.add=ug.prototype.push=yse;ug.prototype.has=vse;function wD(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function xD(e,t){return e.has(t)}var _se=1,bse=2;function CD(e,t,n,r,i,o){var s=n&_se,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,g=n&bse?new ug:void 0;for(o.set(e,t),o.set(t,e);++f<a;){var m=e[f],v=t[f];if(r)var x=s?r(v,m,f,t,e,o):r(m,v,f,e,t,o);if(x!==void 0){if(x)continue;p=!1;break}if(g){if(!wD(t,function(_,b){if(!xD(g,b)&&(m===_||i(m,_,n,r,o)))return g.push(b)})){p=!1;break}}else if(!(m===v||i(m,v,n,r,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function Sse(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function vT(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var wse=1,xse=2,Cse="[object Boolean]",Tse="[object Date]",Ese="[object Error]",Ase="[object Map]",Pse="[object Number]",Rse="[object RegExp]",Ose="[object Set]",kse="[object String]",Ise="[object Symbol]",Mse="[object ArrayBuffer]",Nse="[object DataView]",E9=xo?xo.prototype:void 0,ux=E9?E9.valueOf:void 0;function Lse(e,t,n,r,i,o,s){switch(n){case Nse:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Mse:return!(e.byteLength!=t.byteLength||!o(new d1(e),new d1(t)));case Cse:case Tse:case Pse:return um(+e,+t);case Ese:return e.name==t.name&&e.message==t.message;case Rse:case kse:return e==t+"";case Ase:var a=Sse;case Ose:var l=r&wse;if(a||(a=vT),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=xse,s.set(e,t);var d=CD(a(e),a(t),r,i,o,s);return s.delete(e),d;case Ise:if(ux)return ux.call(e)==ux.call(t)}return!1}var Dse=1,$se=Object.prototype,Fse=$se.hasOwnProperty;function Bse(e,t,n,r,i,o){var s=n&Dse,a=v3(e),l=a.length,u=v3(t),d=u.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=a[f];if(!(s?p in t:Fse.call(t,p)))return!1}var g=o.get(e),m=o.get(t);if(g&&m)return g==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var x=s;++f<l;){p=a[f];var _=e[p],b=t[p];if(r)var y=s?r(b,_,p,t,e,o):r(_,b,p,e,t,o);if(!(y===void 0?_===b||i(_,b,n,r,o):y)){v=!1;break}x||(x=p=="constructor")}if(v&&!x){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(v=!1)}return o.delete(e),o.delete(t),v}var Use=1,A9="[object Arguments]",P9="[object Array]",h0="[object Object]",zse=Object.prototype,R9=zse.hasOwnProperty;function Vse(e,t,n,r,i,o){var s=gr(e),a=gr(t),l=s?P9:Sf(e),u=a?P9:Sf(t);l=l==A9?h0:l,u=u==A9?h0:u;var d=l==h0,f=u==h0,p=l==u;if(p&&sg(e)){if(!sg(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new qo),s||uT(e)?CD(e,t,n,r,i,o):Lse(e,t,l,n,r,i,o);if(!(n&Use)){var g=d&&R9.call(e,"__wrapped__"),m=f&&R9.call(t,"__wrapped__");if(g||m){var v=g?e.value():e,x=m?t.value():t;return o||(o=new qo),i(v,x,n,r,o)}}return p?(o||(o=new qo),Bse(e,t,n,r,i,o)):!1}function Z_(e,t,n,r,i){return e===t?!0:e==null||t==null||!Jo(e)&&!Jo(t)?e!==e&&t!==t:Vse(e,t,n,r,Z_,i)}var jse=1,Gse=2;function Hse(e,t,n,r){var i=n.length,o=i,s=!r;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var l=a[0],u=e[l],d=a[1];if(s&&a[2]){if(u===void 0&&!(l in e))return!1}else{var f=new qo;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?Z_(d,u,jse|Gse,r,f):p))return!1}}return!0}function TD(e){return e===e&&!Pi(e)}function Wse(e){for(var t=cm(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,TD(i)]}return t}function ED(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function qse(e){var t=Wse(e);return t.length==1&&t[0][2]?ED(t[0][0],t[0][1]):function(n){return n===e||Hse(n,e,t)}}function Kse(e,t){return e!=null&&t in Object(e)}function Xse(e,t,n){t=Q_(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=fm(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&sT(i)&&iT(s,i)&&(gr(e)||og(e)))}function Yse(e,t){return e!=null&&Xse(e,t,Kse)}var Qse=1,Zse=2;function Jse(e,t){return cT(e)&&TD(t)?ED(fm(e),t):function(n){var r=lre(n,e);return r===void 0&&r===t?Yse(n,e):Z_(t,r,Qse|Zse)}}function AD(e){return function(t){return t==null?void 0:t[e]}}function eae(e){return function(t){return fT(t,e)}}function tae(e){return cT(e)?AD(fm(e)):eae(e)}function J_(e){return typeof e=="function"?e:e==null?q_:typeof e=="object"?gr(e)?Jse(e[0],e[1]):qse(e):tae(e)}function nae(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(n(o[l],l,o)===!1)break}return t}}var rae=nae();const PD=rae;function iae(e,t){return e&&PD(e,t,cm)}function oae(e,t){return function(n,r){if(n==null)return n;if(!Uf(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var sae=oae(iae);const eb=sae;function S3(e,t,n){(n!==void 0&&!um(e[t],n)||n===void 0&&!(t in e))&&oT(e,t,n)}function aae(e){return Jo(e)&&Uf(e)}function w3(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function lae(e){return Bf(e,dm(e))}function uae(e,t,n,r,i,o,s){var a=w3(e,n),l=w3(t,n),u=s.get(l);if(u){S3(e,n,u);return}var d=o?o(a,l,n+"",e,t,s):void 0,f=d===void 0;if(f){var p=gr(l),g=!p&&sg(l),m=!p&&!g&&uT(l);d=l,p||g||m?gr(a)?d=a:aae(a)?d=EL(a):g?(f=!1,d=dD(l,!0)):m?(f=!1,d=yD(l,!0)):d=[]:VL(l)||og(l)?(d=a,og(a)?d=lae(a):(!Pi(a)||rT(a))&&(d=vD(l))):f=!1}f&&(s.set(l,d),i(d,l,r,o,s),s.delete(l)),S3(e,n,d)}function tb(e,t,n,r,i){e!==t&&PD(t,function(o,s){if(i||(i=new qo),Pi(o))uae(e,t,s,n,tb,r,i);else{var a=r?r(w3(e,s),o,s+"",e,t,i):void 0;a===void 0&&(a=o),S3(e,s,a)}},dm)}function RD(e,t,n,r,i,o){return Pi(e)&&Pi(t)&&(o.set(t,e),tb(e,t,void 0,RD,o),o.delete(t)),e}var cae=ML(function(e,t,n,r){tb(e,t,n,r)});const dae=cae;var fae=kL(function(e){return e.push(void 0,RD),TL(dae,void 0,e)});const hae=fae;function pae(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gae(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function mae(e){return typeof e=="function"?e:q_}function tc(e,t){var n=gr(e)?PL:eb;return n(e,mae(t))}function yae(e,t){var n=[];return eb(e,function(r,i,o){t(r,i,o)&&n.push(r)}),n}function OD(e,t){var n=gr(e)?fD:yae;return n(e,J_(t))}var vae="[object String]";function _ae(e){return typeof e=="string"||!gr(e)&&Jo(e)&&tu(e)==vae}function bae(e,t){return t.length<2?e:fT(e,jL(t,0,-1))}function nb(e,t){return Z_(e,t)}var Sae=ML(function(e,t,n){tb(e,t,n)});const wae=Sae;function kD(e,t){return t=Q_(t,e),e=bae(e,t),e==null||delete e[fm(gae(t))]}function xae(e){return VL(e)?void 0:e}var Cae=1,Tae=2,Eae=4,Aae=dre(function(e,t){var n={};if(e==null)return n;var r=!1;t=xL(t,function(o){return o=Q_(o,e),r||(r=o.length>1),o}),Bf(e,mD(e),n),r&&(n=Ap(n,Cae|Tae|Eae,xae));for(var i=t.length;i--;)kD(n,t[i]);return n});const rb=Aae;var Pae=AD("length");const Rae=Pae;var ID="\\ud800-\\udfff",Oae="\\u0300-\\u036f",kae="\\ufe20-\\ufe2f",Iae="\\u20d0-\\u20ff",Mae=Oae+kae+Iae,Nae="\\ufe0e\\ufe0f",Lae="["+ID+"]",x3="["+Mae+"]",C3="\\ud83c[\\udffb-\\udfff]",Dae="(?:"+x3+"|"+C3+")",MD="[^"+ID+"]",ND="(?:\\ud83c[\\udde6-\\uddff]){2}",LD="[\\ud800-\\udbff][\\udc00-\\udfff]",$ae="\\u200d",DD=Dae+"?",$D="["+Nae+"]?",Fae="(?:"+$ae+"(?:"+[MD,ND,LD].join("|")+")"+$D+DD+")*",Bae=$D+DD+Fae,Uae="(?:"+[MD+x3+"?",x3,ND,LD,Lae].join("|")+")",O9=RegExp(C3+"(?="+C3+")|"+Uae+Bae,"g");function zae(e){for(var t=O9.lastIndex=0;O9.test(e);)++t;return t}function Vae(e){return gT(e)?zae(e):Rae(e)}function jae(e,t,n,r,i){return i(e,function(o,s,a){n=r?(r=!1,o):t(n,o,s,a)}),n}function _T(e,t,n){var r=gr(e)?YL:jae,i=arguments.length<3;return r(e,J_(t),n,i,eb)}var Gae="[object Map]",Hae="[object Set]";function FD(e){if(e==null)return 0;if(Uf(e))return _ae(e)?Vae(e):e.length;var t=Sf(e);return t==Gae||t==Hae?e.size:BL(e).length}function Wae(e,t){var n;return eb(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}function Ou(e,t,n){var r=gr(e)?wD:Wae;return n&&IL(e,t,n)&&(t=void 0),r(e,J_(t))}var qae=Mie(function(e,t,n){return e+(n?" ":"")+Gre(t)});const Kae=qae;var Xae=1/0,Yae=Zd&&1/vT(new Zd([,-0]))[1]==Xae?function(e){return new Zd(e)}:fte;const Qae=Yae;var Zae=200;function Jae(e,t,n){var r=-1,i=Ete,o=e.length,s=!0,a=[],l=a;if(n)s=!1,i=pae;else if(o>=Zae){var u=t?null:Qae(e);if(u)return vT(u);s=!1,i=xD,l=new ug}else l=t?[]:a;e:for(;++r<o;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue e;t&&l.push(f),a.push(d)}else i(l,f,n)||(l!==a&&l.push(f),a.push(d))}return a}function ele(e,t){return e&&e.length?Jae(e,J_(t)):[]}function tle(e,t){return e==null?!0:kD(e,t)}const BD={shouldUpdateImagesOnConnect:!1,disabledTabs:[],disabledFeatures:["lightbox","faceRestore","batches"],disabledSDFeatures:["variation","seamless","symmetry","hires","perlinNoise","noiseThreshold"],canRestoreDeletedImagesFromBin:!0,sd:{disabledControlNetModels:[],disabledControlNetProcessors:[],iterations:{initial:1,min:1,sliderMax:20,inputMax:9999,fineStep:1,coarseStep:1},width:{initial:512,min:64,sliderMax:1536,inputMax:4096,fineStep:8,coarseStep:64},height:{initial:512,min:64,sliderMax:1536,inputMax:4096,fineStep:8,coarseStep:64},steps:{initial:30,min:1,sliderMax:100,inputMax:500,fineStep:1,coarseStep:1},guidance:{initial:7,min:1,sliderMax:20,inputMax:200,fineStep:.1,coarseStep:.5},img2imgStrength:{initial:.7,min:0,sliderMax:1,inputMax:1,fineStep:.01,coarseStep:.05},dynamicPrompts:{maxPrompts:{initial:100,min:1,sliderMax:1e3,inputMax:1e4}}}},UD=yn({name:"config",initialState:BD,reducers:{configChanged:(e,t)=>{wae(e,t.payload)}}}),{configChanged:nle}=UD.actions,rle=UD.reducer,Z9e={"sd-1":"Stable Diffusion 1.x","sd-2":"Stable Diffusion 2.x",sdxl:"Stable Diffusion XL","sdxl-refiner":"Stable Diffusion XL Refiner"},J9e={"sd-1":"SD1","sd-2":"SD2",sdxl:"SDXL","sdxl-refiner":"SDXLR"},ile={"sd-1":{maxClip:12,markers:[0,1,2,3,4,8,12]},"sd-2":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},sdxl:{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]},"sdxl-refiner":{maxClip:24,markers:[0,1,2,3,5,10,15,20,24]}},eRe={lycoris:"LyCORIS",diffusers:"Diffusers"},tRe=0,ole=4294967295;var St;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},e.find=(i,o)=>{for(const s of i)if(o(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(St||(St={}));var T3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(T3||(T3={}));const xe=St.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ml=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},me=St.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),sle=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ko extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,St.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ko.create=e=>new Ko(e);const cg=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===xe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,St.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${St.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${St.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${St.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:St.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,St.assertNever(e)}return{message:n}};let zD=cg;function ale(e){zD=e}function f1(){return zD}const h1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],s={...i,path:o};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(s,{data:t,defaultError:a}).message;return{...i,path:o,message:i.message||a}},lle=[];function Te(e,t){const n=h1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,f1(),cg].filter(r=>!!r)});e.common.issues.push(n)}class Wr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return je;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Wr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return je;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:t.value,value:r}}}const je=Object.freeze({status:"aborted"}),VD=e=>({status:"dirty",value:e}),li=e=>({status:"valid",value:e}),E3=e=>e.status==="aborted",A3=e=>e.status==="dirty",p1=e=>e.status==="valid",g1=e=>typeof Promise<"u"&&e instanceof Promise;var Le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Le||(Le={}));class Ms{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const k9=(e,t)=>{if(p1(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ko(e.common.issues);return this._error=n,this._error}}};function Qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,a)=>s.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??a.defaultError},description:i}}class tt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ml(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ml(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Wr,ctx:{common:t.parent.common,data:t.data,parsedType:ml(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(g1(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ml(t)},o=this._parseSync({data:t,path:i.path,parent:i});return k9(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ml(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(g1(i)?i:Promise.resolve(i));return k9(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const s=t(i),a=()=>o.addIssue({code:me.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new es({schema:this,typeName:Ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return va.create(this,this._def)}nullable(){return ic.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xo.create(this,this._def)}promise(){return xf.create(this,this._def)}or(t){return pg.create([this,t],this._def)}and(t){return gg.create(this,t,this._def)}transform(t){return new es({...Qe(this._def),schema:this,typeName:Ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new bg({...Qe(this._def),innerType:this,defaultValue:n,typeName:Ue.ZodDefault})}brand(){return new GD({typeName:Ue.ZodBranded,type:this,...Qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _1({...Qe(this._def),innerType:this,catchValue:n,typeName:Ue.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return hm.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ule=/^c[^\s-]{8,}$/i,cle=/^[a-z][a-z0-9]*$/,dle=/[0-9A-HJKMNP-TV-Z]{26}/,fle=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,hle=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,ple=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,gle=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,mle=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,yle=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function vle(e,t){return!!((t==="v4"||!t)&&gle.test(e)||(t==="v6"||!t)&&mle.test(e))}class Go extends tt{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:me.invalid_string,...Le.errToObj(r)}),this.nonempty=t=>this.min(1,Le.errToObj(t)),this.trim=()=>new Go({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Go({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Go({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){const o=this._getOrReturnCtx(t);return Te(o,{code:me.invalid_type,expected:xe.string,received:o.parsedType}),je}const r=new Wr;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:me.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:me.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=t.data.length>o.value,a=t.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(t,i),s?Te(i,{code:me.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Te(i,{code:me.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")hle.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"email",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")ple.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"emoji",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")fle.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"uuid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")ule.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cuid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")cle.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cuid2",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")dle.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"ulid",code:me.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Te(i,{validation:"url",code:me.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"regex",code:me.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),Te(i,{code:me.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),Te(i,{code:me.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Te(i,{code:me.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?yle(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:me.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?vle(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"ip",code:me.invalid_string,message:o.message}),r.dirty()):St.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new Go({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Le.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Le.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Le.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Go.create=e=>{var t;return new Go({checks:[],typeName:Ue.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Qe(e)})};function _le(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}class Ul extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){const o=this._getOrReturnCtx(t);return Te(o,{code:me.invalid_type,expected:xe.number,received:o.parsedType}),je}let r;const i=new Wr;for(const o of this._def.checks)o.kind==="int"?St.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:me.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:me.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:me.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?_le(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Te(r,{code:me.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:me.not_finite,message:o.message}),i.dirty()):St.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,r,i){return new Ul({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Le.toString(i)}]})}_addCheck(t){return new Ul({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&St.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ul.create=e=>new Ul({checks:[],typeName:Ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Qe(e)});class zl extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==xe.bigint){const o=this._getOrReturnCtx(t);return Te(o,{code:me.invalid_type,expected:xe.bigint,received:o.parsedType}),je}let r;const i=new Wr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:me.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:me.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:me.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):St.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Le.toString(n))}setLimit(t,n,r,i){return new zl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Le.toString(i)}]})}_addCheck(t){return new zl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}zl.create=e=>{var t;return new zl({checks:[],typeName:Ue.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Qe(e)})};class dg extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){const r=this._getOrReturnCtx(t);return Te(r,{code:me.invalid_type,expected:xe.boolean,received:r.parsedType}),je}return li(t.data)}}dg.create=e=>new dg({typeName:Ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Qe(e)});class nc extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){const o=this._getOrReturnCtx(t);return Te(o,{code:me.invalid_type,expected:xe.date,received:o.parsedType}),je}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Te(o,{code:me.invalid_date}),je}const r=new Wr;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:me.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:me.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):St.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new nc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}nc.create=e=>new nc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ue.ZodDate,...Qe(e)});class m1 extends tt{_parse(t){if(this._getType(t)!==xe.symbol){const r=this._getOrReturnCtx(t);return Te(r,{code:me.invalid_type,expected:xe.symbol,received:r.parsedType}),je}return li(t.data)}}m1.create=e=>new m1({typeName:Ue.ZodSymbol,...Qe(e)});class fg extends tt{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:me.invalid_type,expected:xe.undefined,received:r.parsedType}),je}return li(t.data)}}fg.create=e=>new fg({typeName:Ue.ZodUndefined,...Qe(e)});class hg extends tt{_parse(t){if(this._getType(t)!==xe.null){const r=this._getOrReturnCtx(t);return Te(r,{code:me.invalid_type,expected:xe.null,received:r.parsedType}),je}return li(t.data)}}hg.create=e=>new hg({typeName:Ue.ZodNull,...Qe(e)});class wf extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return li(t.data)}}wf.create=e=>new wf({typeName:Ue.ZodAny,...Qe(e)});class ju extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return li(t.data)}}ju.create=e=>new ju({typeName:Ue.ZodUnknown,...Qe(e)});class Ra extends tt{_parse(t){const n=this._getOrReturnCtx(t);return Te(n,{code:me.invalid_type,expected:xe.never,received:n.parsedType}),je}}Ra.create=e=>new Ra({typeName:Ue.ZodNever,...Qe(e)});class y1 extends tt{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:me.invalid_type,expected:xe.void,received:r.parsedType}),je}return li(t.data)}}y1.create=e=>new y1({typeName:Ue.ZodVoid,...Qe(e)});class Xo extends tt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==xe.array)return Te(n,{code:me.invalid_type,expected:xe.array,received:n.parsedType}),je;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(Te(n,{code:s?me.too_big:me.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Te(n,{code:me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Te(n,{code:me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new Ms(n,s,n.path,a)))).then(s=>Wr.mergeArray(r,s));const o=[...n.data].map((s,a)=>i.type._parseSync(new Ms(n,s,n.path,a)));return Wr.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Xo({...this._def,minLength:{value:t,message:Le.toString(n)}})}max(t,n){return new Xo({...this._def,maxLength:{value:t,message:Le.toString(n)}})}length(t,n){return new Xo({...this._def,exactLength:{value:t,message:Le.toString(n)}})}nonempty(t){return this.min(1,t)}}Xo.create=(e,t)=>new Xo({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ue.ZodArray,...Qe(t)});function yd(e){if(e instanceof gn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=va.create(yd(r))}return new gn({...e._def,shape:()=>t})}else return e instanceof Xo?new Xo({...e._def,type:yd(e.element)}):e instanceof va?va.create(yd(e.unwrap())):e instanceof ic?ic.create(yd(e.unwrap())):e instanceof Ns?Ns.create(e.items.map(t=>yd(t))):e}class gn extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=St.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==xe.object){const u=this._getOrReturnCtx(t);return Te(u,{code:me.invalid_type,expected:xe.object,received:u.parsedType}),je}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ra&&this._def.unknownKeys==="strip"))for(const u in i.data)s.includes(u)||a.push(u);const l=[];for(const u of s){const d=o[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Ms(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Ra){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")a.length>0&&(Te(i,{code:me.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=i.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Ms(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const f=await d.key;u.push({key:f,value:await d.value,alwaysSet:d.alwaysSet})}return u}).then(u=>Wr.mergeObjectSync(r,u)):Wr.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Le.errToObj,new gn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,s,a;const l=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new gn({...this._def,unknownKeys:"strip"})}passthrough(){return new gn({...this._def,unknownKeys:"passthrough"})}extend(t){return new gn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new gn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ue.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new gn({...this._def,catchall:t})}pick(t){const n={};return St.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new gn({...this._def,shape:()=>n})}omit(t){const n={};return St.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new gn({...this._def,shape:()=>n})}deepPartial(){return yd(this)}partial(t){const n={};return St.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new gn({...this._def,shape:()=>n})}required(t){const n={};return St.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof va;)o=o._def.innerType;n[r]=o}}),new gn({...this._def,shape:()=>n})}keyof(){return jD(St.objectKeys(this.shape))}}gn.create=(e,t)=>new gn({shape:()=>e,unknownKeys:"strip",catchall:Ra.create(),typeName:Ue.ZodObject,...Qe(t)});gn.strictCreate=(e,t)=>new gn({shape:()=>e,unknownKeys:"strict",catchall:Ra.create(),typeName:Ue.ZodObject,...Qe(t)});gn.lazycreate=(e,t)=>new gn({shape:e,unknownKeys:"strip",catchall:Ra.create(),typeName:Ue.ZodObject,...Qe(t)});class pg extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new Ko(a.ctx.common.issues));return Te(n,{code:me.invalid_union,unionErrors:s}),je}if(n.common.async)return Promise.all(r.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(l=>new Ko(l));return Te(n,{code:me.invalid_union,unionErrors:a}),je}}get options(){return this._def.options}}pg.create=(e,t)=>new pg({options:e,typeName:Ue.ZodUnion,...Qe(t)});const cv=e=>e instanceof yg?cv(e.schema):e instanceof es?cv(e.innerType()):e instanceof vg?[e.value]:e instanceof Vl?e.options:e instanceof _g?Object.keys(e.enum):e instanceof bg?cv(e._def.innerType):e instanceof fg?[void 0]:e instanceof hg?[null]:null;class ib extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.object)return Te(n,{code:me.invalid_type,expected:xe.object,received:n.parsedType}),je;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Te(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const s=cv(o.shape[t]);if(!s)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,o)}}return new ib({typeName:Ue.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Qe(r)})}}function P3(e,t){const n=ml(e),r=ml(t);if(e===t)return{valid:!0,data:e};if(n===xe.object&&r===xe.object){const i=St.objectKeys(t),o=St.objectKeys(e).filter(a=>i.indexOf(a)!==-1),s={...e,...t};for(const a of o){const l=P3(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===xe.array&&r===xe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const s=e[o],a=t[o],l=P3(s,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===xe.date&&r===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class gg extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,s)=>{if(E3(o)||E3(s))return je;const a=P3(o.value,s.value);return a.valid?((A3(o)||A3(s))&&n.dirty(),{status:n.value,value:a.data}):(Te(r,{code:me.invalid_intersection_types}),je)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}gg.create=(e,t,n)=>new gg({left:e,right:t,typeName:Ue.ZodIntersection,...Qe(n)});class Ns extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.array)return Te(r,{code:me.invalid_type,expected:xe.array,received:r.parsedType}),je;if(r.data.length<this._def.items.length)return Te(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&r.data.length>this._def.items.length&&(Te(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ms(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Wr.mergeArray(n,s)):Wr.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ns({...this._def,rest:t})}}Ns.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ns({items:e,typeName:Ue.ZodTuple,rest:null,...Qe(t)})};class mg extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return Te(r,{code:me.invalid_type,expected:xe.object,received:r.parsedType}),je;const i=[],o=this._def.keyType,s=this._def.valueType;for(const a in r.data)i.push({key:o._parse(new Ms(r,a,r.path,a)),value:s._parse(new Ms(r,r.data[a],r.path,a))});return r.common.async?Wr.mergeObjectAsync(n,i):Wr.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof tt?new mg({keyType:t,valueType:n,typeName:Ue.ZodRecord,...Qe(r)}):new mg({keyType:Go.create(),valueType:t,typeName:Ue.ZodRecord,...Qe(n)})}}class v1 extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.map)return Te(r,{code:me.invalid_type,expected:xe.map,received:r.parsedType}),je;const i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new Ms(r,a,r.path,[u,"key"])),value:o._parse(new Ms(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return je;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return je;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}v1.create=(e,t,n)=>new v1({valueType:t,keyType:e,typeName:Ue.ZodMap,...Qe(n)});class rc extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.set)return Te(r,{code:me.invalid_type,expected:xe.set,received:r.parsedType}),je;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Te(r,{code:me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Te(r,{code:me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function s(l){const u=new Set;for(const d of l){if(d.status==="aborted")return je;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>o._parse(new Ms(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new rc({...this._def,minSize:{value:t,message:Le.toString(n)}})}max(t,n){return new rc({...this._def,maxSize:{value:t,message:Le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}rc.create=(e,t)=>new rc({valueType:e,minSize:null,maxSize:null,typeName:Ue.ZodSet,...Qe(t)});class Jd extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.function)return Te(n,{code:me.invalid_type,expected:xe.function,received:n.parsedType}),je;function r(a,l){return h1({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,f1(),cg].filter(u=>!!u),issueData:{code:me.invalid_arguments,argumentsError:l}})}function i(a,l){return h1({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,f1(),cg].filter(u=>!!u),issueData:{code:me.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;return this._def.returns instanceof xf?li(async(...a)=>{const l=new Ko([]),u=await this._def.args.parseAsync(a,o).catch(p=>{throw l.addIssue(r(a,p)),l}),d=await s(...u);return await this._def.returns._def.type.parseAsync(d,o).catch(p=>{throw l.addIssue(i(d,p)),l})}):li((...a)=>{const l=this._def.args.safeParse(a,o);if(!l.success)throw new Ko([r(a,l.error)]);const u=s(...l.data),d=this._def.returns.safeParse(u,o);if(!d.success)throw new Ko([i(u,d.error)]);return d.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Jd({...this._def,args:Ns.create(t).rest(ju.create())})}returns(t){return new Jd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Jd({args:t||Ns.create([]).rest(ju.create()),returns:n||ju.create(),typeName:Ue.ZodFunction,...Qe(r)})}}class yg extends tt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}yg.create=(e,t)=>new yg({getter:e,typeName:Ue.ZodLazy,...Qe(t)});class vg extends tt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Te(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:t.data}}get value(){return this._def.value}}vg.create=(e,t)=>new vg({value:e,typeName:Ue.ZodLiteral,...Qe(t)});function jD(e,t){return new Vl({values:e,typeName:Ue.ZodEnum,...Qe(t)})}class Vl extends tt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{expected:St.joinValues(r),received:n.parsedType,code:me.invalid_type}),je}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{received:n.data,code:me.invalid_enum_value,options:r}),je}return li(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Vl.create(t)}exclude(t){return Vl.create(this.options.filter(n=>!t.includes(n)))}}Vl.create=jD;class _g extends tt{_parse(t){const n=St.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==xe.string&&r.parsedType!==xe.number){const i=St.objectValues(n);return Te(r,{expected:St.joinValues(i),received:r.parsedType,code:me.invalid_type}),je}if(n.indexOf(t.data)===-1){const i=St.objectValues(n);return Te(r,{received:r.data,code:me.invalid_enum_value,options:i}),je}return li(t.data)}get enum(){return this._def.values}}_g.create=(e,t)=>new _g({values:e,typeName:Ue.ZodNativeEnum,...Qe(t)});class xf extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.promise&&n.common.async===!1)return Te(n,{code:me.invalid_type,expected:xe.promise,received:n.parsedType}),je;const r=n.parsedType===xe.promise?n.data:Promise.resolve(n.data);return li(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}xf.create=(e,t)=>new xf({type:e,typeName:Ue.ZodPromise,...Qe(t)});class es extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const s=i.transform(r.data);return r.common.async?Promise.resolve(s).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:s,path:r.path,parent:r})}const o={addIssue:s=>{Te(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const s=a=>{const l=i.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?je:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?je:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!p1(s))return s;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>p1(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):s);St.assertNever(i)}}es.create=(e,t,n)=>new es({schema:e,typeName:Ue.ZodEffects,effect:t,...Qe(n)});es.createWithPreprocess=(e,t,n)=>new es({schema:t,effect:{type:"preprocess",transform:e},typeName:Ue.ZodEffects,...Qe(n)});class va extends tt{_parse(t){return this._getType(t)===xe.undefined?li(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}va.create=(e,t)=>new va({innerType:e,typeName:Ue.ZodOptional,...Qe(t)});class ic extends tt{_parse(t){return this._getType(t)===xe.null?li(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ic.create=(e,t)=>new ic({innerType:e,typeName:Ue.ZodNullable,...Qe(t)});class bg extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===xe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}bg.create=(e,t)=>new bg({innerType:e,typeName:Ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Qe(t)});class _1 extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return g1(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ko(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ko(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_1.create=(e,t)=>new _1({innerType:e,typeName:Ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Qe(t)});class b1 extends tt{_parse(t){if(this._getType(t)!==xe.nan){const r=this._getOrReturnCtx(t);return Te(r,{code:me.invalid_type,expected:xe.nan,received:r.parsedType}),je}return{status:"valid",value:t.data}}}b1.create=e=>new b1({typeName:Ue.ZodNaN,...Qe(e)});const ble=Symbol("zod_brand");class GD extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class hm extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?je:o.status==="dirty"?(n.dirty(),VD(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?je:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new hm({in:t,out:n,typeName:Ue.ZodPipeline})}}const HD=(e,t={},n)=>e?wf.create().superRefine((r,i)=>{var o,s;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:!0,u=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...u,fatal:l})}}):wf.create(),Sle={object:gn.lazycreate};var Ue;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(Ue||(Ue={}));const wle=(e,t={message:`Input not instance of ${e.name}`})=>HD(n=>n instanceof e,t),WD=Go.create,qD=Ul.create,xle=b1.create,Cle=zl.create,KD=dg.create,Tle=nc.create,Ele=m1.create,Ale=fg.create,Ple=hg.create,Rle=wf.create,Ole=ju.create,kle=Ra.create,Ile=y1.create,Mle=Xo.create,Nle=gn.create,Lle=gn.strictCreate,Dle=pg.create,$le=ib.create,Fle=gg.create,Ble=Ns.create,Ule=mg.create,zle=v1.create,Vle=rc.create,jle=Jd.create,Gle=yg.create,Hle=vg.create,Wle=Vl.create,qle=_g.create,Kle=xf.create,I9=es.create,Xle=va.create,Yle=ic.create,Qle=es.createWithPreprocess,Zle=hm.create,Jle=()=>WD().optional(),eue=()=>qD().optional(),tue=()=>KD().optional(),nue={string:e=>Go.create({...e,coerce:!0}),number:e=>Ul.create({...e,coerce:!0}),boolean:e=>dg.create({...e,coerce:!0}),bigint:e=>zl.create({...e,coerce:!0}),date:e=>nc.create({...e,coerce:!0})},rue=je;var wt=Object.freeze({__proto__:null,defaultErrorMap:cg,setErrorMap:ale,getErrorMap:f1,makeIssue:h1,EMPTY_PATH:lle,addIssueToContext:Te,ParseStatus:Wr,INVALID:je,DIRTY:VD,OK:li,isAborted:E3,isDirty:A3,isValid:p1,isAsync:g1,get util(){return St},get objectUtil(){return T3},ZodParsedType:xe,getParsedType:ml,ZodType:tt,ZodString:Go,ZodNumber:Ul,ZodBigInt:zl,ZodBoolean:dg,ZodDate:nc,ZodSymbol:m1,ZodUndefined:fg,ZodNull:hg,ZodAny:wf,ZodUnknown:ju,ZodNever:Ra,ZodVoid:y1,ZodArray:Xo,ZodObject:gn,ZodUnion:pg,ZodDiscriminatedUnion:ib,ZodIntersection:gg,ZodTuple:Ns,ZodRecord:mg,ZodMap:v1,ZodSet:rc,ZodFunction:Jd,ZodLazy:yg,ZodLiteral:vg,ZodEnum:Vl,ZodNativeEnum:_g,ZodPromise:xf,ZodEffects:es,ZodTransformer:es,ZodOptional:va,ZodNullable:ic,ZodDefault:bg,ZodCatch:_1,ZodNaN:b1,BRAND:ble,ZodBranded:GD,ZodPipeline:hm,custom:HD,Schema:tt,ZodSchema:tt,late:Sle,get ZodFirstPartyTypeKind(){return Ue},coerce:nue,any:Rle,array:Mle,bigint:Cle,boolean:KD,date:Tle,discriminatedUnion:$le,effect:I9,enum:Wle,function:jle,instanceof:wle,intersection:Fle,lazy:Gle,literal:Hle,map:zle,nan:xle,nativeEnum:qle,never:kle,null:Ple,nullable:Yle,number:qD,object:Nle,oboolean:tue,onumber:eue,optional:Xle,ostring:Jle,pipeline:Zle,preprocess:Qle,promise:Kle,record:Ule,set:Vle,strictObject:Lle,string:WD,symbol:Ele,transformer:I9,tuple:Ble,undefined:Ale,union:Dle,unknown:Ole,void:Ile,NEVER:rue,ZodIssueCode:me,quotelessJson:sle,ZodError:Ko});const iue=wt.string(),nRe=e=>iue.safeParse(e).success,oue=wt.string(),rRe=e=>oue.safeParse(e).success,sue=wt.string(),iRe=e=>sue.safeParse(e).success,aue=wt.string(),oRe=e=>aue.safeParse(e).success,lue=wt.number().int().min(1),sRe=e=>lue.safeParse(e).success,uue=wt.number().min(1),aRe=e=>uue.safeParse(e).success,cue=wt.enum(["euler","deis","ddim","ddpm","dpmpp_2s","dpmpp_2m","dpmpp_2m_sde","dpmpp_sde","heun","kdpm_2","lms","pndm","unipc","euler_k","dpmpp_2s_k","dpmpp_2m_k","dpmpp_2m_sde_k","dpmpp_sde_k","heun_k","lms_k","euler_a","kdpm_2_a"]),lRe=e=>cue.safeParse(e).success,uRe={euler:"Euler",deis:"DEIS",ddim:"DDIM",ddpm:"DDPM",dpmpp_sde:"DPM++ SDE",dpmpp_2s:"DPM++ 2S",dpmpp_2m:"DPM++ 2M",dpmpp_2m_sde:"DPM++ 2M SDE",heun:"Heun",kdpm_2:"KDPM 2",lms:"LMS",pndm:"PNDM",unipc:"UniPC",euler_k:"Euler Karras",dpmpp_sde_k:"DPM++ SDE Karras",dpmpp_2s_k:"DPM++ 2S Karras",dpmpp_2m_k:"DPM++ 2M Karras",dpmpp_2m_sde_k:"DPM++ 2M SDE Karras",heun_k:"Heun Karras",lms_k:"LMS Karras",euler_a:"Euler Ancestral",kdpm_2_a:"KDPM 2 Ancestral"},due=wt.number().int().min(0).max(ole),cRe=e=>due.safeParse(e).success,fue=wt.number().multipleOf(8).min(64),dRe=e=>fue.safeParse(e).success,hue=wt.number().multipleOf(8).min(64),fRe=e=>hue.safeParse(e).success,pm=wt.enum(["sd-1","sd-2","sdxl","sdxl-refiner"]),bT=wt.object({model_name:wt.string().min(1),base_model:pm,model_type:wt.literal("main")}),hRe=e=>bT.safeParse(e).success,XD=wt.object({model_name:wt.string().min(1),base_model:wt.literal("sdxl-refiner"),model_type:wt.literal("main")}),pRe=e=>XD.safeParse(e).success,pue=wt.object({model_name:wt.string().min(1),base_model:pm,model_type:wt.literal("onnx")}),YD=wt.union([bT,pue]),gue=wt.object({model_name:wt.string().min(1),base_model:pm}),gRe=wt.object({model_name:wt.string().min(1),base_model:pm}),mRe=wt.object({model_name:wt.string().min(1),base_model:pm}),mue=wt.number().min(0).max(1),yRe=e=>mue.safeParse(e).success;wt.enum(["fp16","fp32"]);const yue=wt.number().min(1).max(10),vRe=e=>yue.safeParse(e).success,vue=wt.number().min(0).max(1),_Re=e=>vue.safeParse(e).success,La={cfgScale:7.5,height:512,img2imgStrength:.75,infillMethod:"patchmatch",iterations:1,perlin:0,positivePrompt:"",negativePrompt:"",scheduler:"euler",seamBlur:16,seamSize:96,seamSteps:30,seamStrength:.7,seed:0,seedWeights:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,shouldRandomizeSeed:!0,shouldUseNoiseSettings:!1,steps:50,threshold:0,tileSize:32,variationAmount:.1,width:512,shouldUseSymmetry:!1,horizontalSymmetrySteps:0,verticalSymmetrySteps:0,model:null,vae:null,vaePrecision:"fp32",seamlessXAxis:!1,seamlessYAxis:!1,clipSkip:0,shouldUseCpuNoise:!0,shouldShowAdvancedOptions:!1,aspectRatio:null},_ue=La,QD=yn({name:"generation",initialState:_ue,reducers:{setPositivePrompt:(e,t)=>{e.positivePrompt=t.payload},setNegativePrompt:(e,t)=>{e.negativePrompt=t.payload},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},clampSymmetrySteps:e=>{e.horizontalSymmetrySteps=bl(e.horizontalSymmetrySteps,0,e.steps),e.verticalSymmetrySteps=bl(e.verticalSymmetrySteps,0,e.steps)},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},toggleSize:e=>{const[t,n]=[e.width,e.height];e.width=n,e.height=t},setScheduler:(e,t)=>{e.scheduler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setSeamlessXAxis:(e,t)=>{e.seamlessXAxis=t.payload},setSeamlessYAxis:(e,t)=>{e.seamlessYAxis=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload,e.shouldGenerateVariations=!0,e.variationAmount=0},resetParametersState:e=>({...e,...La}),setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setSeamSize:(e,t)=>{e.seamSize=t.payload},setSeamBlur:(e,t)=>{e.seamBlur=t.payload},setSeamStrength:(e,t)=>{e.seamStrength=t.payload},setSeamSteps:(e,t)=>{e.seamSteps=t.payload},setTileSize:(e,t)=>{e.tileSize=t.payload},setInfillMethod:(e,t)=>{e.infillMethod=t.payload},setShouldUseSymmetry:(e,t)=>{e.shouldUseSymmetry=t.payload},setHorizontalSymmetrySteps:(e,t)=>{e.horizontalSymmetrySteps=t.payload},setVerticalSymmetrySteps:(e,t)=>{e.verticalSymmetrySteps=t.payload},setShouldUseNoiseSettings:(e,t)=>{e.shouldUseNoiseSettings=t.payload},initialImageChanged:(e,t)=>{const{image_name:n,width:r,height:i}=t.payload;e.initialImage={imageName:n,width:r,height:i}},modelChanged:(e,t)=>{if(e.model=t.payload,e.model===null)return;const{maxClip:n}=ile[e.model.base_model];e.clipSkip=bl(e.clipSkip,0,n)},vaeSelected:(e,t)=>{e.vae=t.payload},vaePrecisionChanged:(e,t)=>{e.vaePrecision=t.payload},setClipSkip:(e,t)=>{e.clipSkip=t.payload},shouldUseCpuNoiseChanged:(e,t)=>{e.shouldUseCpuNoise=t.payload},setShouldShowAdvancedOptions:(e,t)=>{e.shouldShowAdvancedOptions=t.payload,t.payload||(e.clipSkip=0)},setAspectRatio:(e,t)=>{const n=t.payload;e.aspectRatio=n,n&&(e.height=Ss(e.width/n,8))}},extraReducers:e=>{e.addCase(nle,(t,n)=>{var i;const r=(i=n.payload.sd)==null?void 0:i.defaultModel;if(r&&!t.model){const[o,s,a]=r.split("/"),l=bT.safeParse({model_name:a,base_model:o,model_type:s});l.success&&(t.model=l.data)}}),e.addCase(Sue,(t,n)=>{n.payload||(t.clipSkip=0)})}}),{clampSymmetrySteps:bRe,clearInitialImage:ST,resetParametersState:SRe,resetSeed:wRe,setCfgScale:xRe,setWidth:CRe,setHeight:TRe,toggleSize:ERe,setImg2imgStrength:ARe,setInfillMethod:bue,setIterations:PRe,setPerlin:RRe,setPositivePrompt:ORe,setNegativePrompt:kRe,setScheduler:IRe,setSeamBlur:MRe,setSeamSize:NRe,setSeamSteps:LRe,setSeamStrength:DRe,setSeed:$Re,setSeedWeights:FRe,setShouldFitToWidthHeight:BRe,setShouldGenerateVariations:URe,setShouldRandomizeSeed:zRe,setSteps:VRe,setThreshold:jRe,setTileSize:GRe,setVariationAmount:HRe,setShouldUseSymmetry:WRe,setHorizontalSymmetrySteps:qRe,setVerticalSymmetrySteps:KRe,initialImageChanged:ob,modelChanged:Gu,vaeSelected:ZD,setShouldUseNoiseSettings:XRe,setSeamlessXAxis:YRe,setSeamlessYAxis:QRe,setClipSkip:ZRe,shouldUseCpuNoiseChanged:JRe,setShouldShowAdvancedOptions:Sue,setAspectRatio:wue,vaePrecisionChanged:eOe}=QD.actions,xue=QD.reducer,JD=["txt2img","img2img","unifiedCanvas","nodes","modelManager","batch"],M9=(e,t)=>{typeof t=="number"?e.activeTab=t:e.activeTab=JD.indexOf(t)},e$={activeTab:0,shouldPinParametersPanel:!0,shouldShowParametersPanel:!0,shouldShowImageDetails:!1,shouldUseCanvasBetaLayout:!1,shouldShowExistingModelsInSearch:!1,shouldUseSliders:!1,shouldPinGallery:!0,shouldShowGallery:!0,shouldHidePreview:!1,shouldShowProgressInViewer:!0,shouldShowEmbeddingPicker:!1,favoriteSchedulers:[]},t$=yn({name:"ui",initialState:e$,reducers:{setActiveTab:(e,t)=>{M9(e,t.payload)},setShouldPinParametersPanel:(e,t)=>{e.shouldPinParametersPanel=t.payload,e.shouldShowParametersPanel=!0},setShouldShowParametersPanel:(e,t)=>{e.shouldShowParametersPanel=t.payload},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShouldUseCanvasBetaLayout:(e,t)=>{e.shouldUseCanvasBetaLayout=t.payload},setShouldHidePreview:(e,t)=>{e.shouldHidePreview=t.payload},setShouldShowExistingModelsInSearch:(e,t)=>{e.shouldShowExistingModelsInSearch=t.payload},setShouldUseSliders:(e,t)=>{e.shouldUseSliders=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},togglePinGalleryPanel:e=>{e.shouldPinGallery=!e.shouldPinGallery,e.shouldPinGallery||(e.shouldShowGallery=!0)},togglePinParametersPanel:e=>{e.shouldPinParametersPanel=!e.shouldPinParametersPanel,e.shouldPinParametersPanel||(e.shouldShowParametersPanel=!0)},toggleParametersPanel:e=>{e.shouldShowParametersPanel=!e.shouldShowParametersPanel},toggleGalleryPanel:e=>{e.shouldShowGallery=!e.shouldShowGallery},togglePanels:e=>{e.shouldShowGallery||e.shouldShowParametersPanel?(e.shouldShowGallery=!1,e.shouldShowParametersPanel=!1):(e.shouldShowGallery=!0,e.shouldShowParametersPanel=!0)},setShouldShowProgressInViewer:(e,t)=>{e.shouldShowProgressInViewer=t.payload},favoriteSchedulersChanged:(e,t)=>{e.favoriteSchedulers=t.payload},toggleEmbeddingPicker:e=>{e.shouldShowEmbeddingPicker=!e.shouldShowEmbeddingPicker}},extraReducers(e){e.addCase(ob,t=>{M9(t,"img2img")})}}),{setActiveTab:n$,setShouldPinParametersPanel:tOe,setShouldShowParametersPanel:nOe,setShouldShowImageDetails:rOe,setShouldUseCanvasBetaLayout:Cue,setShouldShowExistingModelsInSearch:iOe,setShouldUseSliders:oOe,setShouldHidePreview:sOe,setShouldShowGallery:aOe,togglePanels:lOe,togglePinGalleryPanel:uOe,togglePinParametersPanel:cOe,toggleParametersPanel:dOe,toggleGalleryPanel:fOe,setShouldShowProgressInViewer:hOe,favoriteSchedulersChanged:pOe,toggleEmbeddingPicker:gOe}=t$.actions,Tue=t$.reducer;let ti=[],gm=(e,t)=>{let n=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},l:t||0,lc:0,listen(i,o){return r.lc=n.push(i,o||r.l)/2,()=>{let s=n.indexOf(i);~s&&(n.splice(s,2),r.lc--,r.lc||r.off())}},notify(i){let o=!ti.length;for(let s=0;s<n.length;s+=2)ti.push(n[s],r.value,i,n[s+1]);if(o){for(let s=0;s<ti.length;s+=4){let a=!1;for(let l=s+7;l<ti.length;l+=4)if(ti[l]<ti[s+3]){a=!0;break}a?ti.push(ti[s],ti[s+1],ti[s+2],ti[s+3]):ti[s](ti[s+1],ti[s+2])}ti.length=0}},off(){},set(i){r.value!==i&&(r.value=i,r.notify())},subscribe(i,o){let s=r.listen(i,o);return i(r.value),s},value:e};return r};const Eue=5,p0=6,g0=10;let Aue=(e,t,n,r)=>(e.events=e.events||{},e.events[n+g0]||(e.events[n+g0]=r(i=>{e.events[n].reduceRight((o,s)=>(s(o),o),{shared:{},...i})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let i=e.events[n],o=i.indexOf(t);i.splice(o,1),i.length||(delete e.events[n],e.events[n+g0](),delete e.events[n+g0])}),Pue=1e3,Rue=(e,t)=>Aue(e,r=>{let i=t(r);i&&e.events[p0].push(i)},Eue,r=>{let i=e.listen;e.listen=(...s)=>(!e.lc&&!e.active&&(e.active=!0,r()),i(...s));let o=e.off;return e.events[p0]=[],e.off=()=>{o(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let s of e.events[p0])s();e.events[p0]=[]}},Pue)},()=>{e.listen=i,e.off=o}}),Oue=(e,t)=>{Array.isArray(e)||(e=[e]);let n,r=()=>{let o=e.map(s=>s.get());(n===void 0||o.some((s,a)=>s!==n[a]))&&(n=o,i.set(t(...o)))},i=gm(void 0,Math.max(...e.map(o=>o.l))+1);return Rue(i,()=>{let o=e.map(s=>s.listen(r,i.l));return r(),()=>{for(let s of o)s()}}),i};const kue={"Content-Type":"application/json"},Iue=/\/*$/;function Mue(e){const t=new URLSearchParams;if(e&&typeof e=="object")for(const[n,r]of Object.entries(e))r!=null&&t.set(n,r);return t.toString()}function Nue(e){return JSON.stringify(e)}function Lue(e,t){let n=`${t.baseUrl?t.baseUrl.replace(Iue,""):""}${e}`;if(t.params.path)for(const[r,i]of Object.entries(t.params.path))n=n.replace(`{${r}}`,encodeURIComponent(String(i)));if(t.params.query){const r=t.querySerializer(t.params.query);r&&(n+=`?${r}`)}return n}function Due(e={}){const{fetch:t=globalThis.fetch,querySerializer:n,bodySerializer:r,...i}=e,o=new Headers({...kue,...i.headers??{}});async function s(a,l){const{headers:u,body:d,params:f={},parseAs:p="json",querySerializer:g=n??Mue,bodySerializer:m=r??Nue,...v}=l||{},x=Lue(a,{baseUrl:i.baseUrl,params:f,querySerializer:g}),_=new Headers(o),b=new Headers(u);for(const[T,E]of b.entries())E==null?_.delete(T):_.set(T,E);const y={redirect:"follow",...i,...v,headers:_};d&&(y.body=m(d)),y.body instanceof FormData&&_.delete("Content-Type");const S=await t(x,y);if(S.status===204||S.headers.get("Content-Length")==="0")return S.ok?{data:{},response:S}:{error:{},response:S};if(S.ok){let T=S.body;if(p!=="stream"){const E=S.clone();T=typeof E[p]=="function"?await E[p]():await E.text()}return{data:T,response:S}}let C={};try{C=await S.clone().json()}catch{C=await S.clone().text()}return{error:C,response:S}}return{async get(a,l){return s(a,{...l,method:"GET"})},async put(a,l){return s(a,{...l,method:"PUT"})},async post(a,l){return s(a,{...l,method:"POST"})},async del(a,l){return s(a,{...l,method:"DELETE"})},async options(a,l){return s(a,{...l,method:"OPTIONS"})},async head(a,l){return s(a,{...l,method:"HEAD"})},async patch(a,l){return s(a,{...l,method:"PATCH"})},async trace(a,l){return s(a,{...l,method:"TRACE"})}}}const Sg=gm(),wg=gm(),S1=gm(),sb=Oue([Sg,wg,S1],(e,t,n)=>Due({headers:{...e?{Authorization:`Bearer ${e}`}:{},...n?{"project-id":n}:{}},baseUrl:`${t??""}`})),Mr=Bl("api/sessionCreated",async(e,{rejectWithValue:t})=>{const{graph:n}=e,{post:r}=sb.get(),{data:i,error:o,response:s}=await r("/api/v1/sessions/",{body:n});return o?t({arg:e,status:s.status,error:o}):i}),$ue=e=>Pi(e)&&"status"in e,mm=Bl("api/sessionInvoked",async(e,{rejectWithValue:t})=>{const{session_id:n}=e,{put:r}=sb.get(),{data:i,error:o,response:s}=await r("/api/v1/sessions/{session_id}/invoke",{params:{query:{all:!0},path:{session_id:n}}});if(o)return $ue(o)&&o.status===403?t({arg:e,status:s.status,error:o.body.detail}):t({arg:e,status:s.status,error:o})}),mc=Bl("api/sessionCanceled",async(e,{rejectWithValue:t})=>{const{session_id:n}=e,{del:r}=sb.get(),{data:i,error:o,response:s}=await r("/api/v1/sessions/{session_id}/invoke",{params:{path:{session_id:n}}});return o?t({arg:e,error:o}):i});Bl("api/listSessions",async(e,{rejectWithValue:t})=>{const{params:n}=e,{get:r}=sb.get(),{data:i,error:o,response:s}=await r("/api/v1/sessions/",{params:n});return o?t({arg:e,error:o}):i});const r$=Co(Mr.rejected,mm.rejected),td=(e,t,n,r,i,o,s)=>{const a=Math.floor(e/2-(n+i/2)*s),l=Math.floor(t/2-(r+o/2)*s);return{x:a,y:l}},nd=(e,t,n,r,i=.95)=>{const o=e*i/n,s=t*i/r;return Math.min(1,Math.min(o,s))},mOe=.999,yOe=.1,vOe=20,zh=.95,_Oe=30,bOe=10,N9=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),_u=e=>{const{width:t,height:n}=e,r={width:t,height:n},i=512*512,o=t/n;let s=t*n,a=448;for(;s<i;)if(a+=64,t===n){r.width=512,r.height=512;break}else o>1?(r.width=a,r.height=Ss(a/o,64)):o<1&&(r.height=a,r.width=Ss(a*o,64)),s=r.width*r.height;return r},Fue=e=>({width:Ss(e.width,64),height:Ss(e.height,64)}),SOe=[{label:"Base",value:"base"},{label:"Mask",value:"mask"}],wOe=[{label:"Auto",value:"auto"},{label:"Manual",value:"manual"},{label:"None",value:"none"}],i$=e=>e.kind==="line"&&e.layer==="mask",xOe=e=>e.kind==="line"&&e.layer==="base",L9=e=>e.kind==="image"&&e.layer==="base",COe=e=>e.kind==="fillRect"&&e.layer==="base",TOe=e=>e.kind==="eraseRect"&&e.layer==="base",Bue=e=>e.kind==="line",vd={objects:[],stagingArea:{images:[],selectedImageIndex:-1}},o$={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},boundingBoxScaleMethod:"auto",brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},colorPickerColor:{r:90,g:90,b:255,a:1},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:vd,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],scaledBoundingBoxDimensions:{width:512,height:512},shouldAntialias:!0,shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldRestrictStrokesToBox:!0,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},s$=yn({name:"canvas",initialState:o$,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(zr(e.layerState)),e.layerState.objects=e.layerState.objects.filter(t=>!i$(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,{width:r,height:i}=n,{stageDimensions:o}=e,s={width:f0(bl(r,64,512),64),height:f0(bl(i,64,512),64)},a={x:Ss(r/2-s.width/2,64),y:Ss(i/2-s.height/2,64)};if(e.boundingBoxScaleMethod==="auto"){const d=_u(s);e.scaledBoundingBoxDimensions=d}e.boundingBoxDimensions=s,e.boundingBoxCoordinates=a,e.pastLayerStates.push(zr(e.layerState)),e.layerState={...vd,objects:[{kind:"image",layer:"base",x:0,y:0,width:r,height:i,imageName:n.image_name}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const l=nd(o.width,o.height,r,i,zh),u=td(o.width,o.height,0,0,r,i,l);e.stageScale=l,e.stageCoordinates=u,e.doesCanvasNeedScaling=!0},setBoundingBoxDimensions:(e,t)=>{const n=Fue(t.payload);if(e.boundingBoxDimensions=n,e.boundingBoxScaleMethod==="auto"){const r=_u(n);e.scaledBoundingBoxDimensions=r}},flipBoundingBoxAxes:e=>{const[t,n]=[e.boundingBoxDimensions.width,e.boundingBoxDimensions.height];e.boundingBoxDimensions={width:n,height:t}},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=N9(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=[]},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},canvasSessionIdChanged:(e,t)=>{e.layerState.stagingArea.sessionId=t.payload},stagingAreaInitialized:(e,t)=>{const{sessionId:n,boundingBox:r}=t.payload;e.layerState.stagingArea={boundingBox:r,sessionId:n,images:[],selectedImageIndex:-1}},addImageToStagingArea:(e,t)=>{const n=t.payload;!n||!e.layerState.stagingArea.boundingBox||(e.pastLayerStates.push(zr(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...e.layerState.stagingArea.boundingBox,imageName:n.image_name}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(zr(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...vd.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingOutline=!0},addFillRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,brushColor:r}=e;e.pastLayerStates.push(zr(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"fillRect",layer:"base",...t,...n,color:r}),e.futureLayerStates=[]},addEraseRect:e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n}=e;e.pastLayerStates.push(zr(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"eraseRect",layer:"base",...t,...n}),e.futureLayerStates=[]},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o,shouldRestrictStrokesToBox:s}=e;if(n==="move"||n==="colorPicker")return;const a=o/2,l=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(zr(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const u={kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...l};s&&(u.clip={...e.boundingBoxCoordinates,...e.boundingBoxDimensions}),e.layerState.objects.push(u),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(Bue);n&&n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();t&&(e.futureLayerStates.unshift(zr(e.layerState)),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();t&&(e.pastLayerStates.push(zr(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(zr(e.layerState)),e.layerState=vd,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(L9),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const d=nd(i.width,i.height,512,512,zh),f=td(i.width,i.height,0,0,512,512,d),p={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=f,e.stageDimensions=i,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=p,e.boundingBoxScaleMethod==="auto"){const g=_u(p);e.scaledBoundingBoxDimensions=g}return}const{width:o,height:s}=r,l=nd(t,n,o,s,.95),u=td(i.width,i.height,0,0,o,s,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=N9(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(L9)){const i=nd(r.width,r.height,512,512,zh),o=td(r.width,r.height,0,0,512,512,i),s={width:512,height:512};if(e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=s,e.boundingBoxScaleMethod==="auto"){const a=_u(s);e.scaledBoundingBoxDimensions=a}}},resetCanvasView:(e,t)=>{const{contentRect:n,shouldScaleTo1:r}=t.payload,{stageDimensions:{width:i,height:o}}=e,{x:s,y:a,width:l,height:u}=n;if(l!==0&&u!==0){const d=r?1:nd(i,o,l,u,zh),f=td(i,o,s,a,l,u,d);e.stageScale=d,e.stageCoordinates=f}else{const d=nd(i,o,512,512,zh),f=td(i,o,0,0,512,512,d),p={width:512,height:512};if(e.stageScale=d,e.stageCoordinates=f,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions=p,e.boundingBoxScaleMethod==="auto"){const g=_u(p);e.scaledBoundingBoxDimensions=g}}},nextStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{if(!e.layerState.stagingArea.images.length)return;const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:(e,t)=>{if(!e.layerState.stagingArea.images.length)return;const{images:n,selectedImageIndex:r}=e.layerState.stagingArea;e.pastLayerStates.push(zr(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift();const i=n[r];i&&e.layerState.objects.push({...i}),e.layerState.stagingArea={...vd.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0,e.shouldShowStagingImage=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,s=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>s){const a={width:f0(bl(o,64,512),64),height:f0(bl(s,64,512),64)},l={x:Ss(o/2-a.width/2,64),y:Ss(s/2-a.height/2,64)};if(e.boundingBoxDimensions=a,e.boundingBoxCoordinates=l,e.boundingBoxScaleMethod==="auto"){const u=_u(a);e.scaledBoundingBoxDimensions=u}}},setBoundingBoxScaleMethod:(e,t)=>{if(e.boundingBoxScaleMethod=t.payload,t.payload==="auto"){const n=_u(e.boundingBoxDimensions);e.scaledBoundingBoxDimensions=n}},setScaledBoundingBoxDimensions:(e,t)=>{e.scaledBoundingBoxDimensions=t.payload},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldRestrictStrokesToBox:(e,t)=>{e.shouldRestrictStrokesToBox=t.payload},setShouldAntialias:(e,t)=>{e.shouldAntialias=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setColorPickerColor:(e,t)=>{e.colorPickerColor=t.payload},commitColorPickerColor:e=>{e.brushColor={...e.colorPickerColor,a:e.brushColor.a},e.tool="brush"},setMergedCanvas:(e,t)=>{e.pastLayerStates.push(zr(e.layerState)),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1},mouseLeftCanvas:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isTransformingBoundingBox=!1}},extraReducers:e=>{e.addCase(mc.pending,t=>{t.layerState.stagingArea.images.length||(t.layerState.stagingArea=vd.stagingArea)}),e.addCase(Cue,t=>{t.doesCanvasNeedScaling=!0}),e.addCase(n$,t=>{t.doesCanvasNeedScaling=!0}),e.addCase(wue,(t,n)=>{const r=n.payload;r&&(t.boundingBoxDimensions.height=Ss(t.boundingBoxDimensions.width/r,64))})}}),{addEraseRect:EOe,addFillRect:AOe,addImageToStagingArea:Uue,addLine:POe,addPointToCurrentLine:ROe,clearCanvasHistory:OOe,clearMask:kOe,commitColorPickerColor:IOe,commitStagingAreaImage:zue,discardStagedImages:MOe,fitBoundingBoxToStage:NOe,mouseLeftCanvas:LOe,nextStagingAreaImage:DOe,prevStagingAreaImage:$Oe,redo:FOe,resetCanvas:wT,resetCanvasInteractionState:BOe,resetCanvasView:UOe,resizeAndScaleCanvas:zOe,resizeCanvas:VOe,setBoundingBoxCoordinates:jOe,setBoundingBoxDimensions:GOe,setBoundingBoxPreviewFill:HOe,setBoundingBoxScaleMethod:WOe,flipBoundingBoxAxes:qOe,setBrushColor:KOe,setBrushSize:XOe,setCanvasContainerDimensions:YOe,setColorPickerColor:QOe,setCursorPosition:ZOe,setDoesCanvasNeedScaling:JOe,setInitialCanvasImage:a$,setIsDrawing:eke,setIsMaskEnabled:tke,setIsMouseOverBoundingBox:nke,setIsMoveBoundingBoxKeyHeld:rke,setIsMoveStageKeyHeld:ike,setIsMovingBoundingBox:oke,setIsMovingStage:ske,setIsTransformingBoundingBox:ake,setLayer:lke,setMaskColor:uke,setMergedCanvas:Vue,setShouldAutoSave:cke,setShouldCropToBoundingBoxOnSave:dke,setShouldDarkenOutsideBoundingBox:fke,setShouldLockBoundingBox:hke,setShouldPreserveMaskedArea:pke,setShouldShowBoundingBox:gke,setShouldShowBrush:mke,setShouldShowBrushPreview:yke,setShouldShowCanvasDebugInfo:vke,setShouldShowCheckboardTransparency:_ke,setShouldShowGrid:bke,setShouldShowIntermediates:Ske,setShouldShowStagingImage:wke,setShouldShowStagingOutline:xke,setShouldSnapToGrid:Cke,setStageCoordinates:Tke,setStageScale:Eke,setTool:Ake,toggleShouldLockBoundingBox:Pke,toggleTool:Rke,undo:Oke,setScaledBoundingBoxDimensions:kke,setShouldRestrictStrokesToBox:Ike,stagingAreaInitialized:jue,canvasSessionIdChanged:Gue,setShouldAntialias:Mke}=s$.actions,Hue=s$.reducer,jr=["general"],Sl=["control","mask","user","other"],Wue=100,Nke=20;var w1={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
|
||
*/w1.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",f=1,p=2,g=4,m=1,v=2,x=1,_=2,b=4,y=8,S=16,C=32,T=64,E=128,P=256,k=512,O=30,M="...",G=800,U=16,A=1,N=2,F=3,B=1/0,D=9007199254740991,V=17976931348623157e292,j=0/0,q=4294967295,Z=q-1,ee=q>>>1,ie=[["ary",E],["bind",x],["bindKey",_],["curry",y],["curryRight",S],["flip",k],["partial",C],["partialRight",T],["rearg",P]],se="[object Arguments]",le="[object Array]",W="[object AsyncFunction]",ne="[object Boolean]",fe="[object Date]",pe="[object DOMException]",ve="[object Error]",ye="[object Function]",We="[object GeneratorFunction]",Me="[object Map]",Ee="[object Number]",lt="[object Null]",_e="[object Object]",jt="[object Promise]",Hn="[object Proxy]",Bt="[object RegExp]",it="[object Set]",gt="[object String]",Jt="[object Symbol]",Nr="[object Undefined]",yr="[object WeakMap]",hi="[object WeakSet]",wn="[object ArrayBuffer]",on="[object DataView]",Wn="[object Float32Array]",sn="[object Float64Array]",Gt="[object Int8Array]",vr="[object Int16Array]",Lr="[object Int32Array]",Xr="[object Uint8Array]",Ii="[object Uint8ClampedArray]",En="[object Uint16Array]",Yr="[object Uint32Array]",Vs=/\b__p \+= '';/g,Ji=/\b(__p \+=) '' \+/g,js=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Ot=/[&<>"']/g,qn=RegExp(Xt.source),Dn=RegExp(Ot.source),or=/<%-([\s\S]+?)%>/g,_r=/<%([\s\S]+?)%>/g,br=/<%=([\s\S]+?)%>/g,eo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sr=/^\w*$/,Kn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mi=/[\\^$.*+?()[\]{}|]/g,is=RegExp(Mi.source),to=/^\s+/,za=/\s/,Ao=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wr=/\{\n\/\* \[wrapped with (.+)\] \*/,Gs=/,? & /,Zf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jf=/[()=,{}\[\]\/\s]/,eh=/\\(\\)?/g,th=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Po=/\w*$/,nh=/^[-+]0x[0-9a-f]+$/i,rh=/^0b[01]+$/i,kc=/^\[object .+?Constructor\]$/,ih=/^0o[0-7]+$/i,oh=/^(?:0|[1-9]\d*)$/,sh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,os=/($^)/,ah=/['\n\r\u2028\u2029\\]/g,Ro="\\ud800-\\udfff",Va="\\u0300-\\u036f",lh="\\ufe20-\\ufe2f",ja="\\u20d0-\\u20ff",uu=Va+lh+ja,Ic="\\u2700-\\u27bf",Ga="a-z\\xdf-\\xf6\\xf8-\\xff",g2="\\xac\\xb1\\xd7\\xf7",Gm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m2="\\u2000-\\u206f",y2=" \\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",Hm="A-Z\\xc0-\\xd6\\xd8-\\xde",Wm="\\ufe0e\\ufe0f",qm=g2+Gm+m2+y2,uh="['’]",v2="["+Ro+"]",Km="["+qm+"]",Mc="["+uu+"]",Xm="\\d+",Nc="["+Ic+"]",Lc="["+Ga+"]",Ym="[^"+Ro+qm+Xm+Ic+Ga+Hm+"]",ch="\\ud83c[\\udffb-\\udfff]",Qm="(?:"+Mc+"|"+ch+")",Zm="[^"+Ro+"]",dh="(?:\\ud83c[\\udde6-\\uddff]){2}",fh="[\\ud800-\\udbff][\\udc00-\\udfff]",Hs="["+Hm+"]",Jm="\\u200d",ey="(?:"+Lc+"|"+Ym+")",_2="(?:"+Hs+"|"+Ym+")",Dc="(?:"+uh+"(?:d|ll|m|re|s|t|ve))?",ty="(?:"+uh+"(?:D|LL|M|RE|S|T|VE))?",ny=Qm+"?",ry="["+Wm+"]?",$c="(?:"+Jm+"(?:"+[Zm,dh,fh].join("|")+")"+ry+ny+")*",hh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ph="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fc=ry+ny+$c,b2="(?:"+[Nc,dh,fh].join("|")+")"+Fc,iy="(?:"+[Zm+Mc+"?",Mc,dh,fh,v2].join("|")+")",gh=RegExp(uh,"g"),oy=RegExp(Mc,"g"),Oo=RegExp(ch+"(?="+ch+")|"+iy+Fc,"g"),cu=RegExp([Hs+"?"+Lc+"+"+Dc+"(?="+[Km,Hs,"$"].join("|")+")",_2+"+"+ty+"(?="+[Km,Hs+ey,"$"].join("|")+")",Hs+"?"+ey+"+"+Dc,Hs+"+"+ty,ph,hh,Xm,b2].join("|"),"g"),S2=RegExp("["+Jm+Ro+uu+Wm+"]"),sy=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,w2=["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"],ay=-1,Ht={};Ht[Wn]=Ht[sn]=Ht[Gt]=Ht[vr]=Ht[Lr]=Ht[Xr]=Ht[Ii]=Ht[En]=Ht[Yr]=!0,Ht[se]=Ht[le]=Ht[wn]=Ht[ne]=Ht[on]=Ht[fe]=Ht[ve]=Ht[ye]=Ht[Me]=Ht[Ee]=Ht[_e]=Ht[Bt]=Ht[it]=Ht[gt]=Ht[yr]=!1;var Ut={};Ut[se]=Ut[le]=Ut[wn]=Ut[on]=Ut[ne]=Ut[fe]=Ut[Wn]=Ut[sn]=Ut[Gt]=Ut[vr]=Ut[Lr]=Ut[Me]=Ut[Ee]=Ut[_e]=Ut[Bt]=Ut[it]=Ut[gt]=Ut[Jt]=Ut[Xr]=Ut[Ii]=Ut[En]=Ut[Yr]=!0,Ut[ve]=Ut[ye]=Ut[yr]=!1;var ly={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},x2={"&":"&","<":"<",">":">",'"':""","'":"'"},H={"&":"&","<":"<",">":">",""":'"',"'":"'"},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},re=parseFloat,we=parseInt,ot=typeof He=="object"&&He&&He.Object===Object&&He,Mt=typeof self=="object"&&self&&self.Object===Object&&self,qe=ot||Mt||Function("return this")(),Je=t&&!t.nodeType&&t,_t=Je&&!0&&e&&!e.nodeType&&e,Qr=_t&&_t.exports===Je,xr=Qr&&ot.process,sr=function(){try{var J=_t&&_t.require&&_t.require("util").types;return J||xr&&xr.binding&&xr.binding("util")}catch{}}(),Bc=sr&&sr.isArrayBuffer,Uc=sr&&sr.isDate,mh=sr&&sr.isMap,S6=sr&&sr.isRegExp,w6=sr&&sr.isSet,x6=sr&&sr.isTypedArray;function Ni(J,ae,oe){switch(oe.length){case 0:return J.call(ae);case 1:return J.call(ae,oe[0]);case 2:return J.call(ae,oe[0],oe[1]);case 3:return J.call(ae,oe[0],oe[1],oe[2])}return J.apply(ae,oe)}function fG(J,ae,oe,Ce){for(var Ve=-1,Ct=J==null?0:J.length;++Ve<Ct;){var Xn=J[Ve];ae(Ce,Xn,oe(Xn),J)}return Ce}function no(J,ae){for(var oe=-1,Ce=J==null?0:J.length;++oe<Ce&&ae(J[oe],oe,J)!==!1;);return J}function hG(J,ae){for(var oe=J==null?0:J.length;oe--&&ae(J[oe],oe,J)!==!1;);return J}function C6(J,ae){for(var oe=-1,Ce=J==null?0:J.length;++oe<Ce;)if(!ae(J[oe],oe,J))return!1;return!0}function Ha(J,ae){for(var oe=-1,Ce=J==null?0:J.length,Ve=0,Ct=[];++oe<Ce;){var Xn=J[oe];ae(Xn,oe,J)&&(Ct[Ve++]=Xn)}return Ct}function uy(J,ae){var oe=J==null?0:J.length;return!!oe&&zc(J,ae,0)>-1}function C2(J,ae,oe){for(var Ce=-1,Ve=J==null?0:J.length;++Ce<Ve;)if(oe(ae,J[Ce]))return!0;return!1}function an(J,ae){for(var oe=-1,Ce=J==null?0:J.length,Ve=Array(Ce);++oe<Ce;)Ve[oe]=ae(J[oe],oe,J);return Ve}function Wa(J,ae){for(var oe=-1,Ce=ae.length,Ve=J.length;++oe<Ce;)J[Ve+oe]=ae[oe];return J}function T2(J,ae,oe,Ce){var Ve=-1,Ct=J==null?0:J.length;for(Ce&&Ct&&(oe=J[++Ve]);++Ve<Ct;)oe=ae(oe,J[Ve],Ve,J);return oe}function pG(J,ae,oe,Ce){var Ve=J==null?0:J.length;for(Ce&&Ve&&(oe=J[--Ve]);Ve--;)oe=ae(oe,J[Ve],Ve,J);return oe}function E2(J,ae){for(var oe=-1,Ce=J==null?0:J.length;++oe<Ce;)if(ae(J[oe],oe,J))return!0;return!1}var gG=A2("length");function mG(J){return J.split("")}function yG(J){return J.match(Zf)||[]}function T6(J,ae,oe){var Ce;return oe(J,function(Ve,Ct,Xn){if(ae(Ve,Ct,Xn))return Ce=Ct,!1}),Ce}function cy(J,ae,oe,Ce){for(var Ve=J.length,Ct=oe+(Ce?1:-1);Ce?Ct--:++Ct<Ve;)if(ae(J[Ct],Ct,J))return Ct;return-1}function zc(J,ae,oe){return ae===ae?RG(J,ae,oe):cy(J,E6,oe)}function vG(J,ae,oe,Ce){for(var Ve=oe-1,Ct=J.length;++Ve<Ct;)if(Ce(J[Ve],ae))return Ve;return-1}function E6(J){return J!==J}function A6(J,ae){var oe=J==null?0:J.length;return oe?R2(J,ae)/oe:j}function A2(J){return function(ae){return ae==null?n:ae[J]}}function P2(J){return function(ae){return J==null?n:J[ae]}}function P6(J,ae,oe,Ce,Ve){return Ve(J,function(Ct,Xn,Wt){oe=Ce?(Ce=!1,Ct):ae(oe,Ct,Xn,Wt)}),oe}function _G(J,ae){var oe=J.length;for(J.sort(ae);oe--;)J[oe]=J[oe].value;return J}function R2(J,ae){for(var oe,Ce=-1,Ve=J.length;++Ce<Ve;){var Ct=ae(J[Ce]);Ct!==n&&(oe=oe===n?Ct:oe+Ct)}return oe}function O2(J,ae){for(var oe=-1,Ce=Array(J);++oe<J;)Ce[oe]=ae(oe);return Ce}function bG(J,ae){return an(ae,function(oe){return[oe,J[oe]]})}function R6(J){return J&&J.slice(0,M6(J)+1).replace(to,"")}function Li(J){return function(ae){return J(ae)}}function k2(J,ae){return an(ae,function(oe){return J[oe]})}function yh(J,ae){return J.has(ae)}function O6(J,ae){for(var oe=-1,Ce=J.length;++oe<Ce&&zc(ae,J[oe],0)>-1;);return oe}function k6(J,ae){for(var oe=J.length;oe--&&zc(ae,J[oe],0)>-1;);return oe}function SG(J,ae){for(var oe=J.length,Ce=0;oe--;)J[oe]===ae&&++Ce;return Ce}var wG=P2(ly),xG=P2(x2);function CG(J){return"\\"+Y[J]}function TG(J,ae){return J==null?n:J[ae]}function Vc(J){return S2.test(J)}function EG(J){return sy.test(J)}function AG(J){for(var ae,oe=[];!(ae=J.next()).done;)oe.push(ae.value);return oe}function I2(J){var ae=-1,oe=Array(J.size);return J.forEach(function(Ce,Ve){oe[++ae]=[Ve,Ce]}),oe}function I6(J,ae){return function(oe){return J(ae(oe))}}function qa(J,ae){for(var oe=-1,Ce=J.length,Ve=0,Ct=[];++oe<Ce;){var Xn=J[oe];(Xn===ae||Xn===d)&&(J[oe]=d,Ct[Ve++]=oe)}return Ct}function dy(J){var ae=-1,oe=Array(J.size);return J.forEach(function(Ce){oe[++ae]=Ce}),oe}function PG(J){var ae=-1,oe=Array(J.size);return J.forEach(function(Ce){oe[++ae]=[Ce,Ce]}),oe}function RG(J,ae,oe){for(var Ce=oe-1,Ve=J.length;++Ce<Ve;)if(J[Ce]===ae)return Ce;return-1}function OG(J,ae,oe){for(var Ce=oe+1;Ce--;)if(J[Ce]===ae)return Ce;return Ce}function jc(J){return Vc(J)?IG(J):gG(J)}function ko(J){return Vc(J)?MG(J):mG(J)}function M6(J){for(var ae=J.length;ae--&&za.test(J.charAt(ae)););return ae}var kG=P2(H);function IG(J){for(var ae=Oo.lastIndex=0;Oo.test(J);)++ae;return ae}function MG(J){return J.match(Oo)||[]}function NG(J){return J.match(cu)||[]}var LG=function J(ae){ae=ae==null?qe:Gc.defaults(qe.Object(),ae,Gc.pick(qe,w2));var oe=ae.Array,Ce=ae.Date,Ve=ae.Error,Ct=ae.Function,Xn=ae.Math,Wt=ae.Object,M2=ae.RegExp,DG=ae.String,ro=ae.TypeError,fy=oe.prototype,$G=Ct.prototype,Hc=Wt.prototype,hy=ae["__core-js_shared__"],py=$G.toString,Nt=Hc.hasOwnProperty,FG=0,N6=function(){var c=/[^.]+$/.exec(hy&&hy.keys&&hy.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),gy=Hc.toString,BG=py.call(Wt),UG=qe._,zG=M2("^"+py.call(Nt).replace(Mi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),my=Qr?ae.Buffer:n,Ka=ae.Symbol,yy=ae.Uint8Array,L6=my?my.allocUnsafe:n,vy=I6(Wt.getPrototypeOf,Wt),D6=Wt.create,$6=Hc.propertyIsEnumerable,_y=fy.splice,F6=Ka?Ka.isConcatSpreadable:n,vh=Ka?Ka.iterator:n,du=Ka?Ka.toStringTag:n,by=function(){try{var c=mu(Wt,"defineProperty");return c({},"",{}),c}catch{}}(),VG=ae.clearTimeout!==qe.clearTimeout&&ae.clearTimeout,jG=Ce&&Ce.now!==qe.Date.now&&Ce.now,GG=ae.setTimeout!==qe.setTimeout&&ae.setTimeout,Sy=Xn.ceil,wy=Xn.floor,N2=Wt.getOwnPropertySymbols,HG=my?my.isBuffer:n,B6=ae.isFinite,WG=fy.join,qG=I6(Wt.keys,Wt),Yn=Xn.max,Dr=Xn.min,KG=Ce.now,XG=ae.parseInt,U6=Xn.random,YG=fy.reverse,L2=mu(ae,"DataView"),_h=mu(ae,"Map"),D2=mu(ae,"Promise"),Wc=mu(ae,"Set"),bh=mu(ae,"WeakMap"),Sh=mu(Wt,"create"),xy=bh&&new bh,qc={},QG=yu(L2),ZG=yu(_h),JG=yu(D2),eH=yu(Wc),tH=yu(bh),Cy=Ka?Ka.prototype:n,wh=Cy?Cy.valueOf:n,z6=Cy?Cy.toString:n;function $(c){if(xn(c)&&!Ge(c)&&!(c instanceof ut)){if(c instanceof io)return c;if(Nt.call(c,"__wrapped__"))return VA(c)}return new io(c)}var Kc=function(){function c(){}return function(h){if(!hn(h))return{};if(D6)return D6(h);c.prototype=h;var w=new c;return c.prototype=n,w}}();function Ty(){}function io(c,h){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}$.templateSettings={escape:or,evaluate:_r,interpolate:br,variable:"",imports:{_:$}},$.prototype=Ty.prototype,$.prototype.constructor=$,io.prototype=Kc(Ty.prototype),io.prototype.constructor=io;function ut(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function nH(){var c=new ut(this.__wrapped__);return c.__actions__=pi(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=pi(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=pi(this.__views__),c}function rH(){if(this.__filtered__){var c=new ut(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function iH(){var c=this.__wrapped__.value(),h=this.__dir__,w=Ge(c),R=h<0,I=w?c.length:0,z=mW(0,I,this.__views__),K=z.start,X=z.end,te=X-K,ce=R?X:K-1,de=this.__iteratees__,he=de.length,be=0,Oe=Dr(te,this.__takeCount__);if(!w||!R&&I==te&&Oe==te)return dA(c,this.__actions__);var $e=[];e:for(;te--&&be<Oe;){ce+=h;for(var Ze=-1,Fe=c[ce];++Ze<he;){var st=de[Ze],ht=st.iteratee,Fi=st.type,ei=ht(Fe);if(Fi==N)Fe=ei;else if(!ei){if(Fi==A)continue e;break e}}$e[be++]=Fe}return $e}ut.prototype=Kc(Ty.prototype),ut.prototype.constructor=ut;function fu(c){var h=-1,w=c==null?0:c.length;for(this.clear();++h<w;){var R=c[h];this.set(R[0],R[1])}}function oH(){this.__data__=Sh?Sh(null):{},this.size=0}function sH(c){var h=this.has(c)&&delete this.__data__[c];return this.size-=h?1:0,h}function aH(c){var h=this.__data__;if(Sh){var w=h[c];return w===l?n:w}return Nt.call(h,c)?h[c]:n}function lH(c){var h=this.__data__;return Sh?h[c]!==n:Nt.call(h,c)}function uH(c,h){var w=this.__data__;return this.size+=this.has(c)?0:1,w[c]=Sh&&h===n?l:h,this}fu.prototype.clear=oH,fu.prototype.delete=sH,fu.prototype.get=aH,fu.prototype.has=lH,fu.prototype.set=uH;function Ws(c){var h=-1,w=c==null?0:c.length;for(this.clear();++h<w;){var R=c[h];this.set(R[0],R[1])}}function cH(){this.__data__=[],this.size=0}function dH(c){var h=this.__data__,w=Ey(h,c);if(w<0)return!1;var R=h.length-1;return w==R?h.pop():_y.call(h,w,1),--this.size,!0}function fH(c){var h=this.__data__,w=Ey(h,c);return w<0?n:h[w][1]}function hH(c){return Ey(this.__data__,c)>-1}function pH(c,h){var w=this.__data__,R=Ey(w,c);return R<0?(++this.size,w.push([c,h])):w[R][1]=h,this}Ws.prototype.clear=cH,Ws.prototype.delete=dH,Ws.prototype.get=fH,Ws.prototype.has=hH,Ws.prototype.set=pH;function qs(c){var h=-1,w=c==null?0:c.length;for(this.clear();++h<w;){var R=c[h];this.set(R[0],R[1])}}function gH(){this.size=0,this.__data__={hash:new fu,map:new(_h||Ws),string:new fu}}function mH(c){var h=Fy(this,c).delete(c);return this.size-=h?1:0,h}function yH(c){return Fy(this,c).get(c)}function vH(c){return Fy(this,c).has(c)}function _H(c,h){var w=Fy(this,c),R=w.size;return w.set(c,h),this.size+=w.size==R?0:1,this}qs.prototype.clear=gH,qs.prototype.delete=mH,qs.prototype.get=yH,qs.prototype.has=vH,qs.prototype.set=_H;function hu(c){var h=-1,w=c==null?0:c.length;for(this.__data__=new qs;++h<w;)this.add(c[h])}function bH(c){return this.__data__.set(c,l),this}function SH(c){return this.__data__.has(c)}hu.prototype.add=hu.prototype.push=bH,hu.prototype.has=SH;function Io(c){var h=this.__data__=new Ws(c);this.size=h.size}function wH(){this.__data__=new Ws,this.size=0}function xH(c){var h=this.__data__,w=h.delete(c);return this.size=h.size,w}function CH(c){return this.__data__.get(c)}function TH(c){return this.__data__.has(c)}function EH(c,h){var w=this.__data__;if(w instanceof Ws){var R=w.__data__;if(!_h||R.length<i-1)return R.push([c,h]),this.size=++w.size,this;w=this.__data__=new qs(R)}return w.set(c,h),this.size=w.size,this}Io.prototype.clear=wH,Io.prototype.delete=xH,Io.prototype.get=CH,Io.prototype.has=TH,Io.prototype.set=EH;function V6(c,h){var w=Ge(c),R=!w&&vu(c),I=!w&&!R&&Ja(c),z=!w&&!R&&!I&&Zc(c),K=w||R||I||z,X=K?O2(c.length,DG):[],te=X.length;for(var ce in c)(h||Nt.call(c,ce))&&!(K&&(ce=="length"||I&&(ce=="offset"||ce=="parent")||z&&(ce=="buffer"||ce=="byteLength"||ce=="byteOffset")||Qs(ce,te)))&&X.push(ce);return X}function j6(c){var h=c.length;return h?c[q2(0,h-1)]:n}function AH(c,h){return By(pi(c),pu(h,0,c.length))}function PH(c){return By(pi(c))}function $2(c,h,w){(w!==n&&!Mo(c[h],w)||w===n&&!(h in c))&&Ks(c,h,w)}function xh(c,h,w){var R=c[h];(!(Nt.call(c,h)&&Mo(R,w))||w===n&&!(h in c))&&Ks(c,h,w)}function Ey(c,h){for(var w=c.length;w--;)if(Mo(c[w][0],h))return w;return-1}function RH(c,h,w,R){return Xa(c,function(I,z,K){h(R,I,w(I),K)}),R}function G6(c,h){return c&&as(h,ar(h),c)}function OH(c,h){return c&&as(h,mi(h),c)}function Ks(c,h,w){h=="__proto__"&&by?by(c,h,{configurable:!0,enumerable:!0,value:w,writable:!0}):c[h]=w}function F2(c,h){for(var w=-1,R=h.length,I=oe(R),z=c==null;++w<R;)I[w]=z?n:vw(c,h[w]);return I}function pu(c,h,w){return c===c&&(w!==n&&(c=c<=w?c:w),h!==n&&(c=c>=h?c:h)),c}function oo(c,h,w,R,I,z){var K,X=h&f,te=h&p,ce=h&g;if(w&&(K=I?w(c,R,I,z):w(c)),K!==n)return K;if(!hn(c))return c;var de=Ge(c);if(de){if(K=vW(c),!X)return pi(c,K)}else{var he=$r(c),be=he==ye||he==We;if(Ja(c))return pA(c,X);if(he==_e||he==se||be&&!I){if(K=te||be?{}:MA(c),!X)return te?aW(c,OH(K,c)):sW(c,G6(K,c))}else{if(!Ut[he])return I?c:{};K=_W(c,he,X)}}z||(z=new Io);var Oe=z.get(c);if(Oe)return Oe;z.set(c,K),lP(c)?c.forEach(function(Fe){K.add(oo(Fe,h,w,Fe,c,z))}):sP(c)&&c.forEach(function(Fe,st){K.set(st,oo(Fe,h,w,st,c,z))});var $e=ce?te?iw:rw:te?mi:ar,Ze=de?n:$e(c);return no(Ze||c,function(Fe,st){Ze&&(st=Fe,Fe=c[st]),xh(K,st,oo(Fe,h,w,st,c,z))}),K}function kH(c){var h=ar(c);return function(w){return H6(w,c,h)}}function H6(c,h,w){var R=w.length;if(c==null)return!R;for(c=Wt(c);R--;){var I=w[R],z=h[I],K=c[I];if(K===n&&!(I in c)||!z(K))return!1}return!0}function W6(c,h,w){if(typeof c!="function")throw new ro(s);return Oh(function(){c.apply(n,w)},h)}function Ch(c,h,w,R){var I=-1,z=uy,K=!0,X=c.length,te=[],ce=h.length;if(!X)return te;w&&(h=an(h,Li(w))),R?(z=C2,K=!1):h.length>=i&&(z=yh,K=!1,h=new hu(h));e:for(;++I<X;){var de=c[I],he=w==null?de:w(de);if(de=R||de!==0?de:0,K&&he===he){for(var be=ce;be--;)if(h[be]===he)continue e;te.push(de)}else z(h,he,R)||te.push(de)}return te}var Xa=_A(ss),q6=_A(U2,!0);function IH(c,h){var w=!0;return Xa(c,function(R,I,z){return w=!!h(R,I,z),w}),w}function Ay(c,h,w){for(var R=-1,I=c.length;++R<I;){var z=c[R],K=h(z);if(K!=null&&(X===n?K===K&&!$i(K):w(K,X)))var X=K,te=z}return te}function MH(c,h,w,R){var I=c.length;for(w=Ye(w),w<0&&(w=-w>I?0:I+w),R=R===n||R>I?I:Ye(R),R<0&&(R+=I),R=w>R?0:cP(R);w<R;)c[w++]=h;return c}function K6(c,h){var w=[];return Xa(c,function(R,I,z){h(R,I,z)&&w.push(R)}),w}function Cr(c,h,w,R,I){var z=-1,K=c.length;for(w||(w=SW),I||(I=[]);++z<K;){var X=c[z];h>0&&w(X)?h>1?Cr(X,h-1,w,R,I):Wa(I,X):R||(I[I.length]=X)}return I}var B2=bA(),X6=bA(!0);function ss(c,h){return c&&B2(c,h,ar)}function U2(c,h){return c&&X6(c,h,ar)}function Py(c,h){return Ha(h,function(w){return Zs(c[w])})}function gu(c,h){h=Qa(h,c);for(var w=0,R=h.length;c!=null&&w<R;)c=c[ls(h[w++])];return w&&w==R?c:n}function Y6(c,h,w){var R=h(c);return Ge(c)?R:Wa(R,w(c))}function Zr(c){return c==null?c===n?Nr:lt:du&&du in Wt(c)?gW(c):PW(c)}function z2(c,h){return c>h}function NH(c,h){return c!=null&&Nt.call(c,h)}function LH(c,h){return c!=null&&h in Wt(c)}function DH(c,h,w){return c>=Dr(h,w)&&c<Yn(h,w)}function V2(c,h,w){for(var R=w?C2:uy,I=c[0].length,z=c.length,K=z,X=oe(z),te=1/0,ce=[];K--;){var de=c[K];K&&h&&(de=an(de,Li(h))),te=Dr(de.length,te),X[K]=!w&&(h||I>=120&&de.length>=120)?new hu(K&&de):n}de=c[0];var he=-1,be=X[0];e:for(;++he<I&&ce.length<te;){var Oe=de[he],$e=h?h(Oe):Oe;if(Oe=w||Oe!==0?Oe:0,!(be?yh(be,$e):R(ce,$e,w))){for(K=z;--K;){var Ze=X[K];if(!(Ze?yh(Ze,$e):R(c[K],$e,w)))continue e}be&&be.push($e),ce.push(Oe)}}return ce}function $H(c,h,w,R){return ss(c,function(I,z,K){h(R,w(I),z,K)}),R}function Th(c,h,w){h=Qa(h,c),c=$A(c,h);var R=c==null?c:c[ls(ao(h))];return R==null?n:Ni(R,c,w)}function Q6(c){return xn(c)&&Zr(c)==se}function FH(c){return xn(c)&&Zr(c)==wn}function BH(c){return xn(c)&&Zr(c)==fe}function Eh(c,h,w,R,I){return c===h?!0:c==null||h==null||!xn(c)&&!xn(h)?c!==c&&h!==h:UH(c,h,w,R,Eh,I)}function UH(c,h,w,R,I,z){var K=Ge(c),X=Ge(h),te=K?le:$r(c),ce=X?le:$r(h);te=te==se?_e:te,ce=ce==se?_e:ce;var de=te==_e,he=ce==_e,be=te==ce;if(be&&Ja(c)){if(!Ja(h))return!1;K=!0,de=!1}if(be&&!de)return z||(z=new Io),K||Zc(c)?OA(c,h,w,R,I,z):hW(c,h,te,w,R,I,z);if(!(w&m)){var Oe=de&&Nt.call(c,"__wrapped__"),$e=he&&Nt.call(h,"__wrapped__");if(Oe||$e){var Ze=Oe?c.value():c,Fe=$e?h.value():h;return z||(z=new Io),I(Ze,Fe,w,R,z)}}return be?(z||(z=new Io),pW(c,h,w,R,I,z)):!1}function zH(c){return xn(c)&&$r(c)==Me}function j2(c,h,w,R){var I=w.length,z=I,K=!R;if(c==null)return!z;for(c=Wt(c);I--;){var X=w[I];if(K&&X[2]?X[1]!==c[X[0]]:!(X[0]in c))return!1}for(;++I<z;){X=w[I];var te=X[0],ce=c[te],de=X[1];if(K&&X[2]){if(ce===n&&!(te in c))return!1}else{var he=new Io;if(R)var be=R(ce,de,te,c,h,he);if(!(be===n?Eh(de,ce,m|v,R,he):be))return!1}}return!0}function Z6(c){if(!hn(c)||xW(c))return!1;var h=Zs(c)?zG:kc;return h.test(yu(c))}function VH(c){return xn(c)&&Zr(c)==Bt}function jH(c){return xn(c)&&$r(c)==it}function GH(c){return xn(c)&&Hy(c.length)&&!!Ht[Zr(c)]}function J6(c){return typeof c=="function"?c:c==null?yi:typeof c=="object"?Ge(c)?nA(c[0],c[1]):tA(c):SP(c)}function G2(c){if(!Rh(c))return qG(c);var h=[];for(var w in Wt(c))Nt.call(c,w)&&w!="constructor"&&h.push(w);return h}function HH(c){if(!hn(c))return AW(c);var h=Rh(c),w=[];for(var R in c)R=="constructor"&&(h||!Nt.call(c,R))||w.push(R);return w}function H2(c,h){return c<h}function eA(c,h){var w=-1,R=gi(c)?oe(c.length):[];return Xa(c,function(I,z,K){R[++w]=h(I,z,K)}),R}function tA(c){var h=sw(c);return h.length==1&&h[0][2]?LA(h[0][0],h[0][1]):function(w){return w===c||j2(w,c,h)}}function nA(c,h){return lw(c)&&NA(h)?LA(ls(c),h):function(w){var R=vw(w,c);return R===n&&R===h?_w(w,c):Eh(h,R,m|v)}}function Ry(c,h,w,R,I){c!==h&&B2(h,function(z,K){if(I||(I=new Io),hn(z))WH(c,h,K,w,Ry,R,I);else{var X=R?R(cw(c,K),z,K+"",c,h,I):n;X===n&&(X=z),$2(c,K,X)}},mi)}function WH(c,h,w,R,I,z,K){var X=cw(c,w),te=cw(h,w),ce=K.get(te);if(ce){$2(c,w,ce);return}var de=z?z(X,te,w+"",c,h,K):n,he=de===n;if(he){var be=Ge(te),Oe=!be&&Ja(te),$e=!be&&!Oe&&Zc(te);de=te,be||Oe||$e?Ge(X)?de=X:An(X)?de=pi(X):Oe?(he=!1,de=pA(te,!0)):$e?(he=!1,de=gA(te,!0)):de=[]:kh(te)||vu(te)?(de=X,vu(X)?de=dP(X):(!hn(X)||Zs(X))&&(de=MA(te))):he=!1}he&&(K.set(te,de),I(de,te,R,z,K),K.delete(te)),$2(c,w,de)}function rA(c,h){var w=c.length;if(w)return h+=h<0?w:0,Qs(h,w)?c[h]:n}function iA(c,h,w){h.length?h=an(h,function(z){return Ge(z)?function(K){return gu(K,z.length===1?z[0]:z)}:z}):h=[yi];var R=-1;h=an(h,Li(De()));var I=eA(c,function(z,K,X){var te=an(h,function(ce){return ce(z)});return{criteria:te,index:++R,value:z}});return _G(I,function(z,K){return oW(z,K,w)})}function qH(c,h){return oA(c,h,function(w,R){return _w(c,R)})}function oA(c,h,w){for(var R=-1,I=h.length,z={};++R<I;){var K=h[R],X=gu(c,K);w(X,K)&&Ah(z,Qa(K,c),X)}return z}function KH(c){return function(h){return gu(h,c)}}function W2(c,h,w,R){var I=R?vG:zc,z=-1,K=h.length,X=c;for(c===h&&(h=pi(h)),w&&(X=an(c,Li(w)));++z<K;)for(var te=0,ce=h[z],de=w?w(ce):ce;(te=I(X,de,te,R))>-1;)X!==c&&_y.call(X,te,1),_y.call(c,te,1);return c}function sA(c,h){for(var w=c?h.length:0,R=w-1;w--;){var I=h[w];if(w==R||I!==z){var z=I;Qs(I)?_y.call(c,I,1):Y2(c,I)}}return c}function q2(c,h){return c+wy(U6()*(h-c+1))}function XH(c,h,w,R){for(var I=-1,z=Yn(Sy((h-c)/(w||1)),0),K=oe(z);z--;)K[R?z:++I]=c,c+=w;return K}function K2(c,h){var w="";if(!c||h<1||h>D)return w;do h%2&&(w+=c),h=wy(h/2),h&&(c+=c);while(h);return w}function et(c,h){return dw(DA(c,h,yi),c+"")}function YH(c){return j6(Jc(c))}function QH(c,h){var w=Jc(c);return By(w,pu(h,0,w.length))}function Ah(c,h,w,R){if(!hn(c))return c;h=Qa(h,c);for(var I=-1,z=h.length,K=z-1,X=c;X!=null&&++I<z;){var te=ls(h[I]),ce=w;if(te==="__proto__"||te==="constructor"||te==="prototype")return c;if(I!=K){var de=X[te];ce=R?R(de,te,X):n,ce===n&&(ce=hn(de)?de:Qs(h[I+1])?[]:{})}xh(X,te,ce),X=X[te]}return c}var aA=xy?function(c,h){return xy.set(c,h),c}:yi,ZH=by?function(c,h){return by(c,"toString",{configurable:!0,enumerable:!1,value:Sw(h),writable:!0})}:yi;function JH(c){return By(Jc(c))}function so(c,h,w){var R=-1,I=c.length;h<0&&(h=-h>I?0:I+h),w=w>I?I:w,w<0&&(w+=I),I=h>w?0:w-h>>>0,h>>>=0;for(var z=oe(I);++R<I;)z[R]=c[R+h];return z}function eW(c,h){var w;return Xa(c,function(R,I,z){return w=h(R,I,z),!w}),!!w}function Oy(c,h,w){var R=0,I=c==null?R:c.length;if(typeof h=="number"&&h===h&&I<=ee){for(;R<I;){var z=R+I>>>1,K=c[z];K!==null&&!$i(K)&&(w?K<=h:K<h)?R=z+1:I=z}return I}return X2(c,h,yi,w)}function X2(c,h,w,R){var I=0,z=c==null?0:c.length;if(z===0)return 0;h=w(h);for(var K=h!==h,X=h===null,te=$i(h),ce=h===n;I<z;){var de=wy((I+z)/2),he=w(c[de]),be=he!==n,Oe=he===null,$e=he===he,Ze=$i(he);if(K)var Fe=R||$e;else ce?Fe=$e&&(R||be):X?Fe=$e&&be&&(R||!Oe):te?Fe=$e&&be&&!Oe&&(R||!Ze):Oe||Ze?Fe=!1:Fe=R?he<=h:he<h;Fe?I=de+1:z=de}return Dr(z,Z)}function lA(c,h){for(var w=-1,R=c.length,I=0,z=[];++w<R;){var K=c[w],X=h?h(K):K;if(!w||!Mo(X,te)){var te=X;z[I++]=K===0?0:K}}return z}function uA(c){return typeof c=="number"?c:$i(c)?j:+c}function Di(c){if(typeof c=="string")return c;if(Ge(c))return an(c,Di)+"";if($i(c))return z6?z6.call(c):"";var h=c+"";return h=="0"&&1/c==-B?"-0":h}function Ya(c,h,w){var R=-1,I=uy,z=c.length,K=!0,X=[],te=X;if(w)K=!1,I=C2;else if(z>=i){var ce=h?null:dW(c);if(ce)return dy(ce);K=!1,I=yh,te=new hu}else te=h?[]:X;e:for(;++R<z;){var de=c[R],he=h?h(de):de;if(de=w||de!==0?de:0,K&&he===he){for(var be=te.length;be--;)if(te[be]===he)continue e;h&&te.push(he),X.push(de)}else I(te,he,w)||(te!==X&&te.push(he),X.push(de))}return X}function Y2(c,h){return h=Qa(h,c),c=$A(c,h),c==null||delete c[ls(ao(h))]}function cA(c,h,w,R){return Ah(c,h,w(gu(c,h)),R)}function ky(c,h,w,R){for(var I=c.length,z=R?I:-1;(R?z--:++z<I)&&h(c[z],z,c););return w?so(c,R?0:z,R?z+1:I):so(c,R?z+1:0,R?I:z)}function dA(c,h){var w=c;return w instanceof ut&&(w=w.value()),T2(h,function(R,I){return I.func.apply(I.thisArg,Wa([R],I.args))},w)}function Q2(c,h,w){var R=c.length;if(R<2)return R?Ya(c[0]):[];for(var I=-1,z=oe(R);++I<R;)for(var K=c[I],X=-1;++X<R;)X!=I&&(z[I]=Ch(z[I]||K,c[X],h,w));return Ya(Cr(z,1),h,w)}function fA(c,h,w){for(var R=-1,I=c.length,z=h.length,K={};++R<I;){var X=R<z?h[R]:n;w(K,c[R],X)}return K}function Z2(c){return An(c)?c:[]}function J2(c){return typeof c=="function"?c:yi}function Qa(c,h){return Ge(c)?c:lw(c,h)?[c]:zA(kt(c))}var tW=et;function Za(c,h,w){var R=c.length;return w=w===n?R:w,!h&&w>=R?c:so(c,h,w)}var hA=VG||function(c){return qe.clearTimeout(c)};function pA(c,h){if(h)return c.slice();var w=c.length,R=L6?L6(w):new c.constructor(w);return c.copy(R),R}function ew(c){var h=new c.constructor(c.byteLength);return new yy(h).set(new yy(c)),h}function nW(c,h){var w=h?ew(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.byteLength)}function rW(c){var h=new c.constructor(c.source,Po.exec(c));return h.lastIndex=c.lastIndex,h}function iW(c){return wh?Wt(wh.call(c)):{}}function gA(c,h){var w=h?ew(c.buffer):c.buffer;return new c.constructor(w,c.byteOffset,c.length)}function mA(c,h){if(c!==h){var w=c!==n,R=c===null,I=c===c,z=$i(c),K=h!==n,X=h===null,te=h===h,ce=$i(h);if(!X&&!ce&&!z&&c>h||z&&K&&te&&!X&&!ce||R&&K&&te||!w&&te||!I)return 1;if(!R&&!z&&!ce&&c<h||ce&&w&&I&&!R&&!z||X&&w&&I||!K&&I||!te)return-1}return 0}function oW(c,h,w){for(var R=-1,I=c.criteria,z=h.criteria,K=I.length,X=w.length;++R<K;){var te=mA(I[R],z[R]);if(te){if(R>=X)return te;var ce=w[R];return te*(ce=="desc"?-1:1)}}return c.index-h.index}function yA(c,h,w,R){for(var I=-1,z=c.length,K=w.length,X=-1,te=h.length,ce=Yn(z-K,0),de=oe(te+ce),he=!R;++X<te;)de[X]=h[X];for(;++I<K;)(he||I<z)&&(de[w[I]]=c[I]);for(;ce--;)de[X++]=c[I++];return de}function vA(c,h,w,R){for(var I=-1,z=c.length,K=-1,X=w.length,te=-1,ce=h.length,de=Yn(z-X,0),he=oe(de+ce),be=!R;++I<de;)he[I]=c[I];for(var Oe=I;++te<ce;)he[Oe+te]=h[te];for(;++K<X;)(be||I<z)&&(he[Oe+w[K]]=c[I++]);return he}function pi(c,h){var w=-1,R=c.length;for(h||(h=oe(R));++w<R;)h[w]=c[w];return h}function as(c,h,w,R){var I=!w;w||(w={});for(var z=-1,K=h.length;++z<K;){var X=h[z],te=R?R(w[X],c[X],X,w,c):n;te===n&&(te=c[X]),I?Ks(w,X,te):xh(w,X,te)}return w}function sW(c,h){return as(c,aw(c),h)}function aW(c,h){return as(c,kA(c),h)}function Iy(c,h){return function(w,R){var I=Ge(w)?fG:RH,z=h?h():{};return I(w,c,De(R,2),z)}}function Xc(c){return et(function(h,w){var R=-1,I=w.length,z=I>1?w[I-1]:n,K=I>2?w[2]:n;for(z=c.length>3&&typeof z=="function"?(I--,z):n,K&&Jr(w[0],w[1],K)&&(z=I<3?n:z,I=1),h=Wt(h);++R<I;){var X=w[R];X&&c(h,X,R,z)}return h})}function _A(c,h){return function(w,R){if(w==null)return w;if(!gi(w))return c(w,R);for(var I=w.length,z=h?I:-1,K=Wt(w);(h?z--:++z<I)&&R(K[z],z,K)!==!1;);return w}}function bA(c){return function(h,w,R){for(var I=-1,z=Wt(h),K=R(h),X=K.length;X--;){var te=K[c?X:++I];if(w(z[te],te,z)===!1)break}return h}}function lW(c,h,w){var R=h&x,I=Ph(c);function z(){var K=this&&this!==qe&&this instanceof z?I:c;return K.apply(R?w:this,arguments)}return z}function SA(c){return function(h){h=kt(h);var w=Vc(h)?ko(h):n,R=w?w[0]:h.charAt(0),I=w?Za(w,1).join(""):h.slice(1);return R[c]()+I}}function Yc(c){return function(h){return T2(_P(vP(h).replace(gh,"")),c,"")}}function Ph(c){return function(){var h=arguments;switch(h.length){case 0:return new c;case 1:return new c(h[0]);case 2:return new c(h[0],h[1]);case 3:return new c(h[0],h[1],h[2]);case 4:return new c(h[0],h[1],h[2],h[3]);case 5:return new c(h[0],h[1],h[2],h[3],h[4]);case 6:return new c(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new c(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var w=Kc(c.prototype),R=c.apply(w,h);return hn(R)?R:w}}function uW(c,h,w){var R=Ph(c);function I(){for(var z=arguments.length,K=oe(z),X=z,te=Qc(I);X--;)K[X]=arguments[X];var ce=z<3&&K[0]!==te&&K[z-1]!==te?[]:qa(K,te);if(z-=ce.length,z<w)return EA(c,h,My,I.placeholder,n,K,ce,n,n,w-z);var de=this&&this!==qe&&this instanceof I?R:c;return Ni(de,this,K)}return I}function wA(c){return function(h,w,R){var I=Wt(h);if(!gi(h)){var z=De(w,3);h=ar(h),w=function(X){return z(I[X],X,I)}}var K=c(h,w,R);return K>-1?I[z?h[K]:K]:n}}function xA(c){return Ys(function(h){var w=h.length,R=w,I=io.prototype.thru;for(c&&h.reverse();R--;){var z=h[R];if(typeof z!="function")throw new ro(s);if(I&&!K&&$y(z)=="wrapper")var K=new io([],!0)}for(R=K?R:w;++R<w;){z=h[R];var X=$y(z),te=X=="wrapper"?ow(z):n;te&&uw(te[0])&&te[1]==(E|y|C|P)&&!te[4].length&&te[9]==1?K=K[$y(te[0])].apply(K,te[3]):K=z.length==1&&uw(z)?K[X]():K.thru(z)}return function(){var ce=arguments,de=ce[0];if(K&&ce.length==1&&Ge(de))return K.plant(de).value();for(var he=0,be=w?h[he].apply(this,ce):de;++he<w;)be=h[he].call(this,be);return be}})}function My(c,h,w,R,I,z,K,X,te,ce){var de=h&E,he=h&x,be=h&_,Oe=h&(y|S),$e=h&k,Ze=be?n:Ph(c);function Fe(){for(var st=arguments.length,ht=oe(st),Fi=st;Fi--;)ht[Fi]=arguments[Fi];if(Oe)var ei=Qc(Fe),Bi=SG(ht,ei);if(R&&(ht=yA(ht,R,I,Oe)),z&&(ht=vA(ht,z,K,Oe)),st-=Bi,Oe&&st<ce){var Pn=qa(ht,ei);return EA(c,h,My,Fe.placeholder,w,ht,Pn,X,te,ce-st)}var No=he?w:this,ea=be?No[c]:c;return st=ht.length,X?ht=RW(ht,X):$e&&st>1&&ht.reverse(),de&&te<st&&(ht.length=te),this&&this!==qe&&this instanceof Fe&&(ea=Ze||Ph(ea)),ea.apply(No,ht)}return Fe}function CA(c,h){return function(w,R){return $H(w,c,h(R),{})}}function Ny(c,h){return function(w,R){var I;if(w===n&&R===n)return h;if(w!==n&&(I=w),R!==n){if(I===n)return R;typeof w=="string"||typeof R=="string"?(w=Di(w),R=Di(R)):(w=uA(w),R=uA(R)),I=c(w,R)}return I}}function tw(c){return Ys(function(h){return h=an(h,Li(De())),et(function(w){var R=this;return c(h,function(I){return Ni(I,R,w)})})})}function Ly(c,h){h=h===n?" ":Di(h);var w=h.length;if(w<2)return w?K2(h,c):h;var R=K2(h,Sy(c/jc(h)));return Vc(h)?Za(ko(R),0,c).join(""):R.slice(0,c)}function cW(c,h,w,R){var I=h&x,z=Ph(c);function K(){for(var X=-1,te=arguments.length,ce=-1,de=R.length,he=oe(de+te),be=this&&this!==qe&&this instanceof K?z:c;++ce<de;)he[ce]=R[ce];for(;te--;)he[ce++]=arguments[++X];return Ni(be,I?w:this,he)}return K}function TA(c){return function(h,w,R){return R&&typeof R!="number"&&Jr(h,w,R)&&(w=R=n),h=Js(h),w===n?(w=h,h=0):w=Js(w),R=R===n?h<w?1:-1:Js(R),XH(h,w,R,c)}}function Dy(c){return function(h,w){return typeof h=="string"&&typeof w=="string"||(h=lo(h),w=lo(w)),c(h,w)}}function EA(c,h,w,R,I,z,K,X,te,ce){var de=h&y,he=de?K:n,be=de?n:K,Oe=de?z:n,$e=de?n:z;h|=de?C:T,h&=~(de?T:C),h&b||(h&=~(x|_));var Ze=[c,h,I,Oe,he,$e,be,X,te,ce],Fe=w.apply(n,Ze);return uw(c)&&FA(Fe,Ze),Fe.placeholder=R,BA(Fe,c,h)}function nw(c){var h=Xn[c];return function(w,R){if(w=lo(w),R=R==null?0:Dr(Ye(R),292),R&&B6(w)){var I=(kt(w)+"e").split("e"),z=h(I[0]+"e"+(+I[1]+R));return I=(kt(z)+"e").split("e"),+(I[0]+"e"+(+I[1]-R))}return h(w)}}var dW=Wc&&1/dy(new Wc([,-0]))[1]==B?function(c){return new Wc(c)}:Cw;function AA(c){return function(h){var w=$r(h);return w==Me?I2(h):w==it?PG(h):bG(h,c(h))}}function Xs(c,h,w,R,I,z,K,X){var te=h&_;if(!te&&typeof c!="function")throw new ro(s);var ce=R?R.length:0;if(ce||(h&=~(C|T),R=I=n),K=K===n?K:Yn(Ye(K),0),X=X===n?X:Ye(X),ce-=I?I.length:0,h&T){var de=R,he=I;R=I=n}var be=te?n:ow(c),Oe=[c,h,w,R,I,de,he,z,K,X];if(be&&EW(Oe,be),c=Oe[0],h=Oe[1],w=Oe[2],R=Oe[3],I=Oe[4],X=Oe[9]=Oe[9]===n?te?0:c.length:Yn(Oe[9]-ce,0),!X&&h&(y|S)&&(h&=~(y|S)),!h||h==x)var $e=lW(c,h,w);else h==y||h==S?$e=uW(c,h,X):(h==C||h==(x|C))&&!I.length?$e=cW(c,h,w,R):$e=My.apply(n,Oe);var Ze=be?aA:FA;return BA(Ze($e,Oe),c,h)}function PA(c,h,w,R){return c===n||Mo(c,Hc[w])&&!Nt.call(R,w)?h:c}function RA(c,h,w,R,I,z){return hn(c)&&hn(h)&&(z.set(h,c),Ry(c,h,n,RA,z),z.delete(h)),c}function fW(c){return kh(c)?n:c}function OA(c,h,w,R,I,z){var K=w&m,X=c.length,te=h.length;if(X!=te&&!(K&&te>X))return!1;var ce=z.get(c),de=z.get(h);if(ce&&de)return ce==h&&de==c;var he=-1,be=!0,Oe=w&v?new hu:n;for(z.set(c,h),z.set(h,c);++he<X;){var $e=c[he],Ze=h[he];if(R)var Fe=K?R(Ze,$e,he,h,c,z):R($e,Ze,he,c,h,z);if(Fe!==n){if(Fe)continue;be=!1;break}if(Oe){if(!E2(h,function(st,ht){if(!yh(Oe,ht)&&($e===st||I($e,st,w,R,z)))return Oe.push(ht)})){be=!1;break}}else if(!($e===Ze||I($e,Ze,w,R,z))){be=!1;break}}return z.delete(c),z.delete(h),be}function hW(c,h,w,R,I,z,K){switch(w){case on:if(c.byteLength!=h.byteLength||c.byteOffset!=h.byteOffset)return!1;c=c.buffer,h=h.buffer;case wn:return!(c.byteLength!=h.byteLength||!z(new yy(c),new yy(h)));case ne:case fe:case Ee:return Mo(+c,+h);case ve:return c.name==h.name&&c.message==h.message;case Bt:case gt:return c==h+"";case Me:var X=I2;case it:var te=R&m;if(X||(X=dy),c.size!=h.size&&!te)return!1;var ce=K.get(c);if(ce)return ce==h;R|=v,K.set(c,h);var de=OA(X(c),X(h),R,I,z,K);return K.delete(c),de;case Jt:if(wh)return wh.call(c)==wh.call(h)}return!1}function pW(c,h,w,R,I,z){var K=w&m,X=rw(c),te=X.length,ce=rw(h),de=ce.length;if(te!=de&&!K)return!1;for(var he=te;he--;){var be=X[he];if(!(K?be in h:Nt.call(h,be)))return!1}var Oe=z.get(c),$e=z.get(h);if(Oe&&$e)return Oe==h&&$e==c;var Ze=!0;z.set(c,h),z.set(h,c);for(var Fe=K;++he<te;){be=X[he];var st=c[be],ht=h[be];if(R)var Fi=K?R(ht,st,be,h,c,z):R(st,ht,be,c,h,z);if(!(Fi===n?st===ht||I(st,ht,w,R,z):Fi)){Ze=!1;break}Fe||(Fe=be=="constructor")}if(Ze&&!Fe){var ei=c.constructor,Bi=h.constructor;ei!=Bi&&"constructor"in c&&"constructor"in h&&!(typeof ei=="function"&&ei instanceof ei&&typeof Bi=="function"&&Bi instanceof Bi)&&(Ze=!1)}return z.delete(c),z.delete(h),Ze}function Ys(c){return dw(DA(c,n,HA),c+"")}function rw(c){return Y6(c,ar,aw)}function iw(c){return Y6(c,mi,kA)}var ow=xy?function(c){return xy.get(c)}:Cw;function $y(c){for(var h=c.name+"",w=qc[h],R=Nt.call(qc,h)?w.length:0;R--;){var I=w[R],z=I.func;if(z==null||z==c)return I.name}return h}function Qc(c){var h=Nt.call($,"placeholder")?$:c;return h.placeholder}function De(){var c=$.iteratee||ww;return c=c===ww?J6:c,arguments.length?c(arguments[0],arguments[1]):c}function Fy(c,h){var w=c.__data__;return wW(h)?w[typeof h=="string"?"string":"hash"]:w.map}function sw(c){for(var h=ar(c),w=h.length;w--;){var R=h[w],I=c[R];h[w]=[R,I,NA(I)]}return h}function mu(c,h){var w=TG(c,h);return Z6(w)?w:n}function gW(c){var h=Nt.call(c,du),w=c[du];try{c[du]=n;var R=!0}catch{}var I=gy.call(c);return R&&(h?c[du]=w:delete c[du]),I}var aw=N2?function(c){return c==null?[]:(c=Wt(c),Ha(N2(c),function(h){return $6.call(c,h)}))}:Tw,kA=N2?function(c){for(var h=[];c;)Wa(h,aw(c)),c=vy(c);return h}:Tw,$r=Zr;(L2&&$r(new L2(new ArrayBuffer(1)))!=on||_h&&$r(new _h)!=Me||D2&&$r(D2.resolve())!=jt||Wc&&$r(new Wc)!=it||bh&&$r(new bh)!=yr)&&($r=function(c){var h=Zr(c),w=h==_e?c.constructor:n,R=w?yu(w):"";if(R)switch(R){case QG:return on;case ZG:return Me;case JG:return jt;case eH:return it;case tH:return yr}return h});function mW(c,h,w){for(var R=-1,I=w.length;++R<I;){var z=w[R],K=z.size;switch(z.type){case"drop":c+=K;break;case"dropRight":h-=K;break;case"take":h=Dr(h,c+K);break;case"takeRight":c=Yn(c,h-K);break}}return{start:c,end:h}}function yW(c){var h=c.match(wr);return h?h[1].split(Gs):[]}function IA(c,h,w){h=Qa(h,c);for(var R=-1,I=h.length,z=!1;++R<I;){var K=ls(h[R]);if(!(z=c!=null&&w(c,K)))break;c=c[K]}return z||++R!=I?z:(I=c==null?0:c.length,!!I&&Hy(I)&&Qs(K,I)&&(Ge(c)||vu(c)))}function vW(c){var h=c.length,w=new c.constructor(h);return h&&typeof c[0]=="string"&&Nt.call(c,"index")&&(w.index=c.index,w.input=c.input),w}function MA(c){return typeof c.constructor=="function"&&!Rh(c)?Kc(vy(c)):{}}function _W(c,h,w){var R=c.constructor;switch(h){case wn:return ew(c);case ne:case fe:return new R(+c);case on:return nW(c,w);case Wn:case sn:case Gt:case vr:case Lr:case Xr:case Ii:case En:case Yr:return gA(c,w);case Me:return new R;case Ee:case gt:return new R(c);case Bt:return rW(c);case it:return new R;case Jt:return iW(c)}}function bW(c,h){var w=h.length;if(!w)return c;var R=w-1;return h[R]=(w>1?"& ":"")+h[R],h=h.join(w>2?", ":" "),c.replace(Ao,`{
|
||
/* [wrapped with `+h+`] */
|
||
`)}function SW(c){return Ge(c)||vu(c)||!!(F6&&c&&c[F6])}function Qs(c,h){var w=typeof c;return h=h??D,!!h&&(w=="number"||w!="symbol"&&oh.test(c))&&c>-1&&c%1==0&&c<h}function Jr(c,h,w){if(!hn(w))return!1;var R=typeof h;return(R=="number"?gi(w)&&Qs(h,w.length):R=="string"&&h in w)?Mo(w[h],c):!1}function lw(c,h){if(Ge(c))return!1;var w=typeof c;return w=="number"||w=="symbol"||w=="boolean"||c==null||$i(c)?!0:Sr.test(c)||!eo.test(c)||h!=null&&c in Wt(h)}function wW(c){var h=typeof c;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?c!=="__proto__":c===null}function uw(c){var h=$y(c),w=$[h];if(typeof w!="function"||!(h in ut.prototype))return!1;if(c===w)return!0;var R=ow(w);return!!R&&c===R[0]}function xW(c){return!!N6&&N6 in c}var CW=hy?Zs:Ew;function Rh(c){var h=c&&c.constructor,w=typeof h=="function"&&h.prototype||Hc;return c===w}function NA(c){return c===c&&!hn(c)}function LA(c,h){return function(w){return w==null?!1:w[c]===h&&(h!==n||c in Wt(w))}}function TW(c){var h=jy(c,function(R){return w.size===u&&w.clear(),R}),w=h.cache;return h}function EW(c,h){var w=c[1],R=h[1],I=w|R,z=I<(x|_|E),K=R==E&&w==y||R==E&&w==P&&c[7].length<=h[8]||R==(E|P)&&h[7].length<=h[8]&&w==y;if(!(z||K))return c;R&x&&(c[2]=h[2],I|=w&x?0:b);var X=h[3];if(X){var te=c[3];c[3]=te?yA(te,X,h[4]):X,c[4]=te?qa(c[3],d):h[4]}return X=h[5],X&&(te=c[5],c[5]=te?vA(te,X,h[6]):X,c[6]=te?qa(c[5],d):h[6]),X=h[7],X&&(c[7]=X),R&E&&(c[8]=c[8]==null?h[8]:Dr(c[8],h[8])),c[9]==null&&(c[9]=h[9]),c[0]=h[0],c[1]=I,c}function AW(c){var h=[];if(c!=null)for(var w in Wt(c))h.push(w);return h}function PW(c){return gy.call(c)}function DA(c,h,w){return h=Yn(h===n?c.length-1:h,0),function(){for(var R=arguments,I=-1,z=Yn(R.length-h,0),K=oe(z);++I<z;)K[I]=R[h+I];I=-1;for(var X=oe(h+1);++I<h;)X[I]=R[I];return X[h]=w(K),Ni(c,this,X)}}function $A(c,h){return h.length<2?c:gu(c,so(h,0,-1))}function RW(c,h){for(var w=c.length,R=Dr(h.length,w),I=pi(c);R--;){var z=h[R];c[R]=Qs(z,w)?I[z]:n}return c}function cw(c,h){if(!(h==="constructor"&&typeof c[h]=="function")&&h!="__proto__")return c[h]}var FA=UA(aA),Oh=GG||function(c,h){return qe.setTimeout(c,h)},dw=UA(ZH);function BA(c,h,w){var R=h+"";return dw(c,bW(R,OW(yW(R),w)))}function UA(c){var h=0,w=0;return function(){var R=KG(),I=U-(R-w);if(w=R,I>0){if(++h>=G)return arguments[0]}else h=0;return c.apply(n,arguments)}}function By(c,h){var w=-1,R=c.length,I=R-1;for(h=h===n?R:h;++w<h;){var z=q2(w,I),K=c[z];c[z]=c[w],c[w]=K}return c.length=h,c}var zA=TW(function(c){var h=[];return c.charCodeAt(0)===46&&h.push(""),c.replace(Kn,function(w,R,I,z){h.push(I?z.replace(eh,"$1"):R||w)}),h});function ls(c){if(typeof c=="string"||$i(c))return c;var h=c+"";return h=="0"&&1/c==-B?"-0":h}function yu(c){if(c!=null){try{return py.call(c)}catch{}try{return c+""}catch{}}return""}function OW(c,h){return no(ie,function(w){var R="_."+w[0];h&w[1]&&!uy(c,R)&&c.push(R)}),c.sort()}function VA(c){if(c instanceof ut)return c.clone();var h=new io(c.__wrapped__,c.__chain__);return h.__actions__=pi(c.__actions__),h.__index__=c.__index__,h.__values__=c.__values__,h}function kW(c,h,w){(w?Jr(c,h,w):h===n)?h=1:h=Yn(Ye(h),0);var R=c==null?0:c.length;if(!R||h<1)return[];for(var I=0,z=0,K=oe(Sy(R/h));I<R;)K[z++]=so(c,I,I+=h);return K}function IW(c){for(var h=-1,w=c==null?0:c.length,R=0,I=[];++h<w;){var z=c[h];z&&(I[R++]=z)}return I}function MW(){var c=arguments.length;if(!c)return[];for(var h=oe(c-1),w=arguments[0],R=c;R--;)h[R-1]=arguments[R];return Wa(Ge(w)?pi(w):[w],Cr(h,1))}var NW=et(function(c,h){return An(c)?Ch(c,Cr(h,1,An,!0)):[]}),LW=et(function(c,h){var w=ao(h);return An(w)&&(w=n),An(c)?Ch(c,Cr(h,1,An,!0),De(w,2)):[]}),DW=et(function(c,h){var w=ao(h);return An(w)&&(w=n),An(c)?Ch(c,Cr(h,1,An,!0),n,w):[]});function $W(c,h,w){var R=c==null?0:c.length;return R?(h=w||h===n?1:Ye(h),so(c,h<0?0:h,R)):[]}function FW(c,h,w){var R=c==null?0:c.length;return R?(h=w||h===n?1:Ye(h),h=R-h,so(c,0,h<0?0:h)):[]}function BW(c,h){return c&&c.length?ky(c,De(h,3),!0,!0):[]}function UW(c,h){return c&&c.length?ky(c,De(h,3),!0):[]}function zW(c,h,w,R){var I=c==null?0:c.length;return I?(w&&typeof w!="number"&&Jr(c,h,w)&&(w=0,R=I),MH(c,h,w,R)):[]}function jA(c,h,w){var R=c==null?0:c.length;if(!R)return-1;var I=w==null?0:Ye(w);return I<0&&(I=Yn(R+I,0)),cy(c,De(h,3),I)}function GA(c,h,w){var R=c==null?0:c.length;if(!R)return-1;var I=R-1;return w!==n&&(I=Ye(w),I=w<0?Yn(R+I,0):Dr(I,R-1)),cy(c,De(h,3),I,!0)}function HA(c){var h=c==null?0:c.length;return h?Cr(c,1):[]}function VW(c){var h=c==null?0:c.length;return h?Cr(c,B):[]}function jW(c,h){var w=c==null?0:c.length;return w?(h=h===n?1:Ye(h),Cr(c,h)):[]}function GW(c){for(var h=-1,w=c==null?0:c.length,R={};++h<w;){var I=c[h];R[I[0]]=I[1]}return R}function WA(c){return c&&c.length?c[0]:n}function HW(c,h,w){var R=c==null?0:c.length;if(!R)return-1;var I=w==null?0:Ye(w);return I<0&&(I=Yn(R+I,0)),zc(c,h,I)}function WW(c){var h=c==null?0:c.length;return h?so(c,0,-1):[]}var qW=et(function(c){var h=an(c,Z2);return h.length&&h[0]===c[0]?V2(h):[]}),KW=et(function(c){var h=ao(c),w=an(c,Z2);return h===ao(w)?h=n:w.pop(),w.length&&w[0]===c[0]?V2(w,De(h,2)):[]}),XW=et(function(c){var h=ao(c),w=an(c,Z2);return h=typeof h=="function"?h:n,h&&w.pop(),w.length&&w[0]===c[0]?V2(w,n,h):[]});function YW(c,h){return c==null?"":WG.call(c,h)}function ao(c){var h=c==null?0:c.length;return h?c[h-1]:n}function QW(c,h,w){var R=c==null?0:c.length;if(!R)return-1;var I=R;return w!==n&&(I=Ye(w),I=I<0?Yn(R+I,0):Dr(I,R-1)),h===h?OG(c,h,I):cy(c,E6,I,!0)}function ZW(c,h){return c&&c.length?rA(c,Ye(h)):n}var JW=et(qA);function qA(c,h){return c&&c.length&&h&&h.length?W2(c,h):c}function eq(c,h,w){return c&&c.length&&h&&h.length?W2(c,h,De(w,2)):c}function tq(c,h,w){return c&&c.length&&h&&h.length?W2(c,h,n,w):c}var nq=Ys(function(c,h){var w=c==null?0:c.length,R=F2(c,h);return sA(c,an(h,function(I){return Qs(I,w)?+I:I}).sort(mA)),R});function rq(c,h){var w=[];if(!(c&&c.length))return w;var R=-1,I=[],z=c.length;for(h=De(h,3);++R<z;){var K=c[R];h(K,R,c)&&(w.push(K),I.push(R))}return sA(c,I),w}function fw(c){return c==null?c:YG.call(c)}function iq(c,h,w){var R=c==null?0:c.length;return R?(w&&typeof w!="number"&&Jr(c,h,w)?(h=0,w=R):(h=h==null?0:Ye(h),w=w===n?R:Ye(w)),so(c,h,w)):[]}function oq(c,h){return Oy(c,h)}function sq(c,h,w){return X2(c,h,De(w,2))}function aq(c,h){var w=c==null?0:c.length;if(w){var R=Oy(c,h);if(R<w&&Mo(c[R],h))return R}return-1}function lq(c,h){return Oy(c,h,!0)}function uq(c,h,w){return X2(c,h,De(w,2),!0)}function cq(c,h){var w=c==null?0:c.length;if(w){var R=Oy(c,h,!0)-1;if(Mo(c[R],h))return R}return-1}function dq(c){return c&&c.length?lA(c):[]}function fq(c,h){return c&&c.length?lA(c,De(h,2)):[]}function hq(c){var h=c==null?0:c.length;return h?so(c,1,h):[]}function pq(c,h,w){return c&&c.length?(h=w||h===n?1:Ye(h),so(c,0,h<0?0:h)):[]}function gq(c,h,w){var R=c==null?0:c.length;return R?(h=w||h===n?1:Ye(h),h=R-h,so(c,h<0?0:h,R)):[]}function mq(c,h){return c&&c.length?ky(c,De(h,3),!1,!0):[]}function yq(c,h){return c&&c.length?ky(c,De(h,3)):[]}var vq=et(function(c){return Ya(Cr(c,1,An,!0))}),_q=et(function(c){var h=ao(c);return An(h)&&(h=n),Ya(Cr(c,1,An,!0),De(h,2))}),bq=et(function(c){var h=ao(c);return h=typeof h=="function"?h:n,Ya(Cr(c,1,An,!0),n,h)});function Sq(c){return c&&c.length?Ya(c):[]}function wq(c,h){return c&&c.length?Ya(c,De(h,2)):[]}function xq(c,h){return h=typeof h=="function"?h:n,c&&c.length?Ya(c,n,h):[]}function hw(c){if(!(c&&c.length))return[];var h=0;return c=Ha(c,function(w){if(An(w))return h=Yn(w.length,h),!0}),O2(h,function(w){return an(c,A2(w))})}function KA(c,h){if(!(c&&c.length))return[];var w=hw(c);return h==null?w:an(w,function(R){return Ni(h,n,R)})}var Cq=et(function(c,h){return An(c)?Ch(c,h):[]}),Tq=et(function(c){return Q2(Ha(c,An))}),Eq=et(function(c){var h=ao(c);return An(h)&&(h=n),Q2(Ha(c,An),De(h,2))}),Aq=et(function(c){var h=ao(c);return h=typeof h=="function"?h:n,Q2(Ha(c,An),n,h)}),Pq=et(hw);function Rq(c,h){return fA(c||[],h||[],xh)}function Oq(c,h){return fA(c||[],h||[],Ah)}var kq=et(function(c){var h=c.length,w=h>1?c[h-1]:n;return w=typeof w=="function"?(c.pop(),w):n,KA(c,w)});function XA(c){var h=$(c);return h.__chain__=!0,h}function Iq(c,h){return h(c),c}function Uy(c,h){return h(c)}var Mq=Ys(function(c){var h=c.length,w=h?c[0]:0,R=this.__wrapped__,I=function(z){return F2(z,c)};return h>1||this.__actions__.length||!(R instanceof ut)||!Qs(w)?this.thru(I):(R=R.slice(w,+w+(h?1:0)),R.__actions__.push({func:Uy,args:[I],thisArg:n}),new io(R,this.__chain__).thru(function(z){return h&&!z.length&&z.push(n),z}))});function Nq(){return XA(this)}function Lq(){return new io(this.value(),this.__chain__)}function Dq(){this.__values__===n&&(this.__values__=uP(this.value()));var c=this.__index__>=this.__values__.length,h=c?n:this.__values__[this.__index__++];return{done:c,value:h}}function $q(){return this}function Fq(c){for(var h,w=this;w instanceof Ty;){var R=VA(w);R.__index__=0,R.__values__=n,h?I.__wrapped__=R:h=R;var I=R;w=w.__wrapped__}return I.__wrapped__=c,h}function Bq(){var c=this.__wrapped__;if(c instanceof ut){var h=c;return this.__actions__.length&&(h=new ut(this)),h=h.reverse(),h.__actions__.push({func:Uy,args:[fw],thisArg:n}),new io(h,this.__chain__)}return this.thru(fw)}function Uq(){return dA(this.__wrapped__,this.__actions__)}var zq=Iy(function(c,h,w){Nt.call(c,w)?++c[w]:Ks(c,w,1)});function Vq(c,h,w){var R=Ge(c)?C6:IH;return w&&Jr(c,h,w)&&(h=n),R(c,De(h,3))}function jq(c,h){var w=Ge(c)?Ha:K6;return w(c,De(h,3))}var Gq=wA(jA),Hq=wA(GA);function Wq(c,h){return Cr(zy(c,h),1)}function qq(c,h){return Cr(zy(c,h),B)}function Kq(c,h,w){return w=w===n?1:Ye(w),Cr(zy(c,h),w)}function YA(c,h){var w=Ge(c)?no:Xa;return w(c,De(h,3))}function QA(c,h){var w=Ge(c)?hG:q6;return w(c,De(h,3))}var Xq=Iy(function(c,h,w){Nt.call(c,w)?c[w].push(h):Ks(c,w,[h])});function Yq(c,h,w,R){c=gi(c)?c:Jc(c),w=w&&!R?Ye(w):0;var I=c.length;return w<0&&(w=Yn(I+w,0)),Wy(c)?w<=I&&c.indexOf(h,w)>-1:!!I&&zc(c,h,w)>-1}var Qq=et(function(c,h,w){var R=-1,I=typeof h=="function",z=gi(c)?oe(c.length):[];return Xa(c,function(K){z[++R]=I?Ni(h,K,w):Th(K,h,w)}),z}),Zq=Iy(function(c,h,w){Ks(c,w,h)});function zy(c,h){var w=Ge(c)?an:eA;return w(c,De(h,3))}function Jq(c,h,w,R){return c==null?[]:(Ge(h)||(h=h==null?[]:[h]),w=R?n:w,Ge(w)||(w=w==null?[]:[w]),iA(c,h,w))}var eK=Iy(function(c,h,w){c[w?0:1].push(h)},function(){return[[],[]]});function tK(c,h,w){var R=Ge(c)?T2:P6,I=arguments.length<3;return R(c,De(h,4),w,I,Xa)}function nK(c,h,w){var R=Ge(c)?pG:P6,I=arguments.length<3;return R(c,De(h,4),w,I,q6)}function rK(c,h){var w=Ge(c)?Ha:K6;return w(c,Gy(De(h,3)))}function iK(c){var h=Ge(c)?j6:YH;return h(c)}function oK(c,h,w){(w?Jr(c,h,w):h===n)?h=1:h=Ye(h);var R=Ge(c)?AH:QH;return R(c,h)}function sK(c){var h=Ge(c)?PH:JH;return h(c)}function aK(c){if(c==null)return 0;if(gi(c))return Wy(c)?jc(c):c.length;var h=$r(c);return h==Me||h==it?c.size:G2(c).length}function lK(c,h,w){var R=Ge(c)?E2:eW;return w&&Jr(c,h,w)&&(h=n),R(c,De(h,3))}var uK=et(function(c,h){if(c==null)return[];var w=h.length;return w>1&&Jr(c,h[0],h[1])?h=[]:w>2&&Jr(h[0],h[1],h[2])&&(h=[h[0]]),iA(c,Cr(h,1),[])}),Vy=jG||function(){return qe.Date.now()};function cK(c,h){if(typeof h!="function")throw new ro(s);return c=Ye(c),function(){if(--c<1)return h.apply(this,arguments)}}function ZA(c,h,w){return h=w?n:h,h=c&&h==null?c.length:h,Xs(c,E,n,n,n,n,h)}function JA(c,h){var w;if(typeof h!="function")throw new ro(s);return c=Ye(c),function(){return--c>0&&(w=h.apply(this,arguments)),c<=1&&(h=n),w}}var pw=et(function(c,h,w){var R=x;if(w.length){var I=qa(w,Qc(pw));R|=C}return Xs(c,R,h,w,I)}),eP=et(function(c,h,w){var R=x|_;if(w.length){var I=qa(w,Qc(eP));R|=C}return Xs(h,R,c,w,I)});function tP(c,h,w){h=w?n:h;var R=Xs(c,y,n,n,n,n,n,h);return R.placeholder=tP.placeholder,R}function nP(c,h,w){h=w?n:h;var R=Xs(c,S,n,n,n,n,n,h);return R.placeholder=nP.placeholder,R}function rP(c,h,w){var R,I,z,K,X,te,ce=0,de=!1,he=!1,be=!0;if(typeof c!="function")throw new ro(s);h=lo(h)||0,hn(w)&&(de=!!w.leading,he="maxWait"in w,z=he?Yn(lo(w.maxWait)||0,h):z,be="trailing"in w?!!w.trailing:be);function Oe(Pn){var No=R,ea=I;return R=I=n,ce=Pn,K=c.apply(ea,No),K}function $e(Pn){return ce=Pn,X=Oh(st,h),de?Oe(Pn):K}function Ze(Pn){var No=Pn-te,ea=Pn-ce,wP=h-No;return he?Dr(wP,z-ea):wP}function Fe(Pn){var No=Pn-te,ea=Pn-ce;return te===n||No>=h||No<0||he&&ea>=z}function st(){var Pn=Vy();if(Fe(Pn))return ht(Pn);X=Oh(st,Ze(Pn))}function ht(Pn){return X=n,be&&R?Oe(Pn):(R=I=n,K)}function Fi(){X!==n&&hA(X),ce=0,R=te=I=X=n}function ei(){return X===n?K:ht(Vy())}function Bi(){var Pn=Vy(),No=Fe(Pn);if(R=arguments,I=this,te=Pn,No){if(X===n)return $e(te);if(he)return hA(X),X=Oh(st,h),Oe(te)}return X===n&&(X=Oh(st,h)),K}return Bi.cancel=Fi,Bi.flush=ei,Bi}var dK=et(function(c,h){return W6(c,1,h)}),fK=et(function(c,h,w){return W6(c,lo(h)||0,w)});function hK(c){return Xs(c,k)}function jy(c,h){if(typeof c!="function"||h!=null&&typeof h!="function")throw new ro(s);var w=function(){var R=arguments,I=h?h.apply(this,R):R[0],z=w.cache;if(z.has(I))return z.get(I);var K=c.apply(this,R);return w.cache=z.set(I,K)||z,K};return w.cache=new(jy.Cache||qs),w}jy.Cache=qs;function Gy(c){if(typeof c!="function")throw new ro(s);return function(){var h=arguments;switch(h.length){case 0:return!c.call(this);case 1:return!c.call(this,h[0]);case 2:return!c.call(this,h[0],h[1]);case 3:return!c.call(this,h[0],h[1],h[2])}return!c.apply(this,h)}}function pK(c){return JA(2,c)}var gK=tW(function(c,h){h=h.length==1&&Ge(h[0])?an(h[0],Li(De())):an(Cr(h,1),Li(De()));var w=h.length;return et(function(R){for(var I=-1,z=Dr(R.length,w);++I<z;)R[I]=h[I].call(this,R[I]);return Ni(c,this,R)})}),gw=et(function(c,h){var w=qa(h,Qc(gw));return Xs(c,C,n,h,w)}),iP=et(function(c,h){var w=qa(h,Qc(iP));return Xs(c,T,n,h,w)}),mK=Ys(function(c,h){return Xs(c,P,n,n,n,h)});function yK(c,h){if(typeof c!="function")throw new ro(s);return h=h===n?h:Ye(h),et(c,h)}function vK(c,h){if(typeof c!="function")throw new ro(s);return h=h==null?0:Yn(Ye(h),0),et(function(w){var R=w[h],I=Za(w,0,h);return R&&Wa(I,R),Ni(c,this,I)})}function _K(c,h,w){var R=!0,I=!0;if(typeof c!="function")throw new ro(s);return hn(w)&&(R="leading"in w?!!w.leading:R,I="trailing"in w?!!w.trailing:I),rP(c,h,{leading:R,maxWait:h,trailing:I})}function bK(c){return ZA(c,1)}function SK(c,h){return gw(J2(h),c)}function wK(){if(!arguments.length)return[];var c=arguments[0];return Ge(c)?c:[c]}function xK(c){return oo(c,g)}function CK(c,h){return h=typeof h=="function"?h:n,oo(c,g,h)}function TK(c){return oo(c,f|g)}function EK(c,h){return h=typeof h=="function"?h:n,oo(c,f|g,h)}function AK(c,h){return h==null||H6(c,h,ar(h))}function Mo(c,h){return c===h||c!==c&&h!==h}var PK=Dy(z2),RK=Dy(function(c,h){return c>=h}),vu=Q6(function(){return arguments}())?Q6:function(c){return xn(c)&&Nt.call(c,"callee")&&!$6.call(c,"callee")},Ge=oe.isArray,OK=Bc?Li(Bc):FH;function gi(c){return c!=null&&Hy(c.length)&&!Zs(c)}function An(c){return xn(c)&&gi(c)}function kK(c){return c===!0||c===!1||xn(c)&&Zr(c)==ne}var Ja=HG||Ew,IK=Uc?Li(Uc):BH;function MK(c){return xn(c)&&c.nodeType===1&&!kh(c)}function NK(c){if(c==null)return!0;if(gi(c)&&(Ge(c)||typeof c=="string"||typeof c.splice=="function"||Ja(c)||Zc(c)||vu(c)))return!c.length;var h=$r(c);if(h==Me||h==it)return!c.size;if(Rh(c))return!G2(c).length;for(var w in c)if(Nt.call(c,w))return!1;return!0}function LK(c,h){return Eh(c,h)}function DK(c,h,w){w=typeof w=="function"?w:n;var R=w?w(c,h):n;return R===n?Eh(c,h,n,w):!!R}function mw(c){if(!xn(c))return!1;var h=Zr(c);return h==ve||h==pe||typeof c.message=="string"&&typeof c.name=="string"&&!kh(c)}function $K(c){return typeof c=="number"&&B6(c)}function Zs(c){if(!hn(c))return!1;var h=Zr(c);return h==ye||h==We||h==W||h==Hn}function oP(c){return typeof c=="number"&&c==Ye(c)}function Hy(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=D}function hn(c){var h=typeof c;return c!=null&&(h=="object"||h=="function")}function xn(c){return c!=null&&typeof c=="object"}var sP=mh?Li(mh):zH;function FK(c,h){return c===h||j2(c,h,sw(h))}function BK(c,h,w){return w=typeof w=="function"?w:n,j2(c,h,sw(h),w)}function UK(c){return aP(c)&&c!=+c}function zK(c){if(CW(c))throw new Ve(o);return Z6(c)}function VK(c){return c===null}function jK(c){return c==null}function aP(c){return typeof c=="number"||xn(c)&&Zr(c)==Ee}function kh(c){if(!xn(c)||Zr(c)!=_e)return!1;var h=vy(c);if(h===null)return!0;var w=Nt.call(h,"constructor")&&h.constructor;return typeof w=="function"&&w instanceof w&&py.call(w)==BG}var yw=S6?Li(S6):VH;function GK(c){return oP(c)&&c>=-D&&c<=D}var lP=w6?Li(w6):jH;function Wy(c){return typeof c=="string"||!Ge(c)&&xn(c)&&Zr(c)==gt}function $i(c){return typeof c=="symbol"||xn(c)&&Zr(c)==Jt}var Zc=x6?Li(x6):GH;function HK(c){return c===n}function WK(c){return xn(c)&&$r(c)==yr}function qK(c){return xn(c)&&Zr(c)==hi}var KK=Dy(H2),XK=Dy(function(c,h){return c<=h});function uP(c){if(!c)return[];if(gi(c))return Wy(c)?ko(c):pi(c);if(vh&&c[vh])return AG(c[vh]());var h=$r(c),w=h==Me?I2:h==it?dy:Jc;return w(c)}function Js(c){if(!c)return c===0?c:0;if(c=lo(c),c===B||c===-B){var h=c<0?-1:1;return h*V}return c===c?c:0}function Ye(c){var h=Js(c),w=h%1;return h===h?w?h-w:h:0}function cP(c){return c?pu(Ye(c),0,q):0}function lo(c){if(typeof c=="number")return c;if($i(c))return j;if(hn(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=hn(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=R6(c);var w=rh.test(c);return w||ih.test(c)?we(c.slice(2),w?2:8):nh.test(c)?j:+c}function dP(c){return as(c,mi(c))}function YK(c){return c?pu(Ye(c),-D,D):c===0?c:0}function kt(c){return c==null?"":Di(c)}var QK=Xc(function(c,h){if(Rh(h)||gi(h)){as(h,ar(h),c);return}for(var w in h)Nt.call(h,w)&&xh(c,w,h[w])}),fP=Xc(function(c,h){as(h,mi(h),c)}),qy=Xc(function(c,h,w,R){as(h,mi(h),c,R)}),ZK=Xc(function(c,h,w,R){as(h,ar(h),c,R)}),JK=Ys(F2);function eX(c,h){var w=Kc(c);return h==null?w:G6(w,h)}var tX=et(function(c,h){c=Wt(c);var w=-1,R=h.length,I=R>2?h[2]:n;for(I&&Jr(h[0],h[1],I)&&(R=1);++w<R;)for(var z=h[w],K=mi(z),X=-1,te=K.length;++X<te;){var ce=K[X],de=c[ce];(de===n||Mo(de,Hc[ce])&&!Nt.call(c,ce))&&(c[ce]=z[ce])}return c}),nX=et(function(c){return c.push(n,RA),Ni(hP,n,c)});function rX(c,h){return T6(c,De(h,3),ss)}function iX(c,h){return T6(c,De(h,3),U2)}function oX(c,h){return c==null?c:B2(c,De(h,3),mi)}function sX(c,h){return c==null?c:X6(c,De(h,3),mi)}function aX(c,h){return c&&ss(c,De(h,3))}function lX(c,h){return c&&U2(c,De(h,3))}function uX(c){return c==null?[]:Py(c,ar(c))}function cX(c){return c==null?[]:Py(c,mi(c))}function vw(c,h,w){var R=c==null?n:gu(c,h);return R===n?w:R}function dX(c,h){return c!=null&&IA(c,h,NH)}function _w(c,h){return c!=null&&IA(c,h,LH)}var fX=CA(function(c,h,w){h!=null&&typeof h.toString!="function"&&(h=gy.call(h)),c[h]=w},Sw(yi)),hX=CA(function(c,h,w){h!=null&&typeof h.toString!="function"&&(h=gy.call(h)),Nt.call(c,h)?c[h].push(w):c[h]=[w]},De),pX=et(Th);function ar(c){return gi(c)?V6(c):G2(c)}function mi(c){return gi(c)?V6(c,!0):HH(c)}function gX(c,h){var w={};return h=De(h,3),ss(c,function(R,I,z){Ks(w,h(R,I,z),R)}),w}function mX(c,h){var w={};return h=De(h,3),ss(c,function(R,I,z){Ks(w,I,h(R,I,z))}),w}var yX=Xc(function(c,h,w){Ry(c,h,w)}),hP=Xc(function(c,h,w,R){Ry(c,h,w,R)}),vX=Ys(function(c,h){var w={};if(c==null)return w;var R=!1;h=an(h,function(z){return z=Qa(z,c),R||(R=z.length>1),z}),as(c,iw(c),w),R&&(w=oo(w,f|p|g,fW));for(var I=h.length;I--;)Y2(w,h[I]);return w});function _X(c,h){return pP(c,Gy(De(h)))}var bX=Ys(function(c,h){return c==null?{}:qH(c,h)});function pP(c,h){if(c==null)return{};var w=an(iw(c),function(R){return[R]});return h=De(h),oA(c,w,function(R,I){return h(R,I[0])})}function SX(c,h,w){h=Qa(h,c);var R=-1,I=h.length;for(I||(I=1,c=n);++R<I;){var z=c==null?n:c[ls(h[R])];z===n&&(R=I,z=w),c=Zs(z)?z.call(c):z}return c}function wX(c,h,w){return c==null?c:Ah(c,h,w)}function xX(c,h,w,R){return R=typeof R=="function"?R:n,c==null?c:Ah(c,h,w,R)}var gP=AA(ar),mP=AA(mi);function CX(c,h,w){var R=Ge(c),I=R||Ja(c)||Zc(c);if(h=De(h,4),w==null){var z=c&&c.constructor;I?w=R?new z:[]:hn(c)?w=Zs(z)?Kc(vy(c)):{}:w={}}return(I?no:ss)(c,function(K,X,te){return h(w,K,X,te)}),w}function TX(c,h){return c==null?!0:Y2(c,h)}function EX(c,h,w){return c==null?c:cA(c,h,J2(w))}function AX(c,h,w,R){return R=typeof R=="function"?R:n,c==null?c:cA(c,h,J2(w),R)}function Jc(c){return c==null?[]:k2(c,ar(c))}function PX(c){return c==null?[]:k2(c,mi(c))}function RX(c,h,w){return w===n&&(w=h,h=n),w!==n&&(w=lo(w),w=w===w?w:0),h!==n&&(h=lo(h),h=h===h?h:0),pu(lo(c),h,w)}function OX(c,h,w){return h=Js(h),w===n?(w=h,h=0):w=Js(w),c=lo(c),DH(c,h,w)}function kX(c,h,w){if(w&&typeof w!="boolean"&&Jr(c,h,w)&&(h=w=n),w===n&&(typeof h=="boolean"?(w=h,h=n):typeof c=="boolean"&&(w=c,c=n)),c===n&&h===n?(c=0,h=1):(c=Js(c),h===n?(h=c,c=0):h=Js(h)),c>h){var R=c;c=h,h=R}if(w||c%1||h%1){var I=U6();return Dr(c+I*(h-c+re("1e-"+((I+"").length-1))),h)}return q2(c,h)}var IX=Yc(function(c,h,w){return h=h.toLowerCase(),c+(w?yP(h):h)});function yP(c){return bw(kt(c).toLowerCase())}function vP(c){return c=kt(c),c&&c.replace(sh,wG).replace(oy,"")}function MX(c,h,w){c=kt(c),h=Di(h);var R=c.length;w=w===n?R:pu(Ye(w),0,R);var I=w;return w-=h.length,w>=0&&c.slice(w,I)==h}function NX(c){return c=kt(c),c&&Dn.test(c)?c.replace(Ot,xG):c}function LX(c){return c=kt(c),c&&is.test(c)?c.replace(Mi,"\\$&"):c}var DX=Yc(function(c,h,w){return c+(w?"-":"")+h.toLowerCase()}),$X=Yc(function(c,h,w){return c+(w?" ":"")+h.toLowerCase()}),FX=SA("toLowerCase");function BX(c,h,w){c=kt(c),h=Ye(h);var R=h?jc(c):0;if(!h||R>=h)return c;var I=(h-R)/2;return Ly(wy(I),w)+c+Ly(Sy(I),w)}function UX(c,h,w){c=kt(c),h=Ye(h);var R=h?jc(c):0;return h&&R<h?c+Ly(h-R,w):c}function zX(c,h,w){c=kt(c),h=Ye(h);var R=h?jc(c):0;return h&&R<h?Ly(h-R,w)+c:c}function VX(c,h,w){return w||h==null?h=0:h&&(h=+h),XG(kt(c).replace(to,""),h||0)}function jX(c,h,w){return(w?Jr(c,h,w):h===n)?h=1:h=Ye(h),K2(kt(c),h)}function GX(){var c=arguments,h=kt(c[0]);return c.length<3?h:h.replace(c[1],c[2])}var HX=Yc(function(c,h,w){return c+(w?"_":"")+h.toLowerCase()});function WX(c,h,w){return w&&typeof w!="number"&&Jr(c,h,w)&&(h=w=n),w=w===n?q:w>>>0,w?(c=kt(c),c&&(typeof h=="string"||h!=null&&!yw(h))&&(h=Di(h),!h&&Vc(c))?Za(ko(c),0,w):c.split(h,w)):[]}var qX=Yc(function(c,h,w){return c+(w?" ":"")+bw(h)});function KX(c,h,w){return c=kt(c),w=w==null?0:pu(Ye(w),0,c.length),h=Di(h),c.slice(w,w+h.length)==h}function XX(c,h,w){var R=$.templateSettings;w&&Jr(c,h,w)&&(h=n),c=kt(c),h=qy({},h,R,PA);var I=qy({},h.imports,R.imports,PA),z=ar(I),K=k2(I,z),X,te,ce=0,de=h.interpolate||os,he="__p += '",be=M2((h.escape||os).source+"|"+de.source+"|"+(de===br?th:os).source+"|"+(h.evaluate||os).source+"|$","g"),Oe="//# sourceURL="+(Nt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ay+"]")+`
|
||
`;c.replace(be,function(Fe,st,ht,Fi,ei,Bi){return ht||(ht=Fi),he+=c.slice(ce,Bi).replace(ah,CG),st&&(X=!0,he+=`' +
|
||
__e(`+st+`) +
|
||
'`),ei&&(te=!0,he+=`';
|
||
`+ei+`;
|
||
__p += '`),ht&&(he+=`' +
|
||
((__t = (`+ht+`)) == null ? '' : __t) +
|
||
'`),ce=Bi+Fe.length,Fe}),he+=`';
|
||
`;var $e=Nt.call(h,"variable")&&h.variable;if(!$e)he=`with (obj) {
|
||
`+he+`
|
||
}
|
||
`;else if(Jf.test($e))throw new Ve(a);he=(te?he.replace(Vs,""):he).replace(Ji,"$1").replace(js,"$1;"),he="function("+($e||"obj")+`) {
|
||
`+($e?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(te?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+he+`return __p
|
||
}`;var Ze=bP(function(){return Ct(z,Oe+"return "+he).apply(n,K)});if(Ze.source=he,mw(Ze))throw Ze;return Ze}function YX(c){return kt(c).toLowerCase()}function QX(c){return kt(c).toUpperCase()}function ZX(c,h,w){if(c=kt(c),c&&(w||h===n))return R6(c);if(!c||!(h=Di(h)))return c;var R=ko(c),I=ko(h),z=O6(R,I),K=k6(R,I)+1;return Za(R,z,K).join("")}function JX(c,h,w){if(c=kt(c),c&&(w||h===n))return c.slice(0,M6(c)+1);if(!c||!(h=Di(h)))return c;var R=ko(c),I=k6(R,ko(h))+1;return Za(R,0,I).join("")}function eY(c,h,w){if(c=kt(c),c&&(w||h===n))return c.replace(to,"");if(!c||!(h=Di(h)))return c;var R=ko(c),I=O6(R,ko(h));return Za(R,I).join("")}function tY(c,h){var w=O,R=M;if(hn(h)){var I="separator"in h?h.separator:I;w="length"in h?Ye(h.length):w,R="omission"in h?Di(h.omission):R}c=kt(c);var z=c.length;if(Vc(c)){var K=ko(c);z=K.length}if(w>=z)return c;var X=w-jc(R);if(X<1)return R;var te=K?Za(K,0,X).join(""):c.slice(0,X);if(I===n)return te+R;if(K&&(X+=te.length-X),yw(I)){if(c.slice(X).search(I)){var ce,de=te;for(I.global||(I=M2(I.source,kt(Po.exec(I))+"g")),I.lastIndex=0;ce=I.exec(de);)var he=ce.index;te=te.slice(0,he===n?X:he)}}else if(c.indexOf(Di(I),X)!=X){var be=te.lastIndexOf(I);be>-1&&(te=te.slice(0,be))}return te+R}function nY(c){return c=kt(c),c&&qn.test(c)?c.replace(Xt,kG):c}var rY=Yc(function(c,h,w){return c+(w?" ":"")+h.toUpperCase()}),bw=SA("toUpperCase");function _P(c,h,w){return c=kt(c),h=w?n:h,h===n?EG(c)?NG(c):yG(c):c.match(h)||[]}var bP=et(function(c,h){try{return Ni(c,n,h)}catch(w){return mw(w)?w:new Ve(w)}}),iY=Ys(function(c,h){return no(h,function(w){w=ls(w),Ks(c,w,pw(c[w],c))}),c});function oY(c){var h=c==null?0:c.length,w=De();return c=h?an(c,function(R){if(typeof R[1]!="function")throw new ro(s);return[w(R[0]),R[1]]}):[],et(function(R){for(var I=-1;++I<h;){var z=c[I];if(Ni(z[0],this,R))return Ni(z[1],this,R)}})}function sY(c){return kH(oo(c,f))}function Sw(c){return function(){return c}}function aY(c,h){return c==null||c!==c?h:c}var lY=xA(),uY=xA(!0);function yi(c){return c}function ww(c){return J6(typeof c=="function"?c:oo(c,f))}function cY(c){return tA(oo(c,f))}function dY(c,h){return nA(c,oo(h,f))}var fY=et(function(c,h){return function(w){return Th(w,c,h)}}),hY=et(function(c,h){return function(w){return Th(c,w,h)}});function xw(c,h,w){var R=ar(h),I=Py(h,R);w==null&&!(hn(h)&&(I.length||!R.length))&&(w=h,h=c,c=this,I=Py(h,ar(h)));var z=!(hn(w)&&"chain"in w)||!!w.chain,K=Zs(c);return no(I,function(X){var te=h[X];c[X]=te,K&&(c.prototype[X]=function(){var ce=this.__chain__;if(z||ce){var de=c(this.__wrapped__),he=de.__actions__=pi(this.__actions__);return he.push({func:te,args:arguments,thisArg:c}),de.__chain__=ce,de}return te.apply(c,Wa([this.value()],arguments))})}),c}function pY(){return qe._===this&&(qe._=UG),this}function Cw(){}function gY(c){return c=Ye(c),et(function(h){return rA(h,c)})}var mY=tw(an),yY=tw(C6),vY=tw(E2);function SP(c){return lw(c)?A2(ls(c)):KH(c)}function _Y(c){return function(h){return c==null?n:gu(c,h)}}var bY=TA(),SY=TA(!0);function Tw(){return[]}function Ew(){return!1}function wY(){return{}}function xY(){return""}function CY(){return!0}function TY(c,h){if(c=Ye(c),c<1||c>D)return[];var w=q,R=Dr(c,q);h=De(h),c-=q;for(var I=O2(R,h);++w<c;)h(w);return I}function EY(c){return Ge(c)?an(c,ls):$i(c)?[c]:pi(zA(kt(c)))}function AY(c){var h=++FG;return kt(c)+h}var PY=Ny(function(c,h){return c+h},0),RY=nw("ceil"),OY=Ny(function(c,h){return c/h},1),kY=nw("floor");function IY(c){return c&&c.length?Ay(c,yi,z2):n}function MY(c,h){return c&&c.length?Ay(c,De(h,2),z2):n}function NY(c){return A6(c,yi)}function LY(c,h){return A6(c,De(h,2))}function DY(c){return c&&c.length?Ay(c,yi,H2):n}function $Y(c,h){return c&&c.length?Ay(c,De(h,2),H2):n}var FY=Ny(function(c,h){return c*h},1),BY=nw("round"),UY=Ny(function(c,h){return c-h},0);function zY(c){return c&&c.length?R2(c,yi):0}function VY(c,h){return c&&c.length?R2(c,De(h,2)):0}return $.after=cK,$.ary=ZA,$.assign=QK,$.assignIn=fP,$.assignInWith=qy,$.assignWith=ZK,$.at=JK,$.before=JA,$.bind=pw,$.bindAll=iY,$.bindKey=eP,$.castArray=wK,$.chain=XA,$.chunk=kW,$.compact=IW,$.concat=MW,$.cond=oY,$.conforms=sY,$.constant=Sw,$.countBy=zq,$.create=eX,$.curry=tP,$.curryRight=nP,$.debounce=rP,$.defaults=tX,$.defaultsDeep=nX,$.defer=dK,$.delay=fK,$.difference=NW,$.differenceBy=LW,$.differenceWith=DW,$.drop=$W,$.dropRight=FW,$.dropRightWhile=BW,$.dropWhile=UW,$.fill=zW,$.filter=jq,$.flatMap=Wq,$.flatMapDeep=qq,$.flatMapDepth=Kq,$.flatten=HA,$.flattenDeep=VW,$.flattenDepth=jW,$.flip=hK,$.flow=lY,$.flowRight=uY,$.fromPairs=GW,$.functions=uX,$.functionsIn=cX,$.groupBy=Xq,$.initial=WW,$.intersection=qW,$.intersectionBy=KW,$.intersectionWith=XW,$.invert=fX,$.invertBy=hX,$.invokeMap=Qq,$.iteratee=ww,$.keyBy=Zq,$.keys=ar,$.keysIn=mi,$.map=zy,$.mapKeys=gX,$.mapValues=mX,$.matches=cY,$.matchesProperty=dY,$.memoize=jy,$.merge=yX,$.mergeWith=hP,$.method=fY,$.methodOf=hY,$.mixin=xw,$.negate=Gy,$.nthArg=gY,$.omit=vX,$.omitBy=_X,$.once=pK,$.orderBy=Jq,$.over=mY,$.overArgs=gK,$.overEvery=yY,$.overSome=vY,$.partial=gw,$.partialRight=iP,$.partition=eK,$.pick=bX,$.pickBy=pP,$.property=SP,$.propertyOf=_Y,$.pull=JW,$.pullAll=qA,$.pullAllBy=eq,$.pullAllWith=tq,$.pullAt=nq,$.range=bY,$.rangeRight=SY,$.rearg=mK,$.reject=rK,$.remove=rq,$.rest=yK,$.reverse=fw,$.sampleSize=oK,$.set=wX,$.setWith=xX,$.shuffle=sK,$.slice=iq,$.sortBy=uK,$.sortedUniq=dq,$.sortedUniqBy=fq,$.split=WX,$.spread=vK,$.tail=hq,$.take=pq,$.takeRight=gq,$.takeRightWhile=mq,$.takeWhile=yq,$.tap=Iq,$.throttle=_K,$.thru=Uy,$.toArray=uP,$.toPairs=gP,$.toPairsIn=mP,$.toPath=EY,$.toPlainObject=dP,$.transform=CX,$.unary=bK,$.union=vq,$.unionBy=_q,$.unionWith=bq,$.uniq=Sq,$.uniqBy=wq,$.uniqWith=xq,$.unset=TX,$.unzip=hw,$.unzipWith=KA,$.update=EX,$.updateWith=AX,$.values=Jc,$.valuesIn=PX,$.without=Cq,$.words=_P,$.wrap=SK,$.xor=Tq,$.xorBy=Eq,$.xorWith=Aq,$.zip=Pq,$.zipObject=Rq,$.zipObjectDeep=Oq,$.zipWith=kq,$.entries=gP,$.entriesIn=mP,$.extend=fP,$.extendWith=qy,xw($,$),$.add=PY,$.attempt=bP,$.camelCase=IX,$.capitalize=yP,$.ceil=RY,$.clamp=RX,$.clone=xK,$.cloneDeep=TK,$.cloneDeepWith=EK,$.cloneWith=CK,$.conformsTo=AK,$.deburr=vP,$.defaultTo=aY,$.divide=OY,$.endsWith=MX,$.eq=Mo,$.escape=NX,$.escapeRegExp=LX,$.every=Vq,$.find=Gq,$.findIndex=jA,$.findKey=rX,$.findLast=Hq,$.findLastIndex=GA,$.findLastKey=iX,$.floor=kY,$.forEach=YA,$.forEachRight=QA,$.forIn=oX,$.forInRight=sX,$.forOwn=aX,$.forOwnRight=lX,$.get=vw,$.gt=PK,$.gte=RK,$.has=dX,$.hasIn=_w,$.head=WA,$.identity=yi,$.includes=Yq,$.indexOf=HW,$.inRange=OX,$.invoke=pX,$.isArguments=vu,$.isArray=Ge,$.isArrayBuffer=OK,$.isArrayLike=gi,$.isArrayLikeObject=An,$.isBoolean=kK,$.isBuffer=Ja,$.isDate=IK,$.isElement=MK,$.isEmpty=NK,$.isEqual=LK,$.isEqualWith=DK,$.isError=mw,$.isFinite=$K,$.isFunction=Zs,$.isInteger=oP,$.isLength=Hy,$.isMap=sP,$.isMatch=FK,$.isMatchWith=BK,$.isNaN=UK,$.isNative=zK,$.isNil=jK,$.isNull=VK,$.isNumber=aP,$.isObject=hn,$.isObjectLike=xn,$.isPlainObject=kh,$.isRegExp=yw,$.isSafeInteger=GK,$.isSet=lP,$.isString=Wy,$.isSymbol=$i,$.isTypedArray=Zc,$.isUndefined=HK,$.isWeakMap=WK,$.isWeakSet=qK,$.join=YW,$.kebabCase=DX,$.last=ao,$.lastIndexOf=QW,$.lowerCase=$X,$.lowerFirst=FX,$.lt=KK,$.lte=XK,$.max=IY,$.maxBy=MY,$.mean=NY,$.meanBy=LY,$.min=DY,$.minBy=$Y,$.stubArray=Tw,$.stubFalse=Ew,$.stubObject=wY,$.stubString=xY,$.stubTrue=CY,$.multiply=FY,$.nth=ZW,$.noConflict=pY,$.noop=Cw,$.now=Vy,$.pad=BX,$.padEnd=UX,$.padStart=zX,$.parseInt=VX,$.random=kX,$.reduce=tK,$.reduceRight=nK,$.repeat=jX,$.replace=GX,$.result=SX,$.round=BY,$.runInContext=J,$.sample=iK,$.size=aK,$.snakeCase=HX,$.some=lK,$.sortedIndex=oq,$.sortedIndexBy=sq,$.sortedIndexOf=aq,$.sortedLastIndex=lq,$.sortedLastIndexBy=uq,$.sortedLastIndexOf=cq,$.startCase=qX,$.startsWith=KX,$.subtract=UY,$.sum=zY,$.sumBy=VY,$.template=XX,$.times=TY,$.toFinite=Js,$.toInteger=Ye,$.toLength=cP,$.toLower=YX,$.toNumber=lo,$.toSafeInteger=YK,$.toString=kt,$.toUpper=QX,$.trim=ZX,$.trimEnd=JX,$.trimStart=eY,$.truncate=tY,$.unescape=nY,$.uniqueId=AY,$.upperCase=rY,$.upperFirst=bw,$.each=YA,$.eachRight=QA,$.first=WA,xw($,function(){var c={};return ss($,function(h,w){Nt.call($.prototype,w)||(c[w]=h)}),c}(),{chain:!1}),$.VERSION=r,no(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){$[c].placeholder=$}),no(["drop","take"],function(c,h){ut.prototype[c]=function(w){w=w===n?1:Yn(Ye(w),0);var R=this.__filtered__&&!h?new ut(this):this.clone();return R.__filtered__?R.__takeCount__=Dr(w,R.__takeCount__):R.__views__.push({size:Dr(w,q),type:c+(R.__dir__<0?"Right":"")}),R},ut.prototype[c+"Right"]=function(w){return this.reverse()[c](w).reverse()}}),no(["filter","map","takeWhile"],function(c,h){var w=h+1,R=w==A||w==F;ut.prototype[c]=function(I){var z=this.clone();return z.__iteratees__.push({iteratee:De(I,3),type:w}),z.__filtered__=z.__filtered__||R,z}}),no(["head","last"],function(c,h){var w="take"+(h?"Right":"");ut.prototype[c]=function(){return this[w](1).value()[0]}}),no(["initial","tail"],function(c,h){var w="drop"+(h?"":"Right");ut.prototype[c]=function(){return this.__filtered__?new ut(this):this[w](1)}}),ut.prototype.compact=function(){return this.filter(yi)},ut.prototype.find=function(c){return this.filter(c).head()},ut.prototype.findLast=function(c){return this.reverse().find(c)},ut.prototype.invokeMap=et(function(c,h){return typeof c=="function"?new ut(this):this.map(function(w){return Th(w,c,h)})}),ut.prototype.reject=function(c){return this.filter(Gy(De(c)))},ut.prototype.slice=function(c,h){c=Ye(c);var w=this;return w.__filtered__&&(c>0||h<0)?new ut(w):(c<0?w=w.takeRight(-c):c&&(w=w.drop(c)),h!==n&&(h=Ye(h),w=h<0?w.dropRight(-h):w.take(h-c)),w)},ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},ut.prototype.toArray=function(){return this.take(q)},ss(ut.prototype,function(c,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),R=/^(?:head|last)$/.test(h),I=$[R?"take"+(h=="last"?"Right":""):h],z=R||/^find/.test(h);I&&($.prototype[h]=function(){var K=this.__wrapped__,X=R?[1]:arguments,te=K instanceof ut,ce=X[0],de=te||Ge(K),he=function(st){var ht=I.apply($,Wa([st],X));return R&&be?ht[0]:ht};de&&w&&typeof ce=="function"&&ce.length!=1&&(te=de=!1);var be=this.__chain__,Oe=!!this.__actions__.length,$e=z&&!be,Ze=te&&!Oe;if(!z&&de){K=Ze?K:new ut(this);var Fe=c.apply(K,X);return Fe.__actions__.push({func:Uy,args:[he],thisArg:n}),new io(Fe,be)}return $e&&Ze?c.apply(this,X):(Fe=this.thru(he),$e?R?Fe.value()[0]:Fe.value():Fe)})}),no(["pop","push","shift","sort","splice","unshift"],function(c){var h=fy[c],w=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",R=/^(?:pop|shift)$/.test(c);$.prototype[c]=function(){var I=arguments;if(R&&!this.__chain__){var z=this.value();return h.apply(Ge(z)?z:[],I)}return this[w](function(K){return h.apply(Ge(K)?K:[],I)})}}),ss(ut.prototype,function(c,h){var w=$[h];if(w){var R=w.name+"";Nt.call(qc,R)||(qc[R]=[]),qc[R].push({name:h,func:w})}}),qc[My(n,_).name]=[{name:"wrapper",func:n}],ut.prototype.clone=nH,ut.prototype.reverse=rH,ut.prototype.value=iH,$.prototype.at=Mq,$.prototype.chain=Nq,$.prototype.commit=Lq,$.prototype.next=Dq,$.prototype.plant=Fq,$.prototype.reverse=Bq,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=Uq,$.prototype.first=$.prototype.head,vh&&($.prototype[vh]=$q),$},Gc=LG();_t?((_t.exports=Gc)._=Gc,Je._=Gc):qe._=Gc}).call(He)})(w1,w1.exports);var que=w1.exports,x1=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,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return l([u,d])}}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(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},C1=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},Kue=Object.defineProperty,Xue=Object.defineProperties,Yue=Object.getOwnPropertyDescriptors,T1=Object.getOwnPropertySymbols,l$=Object.prototype.hasOwnProperty,u$=Object.prototype.propertyIsEnumerable,D9=function(e,t,n){return t in e?Kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},kn=function(e,t){for(var n in t||(t={}))l$.call(t,n)&&D9(e,n,t[n]);if(T1)for(var r=0,i=T1(t);r<i.length;r++){var n=i[r];u$.call(t,n)&&D9(e,n,t[n])}return e},xs=function(e,t){return Xue(e,Yue(t))},$9=function(e,t){var n={};for(var r in e)l$.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&T1)for(var i=0,o=T1(e);i<o.length;i++){var r=o[i];t.indexOf(r)<0&&u$.call(e,r)&&(n[r]=e[r])}return n},E1=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{a(n.next(l))}catch(u){i(u)}},s=function(l){try{a(n.throw(l))}catch(u){i(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,s)};a((n=n.apply(e,t)).next())})},ln;(function(e){e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected"})(ln||(ln={}));function Que(e){return{status:e,isUninitialized:e===ln.uninitialized,isLoading:e===ln.pending,isSuccess:e===ln.fulfilled,isError:e===ln.rejected}}function Zue(e){return new RegExp("(^|:)//").test(e)}var Jue=function(e){return e.replace(/\/$/,"")},ece=function(e){return e.replace(/^\//,"")};function tce(e,t){if(!e)return t;if(!t)return e;if(Zue(t))return t;var n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=Jue(e),t=ece(t),""+e+n+t}var F9=function(e){return[].concat.apply([],e)};function nce(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}function rce(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var B9=Zo;function c$(e,t){if(e===t||!(B9(e)&&B9(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,o=Array.isArray(t)?[]:{},s=0,a=n;s<a.length;s++){var l=a[s];o[l]=c$(e[l],t[l]),i&&(i=e[l]===o[l])}return i?e:o}var U9=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},ice=function(e){return e.status>=200&&e.status<=299},oce=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function z9(e){if(!Zo(e))return e;for(var t=kn({},e),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n],o=i[0],s=i[1];s===void 0&&delete t[o]}return t}function sce(e){var t=this;e===void 0&&(e={});var n=e,r=n.baseUrl,i=n.prepareHeaders,o=i===void 0?function(y){return y}:i,s=n.fetchFn,a=s===void 0?U9:s,l=n.paramsSerializer,u=n.isJsonContentType,d=u===void 0?oce:u,f=n.jsonContentType,p=f===void 0?"application/json":f,g=n.jsonReplacer,m=n.timeout,v=n.responseHandler,x=n.validateStatus,_=$9(n,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","jsonReplacer","timeout","responseHandler","validateStatus"]);return typeof fetch>"u"&&a===U9&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(y,S){return E1(t,null,function(){var C,T,E,P,k,O,M,G,U,A,N,F,B,D,V,j,q,Z,ee,ie,se,le,W,ne,fe,pe,ve,ye,We,Me,Ee,lt,_e,jt,Hn,Bt;return x1(this,function(it){switch(it.label){case 0:return C=S.signal,T=S.getState,E=S.extra,P=S.endpoint,k=S.forced,O=S.type,G=typeof y=="string"?{url:y}:y,U=G.url,A=G.headers,N=A===void 0?new Headers(_.headers):A,F=G.params,B=F===void 0?void 0:F,D=G.responseHandler,V=D===void 0?v??"json":D,j=G.validateStatus,q=j===void 0?x??ice:j,Z=G.timeout,ee=Z===void 0?m:Z,ie=$9(G,["url","headers","params","responseHandler","validateStatus","timeout"]),se=kn(xs(kn({},_),{signal:C}),ie),N=new Headers(z9(N)),le=se,[4,o(N,{getState:T,extra:E,endpoint:P,forced:k,type:O})];case 1:le.headers=it.sent()||N,W=function(gt){return typeof gt=="object"&&(Zo(gt)||Array.isArray(gt)||typeof gt.toJSON=="function")},!se.headers.has("content-type")&&W(se.body)&&se.headers.set("content-type",p),W(se.body)&&d(se.headers)&&(se.body=JSON.stringify(se.body,g)),B&&(ne=~U.indexOf("?")?"&":"?",fe=l?l(B):new URLSearchParams(z9(B)),U+=ne+fe),U=tce(r,U),pe=new Request(U,se),ve=pe.clone(),M={request:ve},We=!1,Me=ee&&setTimeout(function(){We=!0,S.abort()},ee),it.label=2;case 2:return it.trys.push([2,4,5,6]),[4,a(pe)];case 3:return ye=it.sent(),[3,6];case 4:return Ee=it.sent(),[2,{error:{status:We?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Ee)},meta:M}];case 5:return Me&&clearTimeout(Me),[7];case 6:lt=ye.clone(),M.response=lt,jt="",it.label=7;case 7:return it.trys.push([7,9,,10]),[4,Promise.all([b(ye,V).then(function(gt){return _e=gt},function(gt){return Hn=gt}),lt.text().then(function(gt){return jt=gt},function(){})])];case 8:if(it.sent(),Hn)throw Hn;return[3,10];case 9:return Bt=it.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:ye.status,data:jt,error:String(Bt)},meta:M}];case 10:return[2,q(ye,_e)?{data:_e,meta:M}:{error:{status:ye.status,data:_e},meta:M}]}})})};function b(y,S){return E1(this,null,function(){var C;return x1(this,function(T){switch(T.label){case 0:return typeof S=="function"?[2,S(y)]:(S==="content-type"&&(S=d(y.headers)?"json":"text"),S!=="json"?[3,2]:[4,y.text()]);case 1:return C=T.sent(),[2,C.length?JSON.parse(C):null];case 2:return[2,y.text()]}})})}}var V9=function(){function e(t,n){n===void 0&&(n=void 0),this.value=t,this.meta=n}return e}(),xT=Re("__rtkq/focused"),d$=Re("__rtkq/unfocused"),CT=Re("__rtkq/online"),f$=Re("__rtkq/offline"),Ls;(function(e){e.query="query",e.mutation="mutation"})(Ls||(Ls={}));function h$(e){return e.type===Ls.query}function ace(e){return e.type===Ls.mutation}function p$(e,t,n,r,i,o){return lce(e)?e(t,n,r,i).map(R3).map(o):Array.isArray(e)?e.map(R3).map(o):[]}function lce(e){return typeof e=="function"}function R3(e){return typeof e=="string"?{type:e}:e}function cx(e){return e!=null}var xg=Symbol("forceQueryFn"),O3=function(e){return typeof e[xg]=="function"};function uce(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,o=e.context,s=new Map,a=new Map,l=i.internalActions,u=l.unsubscribeQueryResult,d=l.removeMutationResult,f=l.updateSubscriptionOptions;return{buildInitiateQuery:b,buildInitiateMutation:y,getRunningQueryThunk:m,getRunningMutationThunk:v,getRunningQueriesThunk:x,getRunningMutationsThunk:_,getRunningOperationPromises:g,removalWarning:p};function p(){throw new Error(`This method had to be removed due to a conceptual bug in RTK.
|
||
Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.
|
||
See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}function g(){typeof process<"u";var S=function(C){return Array.from(C.values()).flatMap(function(T){return T?Object.values(T):[]})};return C1(C1([],S(s)),S(a)).filter(cx)}function m(S,C){return function(T){var E,P=o.endpointDefinitions[S],k=t({queryArgs:C,endpointDefinition:P,endpointName:S});return(E=s.get(T))==null?void 0:E[k]}}function v(S,C){return function(T){var E;return(E=a.get(T))==null?void 0:E[C]}}function x(){return function(S){return Object.values(s.get(S)||{}).filter(cx)}}function _(){return function(S){return Object.values(a.get(S)||{}).filter(cx)}}function b(S,C){var T=function(E,P){var k=P===void 0?{}:P,O=k.subscribe,M=O===void 0?!0:O,G=k.forceRefetch,U=k.subscriptionOptions,A=xg,N=k[A];return function(F,B){var D,V,j=t({queryArgs:E,endpointDefinition:C,endpointName:S}),q=n((D={type:"query",subscribe:M,forceRefetch:G,subscriptionOptions:U,endpointName:S,originalArgs:E,queryCacheKey:j},D[xg]=N,D)),Z=i.endpoints[S].select(E),ee=F(q),ie=Z(B()),se=ee.requestId,le=ee.abort,W=ie.requestId!==se,ne=(V=s.get(F))==null?void 0:V[j],fe=function(){return Z(B())},pe=Object.assign(N?ee.then(fe):W&&!ne?Promise.resolve(ie):Promise.all([ne,ee]).then(fe),{arg:E,requestId:se,subscriptionOptions:U,queryCacheKey:j,abort:le,unwrap:function(){return E1(this,null,function(){var ye;return x1(this,function(We){switch(We.label){case 0:return[4,pe];case 1:if(ye=We.sent(),ye.isError)throw ye.error;return[2,ye.data]}})})},refetch:function(){return F(T(E,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){M&&F(u({queryCacheKey:j,requestId:se}))},updateSubscriptionOptions:function(ye){pe.subscriptionOptions=ye,F(f({endpointName:S,requestId:se,queryCacheKey:j,options:ye}))}});if(!ne&&!W&&!N){var ve=s.get(F)||{};ve[j]=pe,s.set(F,ve),pe.then(function(){delete ve[j],Object.keys(ve).length||s.delete(F)})}return pe}};return T}function y(S){return function(C,T){var E=T===void 0?{}:T,P=E.track,k=P===void 0?!0:P,O=E.fixedCacheKey;return function(M,G){var U=r({type:"mutation",endpointName:S,originalArgs:C,track:k,fixedCacheKey:O}),A=M(U),N=A.requestId,F=A.abort,B=A.unwrap,D=A.unwrap().then(function(Z){return{data:Z}}).catch(function(Z){return{error:Z}}),V=function(){M(d({requestId:N,fixedCacheKey:O}))},j=Object.assign(D,{arg:A.arg,requestId:N,abort:F,unwrap:B,unsubscribe:V,reset:V}),q=a.get(M)||{};return a.set(M,q),q[N]=j,j.then(function(){delete q[N],Object.keys(q).length||a.delete(M)}),O&&(q[O]=j,j.then(function(){q[O]===j&&(delete q[O],Object.keys(q).length||a.delete(M))})),j}}}}function j9(e){return e}function cce(e){var t=this,n=e.reducerPath,r=e.baseQuery,i=e.context.endpointDefinitions,o=e.serializeQueryArgs,s=e.api,a=function(y,S,C){return function(T){var E=i[y];T(s.internalActions.queryResultPatched({queryCacheKey:o({queryArgs:S,endpointDefinition:E,endpointName:y}),patches:C}))}},l=function(y,S,C){return function(T,E){var P,k,O=s.endpoints[y].select(S)(E()),M={patches:[],inversePatches:[],undo:function(){return T(s.util.patchQueryData(y,S,M.inversePatches))}};if(O.status===ln.uninitialized)return M;if("data"in O)if(Ai(O.data)){var G=Z4(O.data,C),U=G[1],A=G[2];(P=M.patches).push.apply(P,U),(k=M.inversePatches).push.apply(k,A)}else{var N=C(O.data);M.patches.push({op:"replace",path:[],value:N}),M.inversePatches.push({op:"replace",path:[],value:O.data})}return T(s.util.patchQueryData(y,S,M.patches)),M}},u=function(y,S,C){return function(T){var E;return T(s.endpoints[y].initiate(S,(E={subscribe:!1,forceRefetch:!0},E[xg]=function(){return{data:C}},E)))}},d=function(y,S){return E1(t,[y,S],function(C,T){var E,P,k,O,M,G,U,A,N,F,B,D,V,j,q,Z,ee,ie,se=T.signal,le=T.abort,W=T.rejectWithValue,ne=T.fulfillWithValue,fe=T.dispatch,pe=T.getState,ve=T.extra;return x1(this,function(ye){switch(ye.label){case 0:E=i[C.endpointName],ye.label=1;case 1:return ye.trys.push([1,8,,13]),P=j9,k=void 0,O={signal:se,abort:le,dispatch:fe,getState:pe,extra:ve,endpoint:C.endpointName,type:C.type,forced:C.type==="query"?f(C,pe()):void 0},M=C.type==="query"?C[xg]:void 0,M?(k=M(),[3,6]):[3,2];case 2:return E.query?[4,r(E.query(C.originalArgs),O,E.extraOptions)]:[3,4];case 3:return k=ye.sent(),E.transformResponse&&(P=E.transformResponse),[3,6];case 4:return[4,E.queryFn(C.originalArgs,O,E.extraOptions,function(We){return r(We,O,E.extraOptions)})];case 5:k=ye.sent(),ye.label=6;case 6:if(typeof process<"u",k.error)throw new V9(k.error,k.meta);return B=ne,[4,P(k.data,k.meta,C.originalArgs)];case 7:return[2,B.apply(void 0,[ye.sent(),(ee={fulfilledTimeStamp:Date.now(),baseQueryMeta:k.meta},ee[Lu]=!0,ee)])];case 8:if(D=ye.sent(),V=D,!(V instanceof V9))return[3,12];j=j9,E.query&&E.transformErrorResponse&&(j=E.transformErrorResponse),ye.label=9;case 9:return ye.trys.push([9,11,,12]),q=W,[4,j(V.value,V.meta,C.originalArgs)];case 10:return[2,q.apply(void 0,[ye.sent(),(ie={baseQueryMeta:V.meta},ie[Lu]=!0,ie)])];case 11:return Z=ye.sent(),V=Z,[3,12];case 12:throw typeof process<"u",console.error(V),V;case 13:return[2]}})})};function f(y,S){var C,T,E,P,k=(T=(C=S[n])==null?void 0:C.queries)==null?void 0:T[y.queryCacheKey],O=(E=S[n])==null?void 0:E.config.refetchOnMountOrArgChange,M=k==null?void 0:k.fulfilledTimeStamp,G=(P=y.forceRefetch)!=null?P:y.subscribe&&O;return G?G===!0||(Number(new Date)-Number(M))/1e3>=G:!1}var p=Bl(n+"/executeQuery",d,{getPendingMeta:function(){var y;return y={startedTimeStamp:Date.now()},y[Lu]=!0,y},condition:function(y,S){var C=S.getState,T,E,P,k=C(),O=(E=(T=k[n])==null?void 0:T.queries)==null?void 0:E[y.queryCacheKey],M=O==null?void 0:O.fulfilledTimeStamp,G=y.originalArgs,U=O==null?void 0:O.originalArgs,A=i[y.endpointName];return O3(y)?!0:(O==null?void 0:O.status)==="pending"?!1:f(y,k)||h$(A)&&((P=A==null?void 0:A.forceRefetch)!=null&&P.call(A,{currentArg:G,previousArg:U,endpointState:O,state:k}))?!0:!M},dispatchConditionRejection:!0}),g=Bl(n+"/executeMutation",d,{getPendingMeta:function(){var y;return y={startedTimeStamp:Date.now()},y[Lu]=!0,y}}),m=function(y){return"force"in y},v=function(y){return"ifOlderThan"in y},x=function(y,S,C){return function(T,E){var P=m(C)&&C.force,k=v(C)&&C.ifOlderThan,O=function(A){return A===void 0&&(A=!0),s.endpoints[y].initiate(S,{forceRefetch:A})},M=s.endpoints[y].select(S)(E());if(P)T(O());else if(k){var G=M==null?void 0:M.fulfilledTimeStamp;if(!G){T(O());return}var U=(Number(new Date)-Number(new Date(G)))/1e3>=k;U&&T(O())}else T(O(!1))}};function _(y){return function(S){var C,T;return((T=(C=S==null?void 0:S.meta)==null?void 0:C.arg)==null?void 0:T.endpointName)===y}}function b(y,S){return{matchPending:Xd(H_(y),_(S)),matchFulfilled:Xd(eu(y),_(S)),matchRejected:Xd(_f(y),_(S))}}return{queryThunk:p,mutationThunk:g,prefetch:x,updateQueryData:l,upsertQueryData:u,patchQueryData:a,buildMatchThunkActions:b}}function g$(e,t,n,r){return p$(n[e.meta.arg.endpointName][t],eu(e)?e.payload:void 0,sm(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function m0(e,t,n){var r=e[t];r&&n(r)}function Cg(e){var t;return(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)!=null?t:e.requestId}function G9(e,t,n){var r=e[Cg(t)];r&&n(r)}var Vh={};function dce(e){var t=e.reducerPath,n=e.queryThunk,r=e.mutationThunk,i=e.context,o=i.endpointDefinitions,s=i.apiUid,a=i.extractRehydrationInfo,l=i.hasRehydrationInfo,u=e.assertTagType,d=e.config,f=Re(t+"/resetApiState"),p=yn({name:t+"/queries",initialState:Vh,reducers:{removeQueryResult:{reducer:function(C,T){var E=T.payload.queryCacheKey;delete C[E]},prepare:uv()},queryResultPatched:function(C,T){var E=T.payload,P=E.queryCacheKey,k=E.patches;m0(C,P,function(O){O.data=d3(O.data,k.concat())})}},extraReducers:function(C){C.addCase(n.pending,function(T,E){var P=E.meta,k=E.meta.arg,O,M,G=O3(k);(k.subscribe||G)&&((M=T[O=k.queryCacheKey])!=null||(T[O]={status:ln.uninitialized,endpointName:k.endpointName})),m0(T,k.queryCacheKey,function(U){U.status=ln.pending,U.requestId=G&&U.requestId?U.requestId:P.requestId,k.originalArgs!==void 0&&(U.originalArgs=k.originalArgs),U.startedTimeStamp=P.startedTimeStamp})}).addCase(n.fulfilled,function(T,E){var P=E.meta,k=E.payload;m0(T,P.arg.queryCacheKey,function(O){var M;if(!(O.requestId!==P.requestId&&!O3(P.arg))){var G=o[P.arg.endpointName].merge;if(O.status=ln.fulfilled,G)if(O.data!==void 0){var U=P.fulfilledTimeStamp,A=P.arg,N=P.baseQueryMeta,F=P.requestId,B=Zl(O.data,function(D){return G(D,k,{arg:A.originalArgs,baseQueryMeta:N,fulfilledTimeStamp:U,requestId:F})});O.data=B}else O.data=k;else O.data=(M=o[P.arg.endpointName].structuralSharing)==null||M?c$(ai(O.data)?H4(O.data):O.data,k):k;delete O.error,O.fulfilledTimeStamp=P.fulfilledTimeStamp}})}).addCase(n.rejected,function(T,E){var P=E.meta,k=P.condition,O=P.arg,M=P.requestId,G=E.error,U=E.payload;m0(T,O.queryCacheKey,function(A){if(!k){if(A.requestId!==M)return;A.status=ln.rejected,A.error=U??G}})}).addMatcher(l,function(T,E){for(var P=a(E).queries,k=0,O=Object.entries(P);k<O.length;k++){var M=O[k],G=M[0],U=M[1];((U==null?void 0:U.status)===ln.fulfilled||(U==null?void 0:U.status)===ln.rejected)&&(T[G]=U)}})}}),g=yn({name:t+"/mutations",initialState:Vh,reducers:{removeMutationResult:{reducer:function(C,T){var E=T.payload,P=Cg(E);P in C&&delete C[P]},prepare:uv()}},extraReducers:function(C){C.addCase(r.pending,function(T,E){var P=E.meta,k=E.meta,O=k.requestId,M=k.arg,G=k.startedTimeStamp;M.track&&(T[Cg(P)]={requestId:O,status:ln.pending,endpointName:M.endpointName,startedTimeStamp:G})}).addCase(r.fulfilled,function(T,E){var P=E.payload,k=E.meta;k.arg.track&&G9(T,k,function(O){O.requestId===k.requestId&&(O.status=ln.fulfilled,O.data=P,O.fulfilledTimeStamp=k.fulfilledTimeStamp)})}).addCase(r.rejected,function(T,E){var P=E.payload,k=E.error,O=E.meta;O.arg.track&&G9(T,O,function(M){M.requestId===O.requestId&&(M.status=ln.rejected,M.error=P??k)})}).addMatcher(l,function(T,E){for(var P=a(E).mutations,k=0,O=Object.entries(P);k<O.length;k++){var M=O[k],G=M[0],U=M[1];((U==null?void 0:U.status)===ln.fulfilled||(U==null?void 0:U.status)===ln.rejected)&&G!==(U==null?void 0:U.requestId)&&(T[G]=U)}})}}),m=yn({name:t+"/invalidation",initialState:Vh,reducers:{},extraReducers:function(C){C.addCase(p.actions.removeQueryResult,function(T,E){for(var P=E.payload.queryCacheKey,k=0,O=Object.values(T);k<O.length;k++)for(var M=O[k],G=0,U=Object.values(M);G<U.length;G++){var A=U[G],N=A.indexOf(P);N!==-1&&A.splice(N,1)}}).addMatcher(l,function(T,E){for(var P,k,O,M,G=a(E).provided,U=0,A=Object.entries(G);U<A.length;U++)for(var N=A[U],F=N[0],B=N[1],D=0,V=Object.entries(B);D<V.length;D++)for(var j=V[D],q=j[0],Z=j[1],ee=(M=(k=(P=T[F])!=null?P:T[F]={})[O=q||"__internal_without_id"])!=null?M:k[O]=[],ie=0,se=Z;ie<se.length;ie++){var le=se[ie],W=ee.includes(le);W||ee.push(le)}}).addMatcher(Co(eu(n),sm(n)),function(T,E){for(var P,k,O,M,G=g$(E,"providesTags",o,u),U=E.meta.arg.queryCacheKey,A=0,N=Object.values(T);A<N.length;A++)for(var F=N[A],B=0,D=Object.values(F);B<D.length;B++){var V=D[B],j=V.indexOf(U);j!==-1&&V.splice(j,1)}for(var q=0,Z=G;q<Z.length;q++){var ee=Z[q],ie=ee.type,se=ee.id,le=(M=(k=(P=T[ie])!=null?P:T[ie]={})[O=se||"__internal_without_id"])!=null?M:k[O]=[],W=le.includes(U);W||le.push(U)}})}}),v=yn({name:t+"/subscriptions",initialState:Vh,reducers:{updateSubscriptionOptions:function(C,T){},unsubscribeQueryResult:function(C,T){},internal_probeSubscription:function(C,T){}}}),x=yn({name:t+"/internalSubscriptions",initialState:Vh,reducers:{subscriptionsUpdated:{reducer:function(C,T){return d3(C,T.payload)},prepare:uv()}}}),_=yn({name:t+"/config",initialState:kn({online:nce(),focused:rce(),middlewareRegistered:!1},d),reducers:{middlewareRegistered:function(C,T){var E=T.payload;C.middlewareRegistered=C.middlewareRegistered==="conflict"||s!==E?"conflict":!0}},extraReducers:function(C){C.addCase(CT,function(T){T.online=!0}).addCase(f$,function(T){T.online=!1}).addCase(xT,function(T){T.focused=!0}).addCase(d$,function(T){T.focused=!1}).addMatcher(l,function(T){return kn({},T)})}}),b=Ff({queries:p.reducer,mutations:g.reducer,provided:m.reducer,subscriptions:x.reducer,config:_.reducer}),y=function(C,T){return b(f.match(T)?void 0:C,T)},S=xs(kn(kn(kn(kn(kn({},_.actions),p.actions),v.actions),x.actions),g.actions),{unsubscribeMutationResult:g.actions.removeMutationResult,resetApiState:f});return{reducer:y,actions:S}}var Du=Symbol.for("RTKQ/skipToken"),m$={status:ln.uninitialized},H9=Zl(m$,function(){}),W9=Zl(m$,function(){});function fce(e){var t=e.serializeQueryArgs,n=e.reducerPath,r=function(d){return H9},i=function(d){return W9};return{buildQuerySelector:a,buildMutationSelector:l,selectInvalidatedBy:u};function o(d){return kn(kn({},d),Que(d.status))}function s(d){var f=d[n];return f}function a(d,f){return function(p){var g=t({queryArgs:p,endpointDefinition:f,endpointName:d}),m=function(x){var _,b,y;return(y=(b=(_=s(x))==null?void 0:_.queries)==null?void 0:b[g])!=null?y:H9},v=p===Du?r:m;return si(v,o)}}function l(){return function(d){var f,p;typeof d=="object"?p=(f=Cg(d))!=null?f:Du:p=d;var g=function(v){var x,_,b;return(b=(_=(x=s(v))==null?void 0:x.mutations)==null?void 0:_[p])!=null?b:W9},m=p===Du?i:g;return si(m,o)}}function u(d,f){for(var p,g=d[n],m=new Set,v=0,x=f.map(R3);v<x.length;v++){var _=x[v],b=g.provided[_.type];if(b)for(var y=(p=_.id!==void 0?b[_.id]:F9(Object.values(b)))!=null?p:[],S=0,C=y;S<C.length;S++){var T=C[S];m.add(T)}}return F9(Array.from(m.values()).map(function(E){var P=g.queries[E];return P?[{queryCacheKey:E,endpointName:P.endpointName,originalArgs:P.originalArgs}]:[]}))}}var y0=WeakMap?new WeakMap:void 0,q9=function(e){var t=e.endpointName,n=e.queryArgs,r="",i=y0==null?void 0:y0.get(n);if(typeof i=="string")r=i;else{var o=JSON.stringify(n,function(s,a){return Zo(a)?Object.keys(a).sort().reduce(function(l,u){return l[u]=a[u],l},{}):a});Zo(n)&&(y0==null||y0.set(n,o)),r=o}return t+"("+r+")"};function hce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){var i=a1(function(d){var f,p;return(p=r.extractRehydrationInfo)==null?void 0:p.call(r,d,{reducerPath:(f=r.reducerPath)!=null?f:"api"})}),o=xs(kn({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},r),{extractRehydrationInfo:i,serializeQueryArgs:function(d){var f=q9;if("serializeQueryArgs"in d.endpointDefinition){var p=d.endpointDefinition.serializeQueryArgs;f=function(g){var m=p(g);return typeof m=="string"?m:q9(xs(kn({},g),{queryArgs:m}))}}else r.serializeQueryArgs&&(f=r.serializeQueryArgs);return f(d)},tagTypes:C1([],r.tagTypes||[])}),s={endpointDefinitions:{},batch:function(d){d()},apiUid:j_(),extractRehydrationInfo:i,hasRehydrationInfo:a1(function(d){return i(d)!=null})},a={injectEndpoints:u,enhanceEndpoints:function(d){var f=d.addTagTypes,p=d.endpoints;if(f)for(var g=0,m=f;g<m.length;g++){var v=m[g];o.tagTypes.includes(v)||o.tagTypes.push(v)}if(p)for(var x=0,_=Object.entries(p);x<_.length;x++){var b=_[x],y=b[0],S=b[1];typeof S=="function"?S(s.endpointDefinitions[y]):Object.assign(s.endpointDefinitions[y]||{},S)}return a}},l=e.map(function(d){return d.init(a,o,s)});function u(d){for(var f=d.endpoints({query:function(S){return xs(kn({},S),{type:Ls.query})},mutation:function(S){return xs(kn({},S),{type:Ls.mutation})}}),p=0,g=Object.entries(f);p<g.length;p++){var m=g[p],v=m[0],x=m[1];if(!d.overrideExisting&&v in s.endpointDefinitions){typeof process<"u";continue}s.endpointDefinitions[v]=x;for(var _=0,b=l;_<b.length;_++){var y=b[_];y.injectEndpoint(v,x)}}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function pce(e){for(var t in e)return!1;return!0}var gce=2147483647/1e3-1,mce=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=e.internalState,o=n.internalActions,s=o.removeQueryResult,a=o.unsubscribeQueryResult;function l(p){var g=i.currentSubscriptions[p];return!!g&&!pce(g)}var u={},d=function(p,g,m){var v;if(a.match(p)){var x=g.getState()[t],_=p.payload.queryCacheKey;f(_,(v=x.queries[_])==null?void 0:v.endpointName,g,x.config)}if(n.util.resetApiState.match(p))for(var b=0,y=Object.entries(u);b<y.length;b++){var S=y[b],C=S[0],T=S[1];T&&clearTimeout(T),delete u[C]}if(r.hasRehydrationInfo(p))for(var x=g.getState()[t],E=r.extractRehydrationInfo(p).queries,P=0,k=Object.entries(E);P<k.length;P++){var O=k[P],_=O[0],M=O[1];f(_,M==null?void 0:M.endpointName,g,x.config)}};function f(p,g,m,v){var x,_=r.endpointDefinitions[g],b=(x=_==null?void 0:_.keepUnusedDataFor)!=null?x:v.keepUnusedDataFor;if(b!==1/0){var y=Math.max(0,Math.min(b,gce));if(!l(p)){var S=u[p];S&&clearTimeout(S),u[p]=setTimeout(function(){l(p)||m.dispatch(s({queryCacheKey:p})),delete u[p]},y*1e3)}}}return d},yce=function(e){var t=e.reducerPath,n=e.context,r=e.context.endpointDefinitions,i=e.mutationThunk,o=e.api,s=e.assertTagType,a=e.refetchQuery,l=o.internalActions.removeQueryResult,u=Co(eu(i),sm(i)),d=function(p,g){u(p)&&f(g$(p,"invalidatesTags",r,s),g),o.util.invalidateTags.match(p)&&f(p$(p.payload,void 0,void 0,void 0,void 0,s),g)};function f(p,g){var m=g.getState(),v=m[t],x=o.util.selectInvalidatedBy(m,p);n.batch(function(){for(var _,b=Array.from(x.values()),y=0,S=b;y<S.length;y++){var C=S[y].queryCacheKey,T=v.queries[C],E=(_=v.subscriptions[C])!=null?_:{};T&&(Object.keys(E).length===0?g.dispatch(l({queryCacheKey:C})):T.status!==ln.uninitialized&&g.dispatch(a(T,C)))}})}return d},vce=function(e){var t=e.reducerPath,n=e.queryThunk,r=e.api,i=e.refetchQuery,o=e.internalState,s={},a=function(g,m){(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&u(g.payload,m),(n.pending.match(g)||n.rejected.match(g)&&g.meta.condition)&&u(g.meta.arg,m),(n.fulfilled.match(g)||n.rejected.match(g)&&!g.meta.condition)&&l(g.meta.arg,m),r.util.resetApiState.match(g)&&f()};function l(g,m){var v=g.queryCacheKey,x=m.getState()[t],_=x.queries[v],b=o.currentSubscriptions[v];if(!(!_||_.status===ln.uninitialized)){var y=p(b);if(Number.isFinite(y)){var S=s[v];S!=null&&S.timeout&&(clearTimeout(S.timeout),S.timeout=void 0);var C=Date.now()+y,T=s[v]={nextPollTimestamp:C,pollingInterval:y,timeout:setTimeout(function(){T.timeout=void 0,m.dispatch(i(_,v))},y)}}}}function u(g,m){var v=g.queryCacheKey,x=m.getState()[t],_=x.queries[v],b=o.currentSubscriptions[v];if(!(!_||_.status===ln.uninitialized)){var y=p(b);if(!Number.isFinite(y)){d(v);return}var S=s[v],C=Date.now()+y;(!S||C<S.nextPollTimestamp)&&l({queryCacheKey:v},m)}}function d(g){var m=s[g];m!=null&&m.timeout&&clearTimeout(m.timeout),delete s[g]}function f(){for(var g=0,m=Object.keys(s);g<m.length;g++){var v=m[g];d(v)}}function p(g){g===void 0&&(g={});var m=Number.POSITIVE_INFINITY;for(var v in g)g[v].pollingInterval&&(m=Math.min(g[v].pollingInterval,m));return m}return a},_ce=function(e){var t=e.reducerPath,n=e.context,r=e.api,i=e.refetchQuery,o=e.internalState,s=r.internalActions.removeQueryResult,a=function(u,d){xT.match(u)&&l(d,"refetchOnFocus"),CT.match(u)&&l(d,"refetchOnReconnect")};function l(u,d){var f=u.getState()[t],p=f.queries,g=o.currentSubscriptions;n.batch(function(){for(var m=0,v=Object.keys(g);m<v.length;m++){var x=v[m],_=p[x],b=g[x];if(!(!b||!_)){var y=Object.values(b).some(function(S){return S[d]===!0})||Object.values(b).every(function(S){return S[d]===void 0})&&f.config[d];y&&(Object.keys(b).length===0?u.dispatch(s({queryCacheKey:x})):_.status!==ln.uninitialized&&u.dispatch(i(_,x)))}}})}return a},K9=new Error("Promise never resolved before cacheEntryRemoved."),bce=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,o=e.mutationThunk;e.internalState;var s=l1(i),a=l1(o),l=eu(i,o),u={},d=function(g,m,v){var x=f(g);if(i.pending.match(g)){var _=v[n].queries[x],b=m.getState()[n].queries[x];!_&&b&&p(g.meta.arg.endpointName,g.meta.arg.originalArgs,x,m,g.meta.requestId)}else if(o.pending.match(g)){var b=m.getState()[n].mutations[x];b&&p(g.meta.arg.endpointName,g.meta.arg.originalArgs,x,m,g.meta.requestId)}else if(l(g)){var y=u[x];y!=null&&y.valueResolved&&(y.valueResolved({data:g.payload,meta:g.meta.baseQueryMeta}),delete y.valueResolved)}else if(t.internalActions.removeQueryResult.match(g)||t.internalActions.removeMutationResult.match(g)){var y=u[x];y&&(delete u[x],y.cacheEntryRemoved())}else if(t.util.resetApiState.match(g))for(var S=0,C=Object.entries(u);S<C.length;S++){var T=C[S],E=T[0],y=T[1];delete u[E],y.cacheEntryRemoved()}};function f(g){return s(g)?g.meta.arg.queryCacheKey:a(g)?g.meta.requestId:t.internalActions.removeQueryResult.match(g)?g.payload.queryCacheKey:t.internalActions.removeMutationResult.match(g)?Cg(g.payload):""}function p(g,m,v,x,_){var b=r.endpointDefinitions[g],y=b==null?void 0:b.onCacheEntryAdded;if(y){var S={},C=new Promise(function(M){S.cacheEntryRemoved=M}),T=Promise.race([new Promise(function(M){S.valueResolved=M}),C.then(function(){throw K9})]);T.catch(function(){}),u[v]=S;var E=t.endpoints[g].select(b.type===Ls.query?m:v),P=x.dispatch(function(M,G,U){return U}),k=xs(kn({},x),{getCacheEntry:function(){return E(x.getState())},requestId:_,extra:P,updateCachedData:b.type===Ls.query?function(M){return x.dispatch(t.util.updateQueryData(g,m,M))}:void 0,cacheDataLoaded:T,cacheEntryRemoved:C}),O=y(m,k);Promise.resolve(O).catch(function(M){if(M!==K9)throw M})}}return d},Sce=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,o=H_(r,i),s=_f(r,i),a=eu(r,i),l={},u=function(d,f){var p,g,m;if(o(d)){var v=d.meta,x=v.requestId,_=v.arg,b=_.endpointName,y=_.originalArgs,S=n.endpointDefinitions[b],C=S==null?void 0:S.onQueryStarted;if(C){var T={},E=new Promise(function(N,F){T.resolve=N,T.reject=F});E.catch(function(){}),l[x]=T;var P=t.endpoints[b].select(S.type===Ls.query?y:x),k=f.dispatch(function(N,F,B){return B}),O=xs(kn({},f),{getCacheEntry:function(){return P(f.getState())},requestId:x,extra:k,updateCachedData:S.type===Ls.query?function(N){return f.dispatch(t.util.updateQueryData(b,y,N))}:void 0,queryFulfilled:E});C(y,O)}}else if(a(d)){var M=d.meta,x=M.requestId,G=M.baseQueryMeta;(p=l[x])==null||p.resolve({data:d.payload,meta:G}),delete l[x]}else if(s(d)){var U=d.meta,x=U.requestId,A=U.rejectedWithValue,G=U.baseQueryMeta;(m=l[x])==null||m.reject({error:(g=d.payload)!=null?g:d.error,isUnhandledError:!A,meta:G}),delete l[x]}};return u},wce=function(e){var t=e.api,n=e.context.apiUid,r=e.reducerPath;return function(i,o){var s,a;t.util.resetApiState.match(i)&&o.dispatch(t.internalActions.middlewareRegistered(n)),typeof process<"u"}},X9,xce=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(X9||(X9=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Cce=function(e){var t=e.api,n=e.queryThunk,r=e.internalState,i=t.reducerPath+"/subscriptions",o=null,s=!1,a=t.internalActions,l=a.updateSubscriptionOptions,u=a.unsubscribeQueryResult,d=function(f,p){var g,m,v,x,_,b,y,S,C;if(l.match(p)){var T=p.payload,E=T.queryCacheKey,P=T.requestId,k=T.options;return(g=f==null?void 0:f[E])!=null&&g[P]&&(f[E][P]=k),!0}if(u.match(p)){var O=p.payload,E=O.queryCacheKey,P=O.requestId;return f[E]&&delete f[E][P],!0}if(t.internalActions.removeQueryResult.match(p))return delete f[p.payload.queryCacheKey],!0;if(n.pending.match(p)){var M=p.meta,G=M.arg,P=M.requestId;if(G.subscribe){var U=(v=f[m=G.queryCacheKey])!=null?v:f[m]={};return U[P]=(_=(x=G.subscriptionOptions)!=null?x:U[P])!=null?_:{},!0}}if(n.rejected.match(p)){var A=p.meta,N=A.condition,G=A.arg,P=A.requestId;if(N&&G.subscribe){var U=(y=f[b=G.queryCacheKey])!=null?y:f[b]={};return U[P]=(C=(S=G.subscriptionOptions)!=null?S:U[P])!=null?C:{},!0}}return!1};return function(f,p){var g,m;if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),t.util.resetApiState.match(f))return o=r.currentSubscriptions={},[!0,!1];if(t.internalActions.internal_probeSubscription.match(f)){var v=f.payload,x=v.queryCacheKey,_=v.requestId,b=!!((g=r.currentSubscriptions[x])!=null&&g[_]);return[!1,b]}var y=d(r.currentSubscriptions,f);if(y){s||(xce(function(){var E=JSON.parse(JSON.stringify(r.currentSubscriptions)),P=Z4(o,function(){return E}),k=P[1];p.next(t.internalActions.subscriptionsUpdated(k)),o=E,s=!1}),s=!0);var S=!!((m=f.type)!=null&&m.startsWith(i)),C=n.rejected.match(f)&&f.meta.condition&&!!f.meta.arg.subscribe,T=!S&&!C;return[T,!1]}return[!0,!1]}};function Tce(e){var t=e.reducerPath,n=e.queryThunk,r=e.api,i=e.context,o=i.apiUid,s={invalidateTags:Re(t+"/invalidateTags")},a=function(f){return!!f&&typeof f.type=="string"&&f.type.startsWith(t+"/")},l=[wce,mce,yce,vce,bce,Sce],u=function(f){var p=!1,g={currentSubscriptions:{}},m=xs(kn({},e),{internalState:g,refetchQuery:d}),v=l.map(function(b){return b(m)}),x=Cce(m),_=_ce(m);return function(b){return function(y){p||(p=!0,f.dispatch(r.internalActions.middlewareRegistered(o)));var S=xs(kn({},f),{next:b}),C=f.getState(),T=x(y,S,C),E=T[0],P=T[1],k;if(E?k=b(y):k=P,f.getState()[t]&&(_(y,S,C),a(y)||i.hasRehydrationInfo(y)))for(var O=0,M=v;O<M.length;O++){var G=M[O];G(y,S,C)}return k}}};return{middleware:u,actions:s};function d(f,p,g){return g===void 0&&(g={}),n(kn({type:"query",endpointName:f.endpointName,originalArgs:f.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:p},g))}}function tl(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,C1([e],t))}var Y9=Symbol(),Ece=function(){return{name:Y9,init:function(e,t,n){var r=t.baseQuery,i=t.tagTypes,o=t.reducerPath,s=t.serializeQueryArgs,a=t.keepUnusedDataFor,l=t.refetchOnMountOrArgChange,u=t.refetchOnFocus,d=t.refetchOnReconnect;Y4();var f=function(ee){return typeof process<"u",ee};Object.assign(e,{reducerPath:o,endpoints:{},internalActions:{onOnline:CT,onOffline:f$,onFocus:xT,onFocusLost:d$},util:{}});var p=cce({baseQuery:r,reducerPath:o,context:n,api:e,serializeQueryArgs:s}),g=p.queryThunk,m=p.mutationThunk,v=p.patchQueryData,x=p.updateQueryData,_=p.upsertQueryData,b=p.prefetch,y=p.buildMatchThunkActions,S=dce({context:n,queryThunk:g,mutationThunk:m,reducerPath:o,assertTagType:f,config:{refetchOnFocus:u,refetchOnReconnect:d,refetchOnMountOrArgChange:l,keepUnusedDataFor:a,reducerPath:o}}),C=S.reducer,T=S.actions;tl(e.util,{patchQueryData:v,updateQueryData:x,upsertQueryData:_,prefetch:b,resetApiState:T.resetApiState}),tl(e.internalActions,T);var E=Tce({reducerPath:o,context:n,queryThunk:g,mutationThunk:m,api:e,assertTagType:f}),P=E.middleware,k=E.actions;tl(e.util,k),tl(e,{reducer:C,middleware:P});var O=fce({serializeQueryArgs:s,reducerPath:o}),M=O.buildQuerySelector,G=O.buildMutationSelector,U=O.selectInvalidatedBy;tl(e.util,{selectInvalidatedBy:U});var A=uce({queryThunk:g,mutationThunk:m,api:e,serializeQueryArgs:s,context:n}),N=A.buildInitiateQuery,F=A.buildInitiateMutation,B=A.getRunningMutationThunk,D=A.getRunningMutationsThunk,V=A.getRunningQueriesThunk,j=A.getRunningQueryThunk,q=A.getRunningOperationPromises,Z=A.removalWarning;return tl(e.util,{getRunningOperationPromises:q,getRunningOperationPromise:Z,getRunningMutationThunk:B,getRunningMutationsThunk:D,getRunningQueryThunk:j,getRunningQueriesThunk:V}),{name:Y9,injectEndpoint:function(ee,ie){var se,le,W=e;(le=(se=W.endpoints)[ee])!=null||(se[ee]={}),h$(ie)?tl(W.endpoints[ee],{name:ee,select:M(ee,ie),initiate:N(ee,ie)},y(g,ee)):ace(ie)&&tl(W.endpoints[ee],{name:ee,select:G(),initiate:F(ee)},y(m,ee))}}}}},y$={exports:{}},v$={};/**
|
||
* @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 Cf=L;function Ace(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pce=typeof Object.is=="function"?Object.is:Ace,Rce=Cf.useState,Oce=Cf.useEffect,kce=Cf.useLayoutEffect,Ice=Cf.useDebugValue;function Mce(e,t){var n=t(),r=Rce({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return kce(function(){i.value=n,i.getSnapshot=t,dx(i)&&o({inst:i})},[e,n,t]),Oce(function(){return dx(i)&&o({inst:i}),e(function(){dx(i)&&o({inst:i})})},[e]),Ice(n),n}function dx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pce(e,n)}catch{return!0}}function Nce(e,t){return t()}var Lce=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Nce:Mce;v$.useSyncExternalStore=Cf.useSyncExternalStore!==void 0?Cf.useSyncExternalStore:Lce;y$.exports=v$;var Dce=y$.exports,_$={exports:{}},b$={};/**
|
||
* @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 ab=L,$ce=Dce;function Fce(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bce=typeof Object.is=="function"?Object.is:Fce,Uce=$ce.useSyncExternalStore,zce=ab.useRef,Vce=ab.useEffect,jce=ab.useMemo,Gce=ab.useDebugValue;b$.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=zce(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=jce(function(){function l(g){if(!u){if(u=!0,d=g,g=r(g),i!==void 0&&s.hasValue){var m=s.value;if(i(m,g))return f=m}return f=g}if(m=f,Bce(d,g))return m;var v=r(g);return i!==void 0&&i(m,v)?m:(d=g,f=v)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=Uce(e,o[0],o[1]);return Vce(function(){s.hasValue=!0,s.value=a},[a]),Gce(a),a};_$.exports=b$;var S$=_$.exports;const Hce=dc(S$);function Wce(e){e()}let w$=Wce;const qce=e=>w$=e,Kce=()=>w$,Q9=Symbol.for(`react-redux-context-${L.version}`),Z9=globalThis;function Xce(){let e=Z9[Q9];return e||(e=L.createContext(null),Z9[Q9]=e),e}const jl=new Proxy({},new Proxy({},{get(e,t){const n=Xce();return(r,...i)=>Reflect[t](n,...i)}}));function TT(e=jl){return function(){return L.useContext(e)}}const x$=TT(),Yce=()=>{throw new Error("uSES not initialized!")};let C$=Yce;const Qce=e=>{C$=e},Zce=(e,t)=>e===t;function Jce(e=jl){const t=e===jl?x$:TT(e);return function(r,i={}){const{equalityFn:o=Zce,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:l,subscription:u,getServerState:d,stabilityCheck:f,noopCheck:p}=t();L.useRef(!0);const g=L.useCallback({[r.name](v){return r(v)}}[r.name],[r,f,s]),m=C$(u.addNestedSub,l.getState,d||l.getState,g,o);return L.useDebugValue(m),m}}const T$=Jce();function A1(){return A1=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},A1.apply(this,arguments)}var E$={exports:{}},$t={};/** @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 mr=typeof Symbol=="function"&&Symbol.for,ET=mr?Symbol.for("react.element"):60103,AT=mr?Symbol.for("react.portal"):60106,lb=mr?Symbol.for("react.fragment"):60107,ub=mr?Symbol.for("react.strict_mode"):60108,cb=mr?Symbol.for("react.profiler"):60114,db=mr?Symbol.for("react.provider"):60109,fb=mr?Symbol.for("react.context"):60110,PT=mr?Symbol.for("react.async_mode"):60111,hb=mr?Symbol.for("react.concurrent_mode"):60111,pb=mr?Symbol.for("react.forward_ref"):60112,gb=mr?Symbol.for("react.suspense"):60113,ede=mr?Symbol.for("react.suspense_list"):60120,mb=mr?Symbol.for("react.memo"):60115,yb=mr?Symbol.for("react.lazy"):60116,tde=mr?Symbol.for("react.block"):60121,nde=mr?Symbol.for("react.fundamental"):60117,rde=mr?Symbol.for("react.responder"):60118,ide=mr?Symbol.for("react.scope"):60119;function Zi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ET:switch(e=e.type,e){case PT:case hb:case lb:case cb:case ub:case gb:return e;default:switch(e=e&&e.$$typeof,e){case fb:case pb:case yb:case mb:case db:return e;default:return t}}case AT:return t}}}function A$(e){return Zi(e)===hb}$t.AsyncMode=PT;$t.ConcurrentMode=hb;$t.ContextConsumer=fb;$t.ContextProvider=db;$t.Element=ET;$t.ForwardRef=pb;$t.Fragment=lb;$t.Lazy=yb;$t.Memo=mb;$t.Portal=AT;$t.Profiler=cb;$t.StrictMode=ub;$t.Suspense=gb;$t.isAsyncMode=function(e){return A$(e)||Zi(e)===PT};$t.isConcurrentMode=A$;$t.isContextConsumer=function(e){return Zi(e)===fb};$t.isContextProvider=function(e){return Zi(e)===db};$t.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ET};$t.isForwardRef=function(e){return Zi(e)===pb};$t.isFragment=function(e){return Zi(e)===lb};$t.isLazy=function(e){return Zi(e)===yb};$t.isMemo=function(e){return Zi(e)===mb};$t.isPortal=function(e){return Zi(e)===AT};$t.isProfiler=function(e){return Zi(e)===cb};$t.isStrictMode=function(e){return Zi(e)===ub};$t.isSuspense=function(e){return Zi(e)===gb};$t.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lb||e===hb||e===cb||e===ub||e===gb||e===ede||typeof e=="object"&&e!==null&&(e.$$typeof===yb||e.$$typeof===mb||e.$$typeof===db||e.$$typeof===fb||e.$$typeof===pb||e.$$typeof===nde||e.$$typeof===rde||e.$$typeof===ide||e.$$typeof===tde)};$t.typeOf=Zi;E$.exports=$t;var ode=E$.exports,P$=ode,sde={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ade={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},R$={};R$[P$.ForwardRef]=sde;R$[P$.Memo]=ade;var Vt={};/**
|
||
* @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 RT=Symbol.for("react.element"),OT=Symbol.for("react.portal"),vb=Symbol.for("react.fragment"),_b=Symbol.for("react.strict_mode"),bb=Symbol.for("react.profiler"),Sb=Symbol.for("react.provider"),wb=Symbol.for("react.context"),lde=Symbol.for("react.server_context"),xb=Symbol.for("react.forward_ref"),Cb=Symbol.for("react.suspense"),Tb=Symbol.for("react.suspense_list"),Eb=Symbol.for("react.memo"),Ab=Symbol.for("react.lazy"),ude=Symbol.for("react.offscreen"),O$;O$=Symbol.for("react.module.reference");function To(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case RT:switch(e=e.type,e){case vb:case bb:case _b:case Cb:case Tb:return e;default:switch(e=e&&e.$$typeof,e){case lde:case wb:case xb:case Ab:case Eb:case Sb:return e;default:return t}}case OT:return t}}}Vt.ContextConsumer=wb;Vt.ContextProvider=Sb;Vt.Element=RT;Vt.ForwardRef=xb;Vt.Fragment=vb;Vt.Lazy=Ab;Vt.Memo=Eb;Vt.Portal=OT;Vt.Profiler=bb;Vt.StrictMode=_b;Vt.Suspense=Cb;Vt.SuspenseList=Tb;Vt.isAsyncMode=function(){return!1};Vt.isConcurrentMode=function(){return!1};Vt.isContextConsumer=function(e){return To(e)===wb};Vt.isContextProvider=function(e){return To(e)===Sb};Vt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===RT};Vt.isForwardRef=function(e){return To(e)===xb};Vt.isFragment=function(e){return To(e)===vb};Vt.isLazy=function(e){return To(e)===Ab};Vt.isMemo=function(e){return To(e)===Eb};Vt.isPortal=function(e){return To(e)===OT};Vt.isProfiler=function(e){return To(e)===bb};Vt.isStrictMode=function(e){return To(e)===_b};Vt.isSuspense=function(e){return To(e)===Cb};Vt.isSuspenseList=function(e){return To(e)===Tb};Vt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vb||e===bb||e===_b||e===Cb||e===Tb||e===ude||typeof e=="object"&&e!==null&&(e.$$typeof===Ab||e.$$typeof===Eb||e.$$typeof===Sb||e.$$typeof===wb||e.$$typeof===xb||e.$$typeof===O$||e.getModuleId!==void 0)};Vt.typeOf=To;function cde(){const e=Kce();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 J9={notify(){},get:()=>[]};function dde(e,t){let n,r=J9;function i(f){return l(),r.subscribe(f)}function o(){r.notify()}function s(){d.onStateChange&&d.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=cde())}function u(){n&&(n(),n=void 0,r.clear(),r=J9)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return d}const fde=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hde=fde?L.useLayoutEffect:L.useEffect;function eR(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function P1(e,t){if(eR(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!eR(e[n[i]],t[n[i]]))return!1;return!0}function pde({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const s=L.useMemo(()=>{const u=dde(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),a=L.useMemo(()=>e.getState(),[e]);hde(()=>{const{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);const l=t||jl;return Lt.createElement(l.Provider,{value:s},n)}function k$(e=jl){const t=e===jl?x$:TT(e);return function(){const{store:r}=t();return r}}const I$=k$();function gde(e=jl){const t=e===jl?I$:k$(e);return function(){return t().dispatch}}const M$=gde();Qce(S$.useSyncExternalStoreWithSelector);qce(bs.unstable_batchedUpdates);var mde=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},yde=Object.defineProperty,vde=Object.defineProperties,_de=Object.getOwnPropertyDescriptors,tR=Object.getOwnPropertySymbols,bde=Object.prototype.hasOwnProperty,Sde=Object.prototype.propertyIsEnumerable,nR=function(e,t,n){return t in e?yde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},sa=function(e,t){for(var n in t||(t={}))bde.call(t,n)&&nR(e,n,t[n]);if(tR)for(var r=0,i=tR(t);r<i.length;r++){var n=i[r];Sde.call(t,n)&&nR(e,n,t[n])}return e},dv=function(e,t){return vde(e,_de(t))};function rR(e,t,n,r){var i=L.useMemo(function(){return{queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}},[e,t,n,r]),o=L.useRef(i);return L.useEffect(function(){o.current.serialized!==i.serialized&&(o.current=i)},[i]),o.current.serialized===i.serialized?o.current.queryArgs:e}var fx=Symbol();function hx(e){var t=L.useRef(e);return L.useEffect(function(){P1(t.current,e)||(t.current=e)},[e]),P1(t.current,e)?t.current:e}var v0=WeakMap?new WeakMap:void 0,wde=function(e){var t=e.endpointName,n=e.queryArgs,r="",i=v0==null?void 0:v0.get(n);if(typeof i=="string")r=i;else{var o=JSON.stringify(n,function(s,a){return Zo(a)?Object.keys(a).sort().reduce(function(l,u){return l[u]=a[u],l},{}):a});Zo(n)&&(v0==null||v0.set(n,o)),r=o}return t+"("+r+")"},xde=typeof window<"u"&&window.document&&window.document.createElement?L.useLayoutEffect:L.useEffect,Cde=function(e){return e},Tde=function(e){return e.isUninitialized?dv(sa({},e),{isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:ln.pending}):e};function Ede(e){var t=e.api,n=e.moduleOptions,r=n.batch,i=n.useDispatch,o=n.useSelector,s=n.useStore,a=n.unstable__sideEffectsInRender,l=e.serializeQueryArgs,u=e.context,d=a?function(v){return v()}:L.useEffect;return{buildQueryHooks:g,buildMutationHook:m,usePrefetch:p};function f(v,x,_){if(x!=null&&x.endpointName&&v.isUninitialized){var b=x.endpointName,y=u.endpointDefinitions[b];l({queryArgs:x.originalArgs,endpointDefinition:y,endpointName:b})===l({queryArgs:_,endpointDefinition:y,endpointName:b})&&(x=void 0)}var S=v.isSuccess?v.data:x==null?void 0:x.data;S===void 0&&(S=v.data);var C=S!==void 0,T=v.isLoading,E=!C&&T,P=v.isSuccess||T&&C;return dv(sa({},v),{data:S,currentData:v.data,isFetching:T,isLoading:E,isSuccess:P})}function p(v,x){var _=i(),b=hx(x);return L.useCallback(function(y,S){return _(t.util.prefetch(v,y,sa(sa({},b),S)))},[v,_,b])}function g(v){var x=function(y,S){var C=S===void 0?{}:S,T=C.refetchOnReconnect,E=C.refetchOnFocus,P=C.refetchOnMountOrArgChange,k=C.skip,O=k===void 0?!1:k,M=C.pollingInterval,G=M===void 0?0:M,U=t.endpoints[v].initiate,A=i(),N=rR(O?Du:y,wde,u.endpointDefinitions[v],v),F=hx({refetchOnReconnect:T,refetchOnFocus:E,pollingInterval:G}),B=L.useRef(!1),D=L.useRef(),V=D.current||{},j=V.queryCacheKey,q=V.requestId,Z=!1;if(j&&q){var ee=A(t.internalActions.internal_probeSubscription({queryCacheKey:j,requestId:q}));Z=!!ee}var ie=!Z&&B.current;return d(function(){B.current=Z}),d(function(){ie&&(D.current=void 0)},[ie]),d(function(){var se,le=D.current;if(typeof process<"u",N===Du){le==null||le.unsubscribe(),D.current=void 0;return}var W=(se=D.current)==null?void 0:se.subscriptionOptions;if(!le||le.arg!==N){le==null||le.unsubscribe();var ne=A(U(N,{subscriptionOptions:F,forceRefetch:P}));D.current=ne}else F!==W&&le.updateSubscriptionOptions(F)},[A,U,P,N,F,ie]),L.useEffect(function(){return function(){var se;(se=D.current)==null||se.unsubscribe(),D.current=void 0}},[]),L.useMemo(function(){return{refetch:function(){var se;if(!D.current)throw new Error("Cannot refetch a query that has not been started yet.");return(se=D.current)==null?void 0:se.refetch()}}},[])},_=function(y){var S=y===void 0?{}:y,C=S.refetchOnReconnect,T=S.refetchOnFocus,E=S.pollingInterval,P=E===void 0?0:E,k=t.endpoints[v].initiate,O=i(),M=L.useState(fx),G=M[0],U=M[1],A=L.useRef(),N=hx({refetchOnReconnect:C,refetchOnFocus:T,pollingInterval:P});d(function(){var D,V,j=(D=A.current)==null?void 0:D.subscriptionOptions;N!==j&&((V=A.current)==null||V.updateSubscriptionOptions(N))},[N]);var F=L.useRef(N);d(function(){F.current=N},[N]);var B=L.useCallback(function(D,V){V===void 0&&(V=!1);var j;return r(function(){var q;(q=A.current)==null||q.unsubscribe(),A.current=j=O(k(D,{subscriptionOptions:F.current,forceRefetch:!V})),U(D)}),j},[O,k]);return L.useEffect(function(){return function(){var D;(D=A==null?void 0:A.current)==null||D.unsubscribe()}},[]),L.useEffect(function(){G!==fx&&!A.current&&B(G,!0)},[G,B]),L.useMemo(function(){return[B,G]},[B,G])},b=function(y,S){var C=S===void 0?{}:S,T=C.skip,E=T===void 0?!1:T,P=C.selectFromResult,k=t.endpoints[v].select,O=rR(E?Du:y,l,u.endpointDefinitions[v],v),M=L.useRef(),G=L.useMemo(function(){return si([k(O),function(B,D){return D},function(B){return O}],f)},[k,O]),U=L.useMemo(function(){return P?si([G],P):G},[G,P]),A=o(function(B){return U(B,M.current)},P1),N=s(),F=G(N.getState(),M.current);return xde(function(){M.current=F},[F]),A};return{useQueryState:b,useQuerySubscription:x,useLazyQuerySubscription:_,useLazyQuery:function(y){var S=_(y),C=S[0],T=S[1],E=b(T,dv(sa({},y),{skip:T===fx})),P=L.useMemo(function(){return{lastArg:T}},[T]);return L.useMemo(function(){return[C,E,P]},[C,E,P])},useQuery:function(y,S){var C=x(y,S),T=b(y,sa({selectFromResult:y===Du||S!=null&&S.skip?void 0:Tde},S)),E=T.data,P=T.status,k=T.isLoading,O=T.isSuccess,M=T.isError,G=T.error;return L.useDebugValue({data:E,status:P,isLoading:k,isSuccess:O,isError:M,error:G}),L.useMemo(function(){return sa(sa({},T),C)},[T,C])}}}function m(v){return function(x){var _=x===void 0?{}:x,b=_.selectFromResult,y=b===void 0?Cde:b,S=_.fixedCacheKey,C=t.endpoints[v],T=C.select,E=C.initiate,P=i(),k=L.useState(),O=k[0],M=k[1];L.useEffect(function(){return function(){O!=null&&O.arg.fixedCacheKey||O==null||O.reset()}},[O]);var G=L.useCallback(function(le){var W=P(E(le,{fixedCacheKey:S}));return M(W),W},[P,E,S]),U=(O||{}).requestId,A=L.useMemo(function(){return si([T({fixedCacheKey:S,requestId:O==null?void 0:O.requestId})],y)},[T,O,y,S]),N=o(A,P1),F=S==null?O==null?void 0:O.arg.originalArgs:void 0,B=L.useCallback(function(){r(function(){O&&M(void 0),S&&P(t.internalActions.removeMutationResult({requestId:U,fixedCacheKey:S}))})},[P,S,O,U]),D=N.endpointName,V=N.data,j=N.status,q=N.isLoading,Z=N.isSuccess,ee=N.isError,ie=N.error;L.useDebugValue({endpointName:D,data:V,status:j,isLoading:q,isSuccess:Z,isError:ee,error:ie});var se=L.useMemo(function(){return dv(sa({},N),{originalArgs:F,reset:B})},[N,F,B]);return L.useMemo(function(){return[G,se]},[G,se])}}}var R1;(function(e){e.query="query",e.mutation="mutation"})(R1||(R1={}));function Ade(e){return e.type===R1.query}function Pde(e){return e.type===R1.mutation}function px(e){return e.replace(e[0],e[0].toUpperCase())}function _0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,mde([e],t))}var Rde=Symbol(),Ode=function(e){var t=e===void 0?{}:e,n=t.batch,r=n===void 0?bs.unstable_batchedUpdates:n,i=t.useDispatch,o=i===void 0?M$:i,s=t.useSelector,a=s===void 0?T$:s,l=t.useStore,u=l===void 0?I$:l,d=t.unstable__sideEffectsInRender,f=d===void 0?!1:d;return{name:Rde,init:function(p,g,m){var v=g.serializeQueryArgs,x=p,_=Ede({api:p,moduleOptions:{batch:r,useDispatch:o,useSelector:a,useStore:u,unstable__sideEffectsInRender:f},serializeQueryArgs:v,context:m}),b=_.buildQueryHooks,y=_.buildMutationHook,S=_.usePrefetch;return _0(x,{usePrefetch:S}),_0(m,{batch:r}),{injectEndpoint:function(C,T){if(Ade(T)){var E=b(C),P=E.useQuery,k=E.useLazyQuery,O=E.useLazyQuerySubscription,M=E.useQueryState,G=E.useQuerySubscription;_0(x.endpoints[C],{useQuery:P,useLazyQuery:k,useLazyQuerySubscription:O,useQueryState:M,useQuerySubscription:G}),p["use"+px(C)+"Query"]=P,p["useLazy"+px(C)+"Query"]=k}else if(Pde(T)){var U=y(C);_0(x.endpoints[C],{useMutation:U}),p["use"+px(C)+"Mutation"]=U}}}}}},kde=hce(Ece(),Ode());const Ide=["Board","BoardImagesTotal","BoardAssetsTotal","Image","ImageNameList","ImageList","ImageMetadata","Model"],Ke="LIST",Mde=async(e,t,n)=>{const r=wg.get(),i=Sg.get(),o=S1.get();return sce({baseUrl:`${r??""}/api/v1`,prepareHeaders:a=>(i&&a.set("Authorization",`Bearer ${i}`),o&&a.set("project-id",o),a)})(e,t,n)},Gl=kde({baseQuery:Mde,reducerPath:"api",tagTypes:Ide,endpoints:()=>({})}),Nde=(e,t)=>{const n=new Date(e),r=new Date(t);return n>r?1:n<r?-1:0},N$="%[a-f0-9]{2}",iR=new RegExp("("+N$+")|([^%]+?)","gi"),oR=new RegExp("("+N$+")+","gi");function k3(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],k3(n),k3(r))}function Lde(e){try{return decodeURIComponent(e)}catch{let t=e.match(iR)||[];for(let n=1;n<t.length;n++)e=k3(t,n).join(""),t=e.match(iR)||[];return e}}function Dde(e){const t={"%FE%FF":"<22><>","%FF%FE":"<22><>"};let n=oR.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const i=Lde(n[0]);i!==n[0]&&(t[n[0]]=i)}n=oR.exec(e)}t["%C2"]="<22>";const r=Object.keys(t);for(const i of r)e=e.replace(new RegExp(i,"g"),t[i]);return e}function $de(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return Dde(e)}}function L$(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const n=e.indexOf(t);return n===-1?[]:[e.slice(0,n),e.slice(n+t.length)]}function Fde(e,t){const n={};if(Array.isArray(t))for(const r of t){const i=Object.getOwnPropertyDescriptor(e,r);i!=null&&i.enumerable&&Object.defineProperty(n,r,i)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){const o=e[r];t(r,o,e)&&Object.defineProperty(n,r,i)}}return n}const Bde=e=>e==null,Ude=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),I3=Symbol("encodeFragmentIdentifier");function zde(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[$n(t,e),"[",i,"]"].join("")]:[...n,[$n(t,e),"[",$n(i,e),"]=",$n(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[$n(t,e),"[]"].join("")]:[...n,[$n(t,e),"[]=",$n(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[$n(t,e),":list="].join("")]:[...n,[$n(t,e),":list=",$n(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[$n(n,e),t,$n(i,e)].join("")]:[[r,$n(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,$n(t,e)]:[...n,[$n(t,e),"=",$n(r,e)].join("")]}}function Vde(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),s=typeof r=="string"&&!o&&ca(r,e).includes(e.arrayFormatSeparator);r=s?ca(r,e):r;const a=o||s?r.split(e.arrayFormatSeparator).map(l=>ca(l,e)):r===null?r:ca(r,e);i[n]=a};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&ca(r,e);return}const s=r===null?[]:r.split(e.arrayFormatSeparator).map(a=>ca(a,e));if(i[n]===void 0){i[n]=s;return}i[n]=[...i[n],...s]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function D$(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function $n(e,t){return t.encode?t.strict?Ude(e):encodeURIComponent(e):e}function ca(e,t){return t.decode?$de(e):e}function $$(e){return Array.isArray(e)?e.sort():typeof e=="object"?$$(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function F$(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function jde(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function sR(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function kT(e){e=F$(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function IT(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},D$(t.arrayFormatSeparator);const n=Vde(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replace(/\+/g," "):i;let[s,a]=L$(o,"=");s===void 0&&(s=o),a=a===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:ca(a,t),n(ca(s,t),a,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null)for(const[s,a]of Object.entries(o))o[s]=sR(a,t);else r[i]=sR(o,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const s=r[o];return s&&typeof s=="object"&&!Array.isArray(s)?i[o]=$$(s):i[o]=s,i},Object.create(null))}function B$(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},D$(t.arrayFormatSeparator);const n=s=>t.skipNull&&Bde(e[s])||t.skipEmptyString&&e[s]==="",r=zde(t),i={};for(const[s,a]of Object.entries(e))n(s)||(i[s]=a);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(s=>{const a=e[s];return a===void 0?"":a===null?$n(s,t):Array.isArray(a)?a.length===0&&t.arrayFormat==="bracket-separator"?$n(s,t)+"[]":a.reduce(r(s),[]).join("&"):$n(s,t)+"="+$n(a,t)}).filter(s=>s.length>0).join("&")}function U$(e,t){var i;t={decode:!0,...t};let[n,r]=L$(e,"#");return n===void 0&&(n=e),{url:((i=n==null?void 0:n.split("?"))==null?void 0:i[0])??"",query:IT(kT(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:ca(r,t)}:{}}}function z$(e,t){t={encode:!0,strict:!0,[I3]:!0,...t};const n=F$(e.url).split("?")[0]||"",r=kT(e.url),i={...IT(r,{sort:!1}),...e.query};let o=B$(i,t);o&&(o=`?${o}`);let s=jde(e.url);if(e.fragmentIdentifier){const a=new URL(n);a.hash=e.fragmentIdentifier,s=t[I3]?a.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${s}`}function V$(e,t,n){n={parseFragmentIdentifier:!0,[I3]:!1,...n};const{url:r,query:i,fragmentIdentifier:o}=U$(e,n);return z$({url:r,query:Fde(i,t),fragmentIdentifier:o},n)}function Gde(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return V$(e,r,n)}const fv=Object.freeze(Object.defineProperty({__proto__:null,exclude:Gde,extract:kT,parse:IT,parseUrl:U$,pick:V$,stringify:B$,stringifyUrl:z$},Symbol.toStringTag,{value:"Module"})),jh=(e,t)=>{if(!e)return!1;const n=O1.selectAll(e);if(n.length>1){const r=new Date(t.created_at),i=n[n.length-1];if(!i)return!1;const o=new Date(i.created_at);return r>=o}else if([0,1].includes(n.length))return!0;return!1},nl=e=>jr.includes(e.image_category)?jr:Sl,pn=Jl({selectId:e=>e.image_name,sortComparer:(e,t)=>Nde(t.updated_at,e.updated_at)}),O1=pn.getSelectors(),Fo=e=>`images/?${fv.stringify(e,{arrayFormat:"none"})}`,Ui=Gl.injectEndpoints({endpoints:e=>({listBoards:e.query({query:t=>({url:"boards/",params:t}),providesTags:(t,n,r)=>{const i=[{type:"Board",id:Ke}];return t&&i.push(...t.items.map(({board_id:o})=>({type:"Board",id:o}))),i}}),listAllBoards:e.query({query:()=>({url:"boards/",params:{all:!0}}),providesTags:(t,n,r)=>{const i=[{type:"Board",id:Ke}];return t&&i.push(...t.map(({board_id:o})=>({type:"Board",id:o}))),i}}),listAllImageNamesForBoard:e.query({query:t=>({url:`boards/${t}/image_names`}),providesTags:(t,n,r)=>[{type:"ImageNameList",id:r}],keepUnusedDataFor:0}),getBoardImagesTotal:e.query({query:t=>({url:Fo({board_id:t??"none",categories:jr,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardImagesTotal",id:r??"none"}],transformResponse:t=>t.total}),getBoardAssetsTotal:e.query({query:t=>({url:Fo({board_id:t??"none",categories:Sl,is_intermediate:!1,limit:0,offset:0}),method:"GET"}),providesTags:(t,n,r)=>[{type:"BoardAssetsTotal",id:r??"none"}],transformResponse:t=>t.total}),createBoard:e.mutation({query:t=>({url:"boards/",method:"POST",params:{board_name:t}}),invalidatesTags:[{type:"Board",id:Ke}]}),updateBoard:e.mutation({query:({board_id:t,changes:n})=>({url:`boards/${t}`,method:"PATCH",body:n}),invalidatesTags:(t,n,r)=>[{type:"Board",id:r.board_id}]})})}),{useListBoardsQuery:Lke,useListAllBoardsQuery:Dke,useGetBoardImagesTotalQuery:$ke,useGetBoardAssetsTotalQuery:Fke,useCreateBoardMutation:Bke,useUpdateBoardMutation:Uke,useListAllImageNamesForBoardQuery:zke}=Ui,Se=Gl.injectEndpoints({endpoints:e=>({listImages:e.query({query:t=>({url:Fo(t),method:"GET"}),providesTags:(t,n,{board_id:r,categories:i})=>[{type:"ImageList",id:Fo({board_id:r,categories:i})}],serializeQueryArgs:({queryArgs:t})=>{const{board_id:n,categories:r}=t;return Fo({board_id:n,categories:r})},transformResponse(t){const{items:n}=t;return pn.addMany(pn.getInitialState(),n)},merge:(t,n)=>{pn.addMany(t,O1.selectAll(n))},forceRefetch({currentArg:t,previousArg:n}){return(t==null?void 0:t.offset)!==(n==null?void 0:n.offset)},async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;O1.selectAll(i).forEach(o=>{n(Se.util.upsertQueryData("getImageDTO",o.image_name,o))})}catch{}},keepUnusedDataFor:86400}),getIntermediatesCount:e.query({query:()=>({url:Fo({is_intermediate:!0})}),providesTags:["IntermediatesCount"],transformResponse:t=>t.total}),getImageDTO:e.query({query:t=>({url:`images/i/${t}`}),providesTags:(t,n,r)=>[{type:"Image",id:r}],keepUnusedDataFor:86400}),getImageMetadata:e.query({query:t=>({url:`images/i/${t}/metadata`}),providesTags:(t,n,r)=>[{type:"ImageMetadata",id:r}],keepUnusedDataFor:86400}),clearIntermediates:e.mutation({query:()=>({url:"images/clear-intermediates",method:"POST"}),invalidatesTags:["IntermediatesCount"]}),deleteImage:e.mutation({query:({image_name:t})=>({url:`images/i/${t}`,method:"DELETE"}),invalidatesTags:(t,n,{board_id:r})=>[{type:"BoardImagesTotal",id:r??"none"},{type:"BoardAssetsTotal",id:r??"none"}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){const{image_name:i,board_id:o}=t,s={board_id:o??"none",categories:nl(t)},a=n(Se.util.updateQueryData("listImages",s,l=>{pn.removeOne(l,i)}));try{await r}catch{a.undo()}}}),deleteImages:e.mutation({query:({imageDTOs:t})=>({url:"images/delete",method:"POST",body:{image_names:t.map(r=>r.image_name)}}),invalidatesTags:(t,n,r)=>[],async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r,o=que.keyBy(t,"image_name");i.deleted_images.forEach(s=>{const a=o[s];if(a){const l={board_id:a.board_id??"none",categories:nl(a)};n(Se.util.updateQueryData("listImages",l,u=>{pn.removeOne(u,s)}))}})}catch{}}}),changeImageIsIntermediate:e.mutation({query:({imageDTO:t,is_intermediate:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{is_intermediate:n}}),invalidatesTags:(t,n,{imageDTO:r})=>[{type:"BoardImagesTotal",id:r.board_id??"none"},{type:"BoardAssetsTotal",id:r.board_id??"none"}],async onQueryStarted({imageDTO:t,is_intermediate:n},{dispatch:r,queryFulfilled:i,getState:o}){const s=[];s.push(r(Se.util.updateQueryData("getImageDTO",t.image_name,l=>{Object.assign(l,{is_intermediate:n})})));const a=nl(t);if(n)s.push(r(Se.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:a},l=>{pn.removeOne(l,t.image_name)})));else{const l={board_id:t.board_id??"none",categories:a},u=Se.endpoints.listImages.select(l)(o()),{data:d}=jr.includes(t.image_category)?Ui.endpoints.getBoardImagesTotal.select(t.board_id??"none")(o()):Ui.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(o()),f=u.data&&u.data.ids.length>=(d??0),p=jh(u.data,t);(f||p)&&s.push(r(Se.util.updateQueryData("listImages",l,g=>{pn.upsertOne(g,t)})))}try{await i}catch{s.forEach(l=>l.undo())}}}),changeImageSessionId:e.mutation({query:({imageDTO:t,session_id:n})=>({url:`images/i/${t.image_name}`,method:"PATCH",body:{session_id:n}}),invalidatesTags:(t,n,{imageDTO:r})=>[{type:"BoardImagesTotal",id:r.board_id??"none"},{type:"BoardAssetsTotal",id:r.board_id??"none"}],async onQueryStarted({imageDTO:t,session_id:n},{dispatch:r,queryFulfilled:i,getState:o}){const s=[];s.push(r(Se.util.updateQueryData("getImageDTO",t.image_name,a=>{Object.assign(a,{session_id:n})})));try{await i}catch{s.forEach(a=>a.undo())}}}),uploadImage:e.mutation({query:({file:t,image_category:n,is_intermediate:r,session_id:i,board_id:o,crop_visible:s})=>{const a=new FormData;return a.append("file",t),{url:"images/upload",method:"POST",body:a,params:{image_category:n,is_intermediate:r,session_id:i,board_id:o==="none"?void 0:o,crop_visible:s}}},async onQueryStarted({file:t,image_category:n,is_intermediate:r,postUploadAction:i,session_id:o,board_id:s},{dispatch:a,queryFulfilled:l}){try{const{data:u}=await l;if(u.is_intermediate)return;a(Se.util.upsertQueryData("getImageDTO",u.image_name,u));const d=nl(u);a(Se.util.updateQueryData("listImages",{board_id:u.board_id??"none",categories:d},f=>{pn.addOne(f,u)})),a(Se.util.invalidateTags([{type:"BoardImagesTotal",id:u.board_id??"none"},{type:"BoardAssetsTotal",id:u.board_id??"none"}]))}catch{}}}),deleteBoard:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE"}),invalidatesTags:(t,n,r)=>[{type:"Board",id:Ke},{type:"ImageList",id:Fo({board_id:"none",categories:jr})},{type:"ImageList",id:Fo({board_id:"none",categories:Sl})},{type:"BoardImagesTotal",id:"none"},{type:"BoardAssetsTotal",id:"none"}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,{deleted_board_images:s}=o;s.forEach(u=>{n(Se.util.updateQueryData("getImageDTO",u,d=>{d.board_id=void 0}))});const a=[{categories:jr},{categories:Sl}],l=s.map(u=>({id:u,changes:{board_id:void 0}}));a.forEach(u=>{n(Se.util.updateQueryData("listImages",u,d=>{pn.updateMany(d,l)}))})}catch{}}}),deleteBoardAndImages:e.mutation({query:t=>({url:`boards/${t}`,method:"DELETE",params:{include_images:!0}}),invalidatesTags:(t,n,r)=>[{type:"Board",id:Ke},{type:"ImageList",id:Fo({board_id:"none",categories:jr})},{type:"ImageList",id:Fo({board_id:"none",categories:Sl})},{type:"BoardImagesTotal",id:"none"},{type:"BoardAssetsTotal",id:"none"}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,{deleted_images:s}=o;[{categories:jr},{categories:Sl}].forEach(l=>{n(Se.util.updateQueryData("listImages",l,u=>{pn.removeMany(u,s)}))})}catch{}}}),addImageToBoard:e.mutation({query:({board_id:t,imageDTO:n})=>{const{image_name:r}=n;return{url:"board_images/",method:"POST",body:{board_id:t,image_name:r}}},invalidatesTags:(t,n,{board_id:r,imageDTO:i})=>[{type:"Board",id:r},{type:"BoardImagesTotal",id:r},{type:"BoardAssetsTotal",id:r},{type:"BoardImagesTotal",id:i.board_id??"none"},{type:"BoardAssetsTotal",id:i.board_id??"none"}],async onQueryStarted({board_id:t,imageDTO:n},{dispatch:r,queryFulfilled:i,getState:o}){const s=[],a=nl(n);if(s.push(r(Se.util.updateQueryData("getImageDTO",n.image_name,l=>{l.board_id=t}))),!n.is_intermediate){s.push(r(Se.util.updateQueryData("listImages",{board_id:n.board_id??"none",categories:a},g=>{pn.removeOne(g,n.image_name)})));const l={board_id:t??"none",categories:a},u=Se.endpoints.listImages.select(l)(o()),{data:d}=jr.includes(n.image_category)?Ui.endpoints.getBoardImagesTotal.select(n.board_id??"none")(o()):Ui.endpoints.getBoardAssetsTotal.select(n.board_id??"none")(o()),f=u.data&&u.data.ids.length>=(d??0),p=jh(u.data,n);(f||p)&&s.push(r(Se.util.updateQueryData("listImages",l,g=>{pn.addOne(g,n)})))}try{await i}catch{s.forEach(l=>l.undo())}}}),removeImageFromBoard:e.mutation({query:({imageDTO:t})=>{const{image_name:n}=t;return{url:"board_images/",method:"DELETE",body:{image_name:n}}},invalidatesTags:(t,n,{imageDTO:r})=>{const{board_id:i}=r;return[{type:"Board",id:i??"none"},{type:"BoardImagesTotal",id:i??"none"},{type:"BoardAssetsTotal",id:i??"none"},{type:"BoardImagesTotal",id:"none"},{type:"BoardAssetsTotal",id:"none"}]},async onQueryStarted({imageDTO:t},{dispatch:n,queryFulfilled:r,getState:i}){const o=nl(t),s=[];s.push(n(Se.util.updateQueryData("getImageDTO",t.image_name,p=>{p.board_id=void 0}))),s.push(n(Se.util.updateQueryData("listImages",{board_id:t.board_id??"none",categories:o},p=>{pn.removeOne(p,t.image_name)})));const a={board_id:"none",categories:o},l=Se.endpoints.listImages.select(a)(i()),{data:u}=jr.includes(t.image_category)?Ui.endpoints.getBoardImagesTotal.select(t.board_id??"none")(i()):Ui.endpoints.getBoardAssetsTotal.select(t.board_id??"none")(i()),d=l.data&&l.data.ids.length>=(u??0),f=jh(l.data,t);(d||f)&&s.push(n(Se.util.updateQueryData("listImages",a,p=>{pn.upsertOne(p,t)})));try{await r}catch{s.forEach(p=>p.undo())}}}),addImagesToBoard:e.mutation({query:({board_id:t,imageDTOs:n})=>({url:"board_images/batch",method:"POST",body:{image_names:n.map(r=>r.image_name),board_id:t}}),invalidatesTags:(t,n,{board_id:r})=>[{type:"Board",id:r??"none"},{type:"BoardImagesTotal",id:r??"none"},{type:"BoardAssetsTotal",id:r??"none"},{type:"BoardImagesTotal",id:"none"},{type:"BoardAssetsTotal",id:"none"}],async onQueryStarted({board_id:t,imageDTOs:n},{dispatch:r,queryFulfilled:i,getState:o}){try{const{data:s}=await i,{added_image_names:a}=s;a.forEach(l=>{r(Se.util.updateQueryData("getImageDTO",l,_=>{_.board_id=t}));const u=n.find(_=>_.image_name===l);if(!u)return;const d=nl(u),f=u.board_id;r(Se.util.updateQueryData("listImages",{board_id:f??"none",categories:d},_=>{pn.removeOne(_,u.image_name)}));const p={board_id:t,categories:d},g=Se.endpoints.listImages.select(p)(o()),{data:m}=jr.includes(u.image_category)?Ui.endpoints.getBoardImagesTotal.select(u.board_id??"none")(o()):Ui.endpoints.getBoardAssetsTotal.select(u.board_id??"none")(o()),v=g.data&&g.data.ids.length>=(m??0),x=jh(g.data,u);(v||x)&&r(Se.util.updateQueryData("listImages",p,_=>{pn.upsertOne(_,{...u,board_id:t})}))})}catch{}}}),removeImagesFromBoard:e.mutation({query:({imageDTOs:t})=>({url:"board_images/batch/delete",method:"POST",body:{image_names:t.map(n=>n.image_name)}}),invalidatesTags:(t,n,{imageDTOs:r})=>{const i=[],o=[{type:"BoardImagesTotal",id:"none"},{type:"BoardAssetsTotal",id:"none"}];return t==null||t.removed_image_names.forEach(s=>{var l;const a=(l=r.find(u=>u.image_name===s))==null?void 0:l.board_id;!a||i.includes(a)||(o.push({type:"Board",id:a}),o.push({type:"BoardImagesTotal",id:a}),o.push({type:"BoardAssetsTotal",id:a}))}),o},async onQueryStarted({imageDTOs:t},{dispatch:n,queryFulfilled:r,getState:i}){try{const{data:o}=await r,{removed_image_names:s}=o;s.forEach(a=>{n(Se.util.updateQueryData("getImageDTO",a,v=>{v.board_id=void 0}));const l=t.find(v=>v.image_name===a);if(!l)return;const u=nl(l);n(Se.util.updateQueryData("listImages",{board_id:l.board_id??"none",categories:u},v=>{pn.removeOne(v,l.image_name)}));const d={board_id:"none",categories:u},f=Se.endpoints.listImages.select(d)(i()),{data:p}=jr.includes(l.image_category)?Ui.endpoints.getBoardImagesTotal.select(l.board_id??"none")(i()):Ui.endpoints.getBoardAssetsTotal.select(l.board_id??"none")(i()),g=f.data&&f.data.ids.length>=(p??0),m=jh(f.data,l);(g||m)&&n(Se.util.updateQueryData("listImages",d,v=>{pn.upsertOne(v,{...l,board_id:void 0})}))})}catch{}}})})}),{useGetIntermediatesCountQuery:Vke,useListImagesQuery:jke,useLazyListImagesQuery:Gke,useGetImageDTOQuery:Hke,useGetImageMetadataQuery:Wke,useDeleteImageMutation:qke,useDeleteImagesMutation:Kke,useUploadImageMutation:Xke,useClearIntermediatesMutation:Yke,useAddImagesToBoardMutation:Qke,useRemoveImagesFromBoardMutation:Zke,useAddImageToBoardMutation:Jke,useRemoveImageFromBoardMutation:eIe,useChangeImageIsIntermediateMutation:tIe,useChangeImageSessionIdMutation:nIe,useDeleteBoardAndImagesMutation:rIe,useDeleteBoardMutation:iIe}=Se,j$=Re("socket/socketConnected"),G$=Re("socket/appSocketConnected"),H$=Re("socket/socketDisconnected"),W$=Re("socket/appSocketDisconnected"),MT=Re("socket/socketSubscribed"),q$=Re("socket/appSocketSubscribed"),K$=Re("socket/socketUnsubscribed"),X$=Re("socket/appSocketUnsubscribed"),Y$=Re("socket/socketInvocationStarted"),Q$=Re("socket/appSocketInvocationStarted"),NT=Re("socket/socketInvocationComplete"),Z$=Re("socket/appSocketInvocationComplete"),J$=Re("socket/socketInvocationError"),LT=Re("socket/appSocketInvocationError"),eF=Re("socket/socketGraphExecutionStateComplete"),tF=Re("socket/appSocketGraphExecutionStateComplete"),nF=Re("socket/socketGeneratorProgress"),rF=Re("socket/appSocketGeneratorProgress"),iF=Re("socket/socketModelLoadStarted"),Hde=Re("socket/appSocketModelLoadStarted"),oF=Re("socket/socketModelLoadCompleted"),Wde=Re("socket/appSocketModelLoadCompleted"),sF=Re("socket/socketSessionRetrievalError"),aF=Re("socket/appSocketSessionRetrievalError"),lF=Re("socket/socketInvocationRetrievalError"),uF=Re("socket/appSocketInvocationRetrievalError"),DT=Re("controlNet/imageProcessed"),_d={none:{type:"none",label:"none",description:"",default:{type:"none"}},canny_image_processor:{type:"canny_image_processor",label:"Canny",description:"",default:{id:"canny_image_processor",type:"canny_image_processor",low_threshold:100,high_threshold:200}},content_shuffle_image_processor:{type:"content_shuffle_image_processor",label:"Content Shuffle",description:"",default:{id:"content_shuffle_image_processor",type:"content_shuffle_image_processor",detect_resolution:512,image_resolution:512,h:512,w:512,f:256}},hed_image_processor:{type:"hed_image_processor",label:"HED",description:"",default:{id:"hed_image_processor",type:"hed_image_processor",detect_resolution:512,image_resolution:512,scribble:!1}},lineart_anime_image_processor:{type:"lineart_anime_image_processor",label:"Lineart Anime",description:"",default:{id:"lineart_anime_image_processor",type:"lineart_anime_image_processor",detect_resolution:512,image_resolution:512}},lineart_image_processor:{type:"lineart_image_processor",label:"Lineart",description:"",default:{id:"lineart_image_processor",type:"lineart_image_processor",detect_resolution:512,image_resolution:512,coarse:!1}},mediapipe_face_processor:{type:"mediapipe_face_processor",label:"Mediapipe Face",description:"",default:{id:"mediapipe_face_processor",type:"mediapipe_face_processor",max_faces:1,min_confidence:.5}},midas_depth_image_processor:{type:"midas_depth_image_processor",label:"Depth (Midas)",description:"",default:{id:"midas_depth_image_processor",type:"midas_depth_image_processor",a_mult:2,bg_th:.1}},mlsd_image_processor:{type:"mlsd_image_processor",label:"M-LSD",description:"",default:{id:"mlsd_image_processor",type:"mlsd_image_processor",detect_resolution:512,image_resolution:512,thr_d:.1,thr_v:.1}},normalbae_image_processor:{type:"normalbae_image_processor",label:"Normal BAE",description:"",default:{id:"normalbae_image_processor",type:"normalbae_image_processor",detect_resolution:512,image_resolution:512}},openpose_image_processor:{type:"openpose_image_processor",label:"Openpose",description:"",default:{id:"openpose_image_processor",type:"openpose_image_processor",detect_resolution:512,image_resolution:512,hand_and_face:!1}},pidi_image_processor:{type:"pidi_image_processor",label:"PIDI",description:"",default:{id:"pidi_image_processor",type:"pidi_image_processor",detect_resolution:512,image_resolution:512,scribble:!1,safe:!1}},zoe_depth_image_processor:{type:"zoe_depth_image_processor",label:"Depth (Zoe)",description:"",default:{id:"zoe_depth_image_processor",type:"zoe_depth_image_processor"}}},b0={canny:"canny_image_processor",mlsd:"mlsd_image_processor",depth:"midas_depth_image_processor",bae:"normalbae_image_processor",lineart:"lineart_image_processor",lineart_anime:"lineart_anime_image_processor",softedge:"hed_image_processor",shuffle:"content_shuffle_image_processor",openpose:"openpose_image_processor",mediapipe:"mediapipe_face_processor"},aR={isEnabled:!0,model:null,weight:1,beginStepPct:0,endStepPct:1,controlMode:"balanced",resizeMode:"just_resize",controlImage:null,processedControlImage:null,processorType:"canny_image_processor",processorNode:_d.canny_image_processor.default,shouldAutoConfig:!0},M3={controlNets:{},isEnabled:!1,pendingControlImages:[]},cF=yn({name:"controlNet",initialState:M3,reducers:{isControlNetEnabledToggled:e=>{e.isEnabled=!e.isEnabled},controlNetAdded:(e,t)=>{const{controlNetId:n,controlNet:r}=t.payload;e.controlNets[n]={...r??aR,controlNetId:n}},controlNetDuplicated:(e,t)=>{const{sourceControlNetId:n,newControlNetId:r}=t.payload,i=e.controlNets[n];if(!i)return;const o=zr(i);o.controlNetId=r,e.controlNets[r]=o},controlNetAddedFromImage:(e,t)=>{const{controlNetId:n,controlImage:r}=t.payload;e.controlNets[n]={...aR,controlNetId:n,controlImage:r}},controlNetRemoved:(e,t)=>{const{controlNetId:n}=t.payload;delete e.controlNets[n]},controlNetToggled:(e,t)=>{const{controlNetId:n}=t.payload,r=e.controlNets[n];r&&(r.isEnabled=!r.isEnabled)},controlNetImageChanged:(e,t)=>{const{controlNetId:n,controlImage:r}=t.payload,i=e.controlNets[n];i&&(i.controlImage=r,i.processedControlImage=null,r!==null&&i.processorType!=="none"&&e.pendingControlImages.push(n))},controlNetProcessedImageChanged:(e,t)=>{const{controlNetId:n,processedControlImage:r}=t.payload,i=e.controlNets[n];i&&(i.processedControlImage=r,e.pendingControlImages=e.pendingControlImages.filter(o=>o!==n))},controlNetModelChanged:(e,t)=>{const{controlNetId:n,model:r}=t.payload,i=e.controlNets[n];if(i&&(i.model=r,i.processedControlImage=null,i.shouldAutoConfig)){let o;for(const s in b0)if(r.model_name.includes(s)){o=b0[s];break}o?(i.processorType=o,i.processorNode=_d[o].default):(i.processorType="none",i.processorNode=_d.none.default)}},controlNetWeightChanged:(e,t)=>{const{controlNetId:n,weight:r}=t.payload,i=e.controlNets[n];i&&(i.weight=r)},controlNetBeginStepPctChanged:(e,t)=>{const{controlNetId:n,beginStepPct:r}=t.payload,i=e.controlNets[n];i&&(i.beginStepPct=r)},controlNetEndStepPctChanged:(e,t)=>{const{controlNetId:n,endStepPct:r}=t.payload,i=e.controlNets[n];i&&(i.endStepPct=r)},controlNetControlModeChanged:(e,t)=>{const{controlNetId:n,controlMode:r}=t.payload,i=e.controlNets[n];i&&(i.controlMode=r)},controlNetResizeModeChanged:(e,t)=>{const{controlNetId:n,resizeMode:r}=t.payload,i=e.controlNets[n];i&&(i.resizeMode=r)},controlNetProcessorParamsChanged:(e,t)=>{const{controlNetId:n,changes:r}=t.payload,i=e.controlNets[n];if(!i)return;const o=i.processorNode;i.processorNode={...o,...r},i.shouldAutoConfig=!1},controlNetProcessorTypeChanged:(e,t)=>{const{controlNetId:n,processorType:r}=t.payload,i=e.controlNets[n];i&&(i.processedControlImage=null,i.processorType=r,i.processorNode=_d[r].default,i.shouldAutoConfig=!1)},controlNetAutoConfigToggled:(e,t)=>{var o;const{controlNetId:n}=t.payload,r=e.controlNets[n];if(!r)return;const i=!r.shouldAutoConfig;if(i){let s;for(const a in b0)if((o=r.model)!=null&&o.model_name.includes(a)){s=b0[a];break}s?(r.processorType=s,r.processorNode=_d[s].default):(r.processorType="none",r.processorNode=_d.none.default)}r.shouldAutoConfig=i},controlNetReset:()=>({...M3})},extraReducers:e=>{e.addCase(DT,(t,n)=>{const r=t.controlNets[n.payload.controlNetId];r&&r.controlImage!==null&&t.pendingControlImages.push(n.payload.controlNetId)}),e.addCase(LT,t=>{t.pendingControlImages=[]}),e.addMatcher(r$,t=>{t.pendingControlImages=[]}),e.addMatcher(Se.endpoints.deleteImage.matchFulfilled,(t,n)=>{const{image_name:r}=n.meta.arg.originalArgs;tc(t.controlNets,i=>{i.controlImage===r&&(i.controlImage=null,i.processedControlImage=null),i.processedControlImage===r&&(i.processedControlImage=null)})})}}),{isControlNetEnabledToggled:oIe,controlNetAdded:sIe,controlNetDuplicated:aIe,controlNetAddedFromImage:lIe,controlNetRemoved:dF,controlNetImageChanged:$T,controlNetProcessedImageChanged:qde,controlNetToggled:uIe,controlNetModelChanged:lR,controlNetWeightChanged:cIe,controlNetBeginStepPctChanged:dIe,controlNetEndStepPctChanged:fIe,controlNetControlModeChanged:hIe,controlNetResizeModeChanged:pIe,controlNetProcessorParamsChanged:Kde,controlNetProcessorTypeChanged:Xde,controlNetReset:FT,controlNetAutoConfigToggled:uR}=cF.actions,Yde=cF.reducer,fF={isEnabled:!1,maxPrompts:100,combinatorial:!0},Qde=fF,hF=yn({name:"dynamicPrompts",initialState:Qde,reducers:{maxPromptsChanged:(e,t)=>{e.maxPrompts=t.payload},maxPromptsReset:e=>{e.maxPrompts=fF.maxPrompts},combinatorialToggled:e=>{e.combinatorial=!e.combinatorial},isEnabledToggled:e=>{e.isEnabled=!e.isEnabled}}}),{isEnabledToggled:gIe,maxPromptsChanged:mIe,maxPromptsReset:yIe,combinatorialToggled:vIe}=hF.actions,Zde=hF.reducer,pF={selection:[],shouldAutoSwitch:!0,autoAssignBoardOnClick:!0,autoAddBoardId:"none",galleryImageMinimumWidth:96,selectedBoardId:"none",galleryView:"images",shouldShowDeleteButton:!1,boardSearchText:""},gF=yn({name:"gallery",initialState:pF,reducers:{imageSelected:(e,t)=>{e.selection=t.payload?[t.payload]:[]},selectionChanged:(e,t)=>{e.selection=t.payload},shouldAutoSwitchChanged:(e,t)=>{e.shouldAutoSwitch=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},autoAssignBoardOnClickChanged:(e,t)=>{e.autoAssignBoardOnClick=t.payload},boardIdSelected:(e,t)=>{e.selectedBoardId=t.payload,e.galleryView="images"},autoAddBoardIdChanged:(e,t)=>{if(!t.payload){e.autoAddBoardId="none";return}e.autoAddBoardId=t.payload},galleryViewChanged:(e,t)=>{e.galleryView=t.payload},shouldShowDeleteButtonChanged:(e,t)=>{e.shouldShowDeleteButton=t.payload},boardSearchTextChanged:(e,t)=>{e.boardSearchText=t.payload}},extraReducers:e=>{e.addMatcher(efe,(t,n)=>{const r=n.meta.arg.originalArgs;r===t.selectedBoardId&&(t.selectedBoardId="none",t.galleryView="images"),r===t.autoAddBoardId&&(t.autoAddBoardId="none")}),e.addMatcher(Ui.endpoints.listAllBoards.matchFulfilled,(t,n)=>{const r=n.payload;t.autoAddBoardId&&(r.map(i=>i.board_id).includes(t.autoAddBoardId)||(t.autoAddBoardId="none"))})}}),{imageSelected:Rs,shouldAutoSwitchChanged:_Ie,autoAssignBoardOnClickChanged:bIe,setGalleryImageMinimumWidth:SIe,boardIdSelected:N3,autoAddBoardIdChanged:wIe,galleryViewChanged:k1,selectionChanged:xIe,shouldShowDeleteButtonChanged:CIe,boardSearchTextChanged:TIe}=gF.actions,Jde=gF.reducer,efe=Co(Se.endpoints.deleteBoard.matchFulfilled,Se.endpoints.deleteBoardAndImages.matchFulfilled),tfe={imagesToDelete:[],isModalOpen:!1},mF=yn({name:"deleteImageModal",initialState:tfe,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToDeleteSelected:(e,t)=>{e.imagesToDelete=t.payload},imageDeletionCanceled:e=>{e.imagesToDelete=[],e.isModalOpen=!1}}}),{isModalOpenChanged:BT,imagesToDeleteSelected:nfe,imageDeletionCanceled:EIe}=mF.actions,rfe=mF.reducer,ife={isModalOpen:!1,imagesToChange:[]},yF=yn({name:"changeBoardModal",initialState:ife,reducers:{isModalOpenChanged:(e,t)=>{e.isModalOpen=t.payload},imagesToChangeSelected:(e,t)=>{e.imagesToChange=t.payload},changeBoardReset:e=>{e.imagesToChange=[],e.isModalOpen=!1}}}),{isModalOpenChanged:AIe,imagesToChangeSelected:PIe,changeBoardReset:RIe}=yF.actions,ofe=yF.reducer,cR={weight:.75},sfe={loras:{}},vF=yn({name:"lora",initialState:sfe,reducers:{loraAdded:(e,t)=>{const{model_name:n,id:r,base_model:i}=t.payload;e.loras[r]={id:r,model_name:n,base_model:i,...cR}},loraRemoved:(e,t)=>{const n=t.payload;delete e.loras[n]},lorasCleared:e=>{e.loras={}},loraWeightChanged:(e,t)=>{const{id:n,weight:r}=t.payload,i=e.loras[n];i&&(i.weight=r)},loraWeightReset:(e,t)=>{const n=t.payload,r=e.loras[n];r&&(r.weight=cR.weight)}}}),{loraAdded:OIe,loraRemoved:_F,loraWeightChanged:kIe,loraWeightReset:IIe,lorasCleared:MIe}=vF.actions,afe=vF.reducer;function Eo(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Eo(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const dR=e=>{let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=u??typeof d!="object"?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},i=()=>t,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,i,a),a},lfe=e=>e?dR(e):dR,{useSyncExternalStoreWithSelector:ufe}=Hce;function cfe(e,t=e.getState,n){const r=ufe(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return L.useDebugValue(r),r}function Ri(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var dfe={value:()=>{}};function Pb(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new hv(n)}function hv(e){this._=e}function ffe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}hv.prototype=Pb.prototype={constructor:hv,on:function(e,t){var n=this._,r=ffe(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=hfe(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=fR(n[i],e.name,t);else if(t==null)for(i in n)n[i]=fR(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new hv(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function hfe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function fR(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=dfe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var L3="http://www.w3.org/1999/xhtml";const hR={svg:"http://www.w3.org/2000/svg",xhtml:L3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rb(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),hR.hasOwnProperty(t)?{space:hR[t],local:e}:e}function pfe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===L3&&t.documentElement.namespaceURI===L3?t.createElement(e):t.createElementNS(n,e)}}function gfe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bF(e){var t=Rb(e);return(t.local?gfe:pfe)(t)}function mfe(){}function UT(e){return e==null?mfe:function(){return this.querySelector(e)}}function yfe(e){typeof e!="function"&&(e=UT(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=new Array(s),l,u,d=0;d<s;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&("__data__"in l&&(u.__data__=l.__data__),a[d]=u);return new Ki(r,this._parents)}function vfe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function _fe(){return[]}function SF(e){return e==null?_fe:function(){return this.querySelectorAll(e)}}function bfe(e){return function(){return vfe(e.apply(this,arguments))}}function Sfe(e){typeof e=="function"?e=bfe(e):e=SF(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],a=s.length,l,u=0;u<a;++u)(l=s[u])&&(r.push(e.call(l,l.__data__,u,s)),i.push(l));return new Ki(r,i)}function wF(e){return function(){return this.matches(e)}}function xF(e){return function(t){return t.matches(e)}}var wfe=Array.prototype.find;function xfe(e){return function(){return wfe.call(this.children,e)}}function Cfe(){return this.firstElementChild}function Tfe(e){return this.select(e==null?Cfe:xfe(typeof e=="function"?e:xF(e)))}var Efe=Array.prototype.filter;function Afe(){return Array.from(this.children)}function Pfe(e){return function(){return Efe.call(this.children,e)}}function Rfe(e){return this.selectAll(e==null?Afe:Pfe(typeof e=="function"?e:xF(e)))}function Ofe(e){typeof e!="function"&&(e=wF(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=[],l,u=0;u<s;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&a.push(l);return new Ki(r,this._parents)}function CF(e){return new Array(e.length)}function kfe(){return new Ki(this._enter||this._groups.map(CF),this._parents)}function I1(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}I1.prototype={constructor:I1,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ife(e){return function(){return e}}function Mfe(e,t,n,r,i,o){for(var s=0,a,l=t.length,u=o.length;s<u;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new I1(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Nfe(e,t,n,r,i,o,s){var a,l,u=new Map,d=t.length,f=o.length,p=new Array(d),g;for(a=0;a<d;++a)(l=t[a])&&(p[a]=g=s.call(l,l.__data__,a,t)+"",u.has(g)?i[a]=l:u.set(g,l));for(a=0;a<f;++a)g=s.call(e,o[a],a,o)+"",(l=u.get(g))?(r[a]=l,l.__data__=o[a],u.delete(g)):n[a]=new I1(e,o[a]);for(a=0;a<d;++a)(l=t[a])&&u.get(p[a])===l&&(i[a]=l)}function Lfe(e){return e.__data__}function Dfe(e,t){if(!arguments.length)return Array.from(this,Lfe);var n=t?Nfe:Mfe,r=this._parents,i=this._groups;typeof e!="function"&&(e=Ife(e));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),u=0;u<o;++u){var d=r[u],f=i[u],p=f.length,g=$fe(e.call(d,d&&d.__data__,u,r)),m=g.length,v=a[u]=new Array(m),x=s[u]=new Array(m),_=l[u]=new Array(p);n(d,f,v,x,_,g,t);for(var b=0,y=0,S,C;b<m;++b)if(S=v[b]){for(b>=y&&(y=b+1);!(C=x[y])&&++y<m;);S._next=C||null}}return s=new Ki(s,r),s._enter=a,s._exit=l,s}function $fe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ffe(){return new Ki(this._exit||this._groups.map(CF),this._parents)}function Bfe(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Ufe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var u=n[l],d=r[l],f=u.length,p=a[l]=new Array(f),g,m=0;m<f;++m)(g=u[m]||d[m])&&(p[m]=g);for(;l<i;++l)a[l]=n[l];return new Ki(a,this._parents)}function zfe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Vfe(e){e||(e=jfe);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),u,d=0;d<a;++d)(u=s[d])&&(l[d]=u);l.sort(t)}return new Ki(i,this._parents).order()}function jfe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Gfe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Hfe(){return Array.from(this)}function Wfe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function qfe(){let e=0;for(const t of this)++e;return e}function Kfe(){return!this.node()}function Xfe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this}function Yfe(e){return function(){this.removeAttribute(e)}}function Qfe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zfe(e,t){return function(){this.setAttribute(e,t)}}function Jfe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ehe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function the(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function nhe(e,t){var n=Rb(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Qfe:Yfe:typeof t=="function"?n.local?the:ehe:n.local?Jfe:Zfe)(n,t))}function TF(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function rhe(e){return function(){this.style.removeProperty(e)}}function ihe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ohe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function she(e,t,n){return arguments.length>1?this.each((t==null?rhe:typeof t=="function"?ohe:ihe)(e,t,n??"")):Tf(this.node(),e)}function Tf(e,t){return e.style.getPropertyValue(t)||TF(e).getComputedStyle(e,null).getPropertyValue(t)}function ahe(e){return function(){delete this[e]}}function lhe(e,t){return function(){this[e]=t}}function uhe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function che(e,t){return arguments.length>1?this.each((t==null?ahe:typeof t=="function"?uhe:lhe)(e,t)):this.node()[e]}function EF(e){return e.trim().split(/^|\s+/)}function zT(e){return e.classList||new AF(e)}function AF(e){this._node=e,this._names=EF(e.getAttribute("class")||"")}AF.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function PF(e,t){for(var n=zT(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function RF(e,t){for(var n=zT(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function dhe(e){return function(){PF(this,e)}}function fhe(e){return function(){RF(this,e)}}function hhe(e,t){return function(){(t.apply(this,arguments)?PF:RF)(this,e)}}function phe(e,t){var n=EF(e+"");if(arguments.length<2){for(var r=zT(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?hhe:t?dhe:fhe)(n,t))}function ghe(){this.textContent=""}function mhe(e){return function(){this.textContent=e}}function yhe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function vhe(e){return arguments.length?this.each(e==null?ghe:(typeof e=="function"?yhe:mhe)(e)):this.node().textContent}function _he(){this.innerHTML=""}function bhe(e){return function(){this.innerHTML=e}}function She(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function whe(e){return arguments.length?this.each(e==null?_he:(typeof e=="function"?She:bhe)(e)):this.node().innerHTML}function xhe(){this.nextSibling&&this.parentNode.appendChild(this)}function Che(){return this.each(xhe)}function The(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ehe(){return this.each(The)}function Ahe(e){var t=typeof e=="function"?e:bF(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Phe(){return null}function Rhe(e,t){var n=typeof e=="function"?e:bF(e),r=t==null?Phe:typeof t=="function"?t:UT(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ohe(){var e=this.parentNode;e&&e.removeChild(this)}function khe(){return this.each(Ohe)}function Ihe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mhe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Nhe(e){return this.select(e?Mhe:Ihe)}function Lhe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Dhe(e){return function(t){e.call(this,t,this.__data__)}}function $he(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Fhe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function Bhe(e,t,n){return function(){var r=this.__on,i,o=Dhe(t);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Uhe(e,t,n){var r=$he(e+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,d;l<u;++l)for(i=0,d=a[l];i<o;++i)if((s=r[i]).type===d.type&&s.name===d.name)return d.value}return}for(a=t?Bhe:Fhe,i=0;i<o;++i)this.each(a(r[i],t,n));return this}function OF(e,t,n){var r=TF(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function zhe(e,t){return function(){return OF(this,e,t)}}function Vhe(e,t){return function(){return OF(this,e,t.apply(this,arguments))}}function jhe(e,t){return this.each((typeof t=="function"?Vhe:zhe)(e,t))}function*Ghe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var kF=[null];function Ki(e,t){this._groups=e,this._parents=t}function ym(){return new Ki([[document.documentElement]],kF)}function Hhe(){return this}Ki.prototype=ym.prototype={constructor:Ki,select:yfe,selectAll:Sfe,selectChild:Tfe,selectChildren:Rfe,filter:Ofe,data:Dfe,enter:kfe,exit:Ffe,join:Bfe,merge:Ufe,selection:Hhe,order:zfe,sort:Vfe,call:Gfe,nodes:Hfe,node:Wfe,size:qfe,empty:Kfe,each:Xfe,attr:nhe,style:she,property:che,classed:phe,text:vhe,html:whe,raise:Che,lower:Ehe,append:Ahe,insert:Rhe,remove:khe,clone:Nhe,datum:Lhe,on:Uhe,dispatch:jhe,[Symbol.iterator]:Ghe};function Vo(e){return typeof e=="string"?new Ki([[document.querySelector(e)]],[document.documentElement]):new Ki([[e]],kF)}function Whe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function gs(e,t){if(e=Whe(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const qhe={passive:!1},Tg={capture:!0,passive:!1};function gx(e){e.stopImmediatePropagation()}function ef(e){e.preventDefault(),e.stopImmediatePropagation()}function IF(e){var t=e.document.documentElement,n=Vo(e).on("dragstart.drag",ef,Tg);"onselectstart"in t?n.on("selectstart.drag",ef,Tg):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function MF(e,t){var n=e.document.documentElement,r=Vo(e).on("dragstart.drag",null);t&&(r.on("click.drag",ef,Tg),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const S0=e=>()=>e;function D3(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}D3.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Khe(e){return!e.ctrlKey&&!e.button}function Xhe(){return this.parentNode}function Yhe(e,t){return t??{x:e.x,y:e.y}}function Qhe(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zhe(){var e=Khe,t=Xhe,n=Yhe,r=Qhe,i={},o=Pb("start","drag","end"),s=0,a,l,u,d,f=0;function p(S){S.on("mousedown.drag",g).filter(r).on("touchstart.drag",x).on("touchmove.drag",_,qhe).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(S,C){if(!(d||!e.call(this,S,C))){var T=y(this,t.call(this,S,C),S,C,"mouse");T&&(Vo(S.view).on("mousemove.drag",m,Tg).on("mouseup.drag",v,Tg),IF(S.view),gx(S),u=!1,a=S.clientX,l=S.clientY,T("start",S))}}function m(S){if(ef(S),!u){var C=S.clientX-a,T=S.clientY-l;u=C*C+T*T>f}i.mouse("drag",S)}function v(S){Vo(S.view).on("mousemove.drag mouseup.drag",null),MF(S.view,u),ef(S),i.mouse("end",S)}function x(S,C){if(e.call(this,S,C)){var T=S.changedTouches,E=t.call(this,S,C),P=T.length,k,O;for(k=0;k<P;++k)(O=y(this,E,S,C,T[k].identifier,T[k]))&&(gx(S),O("start",S,T[k]))}}function _(S){var C=S.changedTouches,T=C.length,E,P;for(E=0;E<T;++E)(P=i[C[E].identifier])&&(ef(S),P("drag",S,C[E]))}function b(S){var C=S.changedTouches,T=C.length,E,P;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),E=0;E<T;++E)(P=i[C[E].identifier])&&(gx(S),P("end",S,C[E]))}function y(S,C,T,E,P,k){var O=o.copy(),M=gs(k||T,C),G,U,A;if((A=n.call(S,new D3("beforestart",{sourceEvent:T,target:p,identifier:P,active:s,x:M[0],y:M[1],dx:0,dy:0,dispatch:O}),E))!=null)return G=A.x-M[0]||0,U=A.y-M[1]||0,function N(F,B,D){var V=M,j;switch(F){case"start":i[P]=N,j=s++;break;case"end":delete i[P],--s;case"drag":M=gs(D||B,C),j=s;break}O.call(F,S,new D3(F,{sourceEvent:B,subject:A,target:p,identifier:P,active:j,x:M[0]+G,y:M[1]+U,dx:M[0]-V[0],dy:M[1]-V[1],dispatch:O}),E)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:S0(!!S),p):e},p.container=function(S){return arguments.length?(t=typeof S=="function"?S:S0(S),p):t},p.subject=function(S){return arguments.length?(n=typeof S=="function"?S:S0(S),p):n},p.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:S0(!!S),p):r},p.on=function(){var S=o.on.apply(o,arguments);return S===o?p:S},p.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,p):Math.sqrt(f)},p}function VT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function NF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function vm(){}var Eg=.7,M1=1/Eg,tf="\\s*([+-]?\\d+)\\s*",Ag="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Os="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Jhe=/^#([0-9a-f]{3,8})$/,epe=new RegExp(`^rgb\\(${tf},${tf},${tf}\\)$`),tpe=new RegExp(`^rgb\\(${Os},${Os},${Os}\\)$`),npe=new RegExp(`^rgba\\(${tf},${tf},${tf},${Ag}\\)$`),rpe=new RegExp(`^rgba\\(${Os},${Os},${Os},${Ag}\\)$`),ipe=new RegExp(`^hsl\\(${Ag},${Os},${Os}\\)$`),ope=new RegExp(`^hsla\\(${Ag},${Os},${Os},${Ag}\\)$`),pR={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};VT(vm,Pg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gR,formatHex:gR,formatHex8:spe,formatHsl:ape,formatRgb:mR,toString:mR});function gR(){return this.rgb().formatHex()}function spe(){return this.rgb().formatHex8()}function ape(){return LF(this).formatHsl()}function mR(){return this.rgb().formatRgb()}function Pg(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Jhe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?yR(t):n===3?new xi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?w0(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?w0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=epe.exec(e))?new xi(t[1],t[2],t[3],1):(t=tpe.exec(e))?new xi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=npe.exec(e))?w0(t[1],t[2],t[3],t[4]):(t=rpe.exec(e))?w0(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ipe.exec(e))?bR(t[1],t[2]/100,t[3]/100,1):(t=ope.exec(e))?bR(t[1],t[2]/100,t[3]/100,t[4]):pR.hasOwnProperty(e)?yR(pR[e]):e==="transparent"?new xi(NaN,NaN,NaN,0):null}function yR(e){return new xi(e>>16&255,e>>8&255,e&255,1)}function w0(e,t,n,r){return r<=0&&(e=t=n=NaN),new xi(e,t,n,r)}function lpe(e){return e instanceof vm||(e=Pg(e)),e?(e=e.rgb(),new xi(e.r,e.g,e.b,e.opacity)):new xi}function $3(e,t,n,r){return arguments.length===1?lpe(e):new xi(e,t,n,r??1)}function xi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}VT(xi,$3,NF(vm,{brighter(e){return e=e==null?M1:Math.pow(M1,e),new xi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Eg:Math.pow(Eg,e),new xi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xi(Hu(this.r),Hu(this.g),Hu(this.b),N1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vR,formatHex:vR,formatHex8:upe,formatRgb:_R,toString:_R}));function vR(){return`#${$u(this.r)}${$u(this.g)}${$u(this.b)}`}function upe(){return`#${$u(this.r)}${$u(this.g)}${$u(this.b)}${$u((isNaN(this.opacity)?1:this.opacity)*255)}`}function _R(){const e=N1(this.opacity);return`${e===1?"rgb(":"rgba("}${Hu(this.r)}, ${Hu(this.g)}, ${Hu(this.b)}${e===1?")":`, ${e})`}`}function N1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $u(e){return e=Hu(e),(e<16?"0":"")+e.toString(16)}function bR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jo(e,t,n,r)}function LF(e){if(e instanceof jo)return new jo(e.h,e.s,e.l,e.opacity);if(e instanceof vm||(e=Pg(e)),!e)return new jo;if(e instanceof jo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new jo(s,a,l,e.opacity)}function cpe(e,t,n,r){return arguments.length===1?LF(e):new jo(e,t,n,r??1)}function jo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}VT(jo,cpe,NF(vm,{brighter(e){return e=e==null?M1:Math.pow(M1,e),new jo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Eg:Math.pow(Eg,e),new jo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xi(mx(e>=240?e-240:e+120,i,r),mx(e,i,r),mx(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new jo(SR(this.h),x0(this.s),x0(this.l),N1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=N1(this.opacity);return`${e===1?"hsl(":"hsla("}${SR(this.h)}, ${x0(this.s)*100}%, ${x0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function SR(e){return e=(e||0)%360,e<0?e+360:e}function x0(e){return Math.max(0,Math.min(1,e||0))}function mx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const DF=e=>()=>e;function dpe(e,t){return function(n){return e+n*t}}function fpe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function hpe(e){return(e=+e)==1?$F:function(t,n){return n-t?fpe(t,n,e):DF(isNaN(t)?n:t)}}function $F(e,t){var n=t-e;return n?dpe(e,n):DF(isNaN(e)?t:e)}const wR=function e(t){var n=hpe(t);function r(i,o){var s=n((i=$3(i)).r,(o=$3(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),u=$F(i.opacity,o.opacity);return function(d){return i.r=s(d),i.g=a(d),i.b=l(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function cl(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var F3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yx=new RegExp(F3.source,"g");function ppe(e){return function(){return e}}function gpe(e){return function(t){return e(t)+""}}function mpe(e,t){var n=F3.lastIndex=yx.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=F3.exec(e))&&(i=yx.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:cl(r,i)})),n=yx.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?gpe(l[0].x):ppe(t):(t=l.length,function(u){for(var d=0,f;d<t;++d)a[(f=l[d]).i]=f.x(u);return a.join("")})}var xR=180/Math.PI,B3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function FF(e,t,n,r,i,o){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*xR,skewX:Math.atan(l)*xR,scaleX:s,scaleY:a}}var C0;function ype(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?B3:FF(t.a,t.b,t.c,t.d,t.e,t.f)}function vpe(e){return e==null||(C0||(C0=document.createElementNS("http://www.w3.org/2000/svg","g")),C0.setAttribute("transform",e),!(e=C0.transform.baseVal.consolidate()))?B3:(e=e.matrix,FF(e.a,e.b,e.c,e.d,e.e,e.f))}function BF(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,d,f,p,g,m){if(u!==f||d!==p){var v=g.push("translate(",null,t,null,n);m.push({i:v-4,x:cl(u,f)},{i:v-2,x:cl(d,p)})}else(f||p)&&g.push("translate("+f+t+p+n)}function s(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(i(f)+"rotate(",null,r)-2,x:cl(u,d)})):d&&f.push(i(f)+"rotate("+d+r)}function a(u,d,f,p){u!==d?p.push({i:f.push(i(f)+"skewX(",null,r)-2,x:cl(u,d)}):d&&f.push(i(f)+"skewX("+d+r)}function l(u,d,f,p,g,m){if(u!==f||d!==p){var v=g.push(i(g)+"scale(",null,",",null,")");m.push({i:v-4,x:cl(u,f)},{i:v-2,x:cl(d,p)})}else(f!==1||p!==1)&&g.push(i(g)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,f,p),s(u.rotate,d.rotate,f,p),a(u.skewX,d.skewX,f,p),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(g){for(var m=-1,v=p.length,x;++m<v;)f[(x=p[m]).i]=x.x(g);return f.join("")}}}var _pe=BF(ype,"px, ","px)","deg)"),bpe=BF(vpe,", ",")",")"),Spe=1e-12;function CR(e){return((e=Math.exp(e))+1/e)/2}function wpe(e){return((e=Math.exp(e))-1/e)/2}function xpe(e){return((e=Math.exp(2*e))-1)/(e+1)}const Cpe=function e(t,n,r){function i(o,s){var a=o[0],l=o[1],u=o[2],d=s[0],f=s[1],p=s[2],g=d-a,m=f-l,v=g*g+m*m,x,_;if(v<Spe)_=Math.log(p/u)/t,x=function(E){return[a+E*g,l+E*m,u*Math.exp(t*E*_)]};else{var b=Math.sqrt(v),y=(p*p-u*u+r*v)/(2*u*n*b),S=(p*p-u*u-r*v)/(2*p*n*b),C=Math.log(Math.sqrt(y*y+1)-y),T=Math.log(Math.sqrt(S*S+1)-S);_=(T-C)/t,x=function(E){var P=E*_,k=CR(C),O=u/(n*b)*(k*xpe(t*P+C)-wpe(C));return[a+O*g,l+O*m,u*k/CR(t*P+C)]}}return x.duration=_*1e3*t/Math.SQRT2,x}return i.rho=function(o){var s=Math.max(.001,+o),a=s*s,l=a*a;return e(s,a,l)},i}(Math.SQRT2,2,4);var Ef=0,dp=0,Gh=0,UF=1e3,L1,fp,D1=0,oc=0,Ob=0,Rg=typeof performance=="object"&&performance.now?performance:Date,zF=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jT(){return oc||(zF(Tpe),oc=Rg.now()+Ob)}function Tpe(){oc=0}function $1(){this._call=this._time=this._next=null}$1.prototype=VF.prototype={constructor:$1,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?jT():+n)+(t==null?0:+t),!this._next&&fp!==this&&(fp?fp._next=this:L1=this,fp=this),this._call=e,this._time=n,U3()},stop:function(){this._call&&(this._call=null,this._time=1/0,U3())}};function VF(e,t,n){var r=new $1;return r.restart(e,t,n),r}function Epe(){jT(),++Ef;for(var e=L1,t;e;)(t=oc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ef}function TR(){oc=(D1=Rg.now())+Ob,Ef=dp=0;try{Epe()}finally{Ef=0,Ppe(),oc=0}}function Ape(){var e=Rg.now(),t=e-D1;t>UF&&(Ob-=t,D1=e)}function Ppe(){for(var e,t=L1,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:L1=n);fp=e,U3(r)}function U3(e){if(!Ef){dp&&(dp=clearTimeout(dp));var t=e-oc;t>24?(e<1/0&&(dp=setTimeout(TR,e-Rg.now()-Ob)),Gh&&(Gh=clearInterval(Gh))):(Gh||(D1=Rg.now(),Gh=setInterval(Ape,UF)),Ef=1,zF(TR))}}function ER(e,t,n){var r=new $1;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Rpe=Pb("start","end","cancel","interrupt"),Ope=[],jF=0,AR=1,z3=2,pv=3,PR=4,V3=5,gv=6;function kb(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;kpe(e,n,{name:t,index:r,group:i,on:Rpe,tween:Ope,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jF})}function GT(e,t){var n=ns(e,t);if(n.state>jF)throw new Error("too late; already scheduled");return n}function Bs(e,t){var n=ns(e,t);if(n.state>pv)throw new Error("too late; already running");return n}function ns(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function kpe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=VF(o,0,n.time);function o(u){n.state=AR,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var d,f,p,g;if(n.state!==AR)return l();for(d in r)if(g=r[d],g.name===n.name){if(g.state===pv)return ER(s);g.state===PR?(g.state=gv,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=gv,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(ER(function(){n.state===pv&&(n.state=PR,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=z3,n.on.call("start",e,e.__data__,n.index,n.group),n.state===z3){for(n.state=pv,i=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}function a(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=V3,1),f=-1,p=i.length;++f<p;)i[f].call(e,d);n.state===V3&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=gv,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function mv(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>z3&&r.state<V3,r.state=gv,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function Ipe(e){return this.each(function(){mv(this,e)})}function Mpe(e,t){var n,r;return function(){var i=Bs(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function Npe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Bs(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=a;break}l===u&&i.push(a)}o.tween=i}}function Lpe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ns(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?Mpe:Npe)(n,e,t))}function HT(e,t,n){var r=e._id;return e.each(function(){var i=Bs(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return ns(i,r).value[t]}}function GF(e,t){var n;return(typeof t=="number"?cl:t instanceof Pg?wR:(n=Pg(t))?(t=n,wR):mpe)(e,t)}function Dpe(e){return function(){this.removeAttribute(e)}}function $pe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fpe(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function Bpe(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function Upe(e,t,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=t(r=s,a)))}}function zpe(e,t,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=t(r=s,a)))}}function Vpe(e,t){var n=Rb(e),r=n==="transform"?bpe:GF;return this.attrTween(e,typeof t=="function"?(n.local?zpe:Upe)(n,r,HT(this,"attr."+e,t)):t==null?(n.local?$pe:Dpe)(n):(n.local?Bpe:Fpe)(n,r,t))}function jpe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Gpe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Hpe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Gpe(e,o)),n}return i._value=t,i}function Wpe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&jpe(e,o)),n}return i._value=t,i}function qpe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Rb(e);return this.tween(n,(r.local?Hpe:Wpe)(r,t))}function Kpe(e,t){return function(){GT(this,e).delay=+t.apply(this,arguments)}}function Xpe(e,t){return t=+t,function(){GT(this,e).delay=t}}function Ype(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Kpe:Xpe)(t,e)):ns(this.node(),t).delay}function Qpe(e,t){return function(){Bs(this,e).duration=+t.apply(this,arguments)}}function Zpe(e,t){return t=+t,function(){Bs(this,e).duration=t}}function Jpe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Qpe:Zpe)(t,e)):ns(this.node(),t).duration}function ege(e,t){if(typeof t!="function")throw new Error;return function(){Bs(this,e).ease=t}}function tge(e){var t=this._id;return arguments.length?this.each(ege(t,e)):ns(this.node(),t).ease}function nge(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Bs(this,e).ease=n}}function rge(e){if(typeof e!="function")throw new Error;return this.each(nge(this._id,e))}function ige(e){typeof e!="function"&&(e=wF(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=[],l,u=0;u<s;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&a.push(l);return new Oa(r,this._parents,this._name,this._id)}function oge(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=t[a],u=n[a],d=l.length,f=s[a]=new Array(d),p,g=0;g<d;++g)(p=l[g]||u[g])&&(f[g]=p);for(;a<r;++a)s[a]=t[a];return new Oa(s,this._parents,this._name,this._id)}function sge(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function age(e,t,n){var r,i,o=sge(t)?GT:Bs;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}function lge(e,t){var n=this._id;return arguments.length<2?ns(this.node(),n).on.on(e):this.each(age(n,e,t))}function uge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function cge(){return this.on("end.remove",uge(this._id))}function dge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=UT(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,u=o[s]=new Array(l),d,f,p=0;p<l;++p)(d=a[p])&&(f=e.call(d,d.__data__,p,a))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,kb(u[p],t,n,p,u,ns(d,n)));return new Oa(o,this._parents,t,n)}function fge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=SF(e));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=e.call(d,d.__data__,f,l),g,m=ns(d,n),v=0,x=p.length;v<x;++v)(g=p[v])&&kb(g,t,n,v,p,m);o.push(p),s.push(d)}return new Oa(o,s,t,n)}var hge=ym.prototype.constructor;function pge(){return new hge(this._groups,this._parents)}function gge(e,t){var n,r,i;return function(){var o=Tf(this,e),s=(this.style.removeProperty(e),Tf(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function HF(e){return function(){this.style.removeProperty(e)}}function mge(e,t,n){var r,i=n+"",o;return function(){var s=Tf(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function yge(e,t,n){var r,i,o;return function(){var s=Tf(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Tf(this,e))),s===l?null:s===r&&l===i?o:(i=l,o=t(r=s,a))}}function vge(e,t){var n,r,i,o="style."+t,s="end."+o,a;return function(){var l=Bs(this,e),u=l.on,d=l.value[o]==null?a||(a=HF(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(s,i=d),l.on=r}}function _ge(e,t,n){var r=(e+="")=="transform"?_pe:GF;return t==null?this.styleTween(e,gge(e,r)).on("end.style."+e,HF(e)):typeof t=="function"?this.styleTween(e,yge(e,r,HT(this,"style."+e,t))).each(vge(this._id,e)):this.styleTween(e,mge(e,r,t),n).on("end.style."+e,null)}function bge(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Sge(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&bge(e,s,n)),r}return o._value=t,o}function wge(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Sge(e,t,n??""))}function xge(e){return function(){this.textContent=e}}function Cge(e){return function(){var t=e(this);this.textContent=t??""}}function Tge(e){return this.tween("text",typeof e=="function"?Cge(HT(this,"text",e)):xge(e==null?"":e+""))}function Ege(e){return function(t){this.textContent=e.call(this,t)}}function Age(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Ege(i)),t}return r._value=e,r}function Pge(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Age(e))}function Rge(){for(var e=this._name,t=this._id,n=WF(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,u=0;u<a;++u)if(l=s[u]){var d=ns(l,t);kb(l,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Oa(r,this._parents,e,n)}function Oge(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var u=Bs(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),i===0&&o()})}var kge=0;function Oa(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function WF(){return++kge}var ta=ym.prototype;Oa.prototype={constructor:Oa,select:dge,selectAll:fge,selectChild:ta.selectChild,selectChildren:ta.selectChildren,filter:ige,merge:oge,selection:pge,transition:Rge,call:ta.call,nodes:ta.nodes,node:ta.node,size:ta.size,empty:ta.empty,each:ta.each,on:lge,attr:Vpe,attrTween:qpe,style:_ge,styleTween:wge,text:Tge,textTween:Pge,remove:cge,tween:Lpe,delay:Ype,duration:Jpe,ease:tge,easeVarying:rge,end:Oge,[Symbol.iterator]:ta[Symbol.iterator]};function Ige(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Mge={time:null,delay:0,duration:250,ease:Ige};function Nge(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Lge(e){var t,n;e instanceof Oa?(t=e._id,e=e._name):(t=WF(),(n=Mge).time=jT(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,u=0;u<a;++u)(l=s[u])&&kb(l,e,t,u,s,n||Nge(l,t));return new Oa(r,this._parents,e,t)}ym.prototype.interrupt=Ipe;ym.prototype.transition=Lge;const T0=e=>()=>e;function Dge(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ga(e,t,n){this.k=e,this.x=t,this.y=n}ga.prototype={constructor:ga,scale:function(e){return e===1?this:new ga(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ga(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var kl=new ga(1,0,0);ga.prototype;function vx(e){e.stopImmediatePropagation()}function Hh(e){e.preventDefault(),e.stopImmediatePropagation()}function $ge(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Fge(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function RR(){return this.__zoom||kl}function Bge(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Uge(){return navigator.maxTouchPoints||"ontouchstart"in this}function zge(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function Vge(){var e=$ge,t=Fge,n=zge,r=Bge,i=Uge,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=Cpe,u=Pb("start","zoom","end"),d,f,p,g=500,m=150,v=0,x=10;function _(A){A.property("__zoom",RR).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",O).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(A,N,F,B){var D=A.selection?A.selection():A;D.property("__zoom",RR),A!==D?C(A,N,F,B):D.interrupt().each(function(){T(this,arguments).event(B).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},_.scaleBy=function(A,N,F,B){_.scaleTo(A,function(){var D=this.__zoom.k,V=typeof N=="function"?N.apply(this,arguments):N;return D*V},F,B)},_.scaleTo=function(A,N,F,B){_.transform(A,function(){var D=t.apply(this,arguments),V=this.__zoom,j=F==null?S(D):typeof F=="function"?F.apply(this,arguments):F,q=V.invert(j),Z=typeof N=="function"?N.apply(this,arguments):N;return n(y(b(V,Z),j,q),D,s)},F,B)},_.translateBy=function(A,N,F,B){_.transform(A,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),s)},null,B)},_.translateTo=function(A,N,F,B,D){_.transform(A,function(){var V=t.apply(this,arguments),j=this.__zoom,q=B==null?S(V):typeof B=="function"?B.apply(this,arguments):B;return n(kl.translate(q[0],q[1]).scale(j.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof F=="function"?-F.apply(this,arguments):-F),V,s)},B,D)};function b(A,N){return N=Math.max(o[0],Math.min(o[1],N)),N===A.k?A:new ga(N,A.x,A.y)}function y(A,N,F){var B=N[0]-F[0]*A.k,D=N[1]-F[1]*A.k;return B===A.x&&D===A.y?A:new ga(A.k,B,D)}function S(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function C(A,N,F,B){A.on("start.zoom",function(){T(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(B).end()}).tween("zoom",function(){var D=this,V=arguments,j=T(D,V).event(B),q=t.apply(D,V),Z=F==null?S(q):typeof F=="function"?F.apply(D,V):F,ee=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),ie=D.__zoom,se=typeof N=="function"?N.apply(D,V):N,le=l(ie.invert(Z).concat(ee/ie.k),se.invert(Z).concat(ee/se.k));return function(W){if(W===1)W=se;else{var ne=le(W),fe=ee/ne[2];W=new ga(fe,Z[0]-ne[0]*fe,Z[1]-ne[1]*fe)}j.zoom(null,W)}})}function T(A,N,F){return!F&&A.__zooming||new E(A,N)}function E(A,N){this.that=A,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,N),this.taps=0}E.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,N){return this.mouse&&A!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var N=Vo(this.that).datum();u.call(A,this.that,new Dge(A,{sourceEvent:this.sourceEvent,target:_,type:A,transform:this.that.__zoom,dispatch:u}),N)}};function P(A,...N){if(!e.apply(this,arguments))return;var F=T(this,N).event(A),B=this.__zoom,D=Math.max(o[0],Math.min(o[1],B.k*Math.pow(2,r.apply(this,arguments)))),V=gs(A);if(F.wheel)(F.mouse[0][0]!==V[0]||F.mouse[0][1]!==V[1])&&(F.mouse[1]=B.invert(F.mouse[0]=V)),clearTimeout(F.wheel);else{if(B.k===D)return;F.mouse=[V,B.invert(V)],mv(this),F.start()}Hh(A),F.wheel=setTimeout(j,m),F.zoom("mouse",n(y(b(B,D),F.mouse[0],F.mouse[1]),F.extent,s));function j(){F.wheel=null,F.end()}}function k(A,...N){if(p||!e.apply(this,arguments))return;var F=A.currentTarget,B=T(this,N,!0).event(A),D=Vo(A.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",ee,!0),V=gs(A,F),j=A.clientX,q=A.clientY;IF(A.view),vx(A),B.mouse=[V,this.__zoom.invert(V)],mv(this),B.start();function Z(ie){if(Hh(ie),!B.moved){var se=ie.clientX-j,le=ie.clientY-q;B.moved=se*se+le*le>v}B.event(ie).zoom("mouse",n(y(B.that.__zoom,B.mouse[0]=gs(ie,F),B.mouse[1]),B.extent,s))}function ee(ie){D.on("mousemove.zoom mouseup.zoom",null),MF(ie.view,B.moved),Hh(ie),B.event(ie).end()}}function O(A,...N){if(e.apply(this,arguments)){var F=this.__zoom,B=gs(A.changedTouches?A.changedTouches[0]:A,this),D=F.invert(B),V=F.k*(A.shiftKey?.5:2),j=n(y(b(F,V),B,D),t.apply(this,N),s);Hh(A),a>0?Vo(this).transition().duration(a).call(C,j,B,A):Vo(this).call(_.transform,j,B,A)}}function M(A,...N){if(e.apply(this,arguments)){var F=A.touches,B=F.length,D=T(this,N,A.changedTouches.length===B).event(A),V,j,q,Z;for(vx(A),j=0;j<B;++j)q=F[j],Z=gs(q,this),Z=[Z,this.__zoom.invert(Z),q.identifier],D.touch0?!D.touch1&&D.touch0[2]!==Z[2]&&(D.touch1=Z,D.taps=0):(D.touch0=Z,V=!0,D.taps=1+!!d);d&&(d=clearTimeout(d)),V&&(D.taps<2&&(f=Z[0],d=setTimeout(function(){d=null},g)),mv(this),D.start())}}function G(A,...N){if(this.__zooming){var F=T(this,N).event(A),B=A.changedTouches,D=B.length,V,j,q,Z;for(Hh(A),V=0;V<D;++V)j=B[V],q=gs(j,this),F.touch0&&F.touch0[2]===j.identifier?F.touch0[0]=q:F.touch1&&F.touch1[2]===j.identifier&&(F.touch1[0]=q);if(j=F.that.__zoom,F.touch1){var ee=F.touch0[0],ie=F.touch0[1],se=F.touch1[0],le=F.touch1[1],W=(W=se[0]-ee[0])*W+(W=se[1]-ee[1])*W,ne=(ne=le[0]-ie[0])*ne+(ne=le[1]-ie[1])*ne;j=b(j,Math.sqrt(W/ne)),q=[(ee[0]+se[0])/2,(ee[1]+se[1])/2],Z=[(ie[0]+le[0])/2,(ie[1]+le[1])/2]}else if(F.touch0)q=F.touch0[0],Z=F.touch0[1];else return;F.zoom("touch",n(y(j,q,Z),F.extent,s))}}function U(A,...N){if(this.__zooming){var F=T(this,N).event(A),B=A.changedTouches,D=B.length,V,j;for(vx(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},g),V=0;V<D;++V)j=B[V],F.touch0&&F.touch0[2]===j.identifier?delete F.touch0:F.touch1&&F.touch1[2]===j.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(j=gs(j,this),Math.hypot(f[0]-j[0],f[1]-j[1])<x)){var q=Vo(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return _.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:T0(+A),_):r},_.filter=function(A){return arguments.length?(e=typeof A=="function"?A:T0(!!A),_):e},_.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:T0(!!A),_):i},_.extent=function(A){return arguments.length?(t=typeof A=="function"?A:T0([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),_):t},_.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],_):[o[0],o[1]]},_.translateExtent=function(A){return arguments.length?(s[0][0]=+A[0][0],s[1][0]=+A[1][0],s[0][1]=+A[0][1],s[1][1]=+A[1][1],_):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},_.constrain=function(A){return arguments.length?(n=A,_):n},_.duration=function(A){return arguments.length?(a=+A,_):a},_.interpolate=function(A){return arguments.length?(l=A,_):l},_.on=function(){var A=u.on.apply(u,arguments);return A===u?_:A},_.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,_):Math.sqrt(v)},_.tapDistance=function(A){return arguments.length?(x=+A,_):x},_}const Ib=L.createContext(null),jge=Ib.Provider,Hl={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`},qF=Hl.error001();function Mn(e,t){const n=L.useContext(Ib);if(n===null)throw new Error(qF);return cfe(n,e,t)}const qr=()=>{const e=L.useContext(Ib);if(e===null)throw new Error(qF);return L.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},Gge=e=>e.userSelectionActive?"none":"all";function Hge({position:e,children:t,className:n,style:r,...i}){const o=Mn(Gge),s=`${e}`.split("-");return ue.jsx("div",{className:Eo(["react-flow__panel",n,...s]),style:{...r,pointerEvents:o},...i,children:t})}function Wge({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:ue.jsx(Hge,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:ue.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const qge=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:l,className:u,...d})=>{const f=L.useRef(null),[p,g]=L.useState({x:0,y:0,width:0,height:0}),m=Eo(["react-flow__edge-textwrapper",u]);return L.useEffect(()=>{if(f.current){const v=f.current.getBBox();g({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),typeof n>"u"||!n?null:ue.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:m,visibility:p.width?"visible":"hidden",...d,children:[i&&ue.jsx("rect",{width:p.width+2*s[0],x:-s[0],y:-s[1],height:p.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:a,ry:a}),ue.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:f,style:r,children:n}),l]})};var Kge=L.memo(qge);const WT=e=>({width:e.offsetWidth,height:e.offsetHeight}),Af=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),qT=(e={x:0,y:0},t)=>({x:Af(e.x,t[0][0],t[1][0]),y:Af(e.y,t[0][1],t[1][1])}),OR=(e,t,n)=>e<t?Af(Math.abs(e-t),1,50)/50:e>n?-Af(Math.abs(e-n),1,50)/50:0,KF=(e,t)=>{const n=OR(e.x,35,t.width-35)*20,r=OR(e.y,35,t.height-35)*20;return[n,r]},XF=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},YF=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),F1=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),QF=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),kR=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),NIe=(e,t)=>QF(YF(F1(e),F1(t))),j3=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Xge=e=>_o(e.width)&&_o(e.height)&&_o(e.x)&&_o(e.y),_o=e=>!isNaN(e)&&isFinite(e),nr=Symbol.for("internals"),ZF=["Enter"," ","Escape"],Yge=(e,t)=>{},Qge=e=>"nativeEvent"in e;function G3(e){var i,o;const t=Qge(e)?e.nativeEvent:e,n=((o=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:o[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const JF=e=>"clientX"in e,Il=(e,t)=>{var o,s;const n=JF(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},_m=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:g=20})=>ue.jsxs(ue.Fragment,{children:[ue.jsx("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:p}),g&&ue.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}),i&&_o(n)&&_o(r)?ue.jsx(Kge,{x:n,y:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u}):null]});_m.displayName="BaseEdge";function Wh(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(o=>o.id===e);i&&n(r,{...i})}}function eB({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[o,a,i,s]}function tB({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:a}){const l=e*.125+i*.375+s*.375+n*.125,u=t*.125+o*.375+a*.375+r*.125,d=Math.abs(l-e),f=Math.abs(u-t);return[l,u,d,f]}var sc;(function(e){e.Strict="strict",e.Loose="loose"})(sc||(sc={}));var nf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(nf||(nf={}));var Og;(function(e){e.Partial="partial",e.Full="full"})(Og||(Og={}));var yl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(yl||(yl={}));var B1;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(B1||(B1={}));var Ne;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ne||(Ne={}));function IR({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ne.Left||e===Ne.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function nB({sourceX:e,sourceY:t,sourcePosition:n=Ne.Bottom,targetX:r,targetY:i,targetPosition:o=Ne.Top}){const[s,a]=IR({pos:n,x1:e,y1:t,x2:r,y2:i}),[l,u]=IR({pos:o,x1:r,y1:i,x2:e,y2:t}),[d,f,p,g]=tB({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${a} ${l},${u} ${r},${i}`,d,f,p,g]}const KT=L.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Ne.Bottom,targetPosition:o=Ne.Top,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:m,interactionWidth:v})=>{const[x,_,b]=nB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o});return ue.jsx(_m,{path:x,labelX:_,labelY:b,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:m,interactionWidth:v})});KT.displayName="SimpleBezierEdge";const MR={[Ne.Left]:{x:-1,y:0},[Ne.Right]:{x:1,y:0},[Ne.Top]:{x:0,y:-1},[Ne.Bottom]:{x:0,y:1}},Zge=({source:e,sourcePosition:t=Ne.Bottom,target:n})=>t===Ne.Left||t===Ne.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},NR=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Jge({source:e,sourcePosition:t=Ne.Bottom,target:n,targetPosition:r=Ne.Top,center:i,offset:o}){const s=MR[t],a=MR[r],l={x:e.x+s.x*o,y:e.y+s.y*o},u={x:n.x+a.x*o,y:n.y+a.y*o},d=Zge({source:l,sourcePosition:t,target:u}),f=d.x!==0?"x":"y",p=d[f];let g=[],m,v;const[x,_,b,y]=eB({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*a[f]===-1){m=i.x||x,v=i.y||_;const C=[{x:m,y:l.y},{x:m,y:u.y}],T=[{x:l.x,y:v},{x:u.x,y:v}];s[f]===p?g=f==="x"?C:T:g=f==="x"?T:C}else{const C=[{x:l.x,y:u.y}],T=[{x:u.x,y:l.y}];if(f==="x"?g=s.x===p?T:C:g=s.y===p?C:T,t!==r){const E=f==="x"?"y":"x",P=s[f]===a[E],k=l[E]>u[E],O=l[E]<u[E];(s[f]===1&&(!P&&k||P&&O)||s[f]!==1&&(!P&&O||P&&k))&&(g=f==="x"?C:T)}m=g[0].x,v=g[0].y}return[[e,l,...g,u,n],m,v,b,y]}function eme(e,t,n,r){const i=Math.min(NR(e,t)/2,NR(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${o+i*u},${s}Q ${o},${s} ${o},${s+i*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${o},${s+i*l}Q ${o},${s} ${o+i*a},${s}`}function H3({sourceX:e,sourceY:t,sourcePosition:n=Ne.Bottom,targetX:r,targetY:i,targetPosition:o=Ne.Top,borderRadius:s=5,centerX:a,centerY:l,offset:u=20}){const[d,f,p,g,m]=Jge({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:a,y:l},offset:u});return[d.reduce((x,_,b)=>{let y="";return b>0&&b<d.length-1?y=eme(d[b-1],_,d[b+1],s):y=`${b===0?"M":"L"}${_.x} ${_.y}`,x+=y,x},""),f,p,g,m]}const Mb=L.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:d,sourcePosition:f=Ne.Bottom,targetPosition:p=Ne.Top,markerEnd:g,markerStart:m,pathOptions:v,interactionWidth:x})=>{const[_,b,y]=H3({sourceX:e,sourceY:t,sourcePosition:f,targetX:n,targetY:r,targetPosition:p,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset});return ue.jsx(_m,{path:_,labelX:b,labelY:y,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:g,markerStart:m,interactionWidth:x})});Mb.displayName="SmoothStepEdge";const XT=L.memo(e=>{var t;return ue.jsx(Mb,{...e,pathOptions:L.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});XT.displayName="StepEdge";function tme({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,a]=eB({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,a]}const YT=L.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:g})=>{const[m,v,x]=tme({sourceX:e,sourceY:t,targetX:n,targetY:r});return ue.jsx(_m,{path:m,labelX:v,labelY:x,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:g})});YT.displayName="StraightEdge";function E0(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function LR({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Ne.Left:return[t-E0(t-r,o),n];case Ne.Right:return[t+E0(r-t,o),n];case Ne.Top:return[t,n-E0(n-i,o)];case Ne.Bottom:return[t,n+E0(i-n,o)]}}function rB({sourceX:e,sourceY:t,sourcePosition:n=Ne.Bottom,targetX:r,targetY:i,targetPosition:o=Ne.Top,curvature:s=.25}){const[a,l]=LR({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[u,d]=LR({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[f,p,g,m]=tB({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${a},${l} ${u},${d} ${r},${i}`,f,p,g,m]}const U1=L.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Ne.Bottom,targetPosition:o=Ne.Top,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:m,pathOptions:v,interactionWidth:x})=>{const[_,b,y]=rB({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:o,curvature:v==null?void 0:v.curvature});return ue.jsx(_m,{path:_,labelX:b,labelY:y,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:m,interactionWidth:x})});U1.displayName="BezierEdge";const QT=L.createContext(null),nme=QT.Provider;QT.Consumer;const rme=()=>L.useContext(QT),ime=e=>"id"in e&&"source"in e&&"target"in e,ome=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,W3=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,sme=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),iB=(e,t)=>{if(!e.source||!e.target)return t;let n;return ime(e)?n={...e}:n={...e,id:ome(e)},sme(n,t)?t:t.concat(n)},oB=({x:e,y:t},[n,r,i],o,[s,a])=>{const l={x:(e-n)/i,y:(t-r)/i};return o?{x:s*Math.round(l.x/s),y:a*Math.round(l.y/a)}:l},ame=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),rf=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},sB=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:o,y:s}=rf(i,t).positionAbsolute;return YF(r,F1({x:o,y:s,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return QF(n)},aB=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1,a=[0,0])=>{const l={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},u=[];return e.forEach(d=>{const{width:f,height:p,selectable:g=!0,hidden:m=!1}=d;if(s&&!g||m)return!1;const{positionAbsolute:v}=rf(d,a),x={x:v.x,y:v.y,width:f||0,height:p||0},_=j3(l,x),b=typeof f>"u"||typeof p>"u"||f===null||p===null,y=o&&_>0,S=(f||0)*(p||0);(b||y||_>=S||d.dragging)&&u.push(d)}),u},lB=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},uB=(e,t,n,r,i,o=.1)=>{const s=t/(e.width*(1+o)),a=n/(e.height*(1+o)),l=Math.min(s,a),u=Af(l,r,i),d=e.x+e.width/2,f=e.y+e.height/2,p=t/2-d*u,g=n/2-f*u;return[p,g,u]},Au=(e,t=0)=>e.transition().duration(t);function DR(e,t,n,r){return(t[n]||[]).reduce((i,o)=>{var s,a;return`${e.id}-${o.id}-${n}`!==r&&i.push({id:o.id||null,type:n,nodeId:e.id,x:(((s=e.positionAbsolute)==null?void 0:s.x)??0)+o.x+o.width/2,y:(((a=e.positionAbsolute)==null?void 0:a.y)??0)+o.y+o.height/2}),i},[])}function lme(e,t,n,r,i,o){const{x:s,y:a}=Il(e),u=t.elementsFromPoint(s,a).find(m=>m.classList.contains("react-flow__handle"));if(u){const m=u.getAttribute("data-nodeid");if(m){const v=ZT(void 0,u),x=u.getAttribute("data-handleid"),_=o({nodeId:m,id:x,type:v});if(_)return{handle:{id:x,type:v,nodeId:m,x:n.x,y:n.y},validHandleResult:_}}}let d=[],f=1/0;if(i.forEach(m=>{const v=Math.sqrt((m.x-n.x)**2+(m.y-n.y)**2);if(v<=r){const x=o(m);v<=f&&(v<f?d=[{handle:m,validHandleResult:x}]:v===f&&d.push({handle:m,validHandleResult:x}),f=v)}}),!d.length)return{handle:null,validHandleResult:cB()};if(d.length===1)return d[0];const p=d.some(({validHandleResult:m})=>m.isValid),g=d.some(({handle:m})=>m.type==="target");return d.find(({handle:m,validHandleResult:v})=>g?m.type==="target":p?v.isValid:!0)||d[0]}const ume={source:null,target:null,sourceHandle:null,targetHandle:null},cB=()=>({handleDomNode:null,isValid:!1,connection:ume,endHandle:null});function dB(e,t,n,r,i,o,s){const a=i==="target",l=s.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...cB(),handleDomNode:l};if(l){const d=ZT(void 0,l),f=l.getAttribute("data-nodeid"),p=l.getAttribute("data-handleid"),g=l.classList.contains("connectable"),m=l.classList.contains("connectableend"),v={source:a?f:n,sourceHandle:a?p:r,target:a?n:f,targetHandle:a?r:p};u.connection=v,g&&m&&(t===sc.Strict?a&&d==="source"||!a&&d==="target":f!==n||p!==r)&&(u.endHandle={nodeId:f,handleId:p,type:d},u.isValid=o(v))}return u}function cme({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,o)=>{if(o[nr]){const{handleBounds:s}=o[nr];let a=[],l=[];s&&(a=DR(o,s,"source",`${t}-${n}-${r}`),l=DR(o,s,"target",`${t}-${n}-${r}`)),i.push(...a,...l)}return i},[])}function ZT(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function _x(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function dme(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function fB({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:o,setState:s,isValidConnection:a,edgeUpdaterType:l,onEdgeUpdateEnd:u}){const d=XF(e.target),{connectionMode:f,domNode:p,autoPanOnConnect:g,connectionRadius:m,onConnectStart:v,panBy:x,getNodes:_,cancelConnection:b}=o();let y=0,S;const{x:C,y:T}=Il(e),E=d==null?void 0:d.elementFromPoint(C,T),P=ZT(l,E),k=p==null?void 0:p.getBoundingClientRect();if(!k||!P)return;let O,M=Il(e,k),G=!1,U=null,A=!1,N=null;const F=cme({nodes:_(),nodeId:n,handleId:t,handleType:P}),B=()=>{if(!g)return;const[j,q]=KF(M,k);x({x:j,y:q}),y=requestAnimationFrame(B)};s({connectionPosition:M,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:P,connectionStartHandle:{nodeId:n,handleId:t,type:P},connectionEndHandle:null}),v==null||v(e,{nodeId:n,handleId:t,handleType:P});function D(j){const{transform:q}=o();M=Il(j,k);const{handle:Z,validHandleResult:ee}=lme(j,d,oB(M,q,!1,[1,1]),m,F,ie=>dB(ie,f,n,t,i?"target":"source",a,d));if(S=Z,G||(B(),G=!0),N=ee.handleDomNode,U=ee.connection,A=ee.isValid,s({connectionPosition:S&&A?ame({x:S.x,y:S.y},q):M,connectionStatus:dme(!!S,A),connectionEndHandle:ee.endHandle}),!S&&!A&&!N)return _x(O);U.source!==U.target&&N&&(_x(O),O=N,N.classList.add("connecting","react-flow__handle-connecting"),N.classList.toggle("valid",A),N.classList.toggle("react-flow__handle-valid",A))}function V(j){var q,Z;(S||N)&&U&&A&&(r==null||r(U)),(Z=(q=o()).onConnectEnd)==null||Z.call(q,j),l&&(u==null||u(j)),_x(O),b(),cancelAnimationFrame(y),G=!1,A=!1,U=null,N=null,d.removeEventListener("mousemove",D),d.removeEventListener("mouseup",V),d.removeEventListener("touchmove",D),d.removeEventListener("touchend",V)}d.addEventListener("mousemove",D),d.addEventListener("mouseup",V),d.addEventListener("touchmove",D),d.addEventListener("touchend",V)}const $R=()=>!0,fme=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),hme=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:o,connectionClickStartHandle:s}=r;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n||(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===n}},hB=L.forwardRef(({type:e="source",position:t=Ne.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:a,children:l,className:u,onMouseDown:d,onTouchStart:f,...p},g)=>{var k,O;const m=s||null,v=e==="target",x=qr(),_=rme(),{connectOnClick:b,noPanClassName:y}=Mn(fme,Ri),{connecting:S,clickConnecting:C}=Mn(hme(_,m,e),Ri);_||(O=(k=x.getState()).onError)==null||O.call(k,"010",Hl.error010());const T=M=>{const{defaultEdgeOptions:G,onConnect:U,hasDefaultEdges:A}=x.getState(),N={...G,...M};if(A){const{edges:F,setEdges:B}=x.getState();B(iB(N,F))}U==null||U(N),a==null||a(N)},E=M=>{if(!_)return;const G=JF(M);i&&(G&&M.button===0||!G)&&fB({event:M,handleId:m,nodeId:_,onConnect:T,isTarget:v,getState:x.getState,setState:x.setState,isValidConnection:n||x.getState().isValidConnection||$R}),G?d==null||d(M):f==null||f(M)},P=M=>{const{onClickConnectStart:G,onClickConnectEnd:U,connectionClickStartHandle:A,connectionMode:N,isValidConnection:F}=x.getState();if(!_||!A&&!i)return;if(!A){G==null||G(M,{nodeId:_,handleId:m,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:_,type:e,handleId:m}});return}const B=XF(M.target),D=n||F||$R,{connection:V,isValid:j}=dB({nodeId:_,id:m,type:e},N,A.nodeId,A.handleId||null,A.type,D,B);j&&T(V),U==null||U(M),x.setState({connectionClickStartHandle:null})};return ue.jsx("div",{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${_}-${m}-${e}`,className:Eo(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!v,target:v,connectable:r,connectablestart:i,connectableend:o,connecting:C,connectionindicator:r&&(i&&!S||o&&S)}]),onMouseDown:E,onTouchStart:E,onClick:b?P:void 0,ref:g,...p,children:l})});hB.displayName="Handle";var z1=L.memo(hB);const pB=({data:e,isConnectable:t,targetPosition:n=Ne.Top,sourcePosition:r=Ne.Bottom})=>ue.jsxs(ue.Fragment,{children:[ue.jsx(z1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,ue.jsx(z1,{type:"source",position:r,isConnectable:t})]});pB.displayName="DefaultNode";var q3=L.memo(pB);const gB=({data:e,isConnectable:t,sourcePosition:n=Ne.Bottom})=>ue.jsxs(ue.Fragment,{children:[e==null?void 0:e.label,ue.jsx(z1,{type:"source",position:n,isConnectable:t})]});gB.displayName="InputNode";var mB=L.memo(gB);const yB=({data:e,isConnectable:t,targetPosition:n=Ne.Top})=>ue.jsxs(ue.Fragment,{children:[ue.jsx(z1,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]});yB.displayName="OutputNode";var vB=L.memo(yB);const JT=()=>null;JT.displayName="GroupNode";const pme=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),A0=e=>e.id;function gme(e,t){return Ri(e.selectedNodes.map(A0),t.selectedNodes.map(A0))&&Ri(e.selectedEdges.map(A0),t.selectedEdges.map(A0))}const _B=L.memo(({onSelectionChange:e})=>{const t=qr(),{selectedNodes:n,selectedEdges:r}=Mn(pme,gme);return L.useEffect(()=>{var o,s;const i={nodes:n,edges:r};e==null||e(i),(s=(o=t.getState()).onSelectionChange)==null||s.call(o,i)},[n,r,e]),null});_B.displayName="SelectionListener";const mme=e=>!!e.onSelectionChange;function yme({onSelectionChange:e}){const t=Mn(mme);return e||t?ue.jsx(_B,{onSelectionChange:e}):null}const vme=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function rd(e,t){L.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function at(e,t,n){L.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const _me=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:o,onConnectEnd:s,onClickConnectStart:a,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:p,edgesUpdatable:g,elevateNodesOnSelect:m,minZoom:v,maxZoom:x,nodeExtent:_,onNodesChange:b,onEdgesChange:y,elementsSelectable:S,connectionMode:C,snapGrid:T,snapToGrid:E,translateExtent:P,connectOnClick:k,defaultEdgeOptions:O,fitView:M,fitViewOptions:G,onNodesDelete:U,onEdgesDelete:A,onNodeDrag:N,onNodeDragStart:F,onNodeDragStop:B,onSelectionDrag:D,onSelectionDragStart:V,onSelectionDragStop:j,noPanClassName:q,nodeOrigin:Z,rfId:ee,autoPanOnConnect:ie,autoPanOnNodeDrag:se,onError:le,connectionRadius:W,isValidConnection:ne})=>{const{setNodes:fe,setEdges:pe,setDefaultNodesAndEdges:ve,setMinZoom:ye,setMaxZoom:We,setTranslateExtent:Me,setNodeExtent:Ee,reset:lt}=Mn(vme,Ri),_e=qr();return L.useEffect(()=>{const jt=r==null?void 0:r.map(Hn=>({...Hn,...O}));return ve(n,jt),()=>{lt()}},[]),at("defaultEdgeOptions",O,_e.setState),at("connectionMode",C,_e.setState),at("onConnect",i,_e.setState),at("onConnectStart",o,_e.setState),at("onConnectEnd",s,_e.setState),at("onClickConnectStart",a,_e.setState),at("onClickConnectEnd",l,_e.setState),at("nodesDraggable",u,_e.setState),at("nodesConnectable",d,_e.setState),at("nodesFocusable",f,_e.setState),at("edgesFocusable",p,_e.setState),at("edgesUpdatable",g,_e.setState),at("elementsSelectable",S,_e.setState),at("elevateNodesOnSelect",m,_e.setState),at("snapToGrid",E,_e.setState),at("snapGrid",T,_e.setState),at("onNodesChange",b,_e.setState),at("onEdgesChange",y,_e.setState),at("connectOnClick",k,_e.setState),at("fitViewOnInit",M,_e.setState),at("fitViewOnInitOptions",G,_e.setState),at("onNodesDelete",U,_e.setState),at("onEdgesDelete",A,_e.setState),at("onNodeDrag",N,_e.setState),at("onNodeDragStart",F,_e.setState),at("onNodeDragStop",B,_e.setState),at("onSelectionDrag",D,_e.setState),at("onSelectionDragStart",V,_e.setState),at("onSelectionDragStop",j,_e.setState),at("noPanClassName",q,_e.setState),at("nodeOrigin",Z,_e.setState),at("rfId",ee,_e.setState),at("autoPanOnConnect",ie,_e.setState),at("autoPanOnNodeDrag",se,_e.setState),at("onError",le,_e.setState),at("connectionRadius",W,_e.setState),at("isValidConnection",ne,_e.setState),rd(e,fe),rd(t,pe),rd(v,ye),rd(x,We),rd(P,Me),rd(_,Ee),null},FR={display:"none"},bme={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},bB="react-flow__node-desc",SB="react-flow__edge-desc",Sme="react-flow__aria-live",wme=e=>e.ariaLiveMessage;function xme({rfId:e}){const t=Mn(wme);return ue.jsx("div",{id:`${Sme}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:bme,children:t})}function Cme({rfId:e,disableKeyboardA11y:t}){return ue.jsxs(ue.Fragment,{children:[ue.jsxs("div",{id:`${bB}-${e}`,style:FR,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),ue.jsx("div",{id:`${SB}-${e}`,style:FR,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&ue.jsx(xme,{rfId:e})]})}const Tme=(e,t,n)=>n===Ne.Left?e-t:n===Ne.Right?e+t:e,Eme=(e,t,n)=>n===Ne.Top?e-t:n===Ne.Bottom?e+t:e,BR="react-flow__edgeupdater",UR=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:a})=>ue.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:Eo([BR,`${BR}-${a}`]),cx:Tme(t,r,e),cy:Eme(n,r,e),r,stroke:"transparent",fill:"transparent"}),Ame=()=>!0;var id=e=>{const t=({id:n,className:r,type:i,data:o,onClick:s,onEdgeDoubleClick:a,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:p,labelBgStyle:g,labelBgPadding:m,labelBgBorderRadius:v,style:x,source:_,target:b,sourceX:y,sourceY:S,targetX:C,targetY:T,sourcePosition:E,targetPosition:P,elementsSelectable:k,hidden:O,sourceHandleId:M,targetHandleId:G,onContextMenu:U,onMouseEnter:A,onMouseMove:N,onMouseLeave:F,edgeUpdaterRadius:B,onEdgeUpdate:D,onEdgeUpdateStart:V,onEdgeUpdateEnd:j,markerEnd:q,markerStart:Z,rfId:ee,ariaLabel:ie,isFocusable:se,isUpdatable:le,pathOptions:W,interactionWidth:ne})=>{const fe=L.useRef(null),[pe,ve]=L.useState(!1),[ye,We]=L.useState(!1),Me=qr(),Ee=L.useMemo(()=>`url(#${W3(Z,ee)})`,[Z,ee]),lt=L.useMemo(()=>`url(#${W3(q,ee)})`,[q,ee]);if(O)return null;const _e=sn=>{const{edges:Gt,addSelectedEdges:vr}=Me.getState();if(k&&(Me.setState({nodesSelectionActive:!1}),vr([n])),s){const Lr=Gt.find(Xr=>Xr.id===n);s(sn,Lr)}},jt=Wh(n,Me.getState,a),Hn=Wh(n,Me.getState,U),Bt=Wh(n,Me.getState,A),it=Wh(n,Me.getState,N),gt=Wh(n,Me.getState,F),Jt=(sn,Gt)=>{if(sn.button!==0)return;const{edges:vr,isValidConnection:Lr}=Me.getState(),Xr=Gt?b:_,Ii=(Gt?G:M)||null,En=Gt?"target":"source",Yr=Lr||Ame,Vs=Gt,Ji=vr.find(Ot=>Ot.id===n);We(!0),V==null||V(sn,Ji,En);const js=Ot=>{We(!1),j==null||j(Ot,Ji,En)};fB({event:sn,handleId:Ii,nodeId:Xr,onConnect:Ot=>D==null?void 0:D(Ji,Ot),isTarget:Vs,getState:Me.getState,setState:Me.setState,isValidConnection:Yr,edgeUpdaterType:En,onEdgeUpdateEnd:js})},Nr=sn=>Jt(sn,!0),yr=sn=>Jt(sn,!1),hi=()=>ve(!0),wn=()=>ve(!1),on=!k&&!s,Wn=sn=>{var Gt;if(ZF.includes(sn.key)&&k){const{unselectNodesAndEdges:vr,addSelectedEdges:Lr,edges:Xr}=Me.getState();sn.key==="Escape"?((Gt=fe.current)==null||Gt.blur(),vr({edges:[Xr.find(En=>En.id===n)]})):Lr([n])}};return ue.jsxs("g",{className:Eo(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:l,animated:u,inactive:on,updating:pe}]),onClick:_e,onDoubleClick:jt,onContextMenu:Hn,onMouseEnter:Bt,onMouseMove:it,onMouseLeave:gt,onKeyDown:se?Wn:void 0,tabIndex:se?0:void 0,role:se?"button":void 0,"data-testid":`rf__edge-${n}`,"aria-label":ie===null?void 0:ie||`Edge from ${_} to ${b}`,"aria-describedby":se?`${SB}-${ee}`:void 0,ref:fe,children:[!ye&&ue.jsx(e,{id:n,source:_,target:b,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:p,labelBgStyle:g,labelBgPadding:m,labelBgBorderRadius:v,data:o,style:x,sourceX:y,sourceY:S,targetX:C,targetY:T,sourcePosition:E,targetPosition:P,sourceHandleId:M,targetHandleId:G,markerStart:Ee,markerEnd:lt,pathOptions:W,interactionWidth:ne}),le&&ue.jsxs(ue.Fragment,{children:[(le==="source"||le===!0)&&ue.jsx(UR,{position:E,centerX:y,centerY:S,radius:B,onMouseDown:Nr,onMouseEnter:hi,onMouseOut:wn,type:"source"}),(le==="target"||le===!0)&&ue.jsx(UR,{position:P,centerX:C,centerY:T,radius:B,onMouseDown:yr,onMouseEnter:hi,onMouseOut:wn,type:"target"})]})]})};return t.displayName="EdgeWrapper",L.memo(t)};function Pme(e){const t={default:id(e.default||U1),straight:id(e.bezier||YT),step:id(e.step||XT),smoothstep:id(e.step||Mb),simplebezier:id(e.simplebezier||KT)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,o)=>(i[o]=id(e[o]||U1),i),n);return{...t,...r}}function zR(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,i=((n==null?void 0:n.y)||0)+t.y,o=(n==null?void 0:n.width)||t.width,s=(n==null?void 0:n.height)||t.height;switch(e){case Ne.Top:return{x:r+o/2,y:i};case Ne.Right:return{x:r+o,y:i+s/2};case Ne.Bottom:return{x:r+o/2,y:i+s};case Ne.Left:return{x:r,y:i+s/2}}}function VR(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const Rme=(e,t,n,r,i,o)=>{const s=zR(n,e,t),a=zR(o,r,i);return{sourceX:s.x,sourceY:s.y,targetX:a.x,targetY:a.y}};function Ome({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:s,height:a,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+o)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const d=F1({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:a/l[2]}),f=Math.max(0,Math.min(d.x2,u.x2)-Math.max(d.x,u.x)),p=Math.max(0,Math.min(d.y2,u.y2)-Math.max(d.y,u.y));return Math.ceil(f*p)>0}function jR(e){var r,i,o,s,a;const t=((r=e==null?void 0:e[nr])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)<"u";return[{x:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.x)||0,y:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}function wB(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:wB(n,t):!1}function GR(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function kme(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||!wB(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var o,s;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((o=i.positionAbsolute)==null?void 0:o.x)??0),y:n.y-(((s=i.positionAbsolute)==null?void 0:s.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode,width:i.width,height:i.height}})}function Ime(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function xB(e,t,n,r,i=[0,0],o){const s=Ime(e,e.extent||r);let a=s;if(e.extent==="parent")if(e.parentNode&&e.width&&e.height){const d=n.get(e.parentNode),{x:f,y:p}=rf(d,i).positionAbsolute;a=d&&_o(f)&&_o(p)&&_o(d.width)&&_o(d.height)?[[f+e.width*i[0],p+e.height*i[1]],[f+d.width-e.width+e.width*i[0],p+d.height-e.height+e.height*i[1]]]:a}else o==null||o("005",Hl.error005()),a=s;else if(e.extent&&e.parentNode){const d=n.get(e.parentNode),{x:f,y:p}=rf(d,i).positionAbsolute;a=[[e.extent[0][0]+f,e.extent[0][1]+p],[e.extent[1][0]+f,e.extent[1][1]+p]]}let l={x:0,y:0};if(e.parentNode){const d=n.get(e.parentNode);l=rf(d,i).positionAbsolute}const u=a?qT(t,a):t;return{position:{x:u.x-l.x,y:u.y-l.y},positionAbsolute:u}}function bx({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const HR=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const o=Array.from(i),s=t.getBoundingClientRect(),a={x:s.width*r[0],y:s.height*r[1]};return o.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-s.left-a.x)/n,y:(u.top-s.top-a.y)/n,...WT(l)}})};function qh(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);n(r,{...i})}}function K3({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeInternals:a}=t.getState(),l=a.get(e);t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&s)&&(o({nodes:[l]}),requestAnimationFrame(()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.blur()})):i([e])}function Mme(){const e=qr();return L.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:o}=e.getState(),s=n.touches?n.touches[0].clientX:n.clientX,a=n.touches?n.touches[0].clientY:n.clientY,l={x:(s-r[0])/r[2],y:(a-r[1])/r[2]};return{xSnapped:o?i[0]*Math.round(l.x/i[0]):l.x,ySnapped:o?i[1]*Math.round(l.y/i[1]):l.y,...l}},[])}function Sx(e){return(t,n,r)=>e==null?void 0:e(t,r)}function CB({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,selectNodesOnDrag:s}){const a=qr(),[l,u]=L.useState(!1),d=L.useRef([]),f=L.useRef({x:null,y:null}),p=L.useRef(0),g=L.useRef(null),m=L.useRef({x:0,y:0}),v=L.useRef(null),x=L.useRef(!1),_=Mme();return L.useEffect(()=>{if(e!=null&&e.current){const b=Vo(e.current),y=({x:C,y:T})=>{const{nodeInternals:E,onNodeDrag:P,onSelectionDrag:k,updateNodePositions:O,nodeExtent:M,snapGrid:G,snapToGrid:U,nodeOrigin:A,onError:N}=a.getState();f.current={x:C,y:T};let F=!1;if(d.current=d.current.map(D=>{const V={x:C-D.distance.x,y:T-D.distance.y};U&&(V.x=G[0]*Math.round(V.x/G[0]),V.y=G[1]*Math.round(V.y/G[1]));const j=xB(D,V,E,M,A,N);return F=F||D.position.x!==j.position.x||D.position.y!==j.position.y,D.position=j.position,D.positionAbsolute=j.positionAbsolute,D}),!F)return;O(d.current,!0,!0),u(!0);const B=i?P:Sx(k);if(B&&v.current){const[D,V]=bx({nodeId:i,dragItems:d.current,nodeInternals:E});B(v.current,D,V)}},S=()=>{if(!g.current)return;const[C,T]=KF(m.current,g.current);if(C!==0||T!==0){const{transform:E,panBy:P}=a.getState();f.current.x=(f.current.x??0)-C/E[2],f.current.y=(f.current.y??0)-T/E[2],P({x:C,y:T})&&y(f.current)}p.current=requestAnimationFrame(S)};if(t)b.on(".drag",null);else{const C=Zhe().on("start",T=>{var F;const{nodeInternals:E,multiSelectionActive:P,domNode:k,nodesDraggable:O,unselectNodesAndEdges:M,onNodeDragStart:G,onSelectionDragStart:U}=a.getState(),A=i?G:Sx(U);!s&&!P&&i&&((F=E.get(i))!=null&&F.selected||M()),i&&o&&s&&K3({id:i,store:a,nodeRef:e});const N=_(T);if(f.current=N,d.current=kme(E,O,N,i),A&&d.current){const[B,D]=bx({nodeId:i,dragItems:d.current,nodeInternals:E});A(T.sourceEvent,B,D)}g.current=(k==null?void 0:k.getBoundingClientRect())||null,m.current=Il(T.sourceEvent,g.current)}).on("drag",T=>{const E=_(T),{autoPanOnNodeDrag:P}=a.getState();!x.current&&P&&(x.current=!0,S()),(f.current.x!==E.xSnapped||f.current.y!==E.ySnapped)&&d.current&&(v.current=T.sourceEvent,m.current=Il(T.sourceEvent,g.current),y(E))}).on("end",T=>{if(u(!1),x.current=!1,cancelAnimationFrame(p.current),d.current){const{updateNodePositions:E,nodeInternals:P,onNodeDragStop:k,onSelectionDragStop:O}=a.getState(),M=i?k:Sx(O);if(E(d.current,!1,!1),M){const[G,U]=bx({nodeId:i,dragItems:d.current,nodeInternals:P});M(T.sourceEvent,G,U)}}}).filter(T=>{const E=T.target;return!T.button&&(!n||!GR(E,`.${n}`,e))&&(!r||GR(E,r,e))});return b.call(C),()=>{b.on(".drag",null)}}}},[e,t,n,r,o,a,i,s,_]),l}function TB(){const e=qr();return L.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:o,getNodes:s,snapToGrid:a,snapGrid:l,onError:u,nodesDraggable:d}=e.getState(),f=s().filter(b=>b.selected&&(b.draggable||d&&typeof b.draggable>"u")),p=a?l[0]:5,g=a?l[1]:5,m=n.isShiftPressed?4:1,v=n.x*p*m,x=n.y*g*m,_=f.map(b=>{if(b.positionAbsolute){const y={x:b.positionAbsolute.x+v,y:b.positionAbsolute.y+x};a&&(y.x=l[0]*Math.round(y.x/l[0]),y.y=l[1]*Math.round(y.y/l[1]));const{positionAbsolute:S,position:C}=xB(b,y,r,i,void 0,u);b.position=C,b.positionAbsolute=S}return b});o(_,!0,!1)},[])}const of={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Kh=e=>{const t=({id:n,type:r,data:i,xPos:o,yPos:s,xPosOrigin:a,yPosOrigin:l,selected:u,onClick:d,onMouseEnter:f,onMouseMove:p,onMouseLeave:g,onContextMenu:m,onDoubleClick:v,style:x,className:_,isDraggable:b,isSelectable:y,isConnectable:S,isFocusable:C,selectNodesOnDrag:T,sourcePosition:E,targetPosition:P,hidden:k,resizeObserver:O,dragHandle:M,zIndex:G,isParent:U,noDragClassName:A,noPanClassName:N,initialized:F,disableKeyboardA11y:B,ariaLabel:D,rfId:V})=>{const j=qr(),q=L.useRef(null),Z=L.useRef(E),ee=L.useRef(P),ie=L.useRef(r),se=y||b||d||f||p||g,le=TB(),W=qh(n,j.getState,f),ne=qh(n,j.getState,p),fe=qh(n,j.getState,g),pe=qh(n,j.getState,m),ve=qh(n,j.getState,v),ye=Ee=>{if(y&&(!T||!b)&&K3({id:n,store:j,nodeRef:q}),d){const lt=j.getState().nodeInternals.get(n);d(Ee,{...lt})}},We=Ee=>{if(!G3(Ee))if(ZF.includes(Ee.key)&&y){const lt=Ee.key==="Escape";K3({id:n,store:j,unselect:lt,nodeRef:q})}else!B&&b&&u&&Object.prototype.hasOwnProperty.call(of,Ee.key)&&(j.setState({ariaLiveMessage:`Moved selected node ${Ee.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~s}`}),le({x:of[Ee.key].x,y:of[Ee.key].y,isShiftPressed:Ee.shiftKey}))};L.useEffect(()=>{if(q.current&&!k){const Ee=q.current;return O==null||O.observe(Ee),()=>O==null?void 0:O.unobserve(Ee)}},[k]),L.useEffect(()=>{const Ee=ie.current!==r,lt=Z.current!==E,_e=ee.current!==P;q.current&&(Ee||lt||_e)&&(Ee&&(ie.current=r),lt&&(Z.current=E),_e&&(ee.current=P),j.getState().updateNodeDimensions([{id:n,nodeElement:q.current,forceUpdate:!0}]))},[n,r,E,P]);const Me=CB({nodeRef:q,disabled:k||!b,noDragClassName:A,handleSelector:M,nodeId:n,isSelectable:y,selectNodesOnDrag:T});return k?null:ue.jsx("div",{className:Eo(["react-flow__node",`react-flow__node-${r}`,{[N]:b},_,{selected:u,selectable:y,parent:U,dragging:Me}]),ref:q,style:{zIndex:G,transform:`translate(${a}px,${l}px)`,pointerEvents:se?"all":"none",visibility:F?"visible":"hidden",...x},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:W,onMouseMove:ne,onMouseLeave:fe,onContextMenu:pe,onClick:ye,onDoubleClick:ve,onKeyDown:C?We:void 0,tabIndex:C?0:void 0,role:C?"button":void 0,"aria-describedby":B?void 0:`${bB}-${V}`,"aria-label":D,children:ue.jsx(nme,{value:n,children:ue.jsx(e,{id:n,data:i,type:r,xPos:o,yPos:s,selected:u,isConnectable:S,sourcePosition:E,targetPosition:P,dragging:Me,dragHandle:M,zIndex:G})})})};return t.displayName="NodeWrapper",L.memo(t)};function Nme(e){const t={input:Kh(e.input||mB),default:Kh(e.default||q3),output:Kh(e.output||vB),group:Kh(e.group||JT)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,o)=>(i[o]=Kh(e[o]||q3),i),n);return{...t,...r}}const Lme=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},Dme=typeof document<"u"?document:null;var kg=(e=null,t={target:Dme})=>{const[n,r]=L.useState(!1),i=L.useRef(!1),o=L.useRef(new Set([])),[s,a]=L.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return L.useEffect(()=>{var l,u;if(e!==null){const d=g=>{if(i.current=g.ctrlKey||g.metaKey||g.shiftKey,!i.current&&G3(g))return!1;const m=qR(g.code,a);o.current.add(g[m]),WR(s,o.current,!1)&&(g.preventDefault(),r(!0))},f=g=>{if(!i.current&&G3(g))return!1;const m=qR(g.code,a);WR(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(g[m]),i.current=!1},p=()=>{o.current.clear(),r(!1)};return(l=t==null?void 0:t.target)==null||l.addEventListener("keydown",d),(u=t==null?void 0:t.target)==null||u.addEventListener("keyup",f),window.addEventListener("blur",p),()=>{var g,m;(g=t==null?void 0:t.target)==null||g.removeEventListener("keydown",d),(m=t==null?void 0:t.target)==null||m.removeEventListener("keyup",f),window.removeEventListener("blur",p)}}},[e,r]),n};function WR(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function qR(e,t){return t.includes(e)?"code":"key"}function EB(e,t,n,r){var s,a;if(!e.parentNode)return n;const i=t.get(e.parentNode),o=rf(i,r);return EB(i,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(((s=i[nr])==null?void 0:s.z)??0)>(n.z??0)?((a=i[nr])==null?void 0:a.z)??0:n.z??0},r)}function AB(e,t,n){e.forEach(r=>{var i;if(r.parentNode&&!e.has(r.parentNode))throw new Error(`Parent node ${r.parentNode} not found`);if(r.parentNode||n!=null&&n[r.id]){const{x:o,y:s,z:a}=EB(r,e,{...r.position,z:((i=r[nr])==null?void 0:i.z)??0},t);r.positionAbsolute={x:o,y:s},r[nr].z=a,n!=null&&n[r.id]&&(r[nr].isParent=!0)}})}function wx(e,t,n,r){const i=new Map,o={},s=r?1e3:0;return e.forEach(a=>{var f;const l=(_o(a.zIndex)?a.zIndex:0)+(a.selected?s:0),u=t.get(a.id),d={width:u==null?void 0:u.width,height:u==null?void 0:u.height,...a,positionAbsolute:{x:a.position.x,y:a.position.y}};a.parentNode&&(d.parentNode=a.parentNode,o[a.parentNode]=!0),Object.defineProperty(d,nr,{enumerable:!1,value:{handleBounds:(f=u==null?void 0:u[nr])==null?void 0:f.handleBounds,z:l}}),i.set(a.id,d)}),AB(i,n,o),i}function PB(e,t={}){const{getNodes:n,width:r,height:i,minZoom:o,maxZoom:s,d3Zoom:a,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:d,nodeOrigin:f}=e(),p=t.initial&&!u&&d;if(a&&l&&(p||!t.initial)){const m=n().filter(x=>{var b;const _=t.includeHiddenNodes?x.width&&x.height:!x.hidden;return(b=t.nodes)!=null&&b.length?_&&t.nodes.some(y=>y.id===x.id):_}),v=m.every(x=>x.width&&x.height);if(m.length>0&&v){const x=sB(m,f),[_,b,y]=uB(x,r,i,t.minZoom??o,t.maxZoom??s,t.padding??.1),S=kl.translate(_,b).scale(y);return typeof t.duration=="number"&&t.duration>0?a.transform(Au(l,t.duration),S):a.transform(l,S),!0}}return!1}function $me(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[nr]:r[nr],selected:n.selected})}),new Map(t)}function Fme(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function P0({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:o,onNodesChange:s,onEdgesChange:a,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:$me(e,i)}),s==null||s(e)),t!=null&&t.length&&(u&&r({edges:Fme(t,o)}),a==null||a(t))}const od=()=>{},Bme={zoomIn:od,zoomOut:od,zoomTo:od,getZoom:()=>1,setViewport:od,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:od,fitBounds:od,project:e=>e,viewportInitialized:!1},Ume=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),zme=()=>{const e=qr(),{d3Zoom:t,d3Selection:n}=Mn(Ume,Ri);return L.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(Au(n,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(Au(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,o)=>t.scaleTo(Au(n,o==null?void 0:o.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,o)=>{const[s,a,l]=e.getState().transform,u=kl.translate(i.x??s,i.y??a).scale(i.zoom??l);t.transform(Au(n,o==null?void 0:o.duration),u)},getViewport:()=>{const[i,o,s]=e.getState().transform;return{x:i,y:o,zoom:s}},fitView:i=>PB(e.getState,i),setCenter:(i,o,s)=>{const{width:a,height:l,maxZoom:u}=e.getState(),d=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:u,f=a/2-i*d,p=l/2-o*d,g=kl.translate(f,p).scale(d);t.transform(Au(n,s==null?void 0:s.duration),g)},fitBounds:(i,o)=>{const{width:s,height:a,minZoom:l,maxZoom:u}=e.getState(),[d,f,p]=uB(i,s,a,l,u,(o==null?void 0:o.padding)??.1),g=kl.translate(d,f).scale(p);t.transform(Au(n,o==null?void 0:o.duration),g)},project:i=>{const{transform:o,snapToGrid:s,snapGrid:a}=e.getState();return oB(i,o,s,a)},viewportInitialized:!0}:Bme,[t,n])};function RB(){const e=zme(),t=qr(),n=L.useCallback(()=>t.getState().getNodes().map(v=>({...v})),[]),r=L.useCallback(v=>t.getState().nodeInternals.get(v),[]),i=L.useCallback(()=>{const{edges:v=[]}=t.getState();return v.map(x=>({...x}))},[]),o=L.useCallback(v=>{const{edges:x=[]}=t.getState();return x.find(_=>_.id===v)},[]),s=L.useCallback(v=>{const{getNodes:x,setNodes:_,hasDefaultNodes:b,onNodesChange:y}=t.getState(),S=x(),C=typeof v=="function"?v(S):v;if(b)_(C);else if(y){const T=C.length===0?S.map(E=>({type:"remove",id:E.id})):C.map(E=>({item:E,type:"reset"}));y(T)}},[]),a=L.useCallback(v=>{const{edges:x=[],setEdges:_,hasDefaultEdges:b,onEdgesChange:y}=t.getState(),S=typeof v=="function"?v(x):v;if(b)_(S);else if(y){const C=S.length===0?x.map(T=>({type:"remove",id:T.id})):S.map(T=>({item:T,type:"reset"}));y(C)}},[]),l=L.useCallback(v=>{const x=Array.isArray(v)?v:[v],{getNodes:_,setNodes:b,hasDefaultNodes:y,onNodesChange:S}=t.getState();if(y){const T=[..._(),...x];b(T)}else if(S){const C=x.map(T=>({item:T,type:"add"}));S(C)}},[]),u=L.useCallback(v=>{const x=Array.isArray(v)?v:[v],{edges:_=[],setEdges:b,hasDefaultEdges:y,onEdgesChange:S}=t.getState();if(y)b([..._,...x]);else if(S){const C=x.map(T=>({item:T,type:"add"}));S(C)}},[]),d=L.useCallback(()=>{const{getNodes:v,edges:x=[],transform:_}=t.getState(),[b,y,S]=_;return{nodes:v().map(C=>({...C})),edges:x.map(C=>({...C})),viewport:{x:b,y,zoom:S}}},[]),f=L.useCallback(({nodes:v,edges:x})=>{const{nodeInternals:_,getNodes:b,edges:y,hasDefaultNodes:S,hasDefaultEdges:C,onNodesDelete:T,onEdgesDelete:E,onNodesChange:P,onEdgesChange:k}=t.getState(),O=(v||[]).map(N=>N.id),M=(x||[]).map(N=>N.id),G=b().reduce((N,F)=>{const B=!O.includes(F.id)&&F.parentNode&&N.find(V=>V.id===F.parentNode);return(typeof F.deletable=="boolean"?F.deletable:!0)&&(O.includes(F.id)||B)&&N.push(F),N},[]),U=y.filter(N=>typeof N.deletable=="boolean"?N.deletable:!0),A=U.filter(N=>M.includes(N.id));if(G||A){const N=lB(G,U),F=[...A,...N],B=F.reduce((D,V)=>(D.includes(V.id)||D.push(V.id),D),[]);if((C||S)&&(C&&t.setState({edges:y.filter(D=>!B.includes(D.id))}),S&&(G.forEach(D=>{_.delete(D.id)}),t.setState({nodeInternals:new Map(_)}))),B.length>0&&(E==null||E(F),k&&k(B.map(D=>({id:D,type:"remove"})))),G.length>0&&(T==null||T(G),P)){const D=G.map(V=>({id:V.id,type:"remove"}));P(D)}}},[]),p=L.useCallback(v=>{const x=Xge(v),_=x?null:t.getState().nodeInternals.get(v.id);return[x?v:kR(_),_,x]},[]),g=L.useCallback((v,x=!0,_)=>{const[b,y,S]=p(v);return b?(_||t.getState().getNodes()).filter(C=>{if(!S&&(C.id===y.id||!C.positionAbsolute))return!1;const T=kR(C),E=j3(T,b);return x&&E>0||E>=v.width*v.height}):[]},[]),m=L.useCallback((v,x,_=!0)=>{const[b]=p(v);if(!b)return!1;const y=j3(b,x);return _&&y>0||y>=v.width*v.height},[]);return L.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:o,setNodes:s,setEdges:a,addNodes:l,addEdges:u,toObject:d,deleteElements:f,getIntersectingNodes:g,isNodeIntersecting:m}),[e,n,r,i,o,s,a,l,u,d,f,g,m])}var Vme=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=qr(),{deleteElements:r}=RB(),i=kg(e),o=kg(t);L.useEffect(()=>{if(i){const{edges:s,getNodes:a}=n.getState(),l=a().filter(d=>d.selected),u=s.filter(d=>d.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[i]),L.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])};function jme(e){const t=qr();L.useEffect(()=>{let n;const r=()=>{var o,s;if(!e.current)return;const i=WT(e.current);(i.height===0||i.width===0)&&((s=(o=t.getState()).onError)==null||s.call(o,"004",Hl.error004())),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const eE={position:"absolute",width:"100%",height:"100%",top:0,left:0},Gme=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,xx=e=>({x:e.x,y:e.y,zoom:e.k}),sd=(e,t)=>e.target.closest(`.${t}`),KR=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Hme=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Wme=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:l=nf.Free,zoomOnDoubleClick:u=!0,elementsSelectable:d,panOnDrag:f=!0,defaultViewport:p,translateExtent:g,minZoom:m,maxZoom:v,zoomActivationKeyCode:x,preventScrolling:_=!0,children:b,noWheelClassName:y,noPanClassName:S})=>{const C=L.useRef(),T=qr(),E=L.useRef(!1),P=L.useRef(!1),k=L.useRef(null),O=L.useRef({x:0,y:0,zoom:0}),{d3Zoom:M,d3Selection:G,d3ZoomHandler:U,userSelectionActive:A}=Mn(Hme,Ri),N=kg(x),F=L.useRef(0);return jme(k),L.useEffect(()=>{if(k.current){const B=k.current.getBoundingClientRect(),D=Vge().scaleExtent([m,v]).translateExtent(g),V=Vo(k.current).call(D),j=kl.translate(p.x,p.y).scale(Af(p.zoom,m,v)),q=[[0,0],[B.width,B.height]],Z=D.constrain()(j,q,g);D.transform(V,Z),T.setState({d3Zoom:D,d3Selection:V,d3ZoomHandler:V.on("wheel.zoom"),transform:[Z.x,Z.y,Z.k],domNode:k.current.closest(".react-flow")})}},[]),L.useEffect(()=>{G&&M&&(s&&!N&&!A?G.on("wheel.zoom",B=>{if(sd(B,y))return!1;B.preventDefault(),B.stopImmediatePropagation();const D=G.property("__zoom").k||1;if(B.ctrlKey&&o){const Z=gs(B),ee=-B.deltaY*(B.deltaMode===1?.05:B.deltaMode?1:.002)*10,ie=D*Math.pow(2,ee);M.scaleTo(G,ie,Z);return}const V=B.deltaMode===1?20:1,j=l===nf.Vertical?0:B.deltaX*V,q=l===nf.Horizontal?0:B.deltaY*V;M.translateBy(G,-(j/D)*a,-(q/D)*a)},{passive:!1}):typeof U<"u"&&G.on("wheel.zoom",function(B,D){if(!_||sd(B,y))return null;B.preventDefault(),U.call(this,B,D)},{passive:!1}))},[A,s,l,G,M,U,N,o,_,y]),L.useEffect(()=>{M&&M.on("start",B=>{var V;if(!B.sourceEvent)return null;F.current=B.sourceEvent.button;const{onViewportChangeStart:D}=T.getState();if(E.current=!0,((V=B.sourceEvent)==null?void 0:V.type)==="mousedown"&&T.setState({paneDragging:!0}),t||D){const j=xx(B.transform);O.current=j,D==null||D(j),t==null||t(B.sourceEvent,j)}})},[M,t]),L.useEffect(()=>{M&&(A&&!E.current?M.on("zoom",null):A||M.on("zoom",B=>{const{onViewportChange:D}=T.getState();if(T.setState({transform:[B.transform.x,B.transform.y,B.transform.k]}),P.current=!!(r&&KR(f,F.current??0)),e||D){const V=xx(B.transform);D==null||D(V),e==null||e(B.sourceEvent,V)}}))},[A,M,e,f,r]),L.useEffect(()=>{M&&M.on("end",B=>{if(!B.sourceEvent)return null;const{onViewportChangeEnd:D}=T.getState();if(E.current=!1,T.setState({paneDragging:!1}),r&&KR(f,F.current??0)&&!P.current&&r(B.sourceEvent),P.current=!1,(n||D)&&Gme(O.current,B.transform)){const V=xx(B.transform);O.current=V,clearTimeout(C.current),C.current=setTimeout(()=>{D==null||D(V),n==null||n(B.sourceEvent,V)},s?150:0)}})},[M,s,f,n,r]),L.useEffect(()=>{M&&M.filter(B=>{const D=N||i,V=o&&B.ctrlKey;if(B.button===1&&B.type==="mousedown"&&(sd(B,"react-flow__node")||sd(B,"react-flow__edge")))return!0;if(!f&&!D&&!s&&!u&&!o||A||!u&&B.type==="dblclick"||sd(B,y)&&B.type==="wheel"||sd(B,S)&&B.type!=="wheel"||!o&&B.ctrlKey&&B.type==="wheel"||!D&&!s&&!V&&B.type==="wheel"||!f&&(B.type==="mousedown"||B.type==="touchstart")||Array.isArray(f)&&!f.includes(B.button)&&(B.type==="mousedown"||B.type==="touchstart"))return!1;const j=Array.isArray(f)&&f.includes(B.button)||!B.button||B.button<=1;return(!B.ctrlKey||B.type==="wheel")&&j})},[A,M,i,o,s,u,f,d,N]),ue.jsx("div",{className:"react-flow__renderer",ref:k,style:eE,children:b})},qme=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Kme(){const{userSelectionActive:e,userSelectionRect:t}=Mn(qme,Ri);return e&&t?ue.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function XR(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(r>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,r>0&&(n.style.width+=r),i>0&&(n.style.height+=i),t.position.x<0){const o=Math.abs(t.position.x);n.position.x=n.position.x-o,n.style.width+=o,t.position.x=0}if(t.position.y<0){const o=Math.abs(t.position.y);n.position.y=n.position.y-o,n.style.height+=o,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function OB(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const o=e.filter(a=>a.id===i.id);if(o.length===0)return r.push(i),r;const s={...i};for(const a of o)if(a)switch(a.type){case"select":{s.selected=a.selected;break}case"position":{typeof a.position<"u"&&(s.position=a.position),typeof a.positionAbsolute<"u"&&(s.positionAbsolute=a.positionAbsolute),typeof a.dragging<"u"&&(s.dragging=a.dragging),s.expandParent&&XR(r,s);break}case"dimensions":{typeof a.dimensions<"u"&&(s.width=a.dimensions.width,s.height=a.dimensions.height),typeof a.updateStyle<"u"&&(s.style={...s.style||{},...a.dimensions}),typeof a.resizing=="boolean"&&(s.resizing=a.resizing),s.expandParent&&XR(r,s);break}case"remove":return r}return r.push(s),r},n)}function kB(e,t){return OB(e,t)}function Xme(e,t){return OB(e,t)}const dl=(e,t)=>({id:e,type:"select",selected:t});function Ld(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(dl(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(dl(r.id,!1))),n},[])}const Cx=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Yme=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),IB=L.memo(({isSelecting:e,selectionMode:t=Og.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:o,onPaneContextMenu:s,onPaneScroll:a,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:d,children:f})=>{const p=L.useRef(null),g=qr(),m=L.useRef(0),v=L.useRef(0),x=L.useRef(),{userSelectionActive:_,elementsSelectable:b,dragging:y}=Mn(Yme,Ri),S=()=>{g.setState({userSelectionActive:!1,userSelectionRect:null}),m.current=0,v.current=0},C=U=>{o==null||o(U),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},T=U=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){U.preventDefault();return}s==null||s(U)},E=a?U=>a(U):void 0,P=U=>{const{resetSelectedElements:A,domNode:N}=g.getState();if(x.current=N==null?void 0:N.getBoundingClientRect(),!b||!e||U.button!==0||U.target!==p.current||!x.current)return;const{x:F,y:B}=Il(U,x.current);A(),g.setState({userSelectionRect:{width:0,height:0,startX:F,startY:B,x:F,y:B}}),r==null||r(U)},k=U=>{const{userSelectionRect:A,nodeInternals:N,edges:F,transform:B,onNodesChange:D,onEdgesChange:V,nodeOrigin:j,getNodes:q}=g.getState();if(!e||!x.current||!A)return;g.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Z=Il(U,x.current),ee=A.startX??0,ie=A.startY??0,se={...A,x:Z.x<ee?Z.x:ee,y:Z.y<ie?Z.y:ie,width:Math.abs(Z.x-ee),height:Math.abs(Z.y-ie)},le=q(),W=aB(N,se,B,t===Og.Partial,!0,j),ne=lB(W,F).map(pe=>pe.id),fe=W.map(pe=>pe.id);if(m.current!==fe.length){m.current=fe.length;const pe=Ld(le,fe);pe.length&&(D==null||D(pe))}if(v.current!==ne.length){v.current=ne.length;const pe=Ld(F,ne);pe.length&&(V==null||V(pe))}g.setState({userSelectionRect:se})},O=U=>{if(U.button!==0)return;const{userSelectionRect:A}=g.getState();!_&&A&&U.target===p.current&&(C==null||C(U)),g.setState({nodesSelectionActive:m.current>0}),S(),i==null||i(U)},M=U=>{_&&(g.setState({nodesSelectionActive:m.current>0}),i==null||i(U)),S()},G=b&&(e||_);return ue.jsxs("div",{className:Eo(["react-flow__pane",{dragging:y,selection:e}]),onClick:G?void 0:Cx(C,p),onContextMenu:Cx(T,p),onWheel:Cx(E,p),onMouseEnter:G?void 0:l,onMouseDown:G?P:void 0,onMouseMove:G?k:u,onMouseUp:G?O:void 0,onMouseLeave:G?M:d,ref:p,style:eE,children:[f,ue.jsx(Kme,{})]})});IB.displayName="Pane";const Qme=e=>{const t=e.getNodes().filter(n=>n.selected);return{...sB(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function Zme({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=qr(),{width:i,height:o,x:s,y:a,transformString:l,userSelectionActive:u}=Mn(Qme,Ri),d=TB(),f=L.useRef(null);if(L.useEffect(()=>{var m;n||(m=f.current)==null||m.focus({preventScroll:!0})},[n]),CB({nodeRef:f}),u||!i||!o)return null;const p=e?m=>{const v=r.getState().getNodes().filter(x=>x.selected);e(m,v)}:void 0,g=m=>{Object.prototype.hasOwnProperty.call(of,m.key)&&d({x:of[m.key].x,y:of[m.key].y,isShiftPressed:m.shiftKey})};return ue.jsx("div",{className:Eo(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:ue.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:i,height:o,top:a,left:s}})})}var Jme=L.memo(Zme);const eye=e=>e.nodesSelectionActive,MB=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,deleteKeyCode:a,onMove:l,onMoveStart:u,onMoveEnd:d,selectionKeyCode:f,selectionOnDrag:p,selectionMode:g,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:b,elementsSelectable:y,zoomOnScroll:S,zoomOnPinch:C,panOnScroll:T,panOnScrollSpeed:E,panOnScrollMode:P,zoomOnDoubleClick:k,panOnDrag:O,defaultViewport:M,translateExtent:G,minZoom:U,maxZoom:A,preventScrolling:N,onSelectionContextMenu:F,noWheelClassName:B,noPanClassName:D,disableKeyboardA11y:V})=>{const j=Mn(eye),q=kg(f),ee=kg(_)||O,ie=q||p&&ee!==!0;return Vme({deleteKeyCode:a,multiSelectionKeyCode:x}),ue.jsx(Wme,{onMove:l,onMoveStart:u,onMoveEnd:d,onPaneContextMenu:o,elementsSelectable:y,zoomOnScroll:S,zoomOnPinch:C,panOnScroll:T,panOnScrollSpeed:E,panOnScrollMode:P,zoomOnDoubleClick:k,panOnDrag:!q&&ee,defaultViewport:M,translateExtent:G,minZoom:U,maxZoom:A,zoomActivationKeyCode:b,preventScrolling:N,noWheelClassName:B,noPanClassName:D,children:ue.jsxs(IB,{onSelectionStart:m,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:ee,isSelecting:!!ie,selectionMode:g,children:[e,j&&ue.jsx(Jme,{onSelectionContextMenu:F,noPanClassName:D,disableKeyboardA11y:V})]})})};MB.displayName="FlowRenderer";var tye=L.memo(MB);function nye(e){return Mn(L.useCallback(n=>e?aB(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}const rye=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),NB=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:o,onError:s}=Mn(rye,Ri),a=nye(e.onlyRenderVisibleElements),l=L.useRef(),u=L.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const d=new ResizeObserver(f=>{const p=f.map(g=>({id:g.target.getAttribute("data-id"),nodeElement:g.target,forceUpdate:!0}));o(p)});return l.current=d,d},[]);return L.useEffect(()=>()=>{var d;(d=l==null?void 0:l.current)==null||d.disconnect()},[]),ue.jsx("div",{className:"react-flow__nodes",style:eE,children:a.map(d=>{var C,T;let f=d.type||"default";e.nodeTypes[f]||(s==null||s("003",Hl.error003(f)),f="default");const p=e.nodeTypes[f]||e.nodeTypes.default,g=!!(d.draggable||t&&typeof d.draggable>"u"),m=!!(d.selectable||i&&typeof d.selectable>"u"),v=!!(d.connectable||n&&typeof d.connectable>"u"),x=!!(d.focusable||r&&typeof d.focusable>"u"),_=e.nodeExtent?qT(d.positionAbsolute,e.nodeExtent):d.positionAbsolute,b=(_==null?void 0:_.x)??0,y=(_==null?void 0:_.y)??0,S=Lme({x:b,y,width:d.width??0,height:d.height??0,origin:e.nodeOrigin});return ue.jsx(p,{id:d.id,className:d.className,style:d.style,type:f,data:d.data,sourcePosition:d.sourcePosition||Ne.Bottom,targetPosition:d.targetPosition||Ne.Top,hidden:d.hidden,xPos:b,yPos:y,xPosOrigin:S.x,yPosOrigin:S.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!d.selected,isDraggable:g,isSelectable:m,isConnectable:v,isFocusable:x,resizeObserver:u,dragHandle:d.dragHandle,zIndex:((C=d[nr])==null?void 0:C.z)??0,isParent:!!((T=d[nr])!=null&&T.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!d.width&&!!d.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:d.ariaLabel},d.id)})})};NB.displayName="NodeRenderer";var iye=L.memo(NB);const oye=[{level:0,isMaxLevel:!0,edges:[]}];function sye(e,t,n=!1){let r=-1;const i=e.reduce((s,a)=>{var d,f;const l=_o(a.zIndex);let u=l?a.zIndex:0;if(n){const p=t.get(a.target),g=t.get(a.source),m=a.selected||(p==null?void 0:p.selected)||(g==null?void 0:g.selected),v=Math.max(((d=g==null?void 0:g[nr])==null?void 0:d.z)||0,((f=p==null?void 0:p[nr])==null?void 0:f.z)||0,1e3);u=(l?a.zIndex:0)+(m?v:0)}return s[u]?s[u].push(a):s[u]=[a],r=u>r?u:r,s},{}),o=Object.entries(i).map(([s,a])=>{const l=+s;return{edges:a,level:l,isMaxLevel:l===r}});return o.length===0?oye:o}function aye(e,t,n){const r=Mn(L.useCallback(i=>e?i.edges.filter(o=>{const s=t.get(o.source),a=t.get(o.target);return(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&Ome({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:a.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:a.width,targetHeight:a.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return sye(r,t,n)}const lye=({color:e="none",strokeWidth:t=1})=>ue.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),uye=({color:e="none",strokeWidth:t=1})=>ue.jsx("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"}),YR={[B1.Arrow]:lye,[B1.ArrowClosed]:uye};function cye(e){const t=qr();return L.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(YR,e)?YR[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",Hl.error009(e)),null)},[e])}const dye=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const l=cye(t);return l?ue.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:a,refX:"0",refY:"0",children:ue.jsx(l,{color:n,strokeWidth:s})}):null},fye=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,o)=>([o.markerStart,o.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const a=W3(s,t);r.includes(a)||(i.push({id:a,color:s.color||e,...s}),r.push(a))}}),i),[]).sort((i,o)=>i.id.localeCompare(o.id))},LB=({defaultColor:e,rfId:t})=>{const n=Mn(L.useCallback(fye({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((o,s)=>o.id!==i[s].id)));return ue.jsx("defs",{children:n.map(r=>ue.jsx(dye,{id:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient},r.id))})};LB.displayName="MarkerDefinitions";var hye=L.memo(LB);const pye=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),DB=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:o,onEdgeUpdate:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:d,onEdgeClick:f,edgeUpdaterRadius:p,onEdgeDoubleClick:g,onEdgeUpdateStart:m,onEdgeUpdateEnd:v,children:x})=>{const{edgesFocusable:_,edgesUpdatable:b,elementsSelectable:y,width:S,height:C,connectionMode:T,nodeInternals:E,onError:P}=Mn(pye,Ri),k=aye(t,E,n);return S?ue.jsxs(ue.Fragment,{children:[k.map(({level:O,edges:M,isMaxLevel:G})=>ue.jsxs("svg",{style:{zIndex:O},width:S,height:C,className:"react-flow__edges react-flow__container",children:[G&&ue.jsx(hye,{defaultColor:e,rfId:r}),ue.jsx("g",{children:M.map(U=>{const[A,N,F]=jR(E.get(U.source)),[B,D,V]=jR(E.get(U.target));if(!F||!V)return null;let j=U.type||"default";i[j]||(P==null||P("011",Hl.error011(j)),j="default");const q=i[j]||i.default,Z=T===sc.Strict?D.target:(D.target??[]).concat(D.source??[]),ee=VR(N.source,U.sourceHandle),ie=VR(Z,U.targetHandle),se=(ee==null?void 0:ee.position)||Ne.Bottom,le=(ie==null?void 0:ie.position)||Ne.Top,W=!!(U.focusable||_&&typeof U.focusable>"u"),ne=typeof s<"u"&&(U.updatable||b&&typeof U.updatable>"u");if(!ee||!ie)return P==null||P("008",Hl.error008(ee,U)),null;const{sourceX:fe,sourceY:pe,targetX:ve,targetY:ye}=Rme(A,ee,se,B,ie,le);return ue.jsx(q,{id:U.id,className:Eo([U.className,o]),type:j,data:U.data,selected:!!U.selected,animated:!!U.animated,hidden:!!U.hidden,label:U.label,labelStyle:U.labelStyle,labelShowBg:U.labelShowBg,labelBgStyle:U.labelBgStyle,labelBgPadding:U.labelBgPadding,labelBgBorderRadius:U.labelBgBorderRadius,style:U.style,source:U.source,target:U.target,sourceHandleId:U.sourceHandle,targetHandleId:U.targetHandle,markerEnd:U.markerEnd,markerStart:U.markerStart,sourceX:fe,sourceY:pe,targetX:ve,targetY:ye,sourcePosition:se,targetPosition:le,elementsSelectable:y,onEdgeUpdate:s,onContextMenu:a,onMouseEnter:l,onMouseMove:u,onMouseLeave:d,onClick:f,edgeUpdaterRadius:p,onEdgeDoubleClick:g,onEdgeUpdateStart:m,onEdgeUpdateEnd:v,rfId:r,ariaLabel:U.ariaLabel,isFocusable:W,isUpdatable:ne,pathOptions:"pathOptions"in U?U.pathOptions:void 0,interactionWidth:U.interactionWidth},U.id)})})]},O)),x]}):null};DB.displayName="EdgeRenderer";var gye=L.memo(DB);const mye=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function yye({children:e}){const t=Mn(mye);return ue.jsx("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}function vye(e){const t=RB(),n=L.useRef(!1);L.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const _ye={[Ne.Left]:Ne.Right,[Ne.Right]:Ne.Left,[Ne.Top]:Ne.Bottom,[Ne.Bottom]:Ne.Top},$B=({nodeId:e,handleType:t,style:n,type:r=yl.Bezier,CustomComponent:i,connectionStatus:o})=>{var T,E,P;const{fromNode:s,handleId:a,toX:l,toY:u,connectionMode:d}=Mn(L.useCallback(k=>({fromNode:k.nodeInternals.get(e),handleId:k.connectionHandleId,toX:(k.connectionPosition.x-k.transform[0])/k.transform[2],toY:(k.connectionPosition.y-k.transform[1])/k.transform[2],connectionMode:k.connectionMode}),[e]),Ri),f=(T=s==null?void 0:s[nr])==null?void 0:T.handleBounds;let p=f==null?void 0:f[t];if(d===sc.Loose&&(p=p||(f==null?void 0:f[t==="source"?"target":"source"])),!s||!p)return null;const g=a?p.find(k=>k.id===a):p[0],m=g?g.x+g.width/2:(s.width??0)/2,v=g?g.y+g.height/2:s.height??0,x=(((E=s.positionAbsolute)==null?void 0:E.x)??0)+m,_=(((P=s.positionAbsolute)==null?void 0:P.y)??0)+v,b=g==null?void 0:g.position,y=b?_ye[b]:null;if(!b||!y)return null;if(i)return ue.jsx(i,{connectionLineType:r,connectionLineStyle:n,fromNode:s,fromHandle:g,fromX:x,fromY:_,toX:l,toY:u,fromPosition:b,toPosition:y,connectionStatus:o});let S="";const C={sourceX:x,sourceY:_,sourcePosition:b,targetX:l,targetY:u,targetPosition:y};return r===yl.Bezier?[S]=rB(C):r===yl.Step?[S]=H3({...C,borderRadius:0}):r===yl.SmoothStep?[S]=H3(C):r===yl.SimpleBezier?[S]=nB(C):S=`M${x},${_} ${l},${u}`,ue.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:n})};$B.displayName="ConnectionLine";const bye=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function Sye({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:o,nodesConnectable:s,width:a,height:l,connectionStatus:u}=Mn(bye,Ri);return!(i&&o&&a&&s)?null:ue.jsx("svg",{style:e,width:a,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container",children:ue.jsx("g",{className:Eo(["react-flow__connection",u]),children:ue.jsx($B,{nodeId:i,handleType:o,style:t,type:n,CustomComponent:r,connectionStatus:u})})})}const FB=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:o,onNodeClick:s,onEdgeClick:a,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:p,onNodeContextMenu:g,onSelectionContextMenu:m,onSelectionStart:v,onSelectionEnd:x,connectionLineType:_,connectionLineStyle:b,connectionLineComponent:y,connectionLineContainerStyle:S,selectionKeyCode:C,selectionOnDrag:T,selectionMode:E,multiSelectionKeyCode:P,panActivationKeyCode:k,zoomActivationKeyCode:O,deleteKeyCode:M,onlyRenderVisibleElements:G,elementsSelectable:U,selectNodesOnDrag:A,defaultViewport:N,translateExtent:F,minZoom:B,maxZoom:D,preventScrolling:V,defaultMarkerColor:j,zoomOnScroll:q,zoomOnPinch:Z,panOnScroll:ee,panOnScrollSpeed:ie,panOnScrollMode:se,zoomOnDoubleClick:le,panOnDrag:W,onPaneClick:ne,onPaneMouseEnter:fe,onPaneMouseMove:pe,onPaneMouseLeave:ve,onPaneScroll:ye,onPaneContextMenu:We,onEdgeUpdate:Me,onEdgeContextMenu:Ee,onEdgeMouseEnter:lt,onEdgeMouseMove:_e,onEdgeMouseLeave:jt,edgeUpdaterRadius:Hn,onEdgeUpdateStart:Bt,onEdgeUpdateEnd:it,noDragClassName:gt,noWheelClassName:Jt,noPanClassName:Nr,elevateEdgesOnSelect:yr,disableKeyboardA11y:hi,nodeOrigin:wn,nodeExtent:on,rfId:Wn})=>(vye(o),ue.jsx(tye,{onPaneClick:ne,onPaneMouseEnter:fe,onPaneMouseMove:pe,onPaneMouseLeave:ve,onPaneContextMenu:We,onPaneScroll:ye,deleteKeyCode:M,selectionKeyCode:C,selectionOnDrag:T,selectionMode:E,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:P,panActivationKeyCode:k,zoomActivationKeyCode:O,elementsSelectable:U,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:q,zoomOnPinch:Z,zoomOnDoubleClick:le,panOnScroll:ee,panOnScrollSpeed:ie,panOnScrollMode:se,panOnDrag:W,defaultViewport:N,translateExtent:F,minZoom:B,maxZoom:D,onSelectionContextMenu:m,preventScrolling:V,noDragClassName:gt,noWheelClassName:Jt,noPanClassName:Nr,disableKeyboardA11y:hi,children:ue.jsxs(yye,{children:[ue.jsx(gye,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:u,onEdgeUpdate:Me,onlyRenderVisibleElements:G,onEdgeContextMenu:Ee,onEdgeMouseEnter:lt,onEdgeMouseMove:_e,onEdgeMouseLeave:jt,onEdgeUpdateStart:Bt,onEdgeUpdateEnd:it,edgeUpdaterRadius:Hn,defaultMarkerColor:j,noPanClassName:Nr,elevateEdgesOnSelect:!!yr,disableKeyboardA11y:hi,rfId:Wn,children:ue.jsx(Sye,{style:b,type:_,component:y,containerStyle:S})}),ue.jsx("div",{className:"react-flow__edgelabel-renderer"}),ue.jsx(iye,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:p,onNodeContextMenu:g,selectNodesOnDrag:A,onlyRenderVisibleElements:G,noPanClassName:Nr,noDragClassName:gt,disableKeyboardA11y:hi,nodeOrigin:wn,nodeExtent:on,rfId:Wn})]})}));FB.displayName="GraphView";var wye=L.memo(FB);const X3=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],rl={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:X3,nodeExtent:X3,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:sc.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:Yge,isValidConnection:void 0},xye=()=>lfe((e,t)=>({...rl,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:o}=t();e({nodeInternals:wx(n,r,i,o)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",o=typeof r<"u",s=i?wx(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:o?r:[],hasDefaultNodes:i,hasDefaultEdges:o})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:o,fitViewOnInitDone:s,fitViewOnInitOptions:a,domNode:l,nodeOrigin:u}=t(),d=l==null?void 0:l.querySelector(".react-flow__viewport");if(!d)return;const f=window.getComputedStyle(d),{m22:p}=new window.DOMMatrixReadOnly(f.transform),g=n.reduce((v,x)=>{const _=i.get(x.id);if(_){const b=WT(x.nodeElement);!!(b.width&&b.height&&(_.width!==b.width||_.height!==b.height||x.forceUpdate))&&(i.set(_.id,{..._,[nr]:{..._[nr],handleBounds:{source:HR(".source",x.nodeElement,p,u),target:HR(".target",x.nodeElement,p,u)}},...b}),v.push({id:_.id,type:"dimensions",dimensions:b}))}return v},[]);AB(i,u);const m=s||o&&!s&&PB(t,{initial:!0,...a});e({nodeInternals:new Map(i),fitViewOnInitDone:m}),(g==null?void 0:g.length)>0&&(r==null||r(g))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:o}=t(),s=n.map(a=>{const l={id:a.id,type:"position",dragging:i};return r&&(l.positionAbsolute=a.positionAbsolute,l.position=a.position),l});o(s)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:o,nodeOrigin:s,getNodes:a,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(o){const u=kB(n,a()),d=wx(u,i,s,l);e({nodeInternals:d})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let s,a=null;r?s=n.map(l=>dl(l,!0)):(s=Ld(o(),n),a=Ld(i,[])),P0({changedNodes:s,changedEdges:a,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=t();let s,a=null;r?s=n.map(l=>dl(l,!0)):(s=Ld(i,n),a=Ld(o(),[])),P0({changedNodes:a,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:o}=t(),s=n||o(),a=r||i,l=s.map(d=>(d.selected=!1,dl(d.id,!1))),u=a.map(d=>dl(d.id,!1));P0({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r==null||r.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r==null||r.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),o=r().filter(a=>a.selected).map(a=>dl(a.id,!1)),s=n.filter(a=>a.selected).map(a=>dl(a.id,!1));P0({changedNodes:o,changedEdges:s,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=qT(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:o,d3Zoom:s,d3Selection:a,translateExtent:l}=t();if(!s||!a||!n.x&&!n.y)return!1;const u=kl.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),d=[[0,0],[i,o]],f=s==null?void 0:s.constrain()(u,d,l);return s.transform(a,f),r[0]!==f.x||r[1]!==f.y||r[2]!==f.k},cancelConnection:()=>e({connectionNodeId:rl.connectionNodeId,connectionHandleId:rl.connectionHandleId,connectionHandleType:rl.connectionHandleType,connectionStatus:rl.connectionStatus,connectionStartHandle:rl.connectionStartHandle,connectionEndHandle:rl.connectionEndHandle}),reset:()=>e({...rl})})),BB=({children:e})=>{const t=L.useRef(null);return t.current||(t.current=xye()),ue.jsx(jge,{value:t.current,children:e})};BB.displayName="ReactFlowProvider";const UB=({children:e})=>L.useContext(Ib)?ue.jsx(ue.Fragment,{children:e}):ue.jsx(BB,{children:e});UB.displayName="ReactFlowWrapper";function QR(e,t){return L.useRef(null),L.useMemo(()=>t(e),[e])}const Cye={input:mB,default:q3,output:vB,group:JT},Tye={default:U1,straight:YT,step:XT,smoothstep:Mb,simplebezier:KT},Eye=[0,0],Aye=[15,15],Pye={x:0,y:0,zoom:1},Rye={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Oye=L.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o=Cye,edgeTypes:s=Tye,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:g,onConnectStart:m,onConnectEnd:v,onClickConnectStart:x,onClickConnectEnd:_,onNodeMouseEnter:b,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:T,onNodeDragStart:E,onNodeDrag:P,onNodeDragStop:k,onNodesDelete:O,onEdgesDelete:M,onSelectionChange:G,onSelectionDragStart:U,onSelectionDrag:A,onSelectionDragStop:N,onSelectionContextMenu:F,onSelectionStart:B,onSelectionEnd:D,connectionMode:V=sc.Strict,connectionLineType:j=yl.Bezier,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:ee,deleteKeyCode:ie="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:le=!1,selectionMode:W=Og.Full,panActivationKeyCode:ne="Space",multiSelectionKeyCode:fe="Meta",zoomActivationKeyCode:pe="Meta",snapToGrid:ve=!1,snapGrid:ye=Aye,onlyRenderVisibleElements:We=!1,selectNodesOnDrag:Me=!0,nodesDraggable:Ee,nodesConnectable:lt,nodesFocusable:_e,nodeOrigin:jt=Eye,edgesFocusable:Hn,edgesUpdatable:Bt,elementsSelectable:it,defaultViewport:gt=Pye,minZoom:Jt=.5,maxZoom:Nr=2,translateExtent:yr=X3,preventScrolling:hi=!0,nodeExtent:wn,defaultMarkerColor:on="#b1b1b7",zoomOnScroll:Wn=!0,zoomOnPinch:sn=!0,panOnScroll:Gt=!1,panOnScrollSpeed:vr=.5,panOnScrollMode:Lr=nf.Free,zoomOnDoubleClick:Xr=!0,panOnDrag:Ii=!0,onPaneClick:En,onPaneMouseEnter:Yr,onPaneMouseMove:Vs,onPaneMouseLeave:Ji,onPaneScroll:js,onPaneContextMenu:Xt,children:Ot,onEdgeUpdate:qn,onEdgeContextMenu:Dn,onEdgeDoubleClick:or,onEdgeMouseEnter:_r,onEdgeMouseMove:br,onEdgeMouseLeave:eo,onEdgeUpdateStart:Sr,onEdgeUpdateEnd:Kn,edgeUpdaterRadius:Mi=10,onNodesChange:is,onEdgesChange:to,noDragClassName:za="nodrag",noWheelClassName:Ao="nowheel",noPanClassName:wr="nopan",fitView:Gs=!1,fitViewOptions:Zf,connectOnClick:Jf=!0,attributionPosition:eh,proOptions:th,defaultEdgeOptions:Po,elevateNodesOnSelect:nh=!0,elevateEdgesOnSelect:rh=!1,disableKeyboardA11y:kc=!1,autoPanOnConnect:ih=!0,autoPanOnNodeDrag:oh=!0,connectionRadius:sh=20,isValidConnection:os,onError:ah,style:Ro,id:Va,...lh},ja)=>{const uu=QR(o,Nme),Ic=QR(s,Pme),Ga=Va||"1";return ue.jsx("div",{...lh,style:{...Ro,...Rye},ref:ja,className:Eo(["react-flow",i]),"data-testid":"rf__wrapper",id:Va,children:ue.jsxs(UB,{children:[ue.jsx(wye,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:b,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:T,nodeTypes:uu,edgeTypes:Ic,connectionLineType:j,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:ee,selectionKeyCode:se,selectionOnDrag:le,selectionMode:W,deleteKeyCode:ie,multiSelectionKeyCode:fe,panActivationKeyCode:ne,zoomActivationKeyCode:pe,onlyRenderVisibleElements:We,selectNodesOnDrag:Me,defaultViewport:gt,translateExtent:yr,minZoom:Jt,maxZoom:Nr,preventScrolling:hi,zoomOnScroll:Wn,zoomOnPinch:sn,zoomOnDoubleClick:Xr,panOnScroll:Gt,panOnScrollSpeed:vr,panOnScrollMode:Lr,panOnDrag:Ii,onPaneClick:En,onPaneMouseEnter:Yr,onPaneMouseMove:Vs,onPaneMouseLeave:Ji,onPaneScroll:js,onPaneContextMenu:Xt,onSelectionContextMenu:F,onSelectionStart:B,onSelectionEnd:D,onEdgeUpdate:qn,onEdgeContextMenu:Dn,onEdgeDoubleClick:or,onEdgeMouseEnter:_r,onEdgeMouseMove:br,onEdgeMouseLeave:eo,onEdgeUpdateStart:Sr,onEdgeUpdateEnd:Kn,edgeUpdaterRadius:Mi,defaultMarkerColor:on,noDragClassName:za,noWheelClassName:Ao,noPanClassName:wr,elevateEdgesOnSelect:rh,rfId:Ga,disableKeyboardA11y:kc,nodeOrigin:jt,nodeExtent:wn}),ue.jsx(_me,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:m,onConnectEnd:v,onClickConnectStart:x,onClickConnectEnd:_,nodesDraggable:Ee,nodesConnectable:lt,nodesFocusable:_e,edgesFocusable:Hn,edgesUpdatable:Bt,elementsSelectable:it,elevateNodesOnSelect:nh,minZoom:Jt,maxZoom:Nr,nodeExtent:wn,onNodesChange:is,onEdgesChange:to,snapToGrid:ve,snapGrid:ye,connectionMode:V,translateExtent:yr,connectOnClick:Jf,defaultEdgeOptions:Po,fitView:Gs,fitViewOptions:Zf,onNodesDelete:O,onEdgesDelete:M,onNodeDragStart:E,onNodeDrag:P,onNodeDragStop:k,onSelectionDrag:A,onSelectionDragStart:U,onSelectionDragStop:N,noPanClassName:wr,nodeOrigin:jt,rfId:Ga,autoPanOnConnect:ih,autoPanOnNodeDrag:oh,onError:ah,connectionRadius:sh,isValidConnection:os}),ue.jsx(yme,{onSelectionChange:G}),Ot,ue.jsx(Wge,{proOptions:th,position:eh}),ue.jsx(Cme,{rfId:Ga,disableKeyboardA11y:kc})]})})});Oye.displayName="ReactFlow";var zB={},Nb={},Lb={};Object.defineProperty(Lb,"__esModule",{value:!0});Lb.createLogMethods=void 0;var kye=function(){return{debug:console.debug.bind(console),error:console.error.bind(console),fatal:console.error.bind(console),info:console.info.bind(console),trace:console.debug.bind(console),warn:console.warn.bind(console)}};Lb.createLogMethods=kye;var tE={},Db={};Object.defineProperty(Db,"__esModule",{value:!0});Db.boolean=void 0;const Iye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};Db.boolean=Iye;var $b={};Object.defineProperty($b,"__esModule",{value:!0});$b.isBooleanable=void 0;const Mye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};$b.isBooleanable=Mye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=Db;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=$b;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(tE);var ZR=Object.prototype.toString,VB=function(t){var n=ZR.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&ZR.call(t.callee)==="[object Function]"),r},Tx,JR;function Nye(){if(JR)return Tx;JR=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=VB,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(p){var g=p.constructor;return g&&g.prototype===p},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if(typeof window>"u")return!1;for(var p in window)try{if(!u["$"+p]&&t.call(window,p)&&window[p]!==null&&typeof window[p]=="object")try{l(window[p])}catch{return!0}}catch{return!0}return!1}(),f=function(p){if(typeof window>"u"||!d)return l(p);try{return l(p)}catch{return!1}};e=function(g){var m=g!==null&&typeof g=="object",v=n.call(g)==="[object Function]",x=r(g),_=m&&n.call(g)==="[object String]",b=[];if(!m&&!v&&!x)throw new TypeError("Object.keys called on a non-object");var y=s&&v;if(_&&g.length>0&&!t.call(g,0))for(var S=0;S<g.length;++S)b.push(String(S));if(x&&g.length>0)for(var C=0;C<g.length;++C)b.push(String(C));else for(var T in g)!(y&&T==="prototype")&&t.call(g,T)&&b.push(String(T));if(o)for(var E=f(g),P=0;P<a.length;++P)!(E&&a[P]==="constructor")&&t.call(g,a[P])&&b.push(a[P]);return b}}return Tx=e,Tx}var Lye=Array.prototype.slice,Dye=VB,eO=Object.keys,yv=eO?function(t){return eO(t)}:Nye(),tO=Object.keys;yv.shim=function(){if(Object.keys){var t=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);t||(Object.keys=function(r){return Dye(r)?tO(Lye.call(r)):tO(r)})}else Object.keys=yv;return Object.keys||yv};var $ye=yv,Fye=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},nO=typeof Symbol<"u"&&Symbol,Bye=Fye,Uye=function(){return typeof nO!="function"||typeof Symbol!="function"||typeof nO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bye()},rO={foo:{}},zye=Object,Vye=function(){return{__proto__:rO}.foo===rO.foo&&!({__proto__:null}instanceof zye)},jye="Function.prototype.bind called on incompatible ",Ex=Array.prototype.slice,Gye=Object.prototype.toString,Hye="[object Function]",Wye=function(t){var n=this;if(typeof n!="function"||Gye.call(n)!==Hye)throw new TypeError(jye+n);for(var r=Ex.call(arguments,1),i,o=function(){if(this instanceof i){var d=n.apply(this,r.concat(Ex.call(arguments)));return Object(d)===d?d:this}else return n.apply(t,r.concat(Ex.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l<s;l++)a.push("$"+l);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i},qye=Wye,jB=Function.prototype.bind||qye,Kye=jB,Xye=Kye.call(Function.call,Object.prototype.hasOwnProperty),dt,Pf=SyntaxError,GB=Function,sf=TypeError,Ax=function(e){try{return GB('"use strict"; return ('+e+").constructor;")()}catch{}},Wu=Object.getOwnPropertyDescriptor;if(Wu)try{Wu({},"")}catch{Wu=null}var Px=function(){throw new sf},Yye=Wu?function(){try{return arguments.callee,Px}catch{try{return Wu(arguments,"callee").get}catch{return Px}}}():Px,ad=Uye(),Qye=Vye(),ur=Object.getPrototypeOf||(Qye?function(e){return e.__proto__}:null),bd={},Zye=typeof Uint8Array>"u"||!ur?dt:ur(Uint8Array),qu={"%AggregateError%":typeof AggregateError>"u"?dt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?dt:ArrayBuffer,"%ArrayIteratorPrototype%":ad&&ur?ur([][Symbol.iterator]()):dt,"%AsyncFromSyncIteratorPrototype%":dt,"%AsyncFunction%":bd,"%AsyncGenerator%":bd,"%AsyncGeneratorFunction%":bd,"%AsyncIteratorPrototype%":bd,"%Atomics%":typeof Atomics>"u"?dt:Atomics,"%BigInt%":typeof BigInt>"u"?dt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?dt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?dt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?dt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?dt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?dt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?dt:FinalizationRegistry,"%Function%":GB,"%GeneratorFunction%":bd,"%Int8Array%":typeof Int8Array>"u"?dt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?dt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?dt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ad&&ur?ur(ur([][Symbol.iterator]())):dt,"%JSON%":typeof JSON=="object"?JSON:dt,"%Map%":typeof Map>"u"?dt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ad||!ur?dt:ur(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?dt:Promise,"%Proxy%":typeof Proxy>"u"?dt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?dt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?dt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ad||!ur?dt:ur(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?dt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ad&&ur?ur(""[Symbol.iterator]()):dt,"%Symbol%":ad?Symbol:dt,"%SyntaxError%":Pf,"%ThrowTypeError%":Yye,"%TypedArray%":Zye,"%TypeError%":sf,"%Uint8Array%":typeof Uint8Array>"u"?dt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?dt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?dt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?dt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?dt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?dt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?dt:WeakSet};if(ur)try{null.error}catch(e){var Jye=ur(ur(e));qu["%Error.prototype%"]=Jye}var e0e=function e(t){var n;if(t==="%AsyncFunction%")n=Ax("async function () {}");else if(t==="%GeneratorFunction%")n=Ax("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ax("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ur&&(n=ur(i.prototype))}return qu[t]=n,n},iO={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bm=jB,V1=Xye,t0e=bm.call(Function.call,Array.prototype.concat),n0e=bm.call(Function.apply,Array.prototype.splice),oO=bm.call(Function.call,String.prototype.replace),j1=bm.call(Function.call,String.prototype.slice),r0e=bm.call(Function.call,RegExp.prototype.exec),i0e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,o0e=/\\(\\)?/g,s0e=function(t){var n=j1(t,0,1),r=j1(t,-1);if(n==="%"&&r!=="%")throw new Pf("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Pf("invalid intrinsic syntax, expected opening `%`");var i=[];return oO(t,i0e,function(o,s,a,l){i[i.length]=a?oO(l,o0e,"$1"):s||o}),i},a0e=function(t,n){var r=t,i;if(V1(iO,r)&&(i=iO[r],r="%"+i[0]+"%"),V1(qu,r)){var o=qu[r];if(o===bd&&(o=e0e(r)),typeof o>"u"&&!n)throw new sf("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Pf("intrinsic "+t+" does not exist!")},l0e=function(t,n){if(typeof t!="string"||t.length===0)throw new sf("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new sf('"allowMissing" argument must be a boolean');if(r0e(/^%?[^%]*%?$/,t)===null)throw new Pf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=s0e(t),i=r.length>0?r[0]:"",o=a0e("%"+i+"%",n),s=o.name,a=o.value,l=!1,u=o.alias;u&&(i=u[0],n0e(r,t0e([0,1],u)));for(var d=1,f=!0;d<r.length;d+=1){var p=r[d],g=j1(p,0,1),m=j1(p,-1);if((g==='"'||g==="'"||g==="`"||m==='"'||m==="'"||m==="`")&&g!==m)throw new Pf("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(l=!0),i+="."+p,s="%"+i+"%",V1(qu,s))a=qu[s];else if(a!=null){if(!(p in a)){if(!n)throw new sf("base intrinsic for "+t+" exists, but the property is not available.");return}if(Wu&&d+1>=r.length){var v=Wu(a,p);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[p]}else f=V1(a,p),a=a[p];f&&!l&&(qu[s]=a)}}return a},u0e=l0e,Y3=u0e("%Object.defineProperty%",!0),Q3=function(){if(Y3)try{return Y3({},"a",{value:1}),!0}catch{return!1}return!1};Q3.hasArrayLengthDefineBug=function(){if(!Q3())return null;try{return Y3([],"length",{value:1}).length!==1}catch{return!0}};var c0e=Q3,d0e=$ye,f0e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",h0e=Object.prototype.toString,p0e=Array.prototype.concat,HB=Object.defineProperty,g0e=function(e){return typeof e=="function"&&h0e.call(e)==="[object Function]"},m0e=c0e(),WB=HB&&m0e,y0e=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!g0e(r)||!r())return}WB?HB(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},qB=function(e,t){var n=arguments.length>2?arguments[2]:{},r=d0e(t);f0e&&(r=p0e.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)y0e(e,r[i],t[r[i]],n[r[i]])};qB.supportsDescriptors=!!WB;var KB=qB,vv={exports:{}};typeof self<"u"?vv.exports=self:typeof window<"u"?vv.exports=window:vv.exports=Function("return this")();var XB=vv.exports,v0e=XB,YB=function(){return typeof He!="object"||!He||He.Math!==Math||He.Array!==Array?v0e:He},_0e=KB,b0e=YB,S0e=function(){var t=b0e();if(_0e.supportsDescriptors){var n=Object.getOwnPropertyDescriptor(t,"globalThis");(!n||n.configurable&&(n.enumerable||!n.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!0})}else(typeof globalThis!="object"||globalThis!==t)&&(t.globalThis=t);return t},w0e=KB,x0e=XB,QB=YB,C0e=S0e,T0e=QB(),ZB=function(){return T0e};w0e(ZB,{getPolyfill:QB,implementation:x0e,shim:C0e});var nE=ZB,JB={},Sm={},rE={},Fb={},Bb={};Object.defineProperty(Bb,"__esModule",{value:!0});Bb.convertWildcardToRegex=void 0;var E0e=/\*+/g,A0e=function(e){return new RegExp(e.replace(E0e,"(.+?)"))};Bb.convertWildcardToRegex=A0e;var wm={};Object.defineProperty(wm,"__esModule",{value:!0});wm.escapeRegexString=void 0;var P0e=/[$()*+.?[\\\]^{|}]/g,R0e=/-/g,O0e=function(e){return e.replace(P0e,"\\$&").replace(R0e,"\\x2d")};wm.escapeRegexString=O0e;var Ub={};Object.defineProperty(Ub,"__esModule",{value:!0});Ub.parseRegex=void 0;var k0e=/(\/?)(.+)\1([a-z]*)/,I0e=/^(?!.*?(.).*?\1)[AJUXgimsux]+$/,M0e=function(e){var t=k0e.exec(e);if(!t)throw new Error("Invalid RegExp.");return t[3]&&!I0e.test(t[3])?new RegExp(e):new RegExp(t[2],t[3])};Ub.parseRegex=M0e;Object.defineProperty(Fb,"__esModule",{value:!0});Fb.createStringTest=void 0;var N0e=Bb,L0e=wm,D0e=Ub,Rx=function(e,t){var n;return e[t]?n=e[t]:n=e[t]=(0,D0e.parseRegex)(t),function(r){var i,o;return(o=(i=r.match(n))===null||i===void 0?void 0:i[0])!==null&&o!==void 0?o:!1}},$0e=function(e,t){if(t.type!=="Tag")throw new Error("Expected a tag expression.");var n=t.expression;if(n.type==="RangeExpression")throw new Error("Unexpected range expression.");if(n.type==="RegexExpression")return Rx(e,n.value);if(n.type!=="LiteralExpression")throw new Error("Expected a literal expression.");var r=String(n.value);return r.includes("*")&&n.quoted===!1?Rx(e,String((0,N0e.convertWildcardToRegex)(r))+(n.quoted?"u":"ui")):Rx(e,"/("+(0,L0e.escapeRegexString)(r)+")/"+(n.quoted?"u":"ui"))};Fb.createStringTest=$0e;var zb={};Object.defineProperty(zb,"__esModule",{value:!0});zb.testComparisonRange=void 0;var F0e=function(e,t,n){switch(n){case":=":return t===e;case":>":return t>e;case":<":return t<e;case":>=":return t>=e;case":<=":return t<=e;default:throw new Error("Unimplemented comparison operator: ".concat(n))}};zb.testComparisonRange=F0e;var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0});Vb.testRange=void 0;var B0e=function(e,t){return typeof e=="number"?!(e<t.min||e===t.min&&!t.minInclusive||e>t.max||e===t.max&&!t.maxInclusive):!1};Vb.testRange=B0e;(function(e){var t=He&&He.__assign||function(){return t=Object.assign||function(d){for(var f,p=1,g=arguments.length;p<g;p++){f=arguments[p];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(d[m]=f[m])}return d},t.apply(this,arguments)},n=He&&He.__spreadArray||function(d,f,p){if(p||arguments.length===2)for(var g=0,m=f.length,v;g<m;g++)(v||!(g in f))&&(v||(v=Array.prototype.slice.call(f,0,g)),v[g]=f[g]);return d.concat(v||Array.prototype.slice.call(f))};Object.defineProperty(e,"__esModule",{value:!0}),e.internalFilter=void 0;var r=Fb,i=zb,o=Vb,s=function(d){if(d.type!=="Tag")throw new Error("Expected a tag expression.");var f=d.expression;if(f.type==="RangeExpression")return function(v){return(0,o.testRange)(v,f.range)};if(f.type==="EmptyExpression")return function(){return!1};var p=f.value;if(d.operator&&d.operator.operator!==":"){var g=d.operator;if(typeof p!="number")throw new TypeError("Expected a number.");return function(v){return typeof v!="number"?!1:(0,i.testComparisonRange)(p,v,g.operator)}}else{if(typeof p=="boolean")return function(v){return v===p};if(p===null)return function(v){return v===null};var m=(0,r.createStringTest)({},d);return function(v){return m(String(v))}}},a=function(d,f,p,g,m){if(Array.isArray(f)){for(var v=!1,x=0,_=0,b=f;_<b.length;_++){var y=b[_];if(a(d,y,p,n(n([],g,!0),[String(x++)],!1),m)){if(p)return!0;v=!0}}return v}else if(typeof f=="object"&&f!==null){var v=!1;for(var S in f)if(a(d,f[S],p,n(n([],g,!0),[S],!1),m)){if(p)return!0;v=!0}return v}if(d.type!=="Tag")throw new Error("Expected a tag expression.");if(!d.test)throw new Error("Expected test to be defined.");var C=d.test(f);return C?(m.push(t(t({},typeof C=="string"&&{keyword:C}),{path:g.join(".")})),!0):!!C},l=function(d,f,p,g,m){if(f.type!=="Tag")throw new Error("Expected a tag expression.");if(f.test||(f.test=s(f)),f.field.type==="ImplicitField"){var v=!1;for(var x in d)if(a(t(t({},f),{field:{location:{end:-1,start:-1},name:x,quoted:!0,quotes:"double",type:"Field"}}),d[x],p,n(n([],g,!0),[x],!1),m)){if(p)return!0;v=!0}return v}if(f.field.name in d)return a(f,d[f.field.name],p,g,m);if(f.getValue&&f.field.path)return a(f,f.getValue(d),p,f.field.path,m);if(f.field.path){for(var _=d,b=0,y=f.field.path;b<y.length;b++){var S=y[b];if(typeof _!="object"||_===null)return!1;if(S in _)_=_[S];else return!1}return a(f,_,p,f.field.path,m)}else return!1},u=function(d,f,p,g,m){if(p===void 0&&(p=!0),g===void 0&&(g=[]),m===void 0&&(m=[]),d.type==="Tag")return f.filter(function(b){return l(b,d,p,d.field.type==="ImplicitField"?g:n(n([],g,!0),[d.field.name],!1),m)});if(d.type==="UnaryOperator"){var v=(0,e.internalFilter)(d.operand,f,p,g,[]);return f.filter(function(b){return!v.includes(b)})}if(!d.left)throw new Error("Expected left to be defined.");var x=(0,e.internalFilter)(d.left,f,p,g,m);if(!d.right)throw new Error("Expected right to be defined.");if(d.type!=="LogicalExpression")throw new Error("Expected a tag expression.");if(d.operator.operator==="OR"){var _=(0,e.internalFilter)(d.right,f,p,g,m);return Array.from(new Set(n(n([],x,!0),_,!0)))}else if(d.operator.operator==="AND")return(0,e.internalFilter)(d.right,x,p,g,m);throw new Error("Unexpected state.")};e.internalFilter=u})(rE);Object.defineProperty(Sm,"__esModule",{value:!0});Sm.filter=void 0;var U0e=rE,z0e=function(e,t){return(0,U0e.internalFilter)(e,t)};Sm.filter=z0e;var jb={};Object.defineProperty(jb,"__esModule",{value:!0});jb.highlight=void 0;var V0e=wm,j0e=rE,G0e=function(e,t){var n=[];(0,j0e.internalFilter)(e,[t],!1,[],n);for(var r=[],i=function(l){var u=r.find(function(d){return d.path===l.path});u||(u={keywords:[],path:l.path},r.push(u)),l.keyword&&u.keywords.push(l.keyword)},o=0,s=n;o<s.length;o++){var a=s[o];i(a)}return r.map(function(l){return l.keywords.length>0?{path:l.path,query:new RegExp("("+l.keywords.map(function(u){return(0,V0e.escapeRegexString)(u.trim())}).join("|")+")")}:{path:l.path}})};jb.highlight=G0e;var Gb={},eU={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.nearley=n()})(He,function(){function t(u,d,f){return this.id=++t.highestId,this.name=u,this.symbols=d,this.postprocess=f,this}t.highestId=0,t.prototype.toString=function(u){var d=typeof u>"u"?this.symbols.map(l).join(" "):this.symbols.slice(0,u).map(l).join(" ")+" ● "+this.symbols.slice(u).map(l).join(" ");return this.name+" → "+d};function n(u,d,f,p){this.rule=u,this.dot=d,this.reference=f,this.data=[],this.wantedBy=p,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var d=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return d.left=this,d.right=u,d.isComplete&&(d.data=d.build(),d.right=void 0),d},n.prototype.build=function(){var u=[],d=this;do u.push(d.right.data),d=d.left;while(d.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function r(u,d){this.grammar=u,this.index=d,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(u){for(var d=this.states,f=this.wants,p=this.completed,g=0;g<d.length;g++){var m=d[g];if(m.isComplete){if(m.finish(),m.data!==s.fail){for(var v=m.wantedBy,x=v.length;x--;){var _=v[x];this.complete(_,m)}if(m.reference===this.index){var b=m.rule.name;(this.completed[b]=this.completed[b]||[]).push(m)}}}else{var b=m.rule.symbols[m.dot];if(typeof b!="string"){this.scannable.push(m);continue}if(f[b]){if(f[b].push(m),p.hasOwnProperty(b))for(var y=p[b],x=0;x<y.length;x++){var S=y[x];this.complete(m,S)}}else f[b]=[m],this.predict(b)}}},r.prototype.predict=function(u){for(var d=this.grammar.byName[u]||[],f=0;f<d.length;f++){var p=d[f],g=this.wants[u],m=new n(p,0,this.index,g);this.states.push(m)}},r.prototype.complete=function(u,d){var f=u.nextState(d);this.states.push(f)};function i(u,d){this.rules=u,this.start=d||this.rules[0].name;var f=this.byName={};this.rules.forEach(function(p){f.hasOwnProperty(p.name)||(f[p.name]=[]),f[p.name].push(p)})}i.fromCompiled=function(p,d){var f=p.Lexer;p.ParserStart&&(d=p.ParserStart,p=p.ParserRules);var p=p.map(function(m){return new t(m.name,m.symbols,m.postprocess)}),g=new i(p,d);return g.lexer=f,g};function o(){this.reset("")}o.prototype.reset=function(u,d){this.buffer=u,this.index=0,this.line=d?d.line:1,this.lastLineBreak=d?-d.col:0},o.prototype.next=function(){if(this.index<this.buffer.length){var u=this.buffer[this.index++];return u===`
|
||
`&&(this.line+=1,this.lastLineBreak=this.index),{value:u}}},o.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},o.prototype.formatError=function(u,d){var f=this.buffer;if(typeof f=="string"){var p=f.split(`
|
||
`).slice(Math.max(0,this.line-5),this.line),g=f.indexOf(`
|
||
`,this.index);g===-1&&(g=f.length);var m=this.index-this.lastLineBreak,v=String(this.line).length;return d+=" at line "+this.line+" col "+m+`:
|
||
|
||
`,d+=p.map(function(_,b){return x(this.line-p.length+b+1,v)+" "+_},this).join(`
|
||
`),d+=`
|
||
`+x("",v+m)+`^
|
||
`,d}else return d+" at index "+(this.index-1);function x(_,b){var y=String(_);return Array(b-y.length+1).join(" ")+y}};function s(u,d,f){if(u instanceof i)var p=u,f=d;else var p=i.fromCompiled(u,d);this.grammar=p,this.options={keepHistory:!1,lexer:p.lexer||new o};for(var g in f||{})this.options[g]=f[g];this.lexer=this.options.lexer,this.lexerState=void 0;var m=new r(p,0);this.table=[m],m.wants[p.start]=[],m.predict(p.start),m.process(),this.current=0}s.fail={},s.prototype.feed=function(u){var d=this.lexer;d.reset(u,this.lexerState);for(var f;;){try{if(f=d.next(),!f)break}catch(E){var v=new r(this.grammar,this.current+1);this.table.push(v);var p=new Error(this.reportLexerError(E));throw p.offset=this.current,p.token=E.token,p}var g=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var m=this.current+1,v=new r(this.grammar,m);this.table.push(v);for(var x=f.text!==void 0?f.text:f.value,_=d.constructor===o?f.value:f,b=g.scannable,y=b.length;y--;){var S=b[y],C=S.rule.symbols[S.dot];if(C.test?C.test(_):C.type?C.type===f.type:C.literal===x){var T=S.nextState({data:_,token:f,isToken:!0,reference:m-1});v.states.push(T)}}if(v.process(),v.states.length===0){var p=new Error(this.reportError(f));throw p.offset=this.current,p.token=f,p}this.options.keepHistory&&(g.lexerState=d.save()),this.current++}return g&&(this.lexerState=d.save()),this.results=this.finish(),this},s.prototype.reportLexerError=function(u){var d,f,p=u.token;return p?(d="input "+JSON.stringify(p.text[0])+" (lexer error)",f=this.lexer.formatError(p,"Syntax error")):(d="input (lexer error)",f=u.message),this.reportErrorCommon(f,d)},s.prototype.reportError=function(u){var d=(u.type?u.type+" token: ":"")+JSON.stringify(u.value!==void 0?u.value:u),f=this.lexer.formatError(u,"Syntax error");return this.reportErrorCommon(f,d)},s.prototype.reportErrorCommon=function(u,d){var f=[];f.push(u);var p=this.table.length-2,g=this.table[p],m=g.states.filter(function(x){var _=x.rule.symbols[x.dot];return _&&typeof _!="string"});if(m.length===0)f.push("Unexpected "+d+`. I did not expect any more input. Here is the state of my parse table:
|
||
`),this.displayStateStack(g.states,f);else{f.push("Unexpected "+d+`. Instead, I was expecting to see one of the following:
|
||
`);var v=m.map(function(x){return this.buildFirstStateStack(x,[])||[x]},this);v.forEach(function(x){var _=x[0],b=_.rule.symbols[_.dot],y=this.getSymbolDisplay(b);f.push("A "+y+" based on:"),this.displayStateStack(x,f)},this)}return f.push(""),f.join(`
|
||
`)},s.prototype.displayStateStack=function(u,d){for(var f,p=0,g=0;g<u.length;g++){var m=u[g],v=m.rule.toString(m.dot);v===f?p++:(p>0&&d.push(" ^ "+p+" more lines identical to this"),p=0,d.push(" "+v)),f=v}},s.prototype.getSymbolDisplay=function(u){return a(u)},s.prototype.buildFirstStateStack=function(u,d){if(d.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var f=u.wantedBy[0],p=[u].concat(d),g=this.buildFirstStateStack(f,p);return g===null?null:[u].concat(g)},s.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},s.prototype.restore=function(u){var d=u.index;this.current=d,this.table[d]=u,this.table.splice(d+1),this.lexerState=u.lexerState,this.results=this.finish()},s.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},s.prototype.finish=function(){var u=[],d=this.grammar.start,f=this.table[this.table.length-1];return f.states.forEach(function(p){p.rule.name===d&&p.dot===p.rule.symbols.length&&p.reference===0&&p.data!==s.fail&&u.push(p)}),u.map(function(p){return p.data})};function a(u){var d=typeof u;if(d==="string")return u;if(d==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function l(u){var d=typeof u;if(d==="string")return u;if(d==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:s,Grammar:i,Rule:t}})})(eU);var H0e=eU.exports,ac={},tU={},nu={};nu.__esModule=void 0;nu.__esModule=!0;var W0e=typeof Object.setPrototypeOf=="function",q0e=typeof Object.getPrototypeOf=="function",K0e=typeof Object.defineProperty=="function",X0e=typeof Object.create=="function",Y0e=typeof Object.prototype.hasOwnProperty=="function",Q0e=function(t,n){W0e?Object.setPrototypeOf(t,n):t.__proto__=n};nu.setPrototypeOf=Q0e;var Z0e=function(t){return q0e?Object.getPrototypeOf(t):t.__proto__||t.prototype};nu.getPrototypeOf=Z0e;var sO=!1,J0e=function e(t,n,r){if(K0e&&!sO)try{Object.defineProperty(t,n,r)}catch{sO=!0,e(t,n,r)}else t[n]=r.value};nu.defineProperty=J0e;var nU=function(t,n){return Y0e?t.hasOwnProperty(t,n):t[n]===void 0};nu.hasOwnProperty=nU;var eve=function(t,n){if(X0e)return Object.create(t,n);var r=function(){};r.prototype=t;var i=new r;if(typeof n>"u")return i;if(typeof n=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof n=="object")for(var o in n)nU(n,o)&&(i[o]=n[o].value);return i};nu.objectCreate=eve;(function(e){e.__esModule=void 0,e.__esModule=!0;var t=nu,n=t.setPrototypeOf,r=t.getPrototypeOf,i=t.defineProperty,o=t.objectCreate,s=new Error().toString()==="[object Error]",a="";function l(u){var d=this.constructor,f=d.name||function(){var x=d.toString().match(/^function\s*([^\s(]+)/);return x===null?a||"Error":x[1]}(),p=f==="Error",g=p?a:f,m=Error.apply(this,arguments);if(n(m,r(this)),!(m instanceof d)||!(m instanceof l)){var m=this;Error.apply(this,arguments),i(m,"message",{configurable:!0,enumerable:!1,value:u,writable:!0})}if(i(m,"name",{configurable:!0,enumerable:!1,value:g,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(m,p?l:d),m.stack===void 0){var v=new Error(u);v.name=m.name,m.stack=v.stack}return s&&i(m,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),m}a=l.name||"ExtendableError",l.prototype=o(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),e.ExtendableError=l,e.default=e.ExtendableError})(tU);var rU=He&&He.__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)}}();Object.defineProperty(ac,"__esModule",{value:!0});ac.SyntaxError=ac.LiqeError=void 0;var tve=tU,iU=function(e){rU(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(tve.ExtendableError);ac.LiqeError=iU;var nve=function(e){rU(t,e);function t(n,r,i,o){var s=e.call(this,n)||this;return s.message=n,s.offset=r,s.line=i,s.column=o,s}return t}(iU);ac.SyntaxError=nve;var iE={},G1=He&&He.__assign||function(){return G1=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},G1.apply(this,arguments)};Object.defineProperty(iE,"__esModule",{value:!0});function na(e){return e[0]}var rve={Lexer:void 0,ParserRules:[{name:"main",symbols:["_","logical_expression","_"],postprocess:function(e){return e[1]}},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","whitespace_character"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(e){return e[0].length}},{name:"__$ebnf$1",symbols:["whitespace_character"]},{name:"__$ebnf$1",symbols:["__$ebnf$1","whitespace_character"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"__",symbols:["__$ebnf$1"],postprocess:function(e){return e[0].length}},{name:"whitespace_character",symbols:[/[ \t\n\v\f]/],postprocess:na},{name:"decimal$ebnf$1",symbols:[{literal:"-"}],postprocess:na},{name:"decimal$ebnf$1",symbols:[],postprocess:function(){return null}},{name:"decimal$ebnf$2",symbols:[/[0-9]/]},{name:"decimal$ebnf$2",symbols:["decimal$ebnf$2",/[0-9]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"decimal$ebnf$3$subexpression$1$ebnf$1",symbols:[/[0-9]/]},{name:"decimal$ebnf$3$subexpression$1$ebnf$1",symbols:["decimal$ebnf$3$subexpression$1$ebnf$1",/[0-9]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"decimal$ebnf$3$subexpression$1",symbols:[{literal:"."},"decimal$ebnf$3$subexpression$1$ebnf$1"]},{name:"decimal$ebnf$3",symbols:["decimal$ebnf$3$subexpression$1"],postprocess:na},{name:"decimal$ebnf$3",symbols:[],postprocess:function(){return null}},{name:"decimal",symbols:["decimal$ebnf$1","decimal$ebnf$2","decimal$ebnf$3"],postprocess:function(e){return parseFloat((e[0]||"")+e[1].join("")+(e[2]?"."+e[2][1].join(""):""))}},{name:"dqstring$ebnf$1",symbols:[]},{name:"dqstring$ebnf$1",symbols:["dqstring$ebnf$1","dstrchar"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"dqstring",symbols:[{literal:'"'},"dqstring$ebnf$1",{literal:'"'}],postprocess:function(e){return e[1].join("")}},{name:"sqstring$ebnf$1",symbols:[]},{name:"sqstring$ebnf$1",symbols:["sqstring$ebnf$1","sstrchar"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"sqstring",symbols:[{literal:"'"},"sqstring$ebnf$1",{literal:"'"}],postprocess:function(e){return e[1].join("")}},{name:"dstrchar",symbols:[/[^\\"\n]/],postprocess:na},{name:"dstrchar",symbols:[{literal:"\\"},"strescape"],postprocess:function(e){return JSON.parse('"'+e.join("")+'"')}},{name:"sstrchar",symbols:[/[^\\'\n]/],postprocess:na},{name:"sstrchar",symbols:[{literal:"\\"},"strescape"],postprocess:function(e){return JSON.parse('"'+e.join("")+'"')}},{name:"sstrchar$string$1",symbols:[{literal:"\\"},{literal:"'"}],postprocess:function(e){return e.join("")}},{name:"sstrchar",symbols:["sstrchar$string$1"],postprocess:function(){return"'"}},{name:"strescape",symbols:[/["\\/bfnrt]/],postprocess:na},{name:"strescape",symbols:[{literal:"u"},/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/,/[a-fA-F0-9]/],postprocess:function(e){return e.join("")}},{name:"logical_expression",symbols:["two_op_logical_expression"],postprocess:na},{name:"two_op_logical_expression",symbols:["pre_two_op_logical_expression","boolean_operator","post_one_op_logical_expression"],postprocess:function(e){return{type:"LogicalExpression",location:{start:e[0].location.start,end:e[2].location.end},operator:e[1],left:e[0],right:e[2]}}},{name:"two_op_logical_expression",symbols:["pre_two_op_implicit_logical_expression","__","post_one_op_implicit_logical_expression"],postprocess:function(e){return{type:"LogicalExpression",location:{start:e[0].location.start,end:e[2].location.end},operator:{operator:"AND",type:"ImplicitBooleanOperator"},left:e[0],right:e[2]}}},{name:"two_op_logical_expression",symbols:["one_op_logical_expression"],postprocess:function(e){return e[0]}},{name:"pre_two_op_implicit_logical_expression",symbols:["two_op_logical_expression"],postprocess:function(e){return e[0]}},{name:"pre_two_op_implicit_logical_expression",symbols:["parentheses_open","_","two_op_logical_expression","_","parentheses_close"],postprocess:function(e){return{location:{start:e[0].location.start,end:e[4].location.start+1},type:"ParenthesizedExpression",expression:e[2]}}},{name:"post_one_op_implicit_logical_expression",symbols:["one_op_logical_expression"],postprocess:function(e){return e[0]}},{name:"post_one_op_implicit_logical_expression",symbols:["parentheses_open","_","one_op_logical_expression","_","parentheses_close"],postprocess:function(e){return{location:{start:e[0].location.start,end:e[4].location.start+1},type:"ParenthesizedExpression",expression:e[2]}}},{name:"pre_two_op_logical_expression",symbols:["two_op_logical_expression","__"],postprocess:function(e){return e[0]}},{name:"pre_two_op_logical_expression",symbols:["parentheses_open","_","two_op_logical_expression","_","parentheses_close"],postprocess:function(e){return{location:{start:e[0].location.start,end:e[4].location.start+1},type:"ParenthesizedExpression",expression:e[2]}}},{name:"one_op_logical_expression",symbols:["parentheses_open","_","parentheses_close"],postprocess:function(e){return{location:{start:e[0].location.start,end:e[2].location.start+1},type:"ParenthesizedExpression",expression:{type:"EmptyExpression",location:{start:e[0].location.start+1,end:e[0].location.start+1}}}}},{name:"one_op_logical_expression",symbols:["parentheses_open","_","two_op_logical_expression","_","parentheses_close"],postprocess:function(e){return{location:{start:e[0].location.start,end:e[4].location.start+1},type:"ParenthesizedExpression",expression:e[2]}}},{name:"one_op_logical_expression$string$1",symbols:[{literal:"N"},{literal:"O"},{literal:"T"}],postprocess:function(e){return e.join("")}},{name:"one_op_logical_expression",symbols:["one_op_logical_expression$string$1","post_boolean_primary"],postprocess:function(e,t){return{type:"UnaryOperator",operator:"NOT",operand:e[1],location:{start:t,end:e[1].location.end}}}},{name:"one_op_logical_expression",symbols:[{literal:"-"},"boolean_primary"],postprocess:function(e,t){return{type:"UnaryOperator",operator:"-",operand:e[1],location:{start:t,end:e[1].location.end}}}},{name:"one_op_logical_expression",symbols:["boolean_primary"],postprocess:function(e){return e[0]}},{name:"post_one_op_logical_expression",symbols:["__","one_op_logical_expression"],postprocess:function(e){return e[1]}},{name:"post_one_op_logical_expression",symbols:["parentheses_open","_","one_op_logical_expression","_","parentheses_close"],postprocess:function(e){return{location:{start:e[0].location,end:e[4].location+1},type:"ParenthesizedExpression",expression:e[2]}}},{name:"parentheses_open",symbols:[{literal:"("}],postprocess:function(e,t){return{location:{start:t}}}},{name:"parentheses_close",symbols:[{literal:")"}],postprocess:function(e,t){return{location:{start:t}}}},{name:"boolean_operator$string$1",symbols:[{literal:"O"},{literal:"R"}],postprocess:function(e){return e.join("")}},{name:"boolean_operator",symbols:["boolean_operator$string$1"],postprocess:function(e,t){return{location:{start:t,end:t+2},operator:"OR",type:"BooleanOperator"}}},{name:"boolean_operator$string$2",symbols:[{literal:"A"},{literal:"N"},{literal:"D"}],postprocess:function(e){return e.join("")}},{name:"boolean_operator",symbols:["boolean_operator$string$2"],postprocess:function(e,t){return{location:{start:t,end:t+3},operator:"AND",type:"BooleanOperator"}}},{name:"boolean_primary",symbols:["tag_expression"],postprocess:na},{name:"post_boolean_primary",symbols:["__","parentheses_open","_","two_op_logical_expression","_","parentheses_close"],postprocess:function(e){return{location:{start:e[1].location.start,end:e[5].location.start+1},type:"ParenthesizedExpression",expression:e[3]}}},{name:"post_boolean_primary",symbols:["__","boolean_primary"],postprocess:function(e){return e[1]}},{name:"tag_expression",symbols:["field","comparison_operator","expression"],postprocess:function(e,t){var n={type:"Field",name:e[0].name,path:e[0].name.split(".").filter(Boolean),quoted:e[0].quoted,quotes:e[0].quotes,location:e[0].location};return e[0].quotes||delete n.quotes,G1({location:{start:t,end:e[2].expression.location.end},field:n,operator:e[1]},e[2])}},{name:"tag_expression",symbols:["field","comparison_operator"],postprocess:function(e,t){var n={type:"Field",name:e[0].name,path:e[0].name.split(".").filter(Boolean),quoted:e[0].quoted,quotes:e[0].quotes,location:e[0].location};return e[0].quotes||delete n.quotes,{type:"Tag",location:{start:t,end:e[1].location.end},field:n,operator:e[1],expression:{type:"EmptyExpression",location:{start:e[1].location.end,end:e[1].location.end}}}}},{name:"tag_expression",symbols:["expression"],postprocess:function(e,t){return G1({location:{start:t,end:e[0].expression.location.end},field:{type:"ImplicitField"}},e[0])}},{name:"field$ebnf$1",symbols:[]},{name:"field$ebnf$1",symbols:["field$ebnf$1",/[a-zA-Z\d_$.]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"field",symbols:[/[_a-zA-Z$]/,"field$ebnf$1"],postprocess:function(e,t){return{type:"LiteralExpression",name:e[0]+e[1].join(""),quoted:!1,location:{start:t,end:t+(e[0]+e[1].join("")).length}}}},{name:"field",symbols:["sqstring"],postprocess:function(e,t){return{type:"LiteralExpression",name:e[0],quoted:!0,quotes:"single",location:{start:t,end:t+e[0].length+2}}}},{name:"field",symbols:["dqstring"],postprocess:function(e,t){return{type:"LiteralExpression",name:e[0],quoted:!0,quotes:"double",location:{start:t,end:t+e[0].length+2}}}},{name:"expression",symbols:["decimal"],postprocess:function(e,t){return{type:"Tag",expression:{location:{start:t,end:t+e.join("").length},type:"LiteralExpression",quoted:!1,value:Number(e.join(""))}}}},{name:"expression",symbols:["regex"],postprocess:function(e,t){return{type:"Tag",expression:{location:{start:t,end:t+e.join("").length},type:"RegexExpression",value:e.join("")}}}},{name:"expression",symbols:["range"],postprocess:function(e){return e[0]}},{name:"expression",symbols:["unquoted_value"],postprocess:function(e,t,n){var r=e.join("");if(e[0]==="AND"||e[0]==="OR"||e[0]==="NOT")return n;var i;return r==="true"?i=!0:r==="false"?i=!1:r==="null"?i=null:i=r,{type:"Tag",expression:{location:{start:t,end:t+r.length},type:"LiteralExpression",quoted:!1,value:i}}}},{name:"expression",symbols:["sqstring"],postprocess:function(e,t){return{type:"Tag",expression:{location:{start:t,end:t+e.join("").length+2},type:"LiteralExpression",quoted:!0,quotes:"single",value:e.join("")}}}},{name:"expression",symbols:["dqstring"],postprocess:function(e,t){return{type:"Tag",expression:{location:{start:t,end:t+e.join("").length+2},type:"LiteralExpression",quoted:!0,quotes:"double",value:e.join("")}}}},{name:"range$string$1",symbols:[{literal:" "},{literal:"T"},{literal:"O"},{literal:" "}],postprocess:function(e){return e.join("")}},{name:"range",symbols:["range_open","decimal","range$string$1","decimal","range_close"],postprocess:function(e,t){return{location:{start:t},type:"Tag",expression:{location:{start:e[0].location.start,end:e[4].location.start+1},type:"RangeExpression",range:{min:e[1],minInclusive:e[0].inclusive,maxInclusive:e[4].inclusive,max:e[3]}}}}},{name:"range_open",symbols:[{literal:"["}],postprocess:function(e,t){return{location:{start:t},inclusive:!0}}},{name:"range_open",symbols:[{literal:"{"}],postprocess:function(e,t){return{location:{start:t},inclusive:!1}}},{name:"range_close",symbols:[{literal:"]"}],postprocess:function(e,t){return{location:{start:t},inclusive:!0}}},{name:"range_close",symbols:[{literal:"}"}],postprocess:function(e,t){return{location:{start:t},inclusive:!1}}},{name:"comparison_operator$subexpression$1",symbols:[{literal:":"}]},{name:"comparison_operator$subexpression$1$string$1",symbols:[{literal:":"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$1"]},{name:"comparison_operator$subexpression$1$string$2",symbols:[{literal:":"},{literal:">"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$2"]},{name:"comparison_operator$subexpression$1$string$3",symbols:[{literal:":"},{literal:"<"}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$3"]},{name:"comparison_operator$subexpression$1$string$4",symbols:[{literal:":"},{literal:">"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$4"]},{name:"comparison_operator$subexpression$1$string$5",symbols:[{literal:":"},{literal:"<"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"comparison_operator$subexpression$1",symbols:["comparison_operator$subexpression$1$string$5"]},{name:"comparison_operator",symbols:["comparison_operator$subexpression$1"],postprocess:function(e,t){return{location:{start:t,end:t+e[0][0].length},type:"ComparisonOperator",operator:e[0][0]}}},{name:"regex",symbols:["regex_body","regex_flags"],postprocess:function(e){return e.join("")}},{name:"regex_body$ebnf$1",symbols:[]},{name:"regex_body$ebnf$1",symbols:["regex_body$ebnf$1","regex_body_char"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_body",symbols:[{literal:"/"},"regex_body$ebnf$1",{literal:"/"}],postprocess:function(e){return"/"+e[1].join("")+"/"}},{name:"regex_body_char",symbols:[/[^\\]/],postprocess:na},{name:"regex_body_char",symbols:[{literal:"\\"},/[^\\]/],postprocess:function(e){return"\\"+e[1]}},{name:"regex_flags",symbols:[]},{name:"regex_flags$ebnf$1",symbols:[/[gmiyusd]/]},{name:"regex_flags$ebnf$1",symbols:["regex_flags$ebnf$1",/[gmiyusd]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"regex_flags",symbols:["regex_flags$ebnf$1"],postprocess:function(e){return e[0].join("")}},{name:"unquoted_value$ebnf$1",symbols:[]},{name:"unquoted_value$ebnf$1",symbols:["unquoted_value$ebnf$1",/[a-zA-Z\.\-_*@#$]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"unquoted_value",symbols:[/[a-zA-Z_*@#$]/,"unquoted_value$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}}],ParserStart:"main"};iE.default=rve;var oU={},Hb={},xm={};Object.defineProperty(xm,"__esModule",{value:!0});xm.isSafePath=void 0;var ive=/^(\.(?:[_a-zA-Z][a-zA-Z\d_]*|\0|[1-9]\d*))+$/u,ove=function(e){return ive.test(e)};xm.isSafePath=ove;Object.defineProperty(Hb,"__esModule",{value:!0});Hb.createGetValueFunctionBody=void 0;var sve=xm,ave=function(e){if(!(0,sve.isSafePath)(e))throw new Error("Unsafe path.");var t="return subject"+e;return t.replace(/(\.(\d+))/g,".[$2]").replace(/\./g,"?.")};Hb.createGetValueFunctionBody=ave;(function(e){var t=He&&He.__assign||function(){return t=Object.assign||function(o){for(var s,a=1,l=arguments.length;a<l;a++){s=arguments[a];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(o[u]=s[u])}return o},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.hydrateAst=void 0;var n=Hb,r=xm,i=function(o){var s=t({},o);return o.type==="Tag"&&o.field.type==="Field"&&"field"in o&&(0,r.isSafePath)(o.field.name)&&(s.getValue=new Function("subject",(0,n.createGetValueFunctionBody)(o.field.name))),"left"in o&&(s.left=(0,e.hydrateAst)(o.left)),"right"in o&&(s.right=(0,e.hydrateAst)(o.right)),"operand"in o&&(s.operand=(0,e.hydrateAst)(o.operand)),s};e.hydrateAst=i})(oU);var sU=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gb,"__esModule",{value:!0});Gb.parse=void 0;var aU=sU(H0e),lve=ac,uve=sU(iE),cve=oU,dve=aU.default.Grammar.fromCompiled(uve.default),fve=/Syntax error at line (?<line>\d+) col (?<column>\d+)/,hve=function(e){if(e.trim()==="")return{location:{end:0,start:0},type:"EmptyExpression"};var t=new aU.default.Parser(dve),n;try{n=t.feed(e).results}catch(o){if(typeof(o==null?void 0:o.message)=="string"&&typeof(o==null?void 0:o.offset)=="number"){var r=o.message.match(fve);throw r?new lve.SyntaxError("Syntax error at line ".concat(r.groups.line," column ").concat(r.groups.column),o.offset,Number(r.groups.line),Number(r.groups.column)):o}throw o}if(n.length===0)throw new Error("Found no parsings.");if(n.length>1)throw new Error("Ambiguous results.");var i=(0,cve.hydrateAst)(n[0]);return i};Gb.parse=hve;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0});Wb.test=void 0;var pve=Sm,gve=function(e,t){return(0,pve.filter)(e,[t]).length===1};Wb.test=gve;var lU={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=void 0;var t=function(o,s){return s==="double"?'"'.concat(o,'"'):s==="single"?"'".concat(o,"'"):o},n=function(o){if(o.type==="LiteralExpression")return o.quoted&&typeof o.value=="string"?t(o.value,o.quotes):String(o.value);if(o.type==="RegexExpression")return String(o.value);if(o.type==="RangeExpression"){var s=o.range,a=s.min,l=s.max,u=s.minInclusive,d=s.maxInclusive;return"".concat(u?"[":"{").concat(a," TO ").concat(l).concat(d?"]":"}")}if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")},r=function(o){if(o.type!=="Tag")throw new Error("Expected a tag expression.");var s=o.field,a=o.expression,l=o.operator;if(s.type==="ImplicitField")return n(a);var u=s.quoted?t(s.name,s.quotes):s.name,d=" ".repeat(a.location.start-l.location.end);return u+l.operator+d+n(a)},i=function(o){if(o.type==="ParenthesizedExpression"){if(!("location"in o.expression))throw new Error("Expected location in expression.");if(!o.location.end)throw new Error("Expected location end.");var s=" ".repeat(o.expression.location.start-(o.location.start+1)),a=" ".repeat(o.location.end-o.expression.location.end-1);return"(".concat(s).concat((0,e.serialize)(o.expression)).concat(a,")")}if(o.type==="Tag")return r(o);if(o.type==="LogicalExpression"){var l="";return o.operator.type==="BooleanOperator"?(l+=" ".repeat(o.operator.location.start-o.left.location.end),l+=o.operator.operator,l+=" ".repeat(o.right.location.start-o.operator.location.end)):l=" ".repeat(o.right.location.start-o.left.location.end),"".concat((0,e.serialize)(o.left)).concat(l).concat((0,e.serialize)(o.right))}if(o.type==="UnaryOperator")return(o.operator==="NOT"?"NOT ":o.operator)+(0,e.serialize)(o.operand);if(o.type==="EmptyExpression")return"";throw new Error("Unexpected AST type.")};e.serialize=i})(lU);var qb={};Object.defineProperty(qb,"__esModule",{value:!0});qb.isSafeUnquotedExpression=void 0;var mve=function(e){return/^[#$*@A-Z_a-z][#$*.@A-Z_a-z-]*$/.test(e)};qb.isSafeUnquotedExpression=mve;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isSafeUnquotedExpression=e.serialize=e.SyntaxError=e.LiqeError=e.test=e.parse=e.highlight=e.filter=void 0;var t=Sm;Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return t.filter}});var n=jb;Object.defineProperty(e,"highlight",{enumerable:!0,get:function(){return n.highlight}});var r=Gb;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return r.parse}});var i=Wb;Object.defineProperty(e,"test",{enumerable:!0,get:function(){return i.test}});var o=ac;Object.defineProperty(e,"LiqeError",{enumerable:!0,get:function(){return o.LiqeError}}),Object.defineProperty(e,"SyntaxError",{enumerable:!0,get:function(){return o.SyntaxError}});var s=lU;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return s.serialize}});var a=qb;Object.defineProperty(e,"isSafeUnquotedExpression",{enumerable:!0,get:function(){return a.isSafeUnquotedExpression}})})(JB);var Cm={},uU={},lc={};Object.defineProperty(lc,"__esModule",{value:!0});lc.ROARR_LOG_FORMAT_VERSION=lc.ROARR_VERSION=void 0;lc.ROARR_VERSION="5.0.0";lc.ROARR_LOG_FORMAT_VERSION="2.0.0";var Tm={};Object.defineProperty(Tm,"__esModule",{value:!0});Tm.logLevels=void 0;Tm.logLevels={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};var cU={},Kb={};Object.defineProperty(Kb,"__esModule",{value:!0});Kb.hasOwnProperty=void 0;const yve=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Kb.hasOwnProperty=yve;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hasOwnProperty=void 0;var t=Kb;Object.defineProperty(e,"hasOwnProperty",{enumerable:!0,get:function(){return t.hasOwnProperty}})})(cU);var dU={},Xb={},Yb={};Object.defineProperty(Yb,"__esModule",{value:!0});Yb.tokenize=void 0;const vve=/(?:%(?<flag>([+0-]|-\+))?(?<width>\d+)?(?<position>\d+\$)?(?<precision>\.\d+)?(?<conversion>[%BCESb-iosux]))|(\\%)/g,_ve=e=>{let t;const n=[];let r=0,i=0,o=null;for(;(t=vve.exec(e))!==null;){t.index>i&&(o={literal:e.slice(i,t.index),type:"literal"},n.push(o));const s=t[0];i=t.index+s.length,s==="\\%"||s==="%%"?o&&o.type==="literal"?o.literal+="%":(o={literal:"%",type:"literal"},n.push(o)):t.groups&&(o={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:s,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(o))}return i<=e.length-1&&(o&&o.type==="literal"?o.literal+=e.slice(i):n.push({literal:e.slice(i),type:"literal"})),n};Yb.tokenize=_ve;Object.defineProperty(Xb,"__esModule",{value:!0});Xb.createPrintf=void 0;const aO=tE,bve=Yb,Sve=(e,t)=>t.placeholder,wve=e=>{var t;const n=(o,s,a)=>a==="-"?o.padEnd(s," "):a==="-+"?((Number(o)>=0?"+":"")+o).padEnd(s," "):a==="+"?((Number(o)>=0?"+":"")+o).padStart(s," "):a==="0"?o.padStart(s,"0"):o.padStart(s," "),r=(t=e==null?void 0:e.formatUnboundExpression)!==null&&t!==void 0?t:Sve,i={};return(o,...s)=>{let a=i[o];a||(a=i[o]=bve.tokenize(o));let l="";for(const u of a)if(u.type==="literal")l+=u.literal;else{let d=s[u.position];if(d===void 0)l+=r(o,u,s);else if(u.conversion==="b")l+=aO.boolean(d)?"true":"false";else if(u.conversion==="B")l+=aO.boolean(d)?"TRUE":"FALSE";else if(u.conversion==="c")l+=d;else if(u.conversion==="C")l+=String(d).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")d=String(Math.trunc(d)),u.width!==null&&(d=n(d,u.width,u.flag)),l+=d;else if(u.conversion==="e")l+=Number(d).toExponential();else if(u.conversion==="E")l+=Number(d).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(d=Number(d).toFixed(u.precision)),u.width!==null&&(d=n(String(d),u.width,u.flag)),l+=d;else if(u.conversion==="o")l+=(Number.parseInt(String(d),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(d=n(String(d),u.width,u.flag)),l+=d;else if(u.conversion==="S")u.width!==null&&(d=n(String(d),u.width,u.flag)),l+=String(d).toUpperCase();else if(u.conversion==="u")l+=Number.parseInt(String(d),10)>>>0;else if(u.conversion==="x")d=(Number.parseInt(String(d),10)>>>0).toString(16),u.width!==null&&(d=n(String(d),u.width,u.flag)),l+=d;else throw new Error("Unknown format specifier.")}return l}};Xb.createPrintf=wve;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=Xb;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(dU);var Z3={exports:{}};(function(e,t){const{hasOwnProperty:n}=Object.prototype,r=x();r.configure=x,r.stringify=r,r.default=r,t.stringify=r,t.configure=x,e.exports=r;const i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function o(_){return _.length<5e3&&!i.test(_)?`"${_}"`:JSON.stringify(_)}function s(_){if(_.length>200)return _.sort();for(let b=1;b<_.length;b++){const y=_[b];let S=b;for(;S!==0&&_[S-1]>y;)_[S]=_[S-1],S--;_[S]=y}return _}const a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function l(_){return a.call(_)!==void 0&&_.length!==0}function u(_,b,y){_.length<y&&(y=_.length);const S=b===","?"":" ";let C=`"0":${S}${_[0]}`;for(let T=1;T<y;T++)C+=`${b}"${T}":${S}${_[T]}`;return C}function d(_){if(n.call(_,"circularValue")){const b=_.circularValue;if(typeof b=="string")return`"${b}"`;if(b==null)return b;if(b===Error||b===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function f(_,b){let y;if(n.call(_,b)&&(y=_[b],typeof y!="boolean"))throw new TypeError(`The "${b}" argument must be of type boolean`);return y===void 0?!0:y}function p(_,b){let y;if(n.call(_,b)){if(y=_[b],typeof y!="number")throw new TypeError(`The "${b}" argument must be of type number`);if(!Number.isInteger(y))throw new TypeError(`The "${b}" argument must be an integer`);if(y<1)throw new RangeError(`The "${b}" argument must be >= 1`)}return y===void 0?1/0:y}function g(_){return _===1?"1 item":`${_} items`}function m(_){const b=new Set;for(const y of _)(typeof y=="string"||typeof y=="number")&&b.add(String(y));return b}function v(_){if(n.call(_,"strict")){const b=_.strict;if(typeof b!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(b)return y=>{let S=`Object can not safely be stringified. Received type ${typeof y}`;throw typeof y!="function"&&(S+=` (${y.toString()})`),new Error(S)}}}function x(_){_={..._};const b=v(_);b&&(_.bigint===void 0&&(_.bigint=!1),"circularValue"in _||(_.circularValue=Error));const y=d(_),S=f(_,"bigint"),C=f(_,"deterministic"),T=p(_,"maximumDepth"),E=p(_,"maximumBreadth");function P(U,A,N,F,B,D){let V=A[U];switch(typeof V=="object"&&V!==null&&typeof V.toJSON=="function"&&(V=V.toJSON(U)),V=F.call(A,U,V),typeof V){case"string":return o(V);case"object":{if(V===null)return"null";if(N.indexOf(V)!==-1)return y;let j="",q=",";const Z=D;if(Array.isArray(V)){if(V.length===0)return"[]";if(T<N.length+1)return'"[Array]"';N.push(V),B!==""&&(D+=B,j+=`
|
||
${D}`,q=`,
|
||
${D}`);const ne=Math.min(V.length,E);let fe=0;for(;fe<ne-1;fe++){const ve=P(String(fe),V,N,F,B,D);j+=ve!==void 0?ve:"null",j+=q}const pe=P(String(fe),V,N,F,B,D);if(j+=pe!==void 0?pe:"null",V.length-1>E){const ve=V.length-E-1;j+=`${q}"... ${g(ve)} not stringified"`}return B!==""&&(j+=`
|
||
${Z}`),N.pop(),`[${j}]`}let ee=Object.keys(V);const ie=ee.length;if(ie===0)return"{}";if(T<N.length+1)return'"[Object]"';let se="",le="";B!==""&&(D+=B,q=`,
|
||
${D}`,se=" ");const W=Math.min(ie,E);C&&!l(V)&&(ee=s(ee)),N.push(V);for(let ne=0;ne<W;ne++){const fe=ee[ne],pe=P(fe,V,N,F,B,D);pe!==void 0&&(j+=`${le}${o(fe)}:${se}${pe}`,le=q)}if(ie>E){const ne=ie-E;j+=`${le}"...":${se}"${g(ne)} not stringified"`,le=q}return B!==""&&le.length>1&&(j=`
|
||
${D}${j}
|
||
${Z}`),N.pop(),`{${j}}`}case"number":return isFinite(V)?String(V):b?b(V):"null";case"boolean":return V===!0?"true":"false";case"undefined":return;case"bigint":if(S)return String(V);default:return b?b(V):void 0}}function k(U,A,N,F,B,D){switch(typeof A=="object"&&A!==null&&typeof A.toJSON=="function"&&(A=A.toJSON(U)),typeof A){case"string":return o(A);case"object":{if(A===null)return"null";if(N.indexOf(A)!==-1)return y;const V=D;let j="",q=",";if(Array.isArray(A)){if(A.length===0)return"[]";if(T<N.length+1)return'"[Array]"';N.push(A),B!==""&&(D+=B,j+=`
|
||
${D}`,q=`,
|
||
${D}`);const ie=Math.min(A.length,E);let se=0;for(;se<ie-1;se++){const W=k(String(se),A[se],N,F,B,D);j+=W!==void 0?W:"null",j+=q}const le=k(String(se),A[se],N,F,B,D);if(j+=le!==void 0?le:"null",A.length-1>E){const W=A.length-E-1;j+=`${q}"... ${g(W)} not stringified"`}return B!==""&&(j+=`
|
||
${V}`),N.pop(),`[${j}]`}N.push(A);let Z="";B!==""&&(D+=B,q=`,
|
||
${D}`,Z=" ");let ee="";for(const ie of F){const se=k(ie,A[ie],N,F,B,D);se!==void 0&&(j+=`${ee}${o(ie)}:${Z}${se}`,ee=q)}return B!==""&&ee.length>1&&(j=`
|
||
${D}${j}
|
||
${V}`),N.pop(),`{${j}}`}case"number":return isFinite(A)?String(A):b?b(A):"null";case"boolean":return A===!0?"true":"false";case"undefined":return;case"bigint":if(S)return String(A);default:return b?b(A):void 0}}function O(U,A,N,F,B){switch(typeof A){case"string":return o(A);case"object":{if(A===null)return"null";if(typeof A.toJSON=="function"){if(A=A.toJSON(U),typeof A!="object")return O(U,A,N,F,B);if(A===null)return"null"}if(N.indexOf(A)!==-1)return y;const D=B;if(Array.isArray(A)){if(A.length===0)return"[]";if(T<N.length+1)return'"[Array]"';N.push(A),B+=F;let se=`
|
||
${B}`;const le=`,
|
||
${B}`,W=Math.min(A.length,E);let ne=0;for(;ne<W-1;ne++){const pe=O(String(ne),A[ne],N,F,B);se+=pe!==void 0?pe:"null",se+=le}const fe=O(String(ne),A[ne],N,F,B);if(se+=fe!==void 0?fe:"null",A.length-1>E){const pe=A.length-E-1;se+=`${le}"... ${g(pe)} not stringified"`}return se+=`
|
||
${D}`,N.pop(),`[${se}]`}let V=Object.keys(A);const j=V.length;if(j===0)return"{}";if(T<N.length+1)return'"[Object]"';B+=F;const q=`,
|
||
${B}`;let Z="",ee="",ie=Math.min(j,E);l(A)&&(Z+=u(A,q,E),V=V.slice(A.length),ie-=A.length,ee=q),C&&(V=s(V)),N.push(A);for(let se=0;se<ie;se++){const le=V[se],W=O(le,A[le],N,F,B);W!==void 0&&(Z+=`${ee}${o(le)}: ${W}`,ee=q)}if(j>E){const se=j-E;Z+=`${ee}"...": "${g(se)} not stringified"`,ee=q}return ee!==""&&(Z=`
|
||
${B}${Z}
|
||
${D}`),N.pop(),`{${Z}}`}case"number":return isFinite(A)?String(A):b?b(A):"null";case"boolean":return A===!0?"true":"false";case"undefined":return;case"bigint":if(S)return String(A);default:return b?b(A):void 0}}function M(U,A,N){switch(typeof A){case"string":return o(A);case"object":{if(A===null)return"null";if(typeof A.toJSON=="function"){if(A=A.toJSON(U),typeof A!="object")return M(U,A,N);if(A===null)return"null"}if(N.indexOf(A)!==-1)return y;let F="";if(Array.isArray(A)){if(A.length===0)return"[]";if(T<N.length+1)return'"[Array]"';N.push(A);const q=Math.min(A.length,E);let Z=0;for(;Z<q-1;Z++){const ie=M(String(Z),A[Z],N);F+=ie!==void 0?ie:"null",F+=","}const ee=M(String(Z),A[Z],N);if(F+=ee!==void 0?ee:"null",A.length-1>E){const ie=A.length-E-1;F+=`,"... ${g(ie)} not stringified"`}return N.pop(),`[${F}]`}let B=Object.keys(A);const D=B.length;if(D===0)return"{}";if(T<N.length+1)return'"[Object]"';let V="",j=Math.min(D,E);l(A)&&(F+=u(A,",",E),B=B.slice(A.length),j-=A.length,V=","),C&&(B=s(B)),N.push(A);for(let q=0;q<j;q++){const Z=B[q],ee=M(Z,A[Z],N);ee!==void 0&&(F+=`${V}${o(Z)}:${ee}`,V=",")}if(D>E){const q=D-E;F+=`${V}"...":"${g(q)} not stringified"`}return N.pop(),`{${F}}`}case"number":return isFinite(A)?String(A):b?b(A):"null";case"boolean":return A===!0?"true":"false";case"undefined":return;case"bigint":if(S)return String(A);default:return b?b(A):void 0}}function G(U,A,N){if(arguments.length>1){let F="";if(typeof N=="number"?F=" ".repeat(Math.min(N,10)):typeof N=="string"&&(F=N.slice(0,10)),A!=null){if(typeof A=="function")return P("",{"":U},[],A,F,"");if(Array.isArray(A))return k("",U,[],m(A),F,"")}if(F.length!==0)return O("",U,[],F,"")}return M("",U,[])}return G}})(Z3,Z3.exports);var xve=Z3.exports;(function(e){var t=He&&He.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.createLogger=void 0;const n=lc,r=Tm,i=cU,o=dU,s=t(nE),a=t(xve);let l=!1;const u=(0,s.default)(),d=()=>u.ROARR,f=()=>({messageContext:{},transforms:[]}),p=()=>{const y=d().asyncLocalStorage;if(!y)throw new Error("AsyncLocalContext is unavailable.");const S=y.getStore();return S||f()},g=()=>!!d().asyncLocalStorage,m=()=>{if(g()){const y=p();return(0,i.hasOwnProperty)(y,"sequenceRoot")&&(0,i.hasOwnProperty)(y,"sequence")&&typeof y.sequence=="number"?String(y.sequenceRoot)+"."+String(y.sequence++):String(d().sequence++)}return String(d().sequence++)},v=(y,S)=>(C,T,E,P,k,O,M,G,U,A)=>{y.child({logLevel:S})(C,T,E,P,k,O,M,G,U,A)},x=1e3,_=(y,S)=>(C,T,E,P,k,O,M,G,U,A)=>{const N=(0,a.default)({a:C,b:T,c:E,d:P,e:k,f:O,g:M,h:G,i:U,j:A,logLevel:S});if(!N)throw new Error("Expected key to be a string");const F=d().onceLog;F.has(N)||(F.add(N),F.size>x&&F.clear(),y.child({logLevel:S})(C,T,E,P,k,O,M,G,U,A))},b=(y,S={},C=[])=>{const T=(E,P,k,O,M,G,U,A,N,F)=>{const B=Date.now(),D=m();let V;g()?V=p():V=f();let j,q;if(typeof E=="string"?j={...V.messageContext,...S}:j={...V.messageContext,...S,...E},typeof E=="string"&&P===void 0)q=E;else if(typeof E=="string"){if(!E.includes("%"))throw new Error("When a string parameter is followed by other arguments, then it is assumed that you are attempting to format a message using printf syntax. You either forgot to add printf bindings or if you meant to add context to the log message, pass them in an object as the first parameter.");q=(0,o.printf)(E,P,k,O,M,G,U,A,N,F)}else{let ee=P;if(typeof P!="string")if(P===void 0)ee="";else throw new TypeError("Message must be a string. Received "+typeof P+".");q=(0,o.printf)(ee,k,O,M,G,U,A,N,F)}let Z={context:j,message:q,sequence:D,time:B,version:n.ROARR_LOG_FORMAT_VERSION};for(const ee of[...V.transforms,...C])if(Z=ee(Z),typeof Z!="object"||Z===null)throw new Error("Message transform function must return a message object.");y(Z)};return T.child=E=>{let P;return g()?P=p():P=f(),typeof E=="function"?(0,e.createLogger)(y,{...P.messageContext,...S,...E},[E,...C]):(0,e.createLogger)(y,{...P.messageContext,...S,...E},C)},T.getContext=()=>{let E;return g()?E=p():E=f(),{...E.messageContext,...S}},T.adopt=async(E,P)=>{if(!g())return l===!1&&(l=!0,y({context:{logLevel:r.logLevels.warn,package:"roarr"},message:"async_hooks are unavailable; Roarr.adopt will not function as expected",sequence:m(),time:Date.now(),version:n.ROARR_LOG_FORMAT_VERSION})),E();const k=p();let O;(0,i.hasOwnProperty)(k,"sequenceRoot")&&(0,i.hasOwnProperty)(k,"sequence")&&typeof k.sequence=="number"?O=k.sequenceRoot+"."+String(k.sequence++):O=String(d().sequence++);let M={...k.messageContext};const G=[...k.transforms];typeof P=="function"?G.push(P):M={...M,...P};const U=d().asyncLocalStorage;if(!U)throw new Error("Async local context unavailable.");return U.run({messageContext:M,sequence:0,sequenceRoot:O,transforms:G},()=>E())},T.debug=v(T,r.logLevels.debug),T.debugOnce=_(T,r.logLevels.debug),T.error=v(T,r.logLevels.error),T.errorOnce=_(T,r.logLevels.error),T.fatal=v(T,r.logLevels.fatal),T.fatalOnce=_(T,r.logLevels.fatal),T.info=v(T,r.logLevels.info),T.infoOnce=_(T,r.logLevels.info),T.trace=v(T,r.logLevels.trace),T.traceOnce=_(T,r.logLevels.trace),T.warn=v(T,r.logLevels.warn),T.warnOnce=_(T,r.logLevels.warn),T};e.createLogger=b})(uU);var Qb={},Cve=function(t,n){for(var r=t.split("."),i=n.split("."),o=0;o<3;o++){var s=Number(r[o]),a=Number(i[o]);if(s>a)return 1;if(a>s)return-1;if(!isNaN(s)&&isNaN(a))return 1;if(isNaN(s)&&!isNaN(a))return-1}return 0},Tve=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qb,"__esModule",{value:!0});Qb.createRoarrInitialGlobalStateBrowser=void 0;const lO=lc,uO=Tve(Cve),Eve=e=>{const t=(e.versions||[]).concat();return t.length>1&&t.sort(uO.default),t.includes(lO.ROARR_VERSION)||t.push(lO.ROARR_VERSION),t.sort(uO.default),{sequence:0,...e,versions:t}};Qb.createRoarrInitialGlobalStateBrowser=Eve;var Zb={};Object.defineProperty(Zb,"__esModule",{value:!0});Zb.getLogLevelName=void 0;const Ave=e=>e<=10?"trace":e<=20?"debug":e<=30?"info":e<=40?"warn":e<=50?"error":"fatal";Zb.getLogLevelName=Ave;(function(e){var t=He&&He.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLogLevelName=e.logLevels=e.Roarr=e.ROARR=void 0;const n=uU,r=Qb,o=(0,t(nE).default)(),s=(0,r.createRoarrInitialGlobalStateBrowser)(o.ROARR||{});e.ROARR=s,o.ROARR=s;const a=f=>JSON.stringify(f),l=(0,n.createLogger)(f=>{var p;s.write&&s.write(((p=s.serializeMessage)!==null&&p!==void 0?p:a)(f))});e.Roarr=l;var u=Tm;Object.defineProperty(e,"logLevels",{enumerable:!0,get:function(){return u.logLevels}});var d=Zb;Object.defineProperty(e,"getLogLevelName",{enumerable:!0,get:function(){return d.getLogLevelName}})})(Cm);var Pve=He&&He.__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},Rve=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nb,"__esModule",{value:!0});Nb.createLogWriter=void 0;var Ove=Lb,kve=tE,Ive=Rve(nE),fU=JB,Mve=Cm,cO=(0,Ive.default)(),Nve={debug:{backgroundColor:"#712bde",color:"#fff"},error:{backgroundColor:"#f05033",color:"#fff"},fatal:{backgroundColor:"#f05033",color:"#fff"},info:{backgroundColor:"#3174f1",color:"#fff"},trace:{backgroundColor:"#666",color:"#fff"},warn:{backgroundColor:"#f5a623",color:"#000"}},Lve={debug:{color:"#8367d3"},error:{color:"#ff1a1a"},fatal:{color:"#ff1a1a"},info:{color:"#3291ff"},trace:{color:"#999"},warn:{color:"#f7b955"}},Dve=function(e){var t=e.getItem("ROARR_FILTER");return t?(0,fU.parse)(t):null},$ve=function(e){var t,n;e===void 0&&(e={});var r=(t=e==null?void 0:e.storage)!==null&&t!==void 0?t:cO.localStorage,i=(n=e==null?void 0:e.logMethods)!==null&&n!==void 0?n:(0,Ove.createLogMethods)();if(!r&&!cO.localStorage)return console.warn("initiated Roarr browser log writer in non-browser context"),function(){};if(!(0,kve.boolean)(r.getItem("ROARR_LOG")))return function(){};var o=Dve(r);return function(s){var a=JSON.parse(s),l=a.context,u=l.logLevel,d=l.namespace,f=Pve(l,["logLevel","namespace"]);if(!(o&&!(0,fU.test)(o,a))){var p=(0,Mve.getLogLevelName)(Number(u)),g=i[p],m=Nve[p],v=`
|
||
background-color: `.concat(m.backgroundColor,`;
|
||
color: `).concat(m.color,`;
|
||
font-weight: bold;
|
||
`),x=`
|
||
color: `.concat(Lve[p].color,`;
|
||
`),_=`
|
||
color: inherit;
|
||
`;Object.keys(f).length>0?g("%c ".concat(p," %c").concat(d?" [".concat(String(d),"]:"):"","%c ").concat(a.message," %O"),v,x,_,f):g("%c ".concat(p," %c").concat(d?" [".concat(String(d),"]:"):"","%c ").concat(a.message),v,x,_)}}};Nb.createLogWriter=$ve;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createLogWriter=void 0;var t=Nb;Object.defineProperty(e,"createLogWriter",{enumerable:!0,get:function(){return t.createLogWriter}})})(zB);Cm.ROARR.write=zB.createLogWriter();const hU={};Cm.Roarr.child(hU);const Jb=gm(Cm.Roarr.child(hU)),Ie=e=>Jb.get().child({namespace:e}),LIe=["trace","debug","info","warn","error","fatal"],DIe={trace:10,debug:20,info:30,warn:40,error:50,fatal:60};function Fve(){const e=[];return function(t,n){if(typeof n!="object"||n===null)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}const Ig=Bl("nodes/receivedOpenAPISchema",async(e,{dispatch:t,rejectWithValue:n})=>{const r=Ie("system");try{const o=await(await fetch("openapi.json")).json();return r.info({openAPISchema:o},"Received OpenAPI schema"),JSON.parse(JSON.stringify(o,Fve()))}catch(i){return n({error:i})}}),pU={nodes:[],edges:[],schema:null,invocationTemplates:{},connectionStartParams:null,shouldShowGraphOverlay:!1,shouldShowFieldTypeLegend:!1,shouldShowMinimapPanel:!0,editorInstance:void 0,progressNodeSize:{width:512,height:512}},gU=yn({name:"nodes",initialState:pU,reducers:{nodesChanged:(e,t)=>{e.nodes=kB(t.payload,e.nodes)},nodeAdded:(e,t)=>{e.nodes.push(t.payload)},edgesChanged:(e,t)=>{e.edges=Xme(t.payload,e.edges)},connectionStarted:(e,t)=>{e.connectionStartParams=t.payload},connectionMade:(e,t)=>{e.edges=iB(t.payload,e.edges)},connectionEnded:e=>{e.connectionStartParams=null},fieldValueChanged:(e,t)=>{var a,l,u;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(d=>d.id===n),s=(u=(l=(a=e.nodes)==null?void 0:a[o])==null?void 0:l.data)==null?void 0:u.inputs[r];s&&o>-1&&(s.value=i)},imageCollectionFieldValueChanged:(e,t)=>{var l,u,d;const{nodeId:n,fieldName:r,value:i}=t.payload,o=e.nodes.findIndex(f=>f.id===n);if(o===-1)return;const s=(d=(u=(l=e.nodes)==null?void 0:l[o])==null?void 0:u.data)==null?void 0:d.inputs[r];if(!s)return;const a=zr(s.value);if(!a){s.value=i;return}s.value=ele(a.concat(i),"image_name")},shouldShowGraphOverlayChanged:(e,t)=>{e.shouldShowGraphOverlay=t.payload},shouldShowFieldTypeLegendChanged:(e,t)=>{e.shouldShowFieldTypeLegend=t.payload},shouldShowMinimapPanelChanged:(e,t)=>{e.shouldShowMinimapPanel=t.payload},nodeTemplatesBuilt:(e,t)=>{e.invocationTemplates=t.payload},nodeEditorReset:e=>{e.nodes=[],e.edges=[]},setEditorInstance:(e,t)=>{e.editorInstance=t.payload},loadFileNodes:(e,t)=>{e.nodes=t.payload},loadFileEdges:(e,t)=>{e.edges=t.payload},setProgressNodeSize:(e,t)=>{e.progressNodeSize=t.payload}},extraReducers:e=>{e.addCase(Ig.fulfilled,(t,n)=>{t.schema=n.payload})}}),{nodesChanged:$Ie,edgesChanged:FIe,nodeAdded:BIe,fieldValueChanged:mU,connectionMade:UIe,connectionStarted:zIe,connectionEnded:VIe,shouldShowGraphOverlayChanged:jIe,shouldShowFieldTypeLegendChanged:GIe,shouldShowMinimapPanelChanged:HIe,nodeTemplatesBuilt:oE,nodeEditorReset:sE,imageCollectionFieldValueChanged:WIe,setEditorInstance:qIe,loadFileNodes:KIe,loadFileEdges:XIe,setProgressNodeSize:YIe}=gU.actions,Bve=gU.reducer,yU={esrganModelName:"RealESRGAN_x4plus.pth"},vU=yn({name:"postprocessing",initialState:yU,reducers:{esrganModelNameChanged:(e,t)=>{e.esrganModelName=t.payload}}}),{esrganModelNameChanged:QIe}=vU.actions,Uve=vU.reducer,zve={positiveStylePrompt:"",negativeStylePrompt:"",shouldConcatSDXLStylePrompt:!0,shouldUseSDXLRefiner:!1,sdxlImg2ImgDenoisingStrength:.7,refinerModel:null,refinerSteps:20,refinerCFGScale:7.5,refinerScheduler:"euler",refinerAestheticScore:6,refinerStart:.7},_U=yn({name:"sdxl",initialState:zve,reducers:{setPositiveStylePromptSDXL:(e,t)=>{e.positiveStylePrompt=t.payload},setNegativeStylePromptSDXL:(e,t)=>{e.negativeStylePrompt=t.payload},setShouldConcatSDXLStylePrompt:(e,t)=>{e.shouldConcatSDXLStylePrompt=t.payload},setShouldUseSDXLRefiner:(e,t)=>{e.shouldUseSDXLRefiner=t.payload},setSDXLImg2ImgDenoisingStrength:(e,t)=>{e.sdxlImg2ImgDenoisingStrength=t.payload},refinerModelChanged:(e,t)=>{e.refinerModel=t.payload},setRefinerSteps:(e,t)=>{e.refinerSteps=t.payload},setRefinerCFGScale:(e,t)=>{e.refinerCFGScale=t.payload},setRefinerScheduler:(e,t)=>{e.refinerScheduler=t.payload},setRefinerAestheticScore:(e,t)=>{e.refinerAestheticScore=t.payload},setRefinerStart:(e,t)=>{e.refinerStart=t.payload}}}),{setPositiveStylePromptSDXL:ZIe,setNegativeStylePromptSDXL:JIe,setShouldConcatSDXLStylePrompt:e7e,setShouldUseSDXLRefiner:Vve,setSDXLImg2ImgDenoisingStrength:t7e,refinerModelChanged:dO,setRefinerSteps:n7e,setRefinerCFGScale:r7e,setRefinerScheduler:i7e,setRefinerAestheticScore:o7e,setRefinerStart:s7e}=_U.actions,jve=_U.reducer,Em=Re("app/userInvoked"),Gve={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class H1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Gve,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new H1(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new H1(this.logger,t)}}var Cs=new H1;class eS{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&[].concat(this.observers[t]).forEach(s=>{s(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[t,...r])})}}function Xh(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function fO(e){return e==null?"":""+e}function Hve(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function aE(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}const o=typeof t!="string"?[].concat(t):t.split(".");for(;o.length>1;){if(i())return{};const s=r(o.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function hO(e,t,n){const{obj:r,k:i}=aE(e,t,Object);r[i]=n}function Wve(e,t,n,r){const{obj:i,k:o}=aE(e,t,Object);i[o]=i[o]||[],r&&(i[o]=i[o].concat(n)),r||i[o].push(n)}function W1(e,t){const{obj:n,k:r}=aE(e,t);if(n)return n[r]}function qve(e,t,n){const r=W1(e,n);return r!==void 0?r:W1(t,n)}function bU(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):bU(e[r],t[r],n):e[r]=t[r]);return e}function ld(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Kve={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Xve(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>Kve[t]):e}const Yve=[" ",",","?","!",";"];function Qve(e,t,n){t=t||"",n=n||"";const r=Yve.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=new RegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function q1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){let s=2,a=r.slice(o,o+s).join(n),l=i[a];for(;l===void 0&&r.length>o+s;)s++,a=r.slice(o,o+s).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(t.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}const u=r.slice(o+s).join(n);return u?q1(l,u,n):void 0}i=i[r[o]]}return i}function K1(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class pO extends eS{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[t,n];r&&typeof r!="string"&&(a=a.concat(r)),r&&typeof r=="string"&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."));const l=W1(this.data,a);return l||!s||typeof r!="string"?l:q1(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),hO(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Object.prototype.toString.apply(r[o])==="[object Array]")&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=W1(this.data,a)||{};i?bU(l,r,o):l={...l,...r},hO(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var SU={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const gO={};class X1 extends eS{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Hve(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Cs.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Qve(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const S=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${S}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:`${l}${S}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:s}const f=this.resolve(t,n);let p=f&&f.res;const g=f&&f.usedKey||s,m=f&&f.exactUsedKey||s,v=Object.prototype.toString.apply(p),x=["[object Number]","[object Function]","[object RegExp]"],_=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&p&&(typeof p!="string"&&typeof p!="boolean"&&typeof p!="number")&&x.indexOf(v)<0&&!(typeof _=="string"&&v==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(f.res=S,f):S}if(o){const S=v==="[object Array]",C=S?[]:{},T=S?m:g;for(const E in p)if(Object.prototype.hasOwnProperty.call(p,E)){const P=`${T}${o}${E}`;C[E]=this.translate(P,{...n,joinArrays:!1,ns:a}),C[E]===P&&(C[E]=p[E])}p=C}}else if(b&&typeof _=="string"&&v==="[object Array]")p=p.join(_),p&&(p=this.extendTranslation(p,t,n,r));else{let S=!1,C=!1;const T=n.count!==void 0&&typeof n.count!="string",E=X1.hasDefaultValue(n),P=T?this.pluralResolver.getSuffix(u,n.count,n):"",k=n.ordinal&&T?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",O=n[`defaultValue${P}`]||n[`defaultValue${k}`]||n.defaultValue;!this.isValidLookup(p)&&E&&(S=!0,p=O),this.isValidLookup(p)||(C=!0,p=s);const G=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:p,U=E&&O!==p&&this.options.updateMissing;if(C||S||U){if(this.logger.log(U?"updateKey":"missingKey",u,l,s,U?O:p),o){const B=this.resolve(s,{...n,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let B=0;B<N.length;B++)A.push(N[B]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(n.lng||this.language):A.push(n.lng||this.language);const F=(B,D,V)=>{const j=E&&V!==p?V:G;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,D,j,U,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,D,j,U,n),this.emit("missingKey",B,l,D,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?A.forEach(B=>{this.pluralResolver.getSuffixes(B,n).forEach(D=>{F([B],s+D,n[`defaultValue${D}`]||O)})}):F(A,s,O))}p=this.extendTranslation(p,t,n,f,r),C&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${s}`),(C||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,S?p:void 0):p=this.options.parseMissingKeyHandler(p))}return i?(f.res=p,f):p}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const p=t.match(this.interpolator.nestingRegexp);d=p&&p.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),u){const p=t.match(this.interpolator.nestingRegexp),g=p&&p.length;d<g&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return o&&o[0]===g[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):s.translate(...g,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,l=typeof a=="string"?[a]:a;return t!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(t=SU.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:i,...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;i=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&typeof n.count!="string",g=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(x=>{this.isValidLookup(r)||(a=x,!gO[`${v[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(gO[`${v[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(_=>{if(this.isValidLookup(r))return;s=_;const b=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,d,_,x,n);else{let S;p&&(S=this.pluralResolver.getSuffix(_,n.count,n));const C=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(b.push(d+S),n.ordinal&&S.indexOf(T)===0&&b.push(d+S.replace(T,this.options.pluralSeparator)),g&&b.push(d+C)),m){const E=`${d}${this.options.contextSeparator}${n.context}`;b.push(E),p&&(b.push(E+S),n.ordinal&&S.indexOf(T)===0&&b.push(E+S.replace(T,this.options.pluralSeparator)),g&&b.push(E+C))}}let y;for(;y=b.pop();)this.isValidLookup(r)||(o=y,r=this.getResource(_,x,y,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Ox(e){return e.charAt(0).toUpperCase()+e.slice(1)}class mO{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cs.create("languageUtils")}getScriptPartFromCode(t){if(t=K1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=K1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ox(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Ox(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Ox(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&o.indexOf(i)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let Zve=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Jve={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const e1e=["v1","v2","v3"],t1e=["v4"],yO={zero:0,one:1,two:2,few:3,many:4,other:5};function n1e(){const e={};return Zve.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Jve[t.fc]}})}),e}class r1e{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Cs.create("pluralResolver"),(!this.options.compatibilityJSON||t1e.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=n1e()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(K1(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>yO[i]-yO[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!e1e.includes(this.options.compatibilityJSON)}}function vO(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=qve(e,t,n);return!o&&i&&typeof n=="string"&&(o=q1(e,n,r),o===void 0&&(o=q1(t,n,r))),o}class i1e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cs.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:Xve,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?ld(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?ld(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?ld(n.nestingPrefix):n.nestingPrefixEscaped||ld("$t("),this.nestingSuffix=n.nestingSuffix?ld(n.nestingSuffix):n.nestingSuffixEscaped||ld(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(m){return m.replace(/\$/g,"$$$$")}const d=m=>{if(m.indexOf(this.formatSeparator)<0){const b=vO(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...i,...n,interpolationkey:m}):b}const v=m.split(this.formatSeparator),x=v.shift().trim(),_=v.join(this.formatSeparator).trim();return this.format(vO(n,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),_,r,{...i,...n,interpolationkey:x})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>u(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?u(this.escape(m)):u(m)}].forEach(m=>{for(a=0;o=m.regex.exec(t);){const v=o[1].trim();if(s=d(v),s===void 0)if(typeof f=="function"){const _=f(t,o,i);s=typeof _=="string"?_:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(p){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=fO(s));const x=m.safeValue(s);if(t=t.replace(o[0],x),p?(m.regex.lastIndex+=s.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;function a(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,s);const g=p.match(/'/g),m=p.match(/"/g);(g&&g.length%2===0&&!m||m.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),u&&(s={...u,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${p}`}return delete s.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=d.shift(),l=d,u=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=fO(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}function o1e(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=u),u==="false"&&(n[a.trim()]=!1),u==="true"&&(n[a.trim()]=!0),isNaN(u)||(n[a.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function ud(e){const t={};return function(r,i,o){const s=i+JSON.stringify(o);let a=t[s];return a||(a=e(K1(i),o),t[s]=a),a(r)}}class s1e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cs.create("formatter"),this.options=t,this.formats={number:ud((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:ud((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:ud((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:ud((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:ud((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ud(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:d}=o1e(l);if(this.formats[u]){let f=a;try{const p=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=p.locale||p.lng||i.locale||i.lng||r;f=this.formats[u](a,g,{...d,...i,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}function a1e(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class l1e extends eS{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Cs.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const p=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,d=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{Wve(l.loaded,[o],s),a1e(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,i,l):d=u(t,n,r,i),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function _O(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function bO(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function R0(){}function u1e(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Mg extends eS{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=bO(t),this.services={},this.logger=Cs,this.modules={external:[]},u1e(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=_O();this.options={...i,...this.options,...bO(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Cs.init(o(this.modules.logger),this.options):Cs.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=s1e);const f=new mO(this.options);this.store=new pO(this.options.resources,this.options);const p=this.services;p.logger=Cs,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new r1e(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=o(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new i1e(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new l1e(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(g){for(var m=arguments.length,v=new Array(m>1?m-1:0),x=1;x<m;x++)v[x-1]=arguments[x];t.emit(g,...v)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new X1(this.services,this.options),this.translator.on("*",function(g){for(var m=arguments.length,v=new Array(m>1?m-1:0),x=1;x<m;x++)v[x-1]=arguments[x];t.emit(g,...v)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=R0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Xh(),u=()=>{const d=(f,p)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),r(f,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R0;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode")return r();const o=[],s=a=>{if(!a)return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{o.indexOf(u)<0&&o.push(u)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=Xh();return t||(t=this.languages),n||(n=this.options.ns),r||(r=R0),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&SU.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Xh();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{s(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([s,a].concat(d))}else l={...a};l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix=l.keyPrefix||r||o.keyPrefix;const p=i.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(s)?g=s.map(m=>`${l.keyPrefix}${p}${m}`):g=l.keyPrefix?`${l.keyPrefix}${p}${s}`:s,i.t(g,l)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=Xh();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Xh();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0);return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new mO(_O());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Mg(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R0;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Mg(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new pO(this.store.data,i),o.services.resourceStore=o.store),o.translator=new X1(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];o.emit(a,...u)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kr=Mg.createInstance();Kr.createInstance=Mg.createInstance;Kr.createInstance;Kr.dir;Kr.init;Kr.loadResources;Kr.reloadResources;Kr.use;Kr.changeLanguage;Kr.getFixedT;const Pp=Kr.t;Kr.exists;Kr.setDefaultNamespace;Kr.hasLoadedNamespace;Kr.loadNamespaces;Kr.loadLanguages;const Ku=e=>typeof e=="string"?{title:e,status:"info",isClosable:!0,duration:2500}:{status:"info",isClosable:!0,duration:2500,...e},wU={isConnected:!1,isProcessing:!1,isGFPGANAvailable:!0,isESRGANAvailable:!0,shouldConfirmOnDelete:!0,currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatusHasSteps:!1,isCancelable:!0,enableImageDebugging:!1,toastQueue:[],progressImage:null,shouldAntialiasProgressImage:!1,sessionId:null,cancelType:"immediate",isCancelScheduled:!1,subscribedNodeIds:[],wereModelsReceived:!1,wasSchemaParsed:!1,consoleLogLevel:"debug",shouldLogToConsole:!0,statusTranslationKey:"common.statusDisconnected",canceledSession:"",isPersisted:!1,language:"en",isUploading:!1,isNodesEnabled:!1,shouldUseNSFWChecker:!1,shouldUseWatermarker:!1},xU=yn({name:"system",initialState:wU,reducers:{setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.statusTranslationKey=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},cancelScheduled:e=>{e.isCancelScheduled=!0},scheduledCancelAborted:e=>{e.isCancelScheduled=!1},cancelTypeChanged:(e,t)=>{e.cancelType=t.payload},subscribedNodeIdsSet:(e,t)=>{e.subscribedNodeIds=t.payload},consoleLogLevelChanged:(e,t)=>{e.consoleLogLevel=t.payload},shouldLogToConsoleChanged:(e,t)=>{e.shouldLogToConsole=t.payload},shouldAntialiasProgressImageChanged:(e,t)=>{e.shouldAntialiasProgressImage=t.payload},isPersistedChanged:(e,t)=>{e.isPersisted=t.payload},languageChanged:(e,t)=>{e.language=t.payload},progressImageSet(e,t){e.progressImage=t.payload},setIsNodesEnabled(e,t){e.isNodesEnabled=t.payload},shouldUseNSFWCheckerChanged(e,t){e.shouldUseNSFWChecker=t.payload},shouldUseWatermarkerChanged(e,t){e.shouldUseWatermarker=t.payload}},extraReducers(e){e.addCase(q$,(t,n)=>{t.sessionId=n.payload.sessionId,t.canceledSession=""}),e.addCase(X$,t=>{t.sessionId=null}),e.addCase(G$,t=>{t.isConnected=!0,t.isCancelable=!0,t.isProcessing=!1,t.currentStatusHasSteps=!1,t.currentStep=0,t.totalSteps=0,t.currentIteration=0,t.totalIterations=0,t.statusTranslationKey="common.statusConnected"}),e.addCase(W$,t=>{t.isConnected=!1,t.isProcessing=!1,t.isCancelable=!0,t.currentStatusHasSteps=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusDisconnected"}),e.addCase(Q$,t=>{t.isCancelable=!0,t.isProcessing=!0,t.currentStatusHasSteps=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusGenerating"}),e.addCase(rF,(t,n)=>{const{step:r,total_steps:i,progress_image:o}=n.payload.data;t.isProcessing=!0,t.isCancelable=!0,t.currentStatusHasSteps=!0,t.currentStep=r+1,t.totalSteps=i,t.progressImage=o??null,t.statusTranslationKey="common.statusGenerating"}),e.addCase(Z$,(t,n)=>{const{data:r}=n.payload;t.currentStatusHasSteps=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusProcessingComplete",t.canceledSession===r.graph_execution_state_id&&(t.isProcessing=!1,t.isCancelable=!0)}),e.addCase(tF,t=>{t.isProcessing=!1,t.isCancelable=!1,t.isCancelScheduled=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusConnected",t.progressImage=null}),e.addCase(Em,t=>{t.isProcessing=!0,t.isCancelable=!0,t.currentStatusHasSteps=!1,t.statusTranslationKey="common.statusPreparing"}),e.addCase(mc.fulfilled,(t,n)=>{t.canceledSession=n.meta.arg.session_id,t.isProcessing=!1,t.isCancelable=!1,t.isCancelScheduled=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusConnected",t.progressImage=null,t.toastQueue.push(Ku({title:Pp("toast.canceled"),status:"warning"}))}),e.addCase(oE,t=>{t.wasSchemaParsed=!0}),e.addMatcher(r$,(t,n)=>{var r;t.isProcessing=!1,t.isCancelable=!1,t.isCancelScheduled=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusConnected",t.progressImage=null,t.toastQueue.push(Ku({title:Pp("toast.serverError"),status:"error",description:((r=n.payload)==null?void 0:r.status)===422?"Validation Error":void 0}))}),e.addMatcher(p1e,(t,n)=>{t.isProcessing=!1,t.isCancelable=!0,t.currentStatusHasSteps=!1,t.currentStep=0,t.totalSteps=0,t.statusTranslationKey="common.statusError",t.progressImage=null,t.toastQueue.push(Ku({title:Pp("toast.serverError"),status:"error",description:Kae(n.payload.data.error_type)}))})}}),{setIsProcessing:a7e,setShouldConfirmOnDelete:l7e,setCurrentStatus:u7e,setIsCancelable:c7e,setEnableImageDebugging:d7e,addToast:Un,clearToastQueue:f7e,cancelScheduled:h7e,scheduledCancelAborted:p7e,cancelTypeChanged:g7e,subscribedNodeIdsSet:m7e,consoleLogLevelChanged:y7e,shouldLogToConsoleChanged:v7e,isPersistedChanged:_7e,shouldAntialiasProgressImageChanged:b7e,languageChanged:S7e,progressImageSet:c1e,setIsNodesEnabled:w7e,shouldUseNSFWCheckerChanged:d1e,shouldUseWatermarkerChanged:f1e}=xU.actions,h1e=xU.reducer,p1e=Co(LT,aF,uF),g1e={searchFolder:null,advancedAddScanModel:null},CU=yn({name:"modelmanager",initialState:g1e,reducers:{setSearchFolder:(e,t)=>{e.searchFolder=t.payload},setAdvancedAddScanModel:(e,t)=>{e.advancedAddScanModel=t.payload}}}),{setSearchFolder:x7e,setAdvancedAddScanModel:C7e}=CU.actions,m1e=CU.reducer,TU={shift:!1},EU=yn({name:"hotkeys",initialState:TU,reducers:{shiftKeyPressed:(e,t)=>{e.shift=t.payload}}}),{shiftKeyPressed:T7e}=EU.actions,y1e=EU.reducer,v1e=jY(MJ);AU=J3=void 0;var _1e=v1e,b1e=function(){var t=[],n=[],r=void 0,i=function(u){return r=u,function(d){return function(f){return _1e.compose.apply(void 0,n)(d)(f)}}},o=function(){for(var u,d,f=arguments.length,p=Array(f),g=0;g<f;g++)p[g]=arguments[g];(u=n).push.apply(u,p.map(function(m){return m(r)})),(d=t).push.apply(d,p)},s=function(u){var d=t.findIndex(function(f){return f===u});if(d===-1){console.error("Middleware does not exist!",u);return}t=t.filter(function(f,p){return p!==d}),n=n.filter(function(f,p){return p!==d})},a=function(){n=[],t=[]};return{enhancer:i,addMiddleware:o,removeMiddleware:s,resetMiddlewares:a}},tS=b1e(),S1e=tS.enhancer,w1e=tS.addMiddleware;tS.removeMiddleware;var x1e=tS.resetMiddlewares,J3=w1e,AU=x1e,e5="@@REMEMBER_REHYDRATED",C1e="@@REMEMBER_PERSISTED";function t5(e){"@babel/helpers - typeof";return t5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t5(e)}var PU=function(t,n){if(t===null||t5(t)!=="object")return{};for(var r=-1,i={};++r<n.length;){var o=n[r];i[o]=t[o]}return i},T1e=function(t,n){var r=0,i;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var l=+new Date,u=(r||l)-l;if(u<=0&&!i){r=l+n,t.apply(void 0,s);return}i&&(clearTimeout(i),i=null),i=setTimeout(function(){r=+new Date+n,t.apply(void 0,s),clearTimeout(i),i=null},u)}},E1e=function(t,n){var r;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];clearTimeout(r),r=setTimeout(function(){t.apply(void 0,o),r=null},n)}};function SO(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(u){n(u);return}a.done?t(l):Promise.resolve(l).then(r,i)}function lE(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(l){SO(o,r,i,s,a,"next",l)}function a(l){SO(o,r,i,s,a,"throw",l)}s(void 0)})}}var A1e=function(){var e=lE(function*(t){var n=t.rememberedKeys,r=t.driver,i=t.prefix,o=t.unserialize,s=yield r.getItem("".concat(i,"rootState"));return s==null?{}:PU(o(s,"rootState"),n)});return function(n){return e.apply(this,arguments)}}(),P1e=function(){var e=lE(function*(t){var n=t.rememberedKeys,r=t.driver,i=t.prefix,o=t.unserialize,s=yield Promise.all(n.map(function(a){return r.getItem("".concat(i).concat(a))}));return n.reduce(function(a,l,u){return s[u]!==null&&s[u]!==void 0&&(a[l]=o(s[u],l)),a},{})});return function(n){return e.apply(this,arguments)}}(),R1e=function(){var e=lE(function*(t,n,r){var i=r.prefix,o=r.driver,s=r.persistWholeStore,a=r.unserialize,l={};try{var u=s?A1e:P1e;l=yield u({rememberedKeys:n,driver:o,prefix:i,unserialize:a})}catch(d){console.warn("redux-remember: rehydrate error",d)}t.dispatch({type:e5,payload:l})});return function(n,r,i){return e.apply(this,arguments)}}();function kx(e,t){return I1e(e)||k1e(e,t)||RU(e,t)||O1e()}function O1e(){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 k1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function I1e(e){if(Array.isArray(e))return e}function Ix(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=RU(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function RU(e,t){if(e){if(typeof e=="string")return wO(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 wO(e,t)}}function wO(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 Y1(e){"@babel/helpers - typeof";return Y1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y1(e)}var xO=function(t){var n;return(n=Object.prototype.toString.call(t).match(/\[object (.*)\]/))===null||n===void 0?void 0:n[1]},CO=function(t){return/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)Array\]$/.test(Object.prototype.toString.call(t))},M1e=function e(t,n){if(t===n)return!0;if(Y1(t)!=="object"||Y1(n)!=="object"||t===null||t===void 0||n===null||n===void 0)return t!==t&&n!==n;if(t.constructor!==n.constructor)return!1;if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(Array.isArray(t)){if(t.length!==n.length)return!1;for(var r=t.length;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(CO(t)&&CO(n)){if(t.byteLength!==n.byteLength)return!1;for(var i=t.byteLength;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}var o=xO(t),s=xO(n);if(o==="DataView"&&s==="DataView")return t.byteLength!==n.byteLength||t.byteOffset!==n.byteOffset?!1:e(t.buffer,n.buffer);if(o==="ArrayBuffer"&&s==="ArrayBuffer")return t.byteLength!==n.byteLength?!1:e(new Uint8Array(t),new Uint8Array(n));if(o==="Map"&&s==="Map"){if(t.size!==n.size)return!1;var a=Ix(t.entries()),l;try{for(a.s();!(l=a.n()).done;){var u=kx(l.value,1),d=u[0];if(!n.has(d))return!1}}catch(P){a.e(P)}finally{a.f()}var f=Ix(t.entries()),p;try{for(f.s();!(p=f.n()).done;){var g=kx(p.value,2),m=g[0],v=g[1];if(!e(v,n.get(m)))return!1}}catch(P){f.e(P)}finally{f.f()}return!0}if(o==="Set"&&s==="Set"){if(t.size!==n.size)return!1;var x=Ix(t.entries()),_;try{for(x.s();!(_=x.n()).done;){var b=kx(_.value,1),y=b[0];if(!n.has(y))return!1}}catch(P){x.e(P)}finally{x.f()}return!0}if(o==="Date"&&s==="Date")return+t==+n;var S=Object.keys(t);if(S.length!==Object.keys(n).length)return!1;for(var C=S.length;C--!==0;)if(!Object.prototype.hasOwnProperty.call(n,S[C]))return!1;for(var T=S.length;T--!==0;){var E=S[T];if(!e(t[E],n[E]))return!1}return o!=="Object"&&s!=="Object"?t===n:!0};const uE=M1e;function TO(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(u){n(u);return}a.done?t(l):Promise.resolve(l).then(r,i)}function OU(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(l){TO(o,r,i,s,a,"next",l)}function a(l){TO(o,r,i,s,a,"throw",l)}s(void 0)})}}var N1e=function(){var e=OU(function*(t,n,r){var i=r.prefix,o=r.driver,s=r.serialize;if(!uE(t,n))return o.setItem("".concat(i,"rootState"),s(t,"rootState"))});return function(n,r,i){return e.apply(this,arguments)}}(),L1e=function(t,n,r){var i=r.prefix,o=r.driver,s=r.serialize;return Promise.all(Object.keys(t).map(function(a){return uE(t[a],n[a])?Promise.resolve():o.setItem("".concat(i).concat(a),s(t[a],a))}))},D1e=function(){var e=OU(function*(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=r.prefix,o=r.driver,s=r.persistWholeStore,a=r.serialize;try{var l=s?N1e:L1e;yield l(t,n,{prefix:i,driver:o,serialize:a})}catch(u){console.warn("redux-remember: persist error",u)}});return function(){return e.apply(this,arguments)}}();function EO(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(u){n(u);return}a.done?t(l):Promise.resolve(l).then(r,i)}function AO(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(l){EO(o,r,i,s,a,"next",l)}function a(l){EO(o,r,i,s,a,"throw",l)}s(void 0)})}}var $1e=function(){var e=AO(function*(t,n,r){var i=r.prefix,o=r.driver,s=r.serialize,a=r.unserialize,l=r.persistThrottle,u=r.persistDebounce,d=r.persistWholeStore;yield R1e(t,n,{prefix:i,driver:o,unserialize:a,persistWholeStore:d});var f={},p=function(){var g=AO(function*(){var m=PU(t.getState(),n);yield D1e(m,f,{prefix:i,driver:o,serialize:s,persistWholeStore:d}),uE(m,f)||t.dispatch({type:C1e,payload:m}),f=m});return function(){return g.apply(this,arguments)}}();u&&u>0?t.subscribe(E1e(p,u)):t.subscribe(T1e(p,l))});return function(n,r,i){return e.apply(this,arguments)}}();const F1e=$1e;function Ng(e){"@babel/helpers - typeof";return Ng=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ng(e)}function PO(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 Mx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PO(Object(n),!0).forEach(function(r){B1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B1e(e,t,n){return t=U1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U1e(e){var t=z1e(e,"string");return Ng(t)==="symbol"?t:String(t)}function z1e(e,t){if(Ng(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ng(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V1e=function(t){var n={state:{}};return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n.state,i=arguments.length>1?arguments[1]:void 0;i.type&&(i.type==="@@INIT"||i.type.startsWith("@@redux/INIT"))&&(n.state=Mx({},r));var o=typeof t=="function"?t:Ff(t);switch(i.type){case e5:return n.state=o(Mx(Mx({},n.state),i.payload||{}),{type:e5}),n.state;default:return o(r,i)}}},j1e=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.prefix,o=i===void 0?"@@remember-":i,s=r.serialize,a=s===void 0?function(x,_){return JSON.stringify(x)}:s,l=r.unserialize,u=l===void 0?function(x,_){return JSON.parse(x)}:l,d=r.persistThrottle,f=d===void 0?100:d,p=r.persistDebounce,g=r.persistWholeStore,m=g===void 0?!1:g;if(!t)throw Error("redux-remember error: driver required");if(!Array.isArray(n))throw Error("redux-remember error: rememberedKeys needs to be an array");var v=function(_){return function(b,y,S){var C=_(b,y,S);return F1e(C,n,{driver:t,prefix:o,serialize:a,unserialize:u,persistThrottle:f,persistDebounce:p,persistWholeStore:m}),C}};return v};const E7e=["chakra-ui-color-mode","i18nextLng","ROARR_FILTER","ROARR_LOG"],G1e="@@invokeai-",H1e=["cursorPosition","isCanvasInitialized","doesCanvasNeedScaling"],W1e=["pendingControlImages"],q1e=["selection","selectedBoardId","galleryView"],K1e=["schema","invocationTemplates"],X1e=[],Y1e=[],Q1e=["currentIteration","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","totalIterations","totalSteps","isCancelScheduled","progressImage","wereModelsReceived","wasSchemaParsed","isPersisted","isUploading"],Z1e=["shouldShowImageDetails"],J1e={canvas:H1e,gallery:q1e,generation:X1e,nodes:K1e,postprocessing:Y1e,system:Q1e,ui:Z1e,controlNet:W1e},e_e=(e,t)=>{const n=rb(e,J1e[t]??[]);return JSON.stringify(n)},t_e={canvas:o$,gallery:pF,generation:La,nodes:pU,postprocessing:yU,system:wU,config:BD,ui:e$,hotkeys:TU,controlNet:M3},n_e=(e,t)=>hae(JSON.parse(e),t_e[t]),kU=Re("nodes/textToImageGraphBuilt"),IU=Re("nodes/imageToImageGraphBuilt"),MU=Re("nodes/canvasGraphBuilt"),NU=Re("nodes/nodesGraphBuilt"),r_e=Co(kU,IU,MU,NU),i_e=e=>{if(r_e(e)&&e.payload.nodes){const t={};return{...e,payload:{...e.payload,nodes:t}}}return Ig.fulfilled.match(e)?{...e,payload:"<OpenAPI schema omitted>"}:oE.match(e)?{...e,payload:"<Node templates omitted>"}:e},o_e=["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setBoundingBoxCoordinates","canvas/setBoundingBoxDimensions","canvas/setIsDrawing","canvas/addPointToCurrentLine","socket/socketGeneratorProgress","socket/appSocketGeneratorProgress","hotkeys/shiftKeyPressed","@@REMEMBER_PERSISTED"],s_e=e=>e,a_e=()=>{Pe({actionCreator:zue,effect:async(e,{dispatch:t,getState:n})=>{const r=Ie("canvas"),i=n(),{sessionId:o,isProcessing:s}=i.system,a=e.payload;if(s){if(!a){r.debug("No canvas session, skipping cancel");return}if(a!==o){r.debug({canvasSessionId:a,session_id:o},"Canvas session does not match global session, skipping cancel");return}t(mc({session_id:o}))}}})};Re("app/appStarted");const l_e=()=>{Pe({matcher:Se.endpoints.listImages.matchFulfilled,effect:async(e,{dispatch:t,unsubscribe:n,cancelActiveListeners:r})=>{if(e.meta.arg.queryCacheKey!==Fo({board_id:"none",categories:jr}))return;r(),n();const i=e.payload;if(i.ids.length>0){const o=pn.getSelectors().selectAll(i)[0];t(Rs(o??null))}}})},cE=Gl.injectEndpoints({endpoints:e=>({getAppVersion:e.query({query:()=>({url:"app/version",method:"GET"}),providesTags:["AppVersion"],keepUnusedDataFor:864e5}),getAppConfig:e.query({query:()=>({url:"app/config",method:"GET"}),providesTags:["AppConfig"],keepUnusedDataFor:864e5})})}),{useGetAppVersionQuery:A7e,useGetAppConfigQuery:P7e}=cE,u_e=()=>{Pe({matcher:cE.endpoints.getAppConfig.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const{infill_methods:r=[],nsfw_methods:i=[],watermarking_methods:o=[]}=e.payload,s=t().generation.infillMethod;r.includes(s)||n(bue(r[0])),i.includes("nsfw_checker")||n(d1e(!1)),o.includes("invisible_watermark")||n(f1e(!1))}})},c_e=Re("app/appStarted"),d_e=()=>{Pe({actionCreator:c_e,effect:async(e,{unsubscribe:t,cancelActiveListeners:n})=>{n(),t()}})},dE={memoizeOptions:{resultEqualityCheck:nb}},LU=(e,t)=>{var f;const{generation:n,canvas:r,nodes:i,controlNet:o}=e,s=((f=n.initialImage)==null?void 0:f.imageName)===t,a=r.layerState.objects.some(p=>p.kind==="image"&&p.imageName===t),l=i.nodes.some(p=>Ou(p.data.inputs,g=>{var m;return g.type==="image"&&((m=g.value)==null?void 0:m.image_name)===t})),u=Ou(o.controlNets,p=>p.controlImage===t||p.processedControlImage===t);return{isInitialImage:s,isCanvasImage:a,isNodesImage:l,isControlNetImage:u}},f_e=si([e=>e],e=>{const{imagesToDelete:t}=e.deleteImageModal;return t.length?t.map(r=>LU(e,r.image_name)):[]},dE),h_e=()=>{Pe({matcher:Se.endpoints.deleteBoardAndImages.matchFulfilled,effect:async(e,{dispatch:t,getState:n})=>{const{deleted_images:r}=e.payload;let i=!1,o=!1,s=!1,a=!1;const l=n();r.forEach(u=>{const d=LU(l,u);d.isInitialImage&&!i&&(t(ST()),i=!0),d.isCanvasImage&&!o&&(t(wT()),o=!0),d.isNodesImage&&!s&&(t(sE()),s=!0),d.isControlNetImage&&!a&&(t(FT()),a=!0)})}})},p_e=()=>{Pe({matcher:Co(N3,k1),effect:async(e,{getState:t,dispatch:n,condition:r,cancelActiveListeners:i})=>{i();const o=t(),s=N3.match(e)?e.payload:o.gallery.selectedBoardId,l=(k1.match(e)?e.payload:o.gallery.galleryView)==="images"?jr:Sl,u={board_id:s??"none",categories:l};if(await r(()=>Se.endpoints.listImages.select(u)(t()).isSuccess,5e3)){const{data:f}=Se.endpoints.listImages.select(u)(t());if(f){const p=O1.selectAll(f)[0];n(Rs(p??null))}else n(Rs(null))}else n(Rs(null))}})},g_e=Re("canvas/canvasSavedToGallery"),m_e=Re("canvas/canvasCopiedToClipboard"),y_e=Re("canvas/canvasDownloadedAsImage"),v_e=Re("canvas/canvasMerged"),__e=Re("canvas/stagingAreaImageSaved");let DU=null,$U=null;const R7e=e=>{DU=e},nS=()=>DU,O7e=e=>{$U=e},b_e=()=>$U,S_e=async e=>new Promise((t,n)=>{e.toBlob(r=>{if(r){t(r);return}n("Unable to create Blob")})}),Q1=async(e,t)=>await S_e(e.toCanvas(t)),fE=async e=>{const t=nS();if(!t)return;const{shouldCropToBoundingBoxOnSave:n,boundingBoxCoordinates:r,boundingBoxDimensions:i}=e.canvas,o=t.clone();o.scale({x:1,y:1});const s=o.getAbsolutePosition(),a=n?{x:r.x+s.x,y:r.y+s.y,width:i.width,height:i.height}:o.getClientRect();return Q1(o,a)},w_e=e=>{navigator.clipboard.write([new ClipboardItem({[e.type]:e})])},x_e=()=>{Pe({actionCreator:m_e,effect:async(e,{dispatch:t,getState:n})=>{const r=Jb.get().child({namespace:"canvasCopiedToClipboardListener"}),i=n(),o=await fE(i);if(!o){r.error("Problem getting base layer blob"),t(Un({title:"Problem Copying Canvas",description:"Unable to export base layer",status:"error"}));return}w_e(o),t(Un({title:"Canvas Copied to Clipboard",status:"success"}))}})},C_e=(e,t)=>{const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),r.remove()},T_e=()=>{Pe({actionCreator:y_e,effect:async(e,{dispatch:t,getState:n})=>{const r=Jb.get().child({namespace:"canvasSavedToGalleryListener"}),i=n(),o=await fE(i);if(!o){r.error("Problem getting base layer blob"),t(Un({title:"Problem Downloading Canvas",description:"Unable to export base layer",status:"error"}));return}C_e(o,"canvas.png"),t(Un({title:"Canvas Downloaded",status:"success"}))}})},E_e=async()=>{const e=nS();if(!e)return;const t=e.clone();return t.scale({x:1,y:1}),Q1(t,t.getClientRect())},A_e=()=>{Pe({actionCreator:v_e,effect:async(e,{dispatch:t})=>{const n=Jb.get().child({namespace:"canvasCopiedToClipboardListener"}),r=await E_e();if(!r){n.error("Problem getting base layer blob"),t(Un({title:"Problem Merging Canvas",description:"Unable to export base layer",status:"error"}));return}const i=nS();if(!i){n.error("Problem getting canvas base layer"),t(Un({title:"Problem Merging Canvas",description:"Unable to export base layer",status:"error"}));return}const o=i.getClientRect({relativeTo:i.getParent()}),s=await t(Se.endpoints.uploadImage.initiate({file:new File([r],"mergedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!0,postUploadAction:{type:"TOAST",toastOptions:{title:"Canvas Merged"}}})).unwrap(),{image_name:a}=s;t(Vue({kind:"image",layer:"base",imageName:a,...o}))}})},P_e=()=>{Pe({actionCreator:g_e,effect:async(e,{dispatch:t,getState:n})=>{const r=Ie("canvas"),i=n(),o=await fE(i);if(!o){r.error("Problem getting base layer blob"),t(Un({title:"Problem Saving Canvas",description:"Unable to export base layer",status:"error"}));return}const{autoAddBoardId:s}=i.gallery;t(Se.endpoints.uploadImage.initiate({file:new File([o],"savedCanvas.png",{type:"image/png"}),image_category:"general",is_intermediate:!1,board_id:s==="none"?void 0:s,crop_visible:!0,postUploadAction:{type:"TOAST",toastOptions:{title:"Canvas Saved to Gallery"}}}))}})},R_e=(e,t,n)=>{var f;if(!(Kde.match(e)||lR.match(e)||$T.match(e)||Xde.match(e)||uR.match(e))||uR.match(e)&&((f=n.controlNet.controlNets[e.payload.controlNetId])==null?void 0:f.shouldAutoConfig)===!0)return!1;const i=t.controlNet.controlNets[e.payload.controlNetId];if(!i)return!1;const{controlImage:o,processorType:s,shouldAutoConfig:a}=i;if(lR.match(e)&&!a)return!1;const l=s!=="none",u=t.system.isProcessing;return l&&!u&&!!o},O_e=()=>{Pe({predicate:R_e,effect:async(e,{dispatch:t,cancelActiveListeners:n,delay:r})=>{const i=Ie("session"),{controlNetId:o}=e.payload;n(),i.trace("ControlNet auto-process triggered"),await r(300),t(DT({controlNetId:o}))}})},yc=Re("system/sessionReadyToInvoke"),FU=e=>(e==null?void 0:e.type)==="image_output",k_e=()=>{Pe({actionCreator:DT,effect:async(e,{dispatch:t,getState:n,take:r})=>{const i=Ie("session"),{controlNetId:o}=e.payload,s=n().controlNet.controlNets[o];if(!(s!=null&&s.controlImage)){i.error("Unable to process ControlNet image");return}const a={nodes:{[s.processorNode.id]:{...s.processorNode,is_intermediate:!0,image:{image_name:s.controlImage}}}},l=t(Mr({graph:a})),[u]=await r(p=>Mr.fulfilled.match(p)&&p.meta.requestId===l.requestId),d=u.payload.id;t(yc());const[f]=await r(p=>NT.match(p)&&p.payload.data.graph_execution_state_id===d);if(FU(f.payload.data.result)){const{image_name:p}=f.payload.data.result.image,[{payload:g}]=await r(v=>Se.endpoints.getImageDTO.matchFulfilled(v)&&v.payload.image_name===p),m=g;i.debug({controlNetId:e.payload,processedControlImage:m},"ControlNet image processed"),t(qde({controlNetId:o,processedControlImage:m.image_name}))}}})},I_e=()=>{Pe({matcher:Se.endpoints.addImageToBoard.matchFulfilled,effect:e=>{const t=Ie("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Image added to board")}})},M_e=()=>{Pe({matcher:Se.endpoints.addImageToBoard.matchRejected,effect:e=>{const t=Ie("images"),{board_id:n,imageDTO:r}=e.meta.arg.originalArgs;t.debug({board_id:n,imageDTO:r},"Problem adding image to board")}})},hE=Re("deleteImageModal/imageDeletionConfirmed"),k7e=e=>e.gallery,I7e=si(e=>e,e=>e.gallery.selection[e.gallery.selection.length-1],dE),BU=si([e=>e],e=>{const{selectedBoardId:t,galleryView:n}=e.gallery;return{board_id:t,categories:n==="images"?jr:Sl,offset:0,limit:Wue,is_intermediate:!1}},dE),N_e=()=>{Pe({actionCreator:hE,effect:async(e,{dispatch:t,getState:n,condition:r})=>{var p;const{imageDTOs:i,imagesUsage:o}=e.payload;if(i.length!==1||o.length!==1)return;const s=i[0],a=o[0];if(!s||!a)return;t(BT(!1));const l=n(),u=(p=l.gallery.selection[l.gallery.selection.length-1])==null?void 0:p.image_name;if(s&&(s==null?void 0:s.image_name)===u){const{image_name:g}=s,m=BU(l),{data:v}=Se.endpoints.listImages.select(m)(l),x=v?pn.getSelectors().selectAll(v):[],_=x.findIndex(C=>C.image_name===g),b=x.filter(C=>C.image_name!==g),y=bl(_,0,b.length-1),S=b[y];t(Rs(S||null))}a.isCanvasImage&&t(wT()),a.isControlNetImage&&t(FT()),a.isInitialImage&&t(ST()),a.isNodesImage&&t(sE());const{requestId:d}=t(Se.endpoints.deleteImage.initiate(s));await r(g=>Se.endpoints.deleteImage.matchFulfilled(g)&&g.meta.requestId===d,3e4)&&t(Gl.util.invalidateTags([{type:"Board",id:s.board_id}]))}})},L_e=()=>{Pe({actionCreator:hE,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTOs:r,imagesUsage:i}=e.payload;if(!(r.length<1||i.length<1))try{await t(Se.endpoints.deleteImages.initiate({imageDTOs:r})).unwrap();const o=n(),s=BU(o),{data:a}=Se.endpoints.listImages.select(s)(o),l=a?pn.getSelectors().selectAll(a)[0]:void 0;t(Rs(l||null)),t(BT(!1)),i.some(u=>u.isCanvasImage)&&t(wT()),i.some(u=>u.isControlNetImage)&&t(FT()),i.some(u=>u.isInitialImage)&&t(ST()),i.some(u=>u.isNodesImage)&&t(sE())}catch{}}})},D_e=()=>{Pe({matcher:Se.endpoints.deleteImage.matchPending,effect:()=>{}})},$_e=()=>{Pe({matcher:Se.endpoints.deleteImage.matchFulfilled,effect:e=>{Ie("images").debug({imageDTO:e.meta.arg.originalArgs},"Image deleted")}})},F_e=()=>{Pe({matcher:Se.endpoints.deleteImage.matchRejected,effect:e=>{Ie("images").debug({imageDTO:e.meta.arg.originalArgs},"Unable to delete image")}})},UU=Re("dnd/dndDropped"),B_e=()=>{Pe({actionCreator:UU,effect:async(e,{dispatch:t})=>{const n=Ie("images"),{activeData:r,overData:i}=e.payload;if(r.payloadType==="IMAGE_DTO"?n.debug({activeData:r,overData:i},"Image dropped"):r.payloadType==="IMAGE_DTOS"?n.debug({activeData:r,overData:i},`Images (${r.payload.imageDTOs.length}) dropped`):n.debug({activeData:r,overData:i},"Unknown payload dropped"),i.actionType==="SET_CURRENT_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(Rs(r.payload.imageDTO));return}if(i.actionType==="SET_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(ob(r.payload.imageDTO));return}if(i.actionType==="SET_CONTROLNET_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{controlNetId:o}=i.context;t($T({controlImage:r.payload.imageDTO.image_name,controlNetId:o}));return}if(i.actionType==="SET_CANVAS_INITIAL_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){t(a$(r.payload.imageDTO));return}if(i.actionType==="SET_NODES_IMAGE"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{fieldName:o,nodeId:s}=i.context;t(mU({nodeId:s,fieldName:o,value:r.payload.imageDTO}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload,{boardId:s}=i.context;t(Se.endpoints.addImageToBoard.initiate({imageDTO:o,board_id:s}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTO"&&r.payload.imageDTO){const{imageDTO:o}=r.payload;t(Se.endpoints.removeImageFromBoard.initiate({imageDTO:o}));return}if(i.actionType==="ADD_TO_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload,{boardId:s}=i.context;t(Se.endpoints.addImagesToBoard.initiate({imageDTOs:o,board_id:s}));return}if(i.actionType==="REMOVE_FROM_BOARD"&&r.payloadType==="IMAGE_DTOS"&&r.payload.imageDTOs){const{imageDTOs:o}=r.payload;t(Se.endpoints.removeImagesFromBoard.initiate({imageDTOs:o}));return}}})},U_e=()=>{Pe({matcher:Se.endpoints.removeImageFromBoard.matchFulfilled,effect:e=>{const t=Ie("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Image removed from board")}})},z_e=()=>{Pe({matcher:Se.endpoints.removeImageFromBoard.matchRejected,effect:e=>{const t=Ie("images"),n=e.meta.arg.originalArgs;t.debug({imageDTO:n},"Problem removing image from board")}})},V_e=()=>{Pe({actionCreator:nfe,effect:async(e,{dispatch:t,getState:n})=>{const r=e.payload,i=n(),{shouldConfirmOnDelete:o}=i.system,s=f_e(n()),a=s.some(l=>l.isCanvasImage)||s.some(l=>l.isInitialImage)||s.some(l=>l.isControlNetImage)||s.some(l=>l.isNodesImage);if(o||a){t(BT(!0));return}t(hE({imageDTOs:r,imagesUsage:s}))}})},cd={title:"Image Uploaded",status:"success"},j_e=()=>{Pe({matcher:Se.endpoints.uploadImage.matchFulfilled,effect:(e,{dispatch:t,getState:n})=>{const r=Ie("images"),i=e.payload,o=n(),{autoAddBoardId:s}=o.gallery;r.debug({imageDTO:i},"Image uploaded");const{postUploadAction:a}=e.meta.arg.originalArgs;if(!(e.payload.is_intermediate&&!a)){if((a==null?void 0:a.type)==="TOAST"){const{toastOptions:l}=a;if(!s||s==="none")t(Un({...cd,...l}));else{t(Se.endpoints.addImageToBoard.initiate({board_id:s,imageDTO:i}));const{data:u}=Ui.endpoints.listAllBoards.select()(o),d=u==null?void 0:u.find(p=>p.board_id===s),f=d?`Added to board ${d.board_name}`:`Added to board ${s}`;t(Un({...cd,description:f}))}return}if((a==null?void 0:a.type)==="SET_CANVAS_INITIAL_IMAGE"){t(a$(i)),t(Un({...cd,description:"Set as canvas initial image"}));return}if((a==null?void 0:a.type)==="SET_CONTROLNET_IMAGE"){const{controlNetId:l}=a;t($T({controlNetId:l,controlImage:i.image_name})),t(Un({...cd,description:"Set as control image"}));return}if((a==null?void 0:a.type)==="SET_INITIAL_IMAGE"){t(ob(i)),t(Un({...cd,description:"Set as initial image"}));return}if((a==null?void 0:a.type)==="SET_NODES_IMAGE"){const{nodeId:l,fieldName:u}=a;t(mU({nodeId:l,fieldName:u,value:i})),t(Un({...cd,description:`Set as node field ${u}`}));return}}}})},G_e=()=>{Pe({matcher:Se.endpoints.uploadImage.matchRejected,effect:(e,{dispatch:t})=>{const n=Ie("images"),r={arg:{...rb(e.meta.arg.originalArgs,["file","postUploadAction"]),file:"<Blob>"}};n.error({...r},"Image upload failed"),t(Un({title:"Image Upload Failed",description:e.error.message,status:"error"}))}})},H_e=Re("generation/initialImageSelected"),W_e=Re("generation/modelSelected"),q_e=()=>{Pe({actionCreator:H_e,effect:(e,{dispatch:t})=>{if(!e.payload){t(Un(Ku({title:Pp("toast.imageNotLoadedDesc"),status:"error"})));return}t(ob(e.payload)),t(Un(Ku(Pp("toast.sentToImageToImage"))))}})},K_e=()=>{Pe({actionCreator:W_e,effect:(e,{getState:t,dispatch:n})=>{var l;const r=Ie("models"),i=t(),o=YD.safeParse(e.payload);if(!o.success){r.error({error:o.error.format()},"Failed to parse main model");return}const s=o.data,{base_model:a}=s;if(((l=i.generation.model)==null?void 0:l.base_model)!==a){let u=0;tc(i.lora.loras,(p,g)=>{p.base_model!==a&&(n(_F(g)),u+=1)});const{vae:d}=i.generation;d&&d.base_model!==a&&(n(ZD(null)),u+=1);const{controlNets:f}=i.controlNet;tc(f,(p,g)=>{var m;((m=p.model)==null?void 0:m.base_model)!==a&&(n(dF({controlNetId:g})),u+=1)}),u>0&&n(Un(Ku({title:`Base model changed, cleared ${u} incompatible submodel${u===1?"":"s"}`,status:"warning"})))}n(Gu(s))}})},RO=Jl({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),OO=Jl({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),kO=Jl({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),IO=Jl({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),MO=Jl({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),n5=Jl({sortComparer:(e,t)=>e.model_name.localeCompare(t.model_name)}),X_e=({base_model:e,model_type:t,model_name:n})=>`${e}/${t}/${n}`,dd=e=>{const t=[];return e.forEach(n=>{const r={...zr(n),id:X_e(n)};t.push(r)}),t},da=Gl.injectEndpoints({endpoints:e=>({getOnnxModels:e.query({query:t=>{const n={model_type:"onnx",base_models:t};return`models/?${fv.stringify(n,{arrayFormat:"none"})}`},providesTags:(t,n,r)=>{const i=[{type:"OnnxModel",id:Ke}];return t&&i.push(...t.ids.map(o=>({type:"OnnxModel",id:o}))),i},transformResponse:(t,n,r)=>{const i=dd(t.models);return OO.setAll(OO.getInitialState(),i)}}),getMainModels:e.query({query:t=>{const n={model_type:"main",base_models:t};return`models/?${fv.stringify(n,{arrayFormat:"none"})}`},providesTags:(t,n,r)=>{const i=[{type:"MainModel",id:Ke}];return t&&i.push(...t.ids.map(o=>({type:"MainModel",id:o}))),i},transformResponse:(t,n,r)=>{const i=dd(t.models);return RO.setAll(RO.getInitialState(),i)}}),updateMainModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/main/${n}`,method:"PATCH",body:r}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),importMainModels:e.mutation({query:({body:t})=>({url:"models/import",method:"POST",body:t}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),addMainModels:e.mutation({query:({body:t})=>({url:"models/add",method:"POST",body:t}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),deleteMainModels:e.mutation({query:({base_model:t,model_name:n,model_type:r})=>({url:`models/${t}/${r}/${n}`,method:"DELETE"}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),convertMainModels:e.mutation({query:({base_model:t,model_name:n,convert_dest_directory:r})=>({url:`models/convert/${t}/main/${n}`,method:"PUT",params:{convert_dest_directory:r}}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),mergeMainModels:e.mutation({query:({base_model:t,body:n})=>({url:`models/merge/${t}`,method:"PUT",body:n}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),syncModels:e.mutation({query:()=>({url:"models/sync",method:"POST"}),invalidatesTags:[{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"OnnxModel",id:Ke}]}),getLoRAModels:e.query({query:()=>({url:"models/",params:{model_type:"lora"}}),providesTags:(t,n,r)=>{const i=[{type:"LoRAModel",id:Ke}];return t&&i.push(...t.ids.map(o=>({type:"LoRAModel",id:o}))),i},transformResponse:(t,n,r)=>{const i=dd(t.models);return kO.setAll(kO.getInitialState(),i)}}),updateLoRAModels:e.mutation({query:({base_model:t,model_name:n,body:r})=>({url:`models/${t}/lora/${n}`,method:"PATCH",body:r}),invalidatesTags:[{type:"LoRAModel",id:Ke}]}),deleteLoRAModels:e.mutation({query:({base_model:t,model_name:n})=>({url:`models/${t}/lora/${n}`,method:"DELETE"}),invalidatesTags:[{type:"LoRAModel",id:Ke}]}),getControlNetModels:e.query({query:()=>({url:"models/",params:{model_type:"controlnet"}}),providesTags:(t,n,r)=>{const i=[{type:"ControlNetModel",id:Ke}];return t&&i.push(...t.ids.map(o=>({type:"ControlNetModel",id:o}))),i},transformResponse:(t,n,r)=>{const i=dd(t.models);return IO.setAll(IO.getInitialState(),i)}}),getVaeModels:e.query({query:()=>({url:"models/",params:{model_type:"vae"}}),providesTags:(t,n,r)=>{const i=[{type:"VaeModel",id:Ke}];return t&&i.push(...t.ids.map(o=>({type:"VaeModel",id:o}))),i},transformResponse:(t,n,r)=>{const i=dd(t.models);return n5.setAll(n5.getInitialState(),i)}}),getTextualInversionModels:e.query({query:()=>({url:"models/",params:{model_type:"embedding"}}),providesTags:(t,n,r)=>{const i=[{type:"TextualInversionModel",id:Ke}];return t&&i.push(...t.ids.map(o=>({type:"TextualInversionModel",id:o}))),i},transformResponse:(t,n,r)=>{const i=dd(t.models);return MO.setAll(MO.getInitialState(),i)}}),getModelsInFolder:e.query({query:t=>({url:`/models/search?${fv.stringify(t,{})}`}),providesTags:(t,n,r)=>{const i=[{type:"ScannedModels",id:Ke}];return t&&i.push(...t.map(o=>({type:"ScannedModels",id:o}))),i}}),getCheckpointConfigs:e.query({query:()=>({url:"/models/ckpt_confs"})})})}),{useGetMainModelsQuery:M7e,useGetOnnxModelsQuery:N7e,useGetControlNetModelsQuery:L7e,useGetLoRAModelsQuery:D7e,useGetTextualInversionModelsQuery:$7e,useGetVaeModelsQuery:F7e,useUpdateMainModelsMutation:B7e,useDeleteMainModelsMutation:U7e,useImportMainModelsMutation:z7e,useAddMainModelsMutation:V7e,useConvertMainModelsMutation:j7e,useMergeMainModelsMutation:G7e,useDeleteLoRAModelsMutation:H7e,useUpdateLoRAModelsMutation:W7e,useSyncModelsMutation:q7e,useGetModelsInFolderQuery:K7e,useGetCheckpointConfigsQuery:X7e}=da,Y_e=()=>{Pe({predicate:(e,t)=>da.endpoints.getMainModels.matchFulfilled(t)&&!t.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=Ie("models");r.info({models:e.payload.entities},`Main models loaded (${e.payload.ids.length})`);const i=t().generation.model;if(Ou(e.payload.entities,u=>(u==null?void 0:u.model_name)===(i==null?void 0:i.model_name)&&(u==null?void 0:u.base_model)===(i==null?void 0:i.base_model)&&(u==null?void 0:u.model_type)===(i==null?void 0:i.model_type)))return;const s=e.payload.ids[0],a=e.payload.entities[s];if(!a){n(Gu(null));return}const l=YD.safeParse(a);if(!l.success){r.error({error:l.error.format()},"Failed to parse main model");return}n(Gu(l.data))}}),Pe({predicate:(e,t)=>da.endpoints.getMainModels.matchFulfilled(t)&&t.meta.arg.originalArgs.includes("sdxl-refiner"),effect:async(e,{getState:t,dispatch:n})=>{const r=Ie("models");r.info({models:e.payload.entities},`SDXL Refiner models loaded (${e.payload.ids.length})`);const i=t().sdxl.refinerModel;if(Ou(e.payload.entities,u=>(u==null?void 0:u.model_name)===(i==null?void 0:i.model_name)&&(u==null?void 0:u.base_model)===(i==null?void 0:i.base_model)&&(u==null?void 0:u.model_type)===(i==null?void 0:i.model_type)))return;const s=e.payload.ids[0],a=e.payload.entities[s];if(!a){n(dO(null)),n(Vve(!1));return}const l=XD.safeParse(a);if(!l.success){r.error({error:l.error.format()},"Failed to parse SDXL Refiner Model");return}n(dO(l.data))}}),Pe({matcher:da.endpoints.getVaeModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{const r=Ie("models");r.info({models:e.payload.entities},`VAEs loaded (${e.payload.ids.length})`);const i=t().generation.vae;if(i===null||Ou(e.payload.entities,l=>(l==null?void 0:l.model_name)===(i==null?void 0:i.model_name)&&(l==null?void 0:l.base_model)===(i==null?void 0:i.base_model)))return;const s=n5.getSelectors().selectAll(e.payload)[0];if(!s){n(Gu(null));return}const a=gue.safeParse(s);if(!a.success){r.error({error:a.error.format()},"Failed to parse VAE model");return}n(ZD(a.data))}}),Pe({matcher:da.endpoints.getLoRAModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{Ie("models").info({models:e.payload.entities},`LoRAs loaded (${e.payload.ids.length})`);const i=t().lora.loras;tc(i,(o,s)=>{Ou(e.payload.entities,l=>(l==null?void 0:l.model_name)===(o==null?void 0:o.model_name)&&(l==null?void 0:l.base_model)===(o==null?void 0:o.base_model))||n(_F(s))})}}),Pe({matcher:da.endpoints.getControlNetModels.matchFulfilled,effect:async(e,{getState:t,dispatch:n})=>{Ie("models").info({models:e.payload.entities},`ControlNet models loaded (${e.payload.ids.length})`);const i=t().controlNet.controlNets;tc(i,(o,s)=>{Ou(e.payload.entities,l=>{var u,d;return(l==null?void 0:l.model_name)===((u=o==null?void 0:o.model)==null?void 0:u.model_name)&&(l==null?void 0:l.base_model)===((d=o==null?void 0:o.model)==null?void 0:d.base_model)})||n(dF({controlNetId:s}))})}}),Pe({matcher:da.endpoints.getTextualInversionModels.matchFulfilled,effect:async e=>{Ie("models").info({models:e.payload.entities},`Embeddings loaded (${e.payload.ids.length})`)}})},Da=e=>JSON.parse(JSON.stringify(e)),r5=e=>!("$ref"in e),Q_e=e=>!("$ref"in e),Y7e=500,Z_e={integer:"integer",float:"float",number:"float",string:"string",boolean:"boolean",enum:"enum",ImageField:"image",image_collection:"image_collection",LatentsField:"latents",ConditioningField:"conditioning",UNetField:"unet",ClipField:"clip",VaeField:"vae",model:"model",refiner_model:"refiner_model",vae_model:"vae_model",lora_model:"lora_model",controlnet_model:"controlnet_model",ControlNetModelField:"controlnet_model",array:"array",item:"item",ColorField:"color",ControlField:"control",control:"control",cfg_scale:"float",control_weight:"float"},J_e=500,Rn=e=>`var(--invokeai-colors-${e}-${J_e})`,Q7e={integer:{color:"red",colorCssVar:Rn("red"),title:"Integer",description:"Integers are whole numbers, without a decimal point."},float:{color:"orange",colorCssVar:Rn("orange"),title:"Float",description:"Floats are numbers with a decimal point."},string:{color:"yellow",colorCssVar:Rn("yellow"),title:"String",description:"Strings are text."},boolean:{color:"green",colorCssVar:Rn("green"),title:"Boolean",description:"Booleans are true or false."},enum:{color:"blue",colorCssVar:Rn("blue"),title:"Enum",description:"Enums are values that may be one of a number of options."},image:{color:"purple",colorCssVar:Rn("purple"),title:"Image",description:"Images may be passed between nodes."},image_collection:{color:"purple",colorCssVar:Rn("purple"),title:"Image Collection",description:"A collection of images."},latents:{color:"pink",colorCssVar:Rn("pink"),title:"Latents",description:"Latents may be passed between nodes."},conditioning:{color:"cyan",colorCssVar:Rn("cyan"),title:"Conditioning",description:"Conditioning may be passed between nodes."},unet:{color:"red",colorCssVar:Rn("red"),title:"UNet",description:"UNet submodel."},clip:{color:"green",colorCssVar:Rn("green"),title:"Clip",description:"Tokenizer and text_encoder submodels."},vae:{color:"blue",colorCssVar:Rn("blue"),title:"Vae",description:"Vae submodel."},control:{color:"cyan",colorCssVar:Rn("cyan"),title:"Control",description:"Control info passed between nodes."},model:{color:"teal",colorCssVar:Rn("teal"),title:"Model",description:"Models are models."},refiner_model:{color:"teal",colorCssVar:Rn("teal"),title:"Refiner Model",description:"Models are models."},vae_model:{color:"teal",colorCssVar:Rn("teal"),title:"VAE",description:"Models are models."},lora_model:{color:"teal",colorCssVar:Rn("teal"),title:"LoRA",description:"Models are models."},controlnet_model:{color:"teal",colorCssVar:Rn("teal"),title:"ControlNet",description:"Models are models."},array:{color:"gray",colorCssVar:Rn("gray"),title:"Array",description:"TODO: Array type description."},item:{color:"gray",colorCssVar:Rn("gray"),title:"Collection Item",description:"TODO: Collection Item type description."},color:{color:"gray",colorCssVar:Rn("gray"),title:"Color",description:"A RGBA color."}},Z7e=250,Nx=e=>{const t=e.$ref.split("/").slice(-1)[0];return t||"UNKNOWN FIELD TYPE"},ebe=({schemaObject:e,baseField:t})=>{const n={...t,type:"integer",inputRequirement:"always",inputKind:"any",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&(n.exclusiveMinimum=e.exclusiveMinimum),n},tbe=({schemaObject:e,baseField:t})=>{const n={...t,type:"float",inputRequirement:"always",inputKind:"any",default:e.default??0};return e.multipleOf!==void 0&&(n.multipleOf=e.multipleOf),e.maximum!==void 0&&(n.maximum=e.maximum),e.exclusiveMaximum!==void 0&&(n.exclusiveMaximum=e.exclusiveMaximum),e.minimum!==void 0&&(n.minimum=e.minimum),e.exclusiveMinimum!==void 0&&(n.exclusiveMinimum=e.exclusiveMinimum),n},nbe=({schemaObject:e,baseField:t})=>{const n={...t,type:"string",inputRequirement:"always",inputKind:"any",default:e.default??""};return e.minLength!==void 0&&(n.minLength=e.minLength),e.maxLength!==void 0&&(n.maxLength=e.maxLength),e.pattern!==void 0&&(n.pattern=e.pattern),n},rbe=({schemaObject:e,baseField:t})=>({...t,type:"boolean",inputRequirement:"always",inputKind:"any",default:e.default??!1}),ibe=({schemaObject:e,baseField:t})=>({...t,type:"model",inputRequirement:"always",inputKind:"direct",default:e.default??void 0}),obe=({schemaObject:e,baseField:t})=>({...t,type:"refiner_model",inputRequirement:"always",inputKind:"direct",default:e.default??void 0}),sbe=({schemaObject:e,baseField:t})=>({...t,type:"vae_model",inputRequirement:"always",inputKind:"direct",default:e.default??void 0}),abe=({schemaObject:e,baseField:t})=>({...t,type:"lora_model",inputRequirement:"always",inputKind:"direct",default:e.default??void 0}),lbe=({schemaObject:e,baseField:t})=>({...t,type:"controlnet_model",inputRequirement:"always",inputKind:"direct",default:e.default??void 0}),ube=({schemaObject:e,baseField:t})=>({...t,type:"image",inputRequirement:"always",inputKind:"any",default:e.default??void 0}),cbe=({schemaObject:e,baseField:t})=>({...t,type:"image_collection",inputRequirement:"always",inputKind:"any",default:e.default??void 0}),dbe=({schemaObject:e,baseField:t})=>({...t,type:"latents",inputRequirement:"always",inputKind:"connection",default:e.default??void 0}),fbe=({schemaObject:e,baseField:t})=>({...t,type:"conditioning",inputRequirement:"always",inputKind:"connection",default:e.default??void 0}),hbe=({schemaObject:e,baseField:t})=>({...t,type:"unet",inputRequirement:"always",inputKind:"connection",default:e.default??void 0}),pbe=({schemaObject:e,baseField:t})=>({...t,type:"clip",inputRequirement:"always",inputKind:"connection",default:e.default??void 0}),gbe=({schemaObject:e,baseField:t})=>({...t,type:"vae",inputRequirement:"always",inputKind:"connection",default:e.default??void 0}),mbe=({schemaObject:e,baseField:t})=>({...t,type:"control",inputRequirement:"always",inputKind:"connection",default:e.default??void 0}),ybe=({schemaObject:e,baseField:t})=>{const n=e.enum??[];return{...t,type:"enum",enumType:e.type??"string",options:n,inputRequirement:"always",inputKind:"direct",default:e.default??n[0]}},NO=({baseField:e})=>({...e,type:"array",inputRequirement:"always",inputKind:"direct",default:[]}),LO=({baseField:e})=>({...e,type:"item",inputRequirement:"always",inputKind:"direct",default:void 0}),vbe=({schemaObject:e,baseField:t})=>({...t,type:"color",inputRequirement:"always",inputKind:"direct",default:e.default??{r:127,g:127,b:127,a:255}}),zU=(e,t,n)=>{let r="";n&&t in n?r=n[t]??"UNKNOWN FIELD TYPE":e.type?e.enum?r="enum":e.type&&(r=e.type):e.allOf?r=Nx(e.allOf[0]):e.anyOf?r=Nx(e.anyOf[0]):e.oneOf&&(r=Nx(e.oneOf[0]));const i=Z_e[r];if(!i)throw`Field type "${r}" is unknown!`;return i},_be=(e,t,n)=>{const r=zU(e,t,n),i={name:t,title:e.title??"",description:e.description??""};if(["image"].includes(r))return ube({schemaObject:e,baseField:i});if(["image_collection"].includes(r))return cbe({schemaObject:e,baseField:i});if(["latents"].includes(r))return dbe({schemaObject:e,baseField:i});if(["conditioning"].includes(r))return fbe({schemaObject:e,baseField:i});if(["unet"].includes(r))return hbe({schemaObject:e,baseField:i});if(["clip"].includes(r))return pbe({schemaObject:e,baseField:i});if(["vae"].includes(r))return gbe({schemaObject:e,baseField:i});if(["control"].includes(r))return mbe({schemaObject:e,baseField:i});if(["model"].includes(r))return ibe({schemaObject:e,baseField:i});if(["refiner_model"].includes(r))return obe({schemaObject:e,baseField:i});if(["vae_model"].includes(r))return sbe({schemaObject:e,baseField:i});if(["lora_model"].includes(r))return abe({schemaObject:e,baseField:i});if(["controlnet_model"].includes(r))return lbe({schemaObject:e,baseField:i});if(["enum"].includes(r))return ybe({schemaObject:e,baseField:i});if(["integer"].includes(r))return ebe({schemaObject:e,baseField:i});if(["number","float"].includes(r))return tbe({schemaObject:e,baseField:i});if(["string"].includes(r))return nbe({schemaObject:e,baseField:i});if(["boolean"].includes(r))return rbe({schemaObject:e,baseField:i});if(["array"].includes(r))return NO({schemaObject:e,baseField:i});if(["item"].includes(r))return LO({schemaObject:e,baseField:i});if(["color"].includes(r))return vbe({schemaObject:e,baseField:i});if(["array"].includes(r))return NO({schemaObject:e,baseField:i});if(["item"].includes(r))return LO({schemaObject:e,baseField:i})},bbe=(e,t,n)=>{const r=e.$ref.split("/").slice(-1)[0];if(!r)throw Ie("nodes").error({refObject:Da(e)},"No output schema name found in ref object"),"No output schema name found in ref object";const i=t.components.schemas[r];if(!i)throw Ie("nodes").error({outputSchemaName:r},"Output schema not found"),"Output schema not found";return r5(i)?_T(i.properties,(s,a,l)=>{if(!["type","id"].includes(l)&&!["object"].includes(a.type)&&r5(a)){const u=zU(a,l,n);s[l]={name:l,title:a.title??"",description:a.description??"",type:u}}return s},{}):{}},Sbe=e=>e==="l2i"?["id","type","metadata"]:["id","type","is_intermediate","metadata"],wbe=["Graph","InvocationMeta","MetadataAccumulatorInvocation"],xbe=e=>{var r;return OD((r=e.components)==null?void 0:r.schemas,(i,o)=>o.includes("Invocation")&&!o.includes("InvocationOutput")&&!wbe.some(s=>o.includes(s))).reduce((i,o)=>{var s,a,l,u,d;if(Q_e(o)){const f=o.properties.type.default,p=Sbe(f),g=((s=o.ui)==null?void 0:s.title)??o.title.replace("Invocation",""),m=(a=o.ui)==null?void 0:a.type_hints,v={};if(f==="collect"){const y=o.properties.item;v.item={type:"item",name:"item",description:y.description??"",title:"Collection Item",inputKind:"connection",inputRequirement:"always",default:void 0}}else if(f==="iterate"){const y=o.properties.collection;v.collection={type:"array",name:"collection",title:y.title??"",default:[],description:y.description??"",inputRequirement:"always",inputKind:"connection"}}else _T(o.properties,(y,S,C)=>{if(!p.includes(C)&&r5(S)){const T=_be(S,C,m);T&&(y[C]=T)}return y},v);const x=o.output;let _;if(f==="iterate"){const y=(u=(l=e.components)==null?void 0:l.schemas)==null?void 0:u.IterateInvocationOutput;_={item:{name:"item",title:(y==null?void 0:y.title)??"",description:(y==null?void 0:y.description)??"",type:"array"}}}else _=bbe(x,e,m);const b={title:g,type:f,tags:((d=o.ui)==null?void 0:d.tags)??[],description:o.description??"",inputs:v,outputs:_};Object.assign(i,{[f]:b})}return i},{})},Cbe=()=>{Pe({actionCreator:Ig.fulfilled,effect:(e,{dispatch:t})=>{const n=Ie("system"),r=e.payload;n.debug({schemaJSON:r},"Dereferenced OpenAPI schema");const i=xbe(r);n.debug({nodeTemplates:Da(i)},`Built ${FD(i)} node templates`),t(oE(i))}}),Pe({actionCreator:Ig.rejected,effect:()=>{Ie("system").error("Problem dereferencing OpenAPI Schema")}})},Tbe=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(e=>[e.name,e]),Ebe=new Map(Tbe),Abe=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],i5=Symbol(".toJSON was called"),Pbe=e=>{e[i5]=!0;const t=e.toJSON();return delete e[i5],t},Rbe=e=>Ebe.get(e)??Error,VU=({from:e,seen:t,to:n,forceEnumerable:r,maxDepth:i,depth:o,useToJSON:s,serialize:a})=>{if(!n)if(Array.isArray(e))n=[];else if(!a&&DO(e)){const u=Rbe(e.name);n=new u}else n={};if(t.push(e),o>=i)return n;if(s&&typeof e.toJSON=="function"&&e[i5]!==!0)return Pbe(e);const l=u=>VU({from:u,seen:[...t],forceEnumerable:r,maxDepth:i,depth:o,useToJSON:s,serialize:a});for(const[u,d]of Object.entries(e)){if(typeof Buffer=="function"&&Buffer.isBuffer(d)){n[u]="[object Buffer]";continue}if(d!==null&&typeof d=="object"&&typeof d.pipe=="function"){n[u]="[object Stream]";continue}if(typeof d!="function"){if(!d||typeof d!="object"){n[u]=d;continue}if(!t.includes(e[u])){o++,n[u]=l(e[u]);continue}n[u]="[Circular]"}}for(const{property:u,enumerable:d}of Abe)typeof e[u]<"u"&&e[u]!==null&&Object.defineProperty(n,u,{value:DO(e[u])?l(e[u]):e[u],enumerable:r?!0:d,configurable:!0,writable:!0});return n};function pE(e,t={}){const{maxDepth:n=Number.POSITIVE_INFINITY,useToJSON:r=!0}=t;return typeof e=="object"&&e!==null?VU({from:e,seen:[],forceEnumerable:!0,maxDepth:n,depth:0,useToJSON:r,serialize:!0}):typeof e=="function"?`[Function: ${e.name??"anonymous"}]`:e}function DO(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}const Obe=()=>{Pe({actionCreator:mc.pending,effect:()=>{}})},kbe=()=>{Pe({actionCreator:mc.fulfilled,effect:e=>{const t=Ie("session"),{session_id:n}=e.meta.arg;t.debug({session_id:n},`Session canceled (${n})`)}})},Ibe=()=>{Pe({actionCreator:mc.rejected,effect:e=>{const t=Ie("session"),{session_id:n}=e.meta.arg;if(e.payload){const{error:r}=e.payload;t.error({session_id:n,error:pE(r)},"Problem canceling session")}}})},Mbe=()=>{Pe({actionCreator:Mr.pending,effect:()=>{}})},Nbe=()=>{Pe({actionCreator:Mr.fulfilled,effect:e=>{const t=Ie("session"),n=e.payload;t.debug({session:Da(n)},`Session created (${n.id})`)}})},Lbe=()=>{Pe({actionCreator:Mr.rejected,effect:e=>{const t=Ie("session");if(e.payload){const{error:n,status:r}=e.payload,i=Da(e.meta.arg);t.error({graph:i,status:r,error:pE(n)},"Problem creating session")}}})},Dbe=()=>{Pe({actionCreator:mm.pending,effect:()=>{}})},$be=()=>{Pe({actionCreator:mm.fulfilled,effect:e=>{const t=Ie("session"),{session_id:n}=e.meta.arg;t.debug({session_id:n},`Session invoked (${n})`)}})},Fbe=()=>{Pe({actionCreator:mm.rejected,effect:e=>{const t=Ie("session"),{session_id:n}=e.meta.arg;if(e.payload){const{error:r}=e.payload;t.error({session_id:n,error:pE(r)},"Problem invoking session")}}})},Bbe=()=>{Pe({actionCreator:yc,effect:(e,{getState:t,dispatch:n})=>{const r=Ie("session"),{sessionId:i}=t().system;i&&(r.debug({session_id:i},`Session ready to invoke (${i})})`),n(mm({session_id:i})))}})},Ube=()=>{Pe({actionCreator:j$,effect:(e,{dispatch:t,getState:n})=>{Ie("socketio").debug("Connected");const{nodes:i,config:o}=n(),{disabledTabs:s}=o;!i.schema&&!s.includes("nodes")&&t(Ig()),t(G$(e.payload)),t(da.util.invalidateTags([{type:"MainModel",id:Ke},{type:"SDXLRefinerModel",id:Ke},{type:"LoRAModel",id:Ke},{type:"ControlNetModel",id:Ke},{type:"VaeModel",id:Ke},{type:"TextualInversionModel",id:Ke},{type:"ScannedModels",id:Ke}])),t(cE.util.invalidateTags(["AppConfig","AppVersion"]))}})},zbe=()=>{Pe({actionCreator:H$,effect:(e,{dispatch:t})=>{Ie("socketio").debug("Disconnected"),t(W$(e.payload))}})},Vbe=()=>{Pe({actionCreator:nF,effect:(e,{dispatch:t,getState:n})=>{const r=Ie("socketio");if(n().system.canceledSession===e.payload.data.graph_execution_state_id){r.trace(e.payload,"Ignored generator progress for canceled session");return}r.trace(e.payload,`Generator progress (${e.payload.data.node.type})`),t(rF(e.payload))}})},jbe=()=>{Pe({actionCreator:eF,effect:(e,{dispatch:t})=>{Ie("socketio").debug(e.payload,"Session complete"),t(tF(e.payload))}})},Gbe=["dataURL_image"],Hbe=()=>{Pe({actionCreator:NT,effect:async(e,{dispatch:t,getState:n})=>{const r=Ie("socketio"),{data:i}=e.payload;r.debug({data:Da(i)},`Invocation complete (${e.payload.data.node.type})`);const o=e.payload.data.graph_execution_state_id,{cancelType:s,isCancelScheduled:a}=n().system;s==="scheduled"&&a&&t(mc({session_id:o}));const{result:l,node:u,graph_execution_state_id:d}=i;if(FU(l)&&!Gbe.includes(u.type)){const{image_name:f}=l.image,{canvas:p,gallery:g}=n(),m=await t(Se.endpoints.getImageDTO.initiate(f)).unwrap();if(d===p.layerState.stagingArea.sessionId&&t(Uue(m)),!m.is_intermediate){const{autoAddBoardId:v}=g;t(v&&v!=="none"?Se.endpoints.addImageToBoard.initiate({board_id:v,imageDTO:m}):Se.util.updateQueryData("listImages",{board_id:"none",categories:jr},b=>{pn.addOne(b,m)})),t(Se.util.invalidateTags([{type:"BoardImagesTotal",id:v},{type:"BoardAssetsTotal",id:v}]));const{selectedBoardId:x,shouldAutoSwitch:_}=g;_&&(v&&v!==x?(t(N3(v)),t(k1("images"))):v||t(k1("images")),t(Rs(m)))}t(c1e(null))}t(Z$(e.payload))}})},Wbe=()=>{Pe({actionCreator:J$,effect:(e,{dispatch:t})=>{Ie("socketio").error(e.payload,`Invocation error (${e.payload.data.node.type})`),t(LT(e.payload))}})},qbe=()=>{Pe({actionCreator:lF,effect:(e,{dispatch:t})=>{Ie("socketio").error(e.payload,`Invocation retrieval error (${e.payload.data.graph_execution_state_id})`),t(uF(e.payload))}})},Kbe=()=>{Pe({actionCreator:Y$,effect:(e,{dispatch:t,getState:n})=>{const r=Ie("socketio");if(n().system.canceledSession===e.payload.data.graph_execution_state_id){r.trace(e.payload,"Ignored invocation started for canceled session");return}r.debug(e.payload,`Invocation started (${e.payload.data.node.type})`),t(Q$(e.payload))}})},Xbe=()=>{Pe({actionCreator:iF,effect:(e,{dispatch:t})=>{const n=Ie("socketio"),{base_model:r,model_name:i,model_type:o,submodel:s}=e.payload.data;let a=`Model load started: ${r}/${o}/${i}`;s&&(a=a.concat(`/${s}`)),n.debug(e.payload,a),t(Hde(e.payload))}}),Pe({actionCreator:oF,effect:(e,{dispatch:t})=>{const n=Ie("socketio"),{base_model:r,model_name:i,model_type:o,submodel:s}=e.payload.data;let a=`Model load complete: ${r}/${o}/${i}`;s&&(a=a.concat(`/${s}`)),n.debug(e.payload,a),t(Wde(e.payload))}})},Ybe=()=>{Pe({actionCreator:sF,effect:(e,{dispatch:t})=>{Ie("socketio").error(e.payload,`Session retrieval error (${e.payload.data.graph_execution_state_id})`),t(aF(e.payload))}})},Qbe=()=>{Pe({actionCreator:MT,effect:(e,{dispatch:t})=>{Ie("socketio").debug(e.payload,"Subscribed"),t(q$(e.payload))}})},Zbe=()=>{Pe({actionCreator:K$,effect:(e,{dispatch:t})=>{Ie("socketio").debug(e.payload,"Unsubscribed"),t(X$(e.payload))}})},Jbe=()=>{Pe({actionCreator:__e,effect:async(e,{dispatch:t,getState:n})=>{const{imageDTO:r}=e.payload;try{const i=await t(Se.endpoints.changeImageIsIntermediate.initiate({imageDTO:r,is_intermediate:!1})).unwrap(),{autoAddBoardId:o}=n().gallery;o&&await t(Se.endpoints.addImageToBoard.initiate({imageDTO:i,board_id:o})),t(Un({title:"Image Saved",status:"success"}))}catch(i){t(Un({title:"Image Saving Failed",description:i==null?void 0:i.message,status:"error"}))}}})},J7e=["sd-1","sd-2","sdxl","sdxl-refiner"],eSe=["sd-1","sd-2","sdxl"],eMe=["sdxl-refiner"],tSe=()=>{Pe({actionCreator:n$,effect:(e,{getState:t,dispatch:n})=>{if(e.payload==="unifiedCanvas"){const{data:i}=da.endpoints.getMainModels.select(eSe)(t());if(!i){n(Gu(null));return}const o=[];tc(i.entities,d=>{d&&["sd-1","sd-2"].includes(d.base_model)&&o.push(d)});const s=o[0];if(!s){n(Gu(null));return}const{base_model:a,model_name:l,model_type:u}=s;n(Gu({base_model:a,model_name:l,model_type:u}))}}})},vt="positive_conditioning",Pt="negative_conditioning",cr="text_to_latents",Rt="latents_to_image",Dd="nsfw_checker",Yh="invisible_watermark",mt="noise",ms="rand_int",fa="range_of_size",vi="iterate",Or="main_model_loader",rS="onnx_model_loader",Qh="vae_loader",nSe="lora_loader",qt="clip_skip",un="image_to_latents",Bn="latents_to_latents",ii="resize_image",ds="inpaint",O0="control_net_collect",Lx="dynamic_prompt",It="metadata_accumulator",$O="esrgan",Zn="sdxl_model_loader",il="t2l_sdxl",fs="l2l_sdxl",fd="sdxl_refiner_model_loader",k0="sdxl_refiner_positive_conditioning",I0="sdxl_refiner_negative_conditioning",bu="l2l_sdxl_refiner",gE="text_to_image_graph",rSe="sdxl_text_to_image_graph",iSe="sxdl_image_to_image_graph",Z1="image_to_image_graph",jU="inpaint_graph",oSe=({image_name:e,esrganModelName:t})=>{const n={id:$O,type:"esrgan",image:{image_name:e},model_name:t,is_intermediate:!1};return{id:"adhoc-esrgan-graph",nodes:{[$O]:n},edges:[]}},sSe=Re("upscale/upscaleRequested"),aSe=()=>{Pe({actionCreator:sSe,effect:async(e,{dispatch:t,getState:n,take:r})=>{const{image_name:i}=e.payload,{esrganModelName:o}=n().postprocessing,s=oSe({image_name:i,esrganModelName:o});t(Mr({graph:s})),await r(Mr.fulfilled.match),t(yc())}})},lSe=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>")})},FO=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=i=>t(r.result),r.onerror=i=>n(r.error),r.onabort=i=>n(new Error("Read aborted")),r.readAsDataURL(e)});var mE={exports:{}},iS={},GU={},rt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;var t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof He<"u"?He:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.2.0",isBrowser:n(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return e.Konva.angleDeg?i*t:i},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 e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(i){e.glob.Konva=i}};const r=i=>{e.Konva[i.prototype.getClassName()]=i};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(rt);var Sn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=rt;class n{constructor(S=[1,0,0,1,0,0]){this.dirty=!1,this.m=S&&S.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 n(this.m)}copyInto(S){S.m[0]=this.m[0],S.m[1]=this.m[1],S.m[2]=this.m[2],S.m[3]=this.m[3],S.m[4]=this.m[4],S.m[5]=this.m[5]}point(S){var C=this.m;return{x:C[0]*S.x+C[2]*S.y+C[4],y:C[1]*S.x+C[3]*S.y+C[5]}}translate(S,C){return this.m[4]+=this.m[0]*S+this.m[2]*C,this.m[5]+=this.m[1]*S+this.m[3]*C,this}scale(S,C){return this.m[0]*=S,this.m[1]*=S,this.m[2]*=C,this.m[3]*=C,this}rotate(S){var C=Math.cos(S),T=Math.sin(S),E=this.m[0]*C+this.m[2]*T,P=this.m[1]*C+this.m[3]*T,k=this.m[0]*-T+this.m[2]*C,O=this.m[1]*-T+this.m[3]*C;return this.m[0]=E,this.m[1]=P,this.m[2]=k,this.m[3]=O,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(S,C){var T=this.m[0]+this.m[2]*C,E=this.m[1]+this.m[3]*C,P=this.m[2]+this.m[0]*S,k=this.m[3]+this.m[1]*S;return this.m[0]=T,this.m[1]=E,this.m[2]=P,this.m[3]=k,this}multiply(S){var C=this.m[0]*S.m[0]+this.m[2]*S.m[1],T=this.m[1]*S.m[0]+this.m[3]*S.m[1],E=this.m[0]*S.m[2]+this.m[2]*S.m[3],P=this.m[1]*S.m[2]+this.m[3]*S.m[3],k=this.m[0]*S.m[4]+this.m[2]*S.m[5]+this.m[4],O=this.m[1]*S.m[4]+this.m[3]*S.m[5]+this.m[5];return this.m[0]=C,this.m[1]=T,this.m[2]=E,this.m[3]=P,this.m[4]=k,this.m[5]=O,this}invert(){var S=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),C=this.m[3]*S,T=-this.m[1]*S,E=-this.m[2]*S,P=this.m[0]*S,k=S*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),O=S*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=C,this.m[1]=T,this.m[2]=E,this.m[3]=P,this.m[4]=k,this.m[5]=O,this}getMatrix(){return this.m}decompose(){var S=this.m[0],C=this.m[1],T=this.m[2],E=this.m[3],P=this.m[4],k=this.m[5],O=S*E-C*T;let M={x:P,y:k,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(S!=0||C!=0){var G=Math.sqrt(S*S+C*C);M.rotation=C>0?Math.acos(S/G):-Math.acos(S/G),M.scaleX=G,M.scaleY=O/G,M.skewX=(S*T+C*E)/O,M.skewY=0}else if(T!=0||E!=0){var U=Math.sqrt(T*T+E*E);M.rotation=Math.PI/2-(E>0?Math.acos(-T/U):-Math.acos(T/U)),M.scaleX=O/U,M.scaleY=U,M.skewX=0,M.skewY=(S*T+C*E)/O}return M.rotation=e.Util._getRotation(M.rotation),M}}e.Transform=n;var r="[object Array]",i="[object Number]",o="[object String]",s="[object Boolean]",a=Math.PI/180,l=180/Math.PI,u="#",d="",f="0",p="Konva warning: ",g="Konva error: ",m="rgb(",v={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]},x=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,_=[];const b=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(y){setTimeout(y,60)};e.Util={_isElement(y){return!!(y&&y.nodeType==1)},_isFunction(y){return!!(y&&y.constructor&&y.call&&y.apply)},_isPlainObject(y){return!!y&&y.constructor===Object},_isArray(y){return Object.prototype.toString.call(y)===r},_isNumber(y){return Object.prototype.toString.call(y)===i&&!isNaN(y)&&isFinite(y)},_isString(y){return Object.prototype.toString.call(y)===o},_isBoolean(y){return Object.prototype.toString.call(y)===s},isObject(y){return y instanceof Object},isValidSelector(y){if(typeof y!="string")return!1;var S=y[0];return S==="#"||S==="."||S===S.toUpperCase()},_sign(y){return y===0||y>0?1:-1},requestAnimFrame(y){_.push(y),_.length===1&&b(function(){const S=_;_=[],S.forEach(function(C){C()})})},createCanvasElement(){var y=document.createElement("canvas");try{y.style=y.style||{}}catch{}return y},createImageElement(){return document.createElement("img")},_isInDocument(y){for(;y=y.parentNode;)if(y==document)return!0;return!1},_urlToImage(y,S){var C=e.Util.createImageElement();C.onload=function(){S(C)},C.src=y},_rgbToHex(y,S,C){return((1<<24)+(y<<16)+(S<<8)+C).toString(16).slice(1)},_hexToRgb(y){y=y.replace(u,d);var S=parseInt(y,16);return{r:S>>16&255,g:S>>8&255,b:S&255}},getRandomColor(){for(var y=(Math.random()*16777215<<0).toString(16);y.length<6;)y=f+y;return u+y},getRGB(y){var S;return y in v?(S=v[y],{r:S[0],g:S[1],b:S[2]}):y[0]===u?this._hexToRgb(y.substring(1)):y.substr(0,4)===m?(S=x.exec(y.replace(/ /g,"")),{r:parseInt(S[1],10),g:parseInt(S[2],10),b:parseInt(S[3],10)}):{r:0,g:0,b:0}},colorToRGBA(y){return y=y||"black",e.Util._namedColorToRBA(y)||e.Util._hex3ColorToRGBA(y)||e.Util._hex4ColorToRGBA(y)||e.Util._hex6ColorToRGBA(y)||e.Util._hex8ColorToRGBA(y)||e.Util._rgbColorToRGBA(y)||e.Util._rgbaColorToRGBA(y)||e.Util._hslColorToRGBA(y)},_namedColorToRBA(y){var S=v[y.toLowerCase()];return S?{r:S[0],g:S[1],b:S[2],a:1}:null},_rgbColorToRGBA(y){if(y.indexOf("rgb(")===0){y=y.match(/rgb\(([^)]+)\)/)[1];var S=y.split(/ *, */).map(Number);return{r:S[0],g:S[1],b:S[2],a:1}}},_rgbaColorToRGBA(y){if(y.indexOf("rgba(")===0){y=y.match(/rgba\(([^)]+)\)/)[1];var S=y.split(/ *, */).map((C,T)=>C.slice(-1)==="%"?T===3?parseInt(C)/100:parseInt(C)/100*255:Number(C));return{r:S[0],g:S[1],b:S[2],a:S[3]}}},_hex8ColorToRGBA(y){if(y[0]==="#"&&y.length===9)return{r:parseInt(y.slice(1,3),16),g:parseInt(y.slice(3,5),16),b:parseInt(y.slice(5,7),16),a:parseInt(y.slice(7,9),16)/255}},_hex6ColorToRGBA(y){if(y[0]==="#"&&y.length===7)return{r:parseInt(y.slice(1,3),16),g:parseInt(y.slice(3,5),16),b:parseInt(y.slice(5,7),16),a:1}},_hex4ColorToRGBA(y){if(y[0]==="#"&&y.length===5)return{r:parseInt(y[1]+y[1],16),g:parseInt(y[2]+y[2],16),b:parseInt(y[3]+y[3],16),a:parseInt(y[4]+y[4],16)/255}},_hex3ColorToRGBA(y){if(y[0]==="#"&&y.length===4)return{r:parseInt(y[1]+y[1],16),g:parseInt(y[2]+y[2],16),b:parseInt(y[3]+y[3],16),a:1}},_hslColorToRGBA(y){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(y)){const[S,...C]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(y),T=Number(C[0])/360,E=Number(C[1])/100,P=Number(C[2])/100;let k,O,M;if(E===0)return M=P*255,{r:Math.round(M),g:Math.round(M),b:Math.round(M),a:1};P<.5?k=P*(1+E):k=P+E-P*E;const G=2*P-k,U=[0,0,0];for(let A=0;A<3;A++)O=T+1/3*-(A-1),O<0&&O++,O>1&&O--,6*O<1?M=G+(k-G)*6*O:2*O<1?M=k:3*O<2?M=G+(k-G)*(2/3-O)*6:M=G,U[A]=M*255;return{r:Math.round(U[0]),g:Math.round(U[1]),b:Math.round(U[2]),a:1}}},haveIntersection(y,S){return!(S.x>y.x+y.width||S.x+S.width<y.x||S.y>y.y+y.height||S.y+S.height<y.y)},cloneObject(y){var S={};for(var C in y)this._isPlainObject(y[C])?S[C]=this.cloneObject(y[C]):this._isArray(y[C])?S[C]=this.cloneArray(y[C]):S[C]=y[C];return S},cloneArray(y){return y.slice(0)},degToRad(y){return y*a},radToDeg(y){return y*l},_degToRad(y){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(y)},_radToDeg(y){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(y)},_getRotation(y){return t.Konva.angleDeg?e.Util.radToDeg(y):y},_capitalize(y){return y.charAt(0).toUpperCase()+y.slice(1)},throw(y){throw new Error(g+y)},error(y){console.error(g+y)},warn(y){t.Konva.showWarnings&&console.warn(p+y)},each(y,S){for(var C in y)S(C,y[C])},_inRange(y,S,C){return S<=y&&y<C},_getProjectionToSegment(y,S,C,T,E,P){var k,O,M,G=(y-C)*(y-C)+(S-T)*(S-T);if(G==0)k=y,O=S,M=(E-C)*(E-C)+(P-T)*(P-T);else{var U=((E-y)*(C-y)+(P-S)*(T-S))/G;U<0?(k=y,O=S,M=(y-E)*(y-E)+(S-P)*(S-P)):U>1?(k=C,O=T,M=(C-E)*(C-E)+(T-P)*(T-P)):(k=y+U*(C-y),O=S+U*(T-S),M=(k-E)*(k-E)+(O-P)*(O-P))}return[k,O,M]},_getProjectionToLine(y,S,C){var T=e.Util.cloneObject(y),E=Number.MAX_VALUE;return S.forEach(function(P,k){if(!(!C&&k===S.length-1)){var O=S[(k+1)%S.length],M=e.Util._getProjectionToSegment(P.x,P.y,O.x,O.y,y.x,y.y),G=M[0],U=M[1],A=M[2];A<E&&(T.x=G,T.y=U,E=A)}}),T},_prepareArrayForTween(y,S,C){var T,E=[],P=[];if(y.length>S.length){var k=S;S=y,y=k}for(T=0;T<y.length;T+=2)E.push({x:y[T],y:y[T+1]});for(T=0;T<S.length;T+=2)P.push({x:S[T],y:S[T+1]});var O=[];return P.forEach(function(M){var G=e.Util._getProjectionToLine(M,E,C);O.push(G.x),O.push(G.y)}),O},_prepareToStringify(y){var S;y.visitedByCircularReferenceRemoval=!0;for(var C in y)if(y.hasOwnProperty(C)&&y[C]&&typeof y[C]=="object"){if(S=Object.getOwnPropertyDescriptor(y,C),y[C].visitedByCircularReferenceRemoval||e.Util._isElement(y[C]))if(S.configurable)delete y[C];else return null;else if(e.Util._prepareToStringify(y[C])===null)if(S.configurable)delete y[C];else return null}return delete y.visitedByCircularReferenceRemoval,y},_assign(y,S){for(var C in S)y[C]=S[C];return y},_getFirstPointerId(y){return y.touches?y.changedTouches[0].identifier:y.pointerId||999},releaseCanvas(...y){t.Konva.releaseCanvasOnDestroy&&y.forEach(S=>{S.width=0,S.height=0})},drawRoundedRectPath(y,S,C,T){let E=0,P=0,k=0,O=0;typeof T=="number"?E=P=k=O=Math.min(T,S/2,C/2):(E=Math.min(T[0]||0,S/2,C/2),P=Math.min(T[1]||0,S/2,C/2),O=Math.min(T[2]||0,S/2,C/2),k=Math.min(T[3]||0,S/2,C/2)),y.moveTo(E,0),y.lineTo(S-P,0),y.arc(S-P,P,P,Math.PI*3/2,0,!1),y.lineTo(S,C-O),y.arc(S-O,C-O,O,0,Math.PI/2,!1),y.lineTo(k,C),y.arc(k,C-k,k,Math.PI/2,Math.PI,!1),y.lineTo(0,E),y.arc(E,E,E,Math.PI,Math.PI*3/2,!1)}}})(Sn);var fn={},nt={},ke={};Object.defineProperty(ke,"__esModule",{value:!0});ke.getComponentValidator=ke.getBooleanValidator=ke.getNumberArrayValidator=ke.getFunctionValidator=ke.getStringOrGradientValidator=ke.getStringValidator=ke.getNumberOrAutoValidator=ke.getNumberOrArrayOfNumbersValidator=ke.getNumberValidator=ke.alphaComponent=ke.RGBComponent=void 0;const $a=rt,Tn=Sn;function Fa(e){return Tn.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||Tn.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function uSe(e){return e>255?255:e<0?0:Math.round(e)}ke.RGBComponent=uSe;function cSe(e){return e>1?1:e<1e-4?1e-4:e}ke.alphaComponent=cSe;function dSe(){if($a.Konva.isUnminified)return function(e,t){return Tn.Util._isNumber(e)||Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}ke.getNumberValidator=dSe;function fSe(e){if($a.Konva.isUnminified)return function(t,n){let r=Tn.Util._isNumber(t),i=Tn.Util._isArray(t)&&t.length==e;return!r&&!i&&Tn.Util.warn(Fa(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+e+")"),t}}ke.getNumberOrArrayOfNumbersValidator=fSe;function hSe(){if($a.Konva.isUnminified)return function(e,t){var n=Tn.Util._isNumber(e),r=e==="auto";return n||r||Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}ke.getNumberOrAutoValidator=hSe;function pSe(){if($a.Konva.isUnminified)return function(e,t){return Tn.Util._isString(e)||Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}ke.getStringValidator=pSe;function gSe(){if($a.Konva.isUnminified)return function(e,t){const n=Tn.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}ke.getStringOrGradientValidator=gSe;function mSe(){if($a.Konva.isUnminified)return function(e,t){return Tn.Util._isFunction(e)||Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}ke.getFunctionValidator=mSe;function ySe(){if($a.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(Tn.Util._isArray(e)?e.forEach(function(r){Tn.Util._isNumber(r)||Tn.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}ke.getNumberArrayValidator=ySe;function vSe(){if($a.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||Tn.Util.warn(Fa(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}ke.getBooleanValidator=vSe;function _Se(e){if($a.Konva.isUnminified)return function(t,n){return t==null||Tn.Util.isObject(t)||Tn.Util.warn(Fa(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}ke.getComponentValidator=_Se;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Sn,n=ke;var r="get",i="set";e.Factory={addGetterSetter(o,s,a,l,u){e.Factory.addGetter(o,s,a),e.Factory.addSetter(o,s,l,u),e.Factory.addOverloadedGetterSetter(o,s)},addGetter(o,s,a){var l=r+t.Util._capitalize(s);o.prototype[l]=o.prototype[l]||function(){var u=this.attrs[s];return u===void 0?a:u}},addSetter(o,s,a,l){var u=i+t.Util._capitalize(s);o.prototype[u]||e.Factory.overWriteSetter(o,s,a,l)},overWriteSetter(o,s,a,l){var u=i+t.Util._capitalize(s);o.prototype[u]=function(d){return a&&d!==void 0&&d!==null&&(d=a.call(this,d,s)),this._setAttr(s,d),l&&l.call(this),this}},addComponentsGetterSetter(o,s,a,l,u){var d=a.length,f=t.Util._capitalize,p=r+f(s),g=i+f(s),m,v;o.prototype[p]=function(){var _={};for(m=0;m<d;m++)v=a[m],_[v]=this.getAttr(s+f(v));return _};var x=(0,n.getComponentValidator)(a);o.prototype[g]=function(_){var b=this.attrs[s],y;l&&(_=l.call(this,_)),x&&x.call(this,_,s);for(y in _)_.hasOwnProperty(y)&&this._setAttr(s+f(y),_[y]);return _||a.forEach(S=>{this._setAttr(s+f(S),void 0)}),this._fireChangeEvent(s,b,_),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(o,s)},addOverloadedGetterSetter(o,s){var a=t.Util._capitalize(s),l=i+a,u=r+a;o.prototype[s]=function(){return arguments.length?(this[l](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(o,s,a,l){t.Util.error("Adding deprecated "+s);var u=r+t.Util._capitalize(s),d=s+" property is deprecated and will be removed soon. Look at Konva change log for more information.";o.prototype[u]=function(){t.Util.error(d);var f=this.attrs[s];return f===void 0?a:f},e.Factory.addSetter(o,s,l,function(){t.Util.error(d)}),e.Factory.addOverloadedGetterSetter(o,s)},backCompat(o,s){t.Util.each(s,function(a,l){var u=o.prototype[l],d=r+t.Util._capitalize(a),f=i+t.Util._capitalize(a);function p(){u.apply(this,arguments),t.Util.error('"'+a+'" method is deprecated and will be removed soon. Use ""'+l+'" instead.')}o.prototype[a]=p,o.prototype[d]=p,o.prototype[f]=p})},afterSetFilter(){this._filterUpToDate=!1}}})(nt);var Yo={},_a={};Object.defineProperty(_a,"__esModule",{value:!0});_a.HitContext=_a.SceneContext=_a.Context=void 0;const HU=Sn,bSe=rt;function SSe(e){var t=[],n=e.length,r=HU.Util,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 BO=",",wSe="(",xSe=")",CSe="([",TSe="])",ESe=";",ASe="()",PSe="=",UO=["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"],RSe=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const OSe=100;class oS{constructor(t){this.canvas=t,bSe.Konva.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="",s,a,l,u;for(s=0;s<i;s++)a=r[s],l=a.method,l?(u=a.args,o+=l,t?o+=ASe:HU.Util._isArray(u[0])?o+=CSe+u.join(BO)+TSe:(n&&(u=u.map(d=>typeof d=="number"?Math.floor(d):d)),o+=wSe+u.join(BO)+xSe)):(o+=a.property,t||(o+=PSe+a.val)),o+=ESe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=OSe&&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){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,s){this._context.arc(t,n,r,i,o,s)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,s){this._context.bezierCurveTo(t,n,r,i,o,s)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(...t){this._context.clip.apply(this._context,t)}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,s){return this._context.createRadialGradient(t,n,r,i,o,s)}drawImage(t,n,r,i,o,s,a,l,u){var d=arguments,f=this._context;d.length===3?f.drawImage(t,n,r):d.length===5?f.drawImage(t,n,r,i,o):d.length===9&&f.drawImage(t,n,r,i,o,s,a,l,u)}ellipse(t,n,r,i,o,s,a,l){this._context.ellipse(t,n,r,i,o,s,a,l)}isPointInPath(t,n,r,i){return r?this._context.isPointInPath(r,t,n,i):this._context.isPointInPath(t,n,i)}fill(...t){this._context.fill.apply(this._context,t)}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,s){this._context.setTransform(t,n,r,i,o,s)}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,s){this._context.transform(t,n,r,i,o,s)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=UO.length,r=this.setAttr,i,o,s=function(a){var l=t[a],u;t[a]=function(){return o=SSe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:a,args:o}),u}};for(i=0;i<n;i++)s(UO[i]);t.setAttr=function(){r.apply(t,arguments);var a=arguments[0],l=arguments[1];(a==="shadowOffsetX"||a==="shadowOffsetY"||a==="shadowBlur")&&(l=l/this.canvas.getPixelRatio()),t._trace({property:a,val:l})}}_applyGlobalCompositeOperation(t){const n=t.attrs.globalCompositeOperation;var r=!n||n==="source-over";r||this.setAttr("globalCompositeOperation",n)}}_a.Context=oS;RSe.forEach(function(e){Object.defineProperty(oS.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class kSe extends oS{constructor(t,{willReadFrequently:n=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:n})}_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){const n=t._getRadialGradient();n&&(this.setAttr("fillStyle",n),t._fillFunc(this))}_fill(t){const n=t.fill(),r=t.getFillPriority();if(n&&r==="color"){this._fillColor(t);return}const i=t.getFillPatternImage();if(i&&r==="pattern"){this._fillPattern(t);return}const o=t.getFillLinearGradientColorStops();if(o&&r==="linear-gradient"){this._fillLinearGradient(t);return}const s=t.getFillRadialGradientColorStops();if(s&&r==="radial-gradient"){this._fillRadialGradient(t);return}n?this._fillColor(t):i?this._fillPattern(t):o?this._fillLinearGradient(t):s&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const n=t.getStrokeLinearGradientStartPoint(),r=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(n.x,n.y,r.x,r.y);if(i){for(var s=0;s<i.length;s+=2)o.addColorStop(i[s],i[s+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",s=(r=t.getShadowBlur())!==null&&r!==void 0?r:5,a=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},l=t.getAbsoluteScale(),u=this.canvas.getPixelRatio(),d=l.x*u,f=l.y*u;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",s*Math.min(Math.abs(d),Math.abs(f))),this.setAttr("shadowOffsetX",a.x*d),this.setAttr("shadowOffsetY",a.y*f)}}_a.SceneContext=kSe;class ISe extends oS{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()){const o=t.getStrokeScaleEnabled();if(!o){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),i=r==="auto"?t.strokeWidth():r;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),o||this.restore()}}}_a.HitContext=ISe;Object.defineProperty(Yo,"__esModule",{value:!0});Yo.HitCanvas=Yo.SceneCanvas=Yo.Canvas=void 0;const J1=Sn,WU=_a,qU=rt,MSe=nt,NSe=ke;var M0;function LSe(){if(M0)return M0;var e=J1.Util.createCanvasElement(),t=e.getContext("2d");return M0=function(){var n=qU.Konva._global.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return n/r}(),J1.Util.releaseCanvas(e),M0}class sS{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=t||{},r=n.pixelRatio||qU.Konva.pixelRatio||LSe();this.pixelRatio=r,this._canvas=J1.Util.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 J1.Util.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}Yo.Canvas=sS;MSe.Factory.addGetterSetter(sS,"pixelRatio",void 0,(0,NSe.getNumberValidator)());class DSe extends sS{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new WU.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}Yo.SceneCanvas=DSe;class $Se extends sS{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new WU.HitContext(this),this.setSize(t.width,t.height)}}Yo.HitCanvas=$Se;var aS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=rt,n=Sn;e.DD={get isDragging(){var r=!1;return e.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(i=>{r=i.node}),r},_dragElements:new Map,_drag(r){const i=[];e.DD._dragElements.forEach((o,s)=>{const{node:a}=o,l=a.getStage();l.setPointersPositions(r),o.pointerId===void 0&&(o.pointerId=n.Util._getFirstPointerId(r));const u=l._changedPointerPositions.find(p=>p.id===o.pointerId);if(u){if(o.dragStatus!=="dragging"){var d=a.dragDistance(),f=Math.max(Math.abs(u.x-o.startPointerPos.x),Math.abs(u.y-o.startPointerPos.y));if(f<d||(a.startDrag({evt:r}),!a.isDragging()))return}a._setDragPosition(r,o),i.push(a)}}),i.forEach(o=>{o.fire("dragmove",{type:"dragmove",target:o,evt:r},!0)})},_endDragBefore(r){const i=[];e.DD._dragElements.forEach(o=>{const{node:s}=o,a=s.getStage();if(r&&a.setPointersPositions(r),!a._changedPointerPositions.find(d=>d.id===o.pointerId))return;(o.dragStatus==="dragging"||o.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,o.dragStatus="stopped");const u=o.node.getLayer()||o.node instanceof t.Konva.Stage&&o.node;u&&i.indexOf(u)===-1&&i.push(u)}),i.forEach(o=>{o.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((i,o)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:r},!0),i.dragStatus!=="dragging"&&e.DD._dragElements.delete(o)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(aS);Object.defineProperty(fn,"__esModule",{value:!0});fn.Node=void 0;const ct=Sn,Am=nt,N0=Yo,Su=rt,uo=aS,Nn=ke;var _v="absoluteOpacity",L0="allEventListeners",aa="absoluteTransform",zO="absoluteScale",wu="canvas",FSe="Change",BSe="children",USe="konva",o5="listening",VO="mouseenter",jO="mouseleave",GO="set",HO="Shape",bv=" ",WO="stage",sl="transform",zSe="Stage",s5="visible",VSe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(bv);let jSe=1;class ze{constructor(t){this._id=jSe++,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===sl||t===aa)&&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===sl||t===aa,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(bv);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(wu)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===aa&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(wu)){const{scene:t,filter:n,hit:r}=this._cache.get(wu);ct.Util.releaseCanvas(t,n,r),this._cache.delete(wu)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),s=n.pixelRatio,a=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,d=n.drawBorder||!1,f=n.hitCanvasPixelRatio||1;if(!i||!o){ct.Util.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,a-=u,l-=u;var p=new N0.SceneCanvas({pixelRatio:s,width:i,height:o}),g=new N0.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),m=new N0.HitCanvas({pixelRatio:f,width:i,height:o}),v=p.getContext(),x=m.getContext();return m.isCache=!0,p.isCache=!0,this._cache.delete(wu),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(p.getContext()._context.imageSmoothingEnabled=!1,g.getContext()._context.imageSmoothingEnabled=!1),v.save(),x.save(),v.translate(-a,-l),x.translate(-a,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(_v),this._clearSelfAndDescendantCache(zO),this.drawScene(p,this),this.drawHit(m,this),this._isUnderCache=!1,v.restore(),x.restore(),d&&(v.save(),v.beginPath(),v.rect(0,0,i,o),v.closePath(),v.setAttr("strokeStyle","red"),v.setAttr("lineWidth",5),v.stroke(),v.restore()),this._cache.set(wu,{scene:p,filter:g,hit:m,x:a,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(wu)}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,s,a,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var d=l.point(u);i===void 0&&(i=s=d.x,o=a=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),s=Math.max(s,d.x),a=Math.max(a,d.y)}),{x:i,y:o,width:s-i,height:a-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(),s,a,l,u;if(t){if(!this._filterUpToDate){var d=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(s=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/d,r.getHeight()/d),a=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<s;l++){if(u=t[l],typeof u!="function"){ct.Util.error("Filter should be type of function, but got "+typeof u+" instead. Please check correct filters");continue}u.call(this,a),o.putImageData(a,0,0)}}catch(f){ct.Util.error("Unable to apply filter. "+f.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(L0),arguments.length===3)return this._delegate.apply(this,arguments);var r=t.split(bv),i=r.length,o,s,a,l,u;for(o=0;o<i;o++)s=r[o],a=s.split("."),l=a[0],u=a[1]||"",this.eventListeners[l]||(this.eventListeners[l]=[]),this.eventListeners[l].push({name:u,handler:n});return this}off(t,n){var r=(t||"").split(bv),i=r.length,o,s,a,l,u,d;if(this._cache&&this._cache.delete(L0),!t)for(s in this.eventListeners)this._off(s);for(o=0;o<i;o++)if(a=r[o],l=a.split("."),u=l[0],d=l[1],u)this.eventListeners[u]&&this._off(u,d,n);else for(s in this.eventListeners)this._off(s,d,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 s=o.target.findAncestors(n,!0,i),a=0;a<s.length;a++)o=ct.Util.cloneObject(o),o.currentTarget=s[a],r.call(s[a],o)})}remove(){return this.isDragging()&&this.stopDrag(),uo.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(aa),this._clearSelfAndDescendantCache(_v),this._clearSelfAndDescendantCache(zO),this._clearSelfAndDescendantCache(WO),this._clearSelfAndDescendantCache(s5),this._clearSelfAndDescendantCache(o5)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var n="get"+ct.Util._capitalize(t);return ct.Util._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!==BSe&&(r=GO+ct.Util._capitalize(n),ct.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(o5,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(s5,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;uo.DD._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(s.node.nodeType==="Stage"||s.node.getLayer()===r)&&(i=!0)});var o=!n&&!Su.Konva.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,s,a;function l(u){for(i=[],o=u.length,s=0;s<o;s++)a=u[s],r++,a.nodeType!==HO&&(i=i.concat(a.getChildren().slice())),a._id===n._id&&(s=o);i.length>0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==zSe&&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(sl),this._clearSelfAndDescendantCache(aa)),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 ct.Transform,s=this.offset();return o.m=i.slice(),o.translate(s.x,s.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(sl);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(sl),this._clearSelfAndDescendantCache(aa),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,s;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,s=0;s<o;s++)t(r[s])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return ct.Util.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 ct.Util.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 ct.Util.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 ct.Util.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 ct.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&ct.Util.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(_v,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,s,a;t.attrs={};for(r in n)i=n[r],a=ct.Util.isObject(i)&&!ct.Util._isPlainObject(i)&&!ct.Util._isArray(i),!a&&(o=typeof this[r]=="function"&&this[r],delete n[r],s=o?o.call(this):null,n[r]=i,s!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),ct.Util._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],ct.Util.isValidSelector(o)||(ct.Util.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),ct.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),ct.Util.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(WO,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(aa,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var n;if(t)return n=new ct.Transform,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(aa)||new ct.Transform,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,s=this.attrs.offsetX||0,a=this.attrs.offsetY||0;n.translate(i-s,o-a)}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(sl,this._getTransform)}_getTransform(){var t,n,r=this._cache.get(sl)||new ct.Transform;r.reset();var i=this.x(),o=this.y(),s=Su.Konva.getAngle(this.rotation()),a=(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,d=this.attrs.skewY||0,f=this.attrs.offsetX||0,p=this.attrs.offsetY||0;return(i!==0||o!==0)&&r.translate(i,o),s!==0&&r.rotate(s),(u!==0||d!==0)&&r.skew(u,d),(a!==1||l!==1)&&r.scale(a,l),(f!==0||p!==0)&&r.translate(-1*f,-1*p),r.dirty=!1,r}clone(t){var n=ct.Util.cloneObject(this.attrs),r,i,o,s,a;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,s=0;s<o;s++)a=i[s],a.name.indexOf(USe)<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(a));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),s=t.pixelRatio||1,a=new N0.SceneCanvas({width:t.width||Math.ceil(n.width)||(r?r.width():0),height:t.height||Math.ceil(n.height)||(r?r.height():0),pixelRatio:s}),l=a.getContext();return t.imageSmoothingEnabled===!1&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||o)&&l.translate(-1*i,-1*o),this.drawScene(a),l.restore(),a}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var n=t.mimeType||null,r=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(n,r);return t.callback&&t.callback(i),i}toImage(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,ct.Util._urlToImage(this.toDataURL(t),function(o){n(o),i==null||i(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i==null||i(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Su.Konva.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,s,a;for(o=0;o<i.length;o++)if(s=i[o].name,a=i[o].handler,(s!=="konva"||n==="konva")&&(!n||s===n)&&(!r||r===a)){if(i.splice(o,1),i.length===0){delete this.eventListeners[t];break}o--}}_fireChangeEvent(t,n,r){this._fire(t+FSe,{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[GO+ct.Util._capitalize(t)];return ct.Util._isFunction(r)?r.call(this,n):this._setAttr(t,n),this}_requestDraw(){if(Su.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,n){var r=this.attrs[t];r===n&&!ct.Util.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===HO&&(n.target=this);var i=(t===VO||t===jO)&&(r&&(this===r||this.isAncestorOf&&this.isAncestorOf(r))||this.nodeType==="Stage"&&!r);if(!i){this._fire(t,n);var o=(t===VO||t===jO)&&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){var n,r,i;const o=(n=this._cache.get(L0))!==null&&n!==void 0?n:{};let s=o==null?void 0:o[t];if(s===void 0){s=[];let a=Object.getPrototypeOf(this);for(;a;){const l=(i=(r=a.eventListeners)===null||r===void 0?void 0:r[t])!==null&&i!==void 0?i:[];s.push(...l),a=Object.getPrototypeOf(a)}o[t]=s,this._cache.set(L0,o)}return s}_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;uo.DD._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){uo.DD._dragElements.has(this._id)||this._createDragElement(t);const r=uo.DD._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 s=o.call(this,i,t);s?i=s:ct.Util.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=uo.DD._dragElements.get(this._id);n&&(n.dragStatus="stopped"),uo.DD._endDragBefore(t),uo.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=uo.DD._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||Su.Konva.dragButtons.indexOf(t.evt.button)>=0;if(r&&!this.isDragging()){var i=!1;uo.DD._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=uo.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&uo.DD._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 ct.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return ct.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=ze.prototype.getClassName.call(t),i=t.children,o,s,a;n&&(t.attrs.container=n),Su.Konva[r]||(ct.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=Su.Konva[r];if(o=new l(t.attrs),i)for(s=i.length,a=0;a<s;a++)o.add(ze._createNode(i[a]));return o}}fn.Node=ze;ze.prototype.nodeType="Node";ze.prototype._attrsAffectingSize=[];ze.prototype.eventListeners={};ze.prototype.on.call(ze.prototype,VSe,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(sl),this._clearSelfAndDescendantCache(aa)});ze.prototype.on.call(ze.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(s5)});ze.prototype.on.call(ze.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(o5)});ze.prototype.on.call(ze.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(_v)});const Kt=Am.Factory.addGetterSetter;Kt(ze,"zIndex");Kt(ze,"absolutePosition");Kt(ze,"position");Kt(ze,"x",0,(0,Nn.getNumberValidator)());Kt(ze,"y",0,(0,Nn.getNumberValidator)());Kt(ze,"globalCompositeOperation","source-over",(0,Nn.getStringValidator)());Kt(ze,"opacity",1,(0,Nn.getNumberValidator)());Kt(ze,"name","",(0,Nn.getStringValidator)());Kt(ze,"id","",(0,Nn.getStringValidator)());Kt(ze,"rotation",0,(0,Nn.getNumberValidator)());Am.Factory.addComponentsGetterSetter(ze,"scale",["x","y"]);Kt(ze,"scaleX",1,(0,Nn.getNumberValidator)());Kt(ze,"scaleY",1,(0,Nn.getNumberValidator)());Am.Factory.addComponentsGetterSetter(ze,"skew",["x","y"]);Kt(ze,"skewX",0,(0,Nn.getNumberValidator)());Kt(ze,"skewY",0,(0,Nn.getNumberValidator)());Am.Factory.addComponentsGetterSetter(ze,"offset",["x","y"]);Kt(ze,"offsetX",0,(0,Nn.getNumberValidator)());Kt(ze,"offsetY",0,(0,Nn.getNumberValidator)());Kt(ze,"dragDistance",null,(0,Nn.getNumberValidator)());Kt(ze,"width",0,(0,Nn.getNumberValidator)());Kt(ze,"height",0,(0,Nn.getNumberValidator)());Kt(ze,"listening",!0,(0,Nn.getBooleanValidator)());Kt(ze,"preventDefault",!0,(0,Nn.getBooleanValidator)());Kt(ze,"filters",null,function(e){return this._filterUpToDate=!1,e});Kt(ze,"visible",!0,(0,Nn.getBooleanValidator)());Kt(ze,"transformsEnabled","all",(0,Nn.getStringValidator)());Kt(ze,"size");Kt(ze,"dragBoundFunc");Kt(ze,"draggable",!1,(0,Nn.getBooleanValidator)());Am.Factory.backCompat(ze,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var vc={};Object.defineProperty(vc,"__esModule",{value:!0});vc.Container=void 0;const zf=nt,Dx=fn,lS=ke;class _c extends Dx.Node{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(t.length===0)return this;if(t.length>1){for(var n=0;n<t.length;n++)this.add(t[n]);return this}const 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=Dx.Node.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=Dx.Node.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(),s=this._getCanvasCache(),a=s&&s.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(a){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(),s=this._getCanvasCache(),a=s&&s.hit;if(a){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(),s=this.clipWidth(),a=this.clipHeight(),l=this.clipFunc(),u=s&&a||l;const d=r===this;if(u){o.save();var f=this.getAbsoluteTransform(r),p=f.getMatrix();o.transform(p[0],p[1],p[2],p[3],p[4],p[5]),o.beginPath();let x;if(l)x=l.call(this,o,this);else{var g=this.clipX(),m=this.clipY();o.rect(g,m,s,a)}o.clip.apply(o,x),p=f.copy().invert().getMatrix(),o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}var v=!d&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";v&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(x){x[t](n,r)}),v&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,s,a,l,u={x:1/0,y:1/0,width:0,height:0},d=this;(n=this.children)===null||n===void 0||n.forEach(function(v){if(v.visible()){var x=v.getClientRect({relativeTo:d,skipShadow:t.skipShadow,skipStroke:t.skipStroke});x.width===0&&x.height===0||(o===void 0?(o=x.x,s=x.y,a=x.x+x.width,l=x.y+x.height):(o=Math.min(o,x.x),s=Math.min(s,x.y),a=Math.max(a,x.x+x.width),l=Math.max(l,x.y+x.height)))}});for(var f=this.find("Shape"),p=!1,g=0;g<f.length;g++){var m=f[g];if(m._isVisible(this)){p=!0;break}}return p&&o!==void 0?u={x:o,y:s,width:a-o,height:l-s}:u={x:0,y:0,width:0,height:0},r?u:this._transformedRect(u,i)}}vc.Container=_c;zf.Factory.addComponentsGetterSetter(_c,"clip",["x","y","width","height"]);zf.Factory.addGetterSetter(_c,"clipX",void 0,(0,lS.getNumberValidator)());zf.Factory.addGetterSetter(_c,"clipY",void 0,(0,lS.getNumberValidator)());zf.Factory.addGetterSetter(_c,"clipWidth",void 0,(0,lS.getNumberValidator)());zf.Factory.addGetterSetter(_c,"clipHeight",void 0,(0,lS.getNumberValidator)());zf.Factory.addGetterSetter(_c,"clipFunc");var KU={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.releaseCapture=Vi.setPointerCapture=Vi.hasPointerCapture=Vi.createEvent=Vi.getCapturedShape=void 0;const GSe=rt,Lg=new Map,XU=GSe.Konva._global.PointerEvent!==void 0;function HSe(e){return Lg.get(e)}Vi.getCapturedShape=HSe;function yE(e){return{evt:e,pointerId:e.pointerId}}Vi.createEvent=yE;function WSe(e,t){return Lg.get(e)===t}Vi.hasPointerCapture=WSe;function qSe(e,t){YU(e),t.getStage()&&(Lg.set(e,t),XU&&t._fire("gotpointercapture",yE(new PointerEvent("gotpointercapture"))))}Vi.setPointerCapture=qSe;function YU(e,t){const n=Lg.get(e);if(!n)return;const r=n.getStage();r&&r.content,Lg.delete(e),XU&&n._fire("lostpointercapture",yE(new PointerEvent("lostpointercapture")))}Vi.releaseCapture=YU;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=Sn,n=nt,r=vc,i=rt,o=Yo,s=aS,a=rt,l=Vi;var u="Stage",d="string",f="px",p="mouseout",g="mouseleave",m="mouseover",v="mouseenter",x="mousemove",_="mousedown",b="mouseup",y="pointermove",S="pointerdown",C="pointerup",T="pointercancel",E="lostpointercapture",P="pointerout",k="pointerleave",O="pointerover",M="pointerenter",G="contextmenu",U="touchstart",A="touchend",N="touchmove",F="touchcancel",B="wheel",D=5,V=[[v,"_pointerenter"],[_,"_pointerdown"],[x,"_pointermove"],[b,"_pointerup"],[g,"_pointerleave"],[U,"_pointerdown"],[N,"_pointermove"],[A,"_pointerup"],[F,"_pointercancel"],[m,"_pointerover"],[B,"_wheel"],[G,"_contextmenu"],[S,"_pointerdown"],[y,"_pointermove"],[C,"_pointerup"],[T,"_pointercancel"],[E,"_lostpointercapture"]];const j={mouse:{[P]:p,[k]:g,[O]:m,[M]:v,[y]:x,[S]:_,[C]:b,[T]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[P]:"touchout",[k]:"touchleave",[O]:"touchover",[M]:"touchenter",[y]:N,[S]:U,[C]:A,[T]:F,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[P]:P,[k]:k,[O]:O,[M]:M,[y]:y,[S]:S,[C]:C,[T]:T,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},q=le=>le.indexOf("pointer")>=0?"pointer":le.indexOf("touch")>=0?"touch":"mouse",Z=le=>{const W=q(le);if(W==="pointer")return i.Konva.pointerEventsEnabled&&j.pointer;if(W==="touch")return j.touch;if(W==="mouse")return j.mouse};function ee(le={}){return(le.clipFunc||le.clipWidth||le.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),le}const ie="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);";e.stages=[];class se extends r.Container{constructor(W){super(ee(W)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ee(this.attrs)}),this._checkVisibility()}_validateAdd(W){const ne=W.getType()==="Layer",fe=W.getType()==="FastLayer";ne||fe||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const W=this.visible()?"":"none";this.content.style.display=W}setContainer(W){if(typeof W===d){if(W.charAt(0)==="."){var ne=W.slice(1);W=document.getElementsByClassName(ne)[0]}else{var fe;W.charAt(0)!=="#"?fe=W:fe=W.slice(1),W=document.getElementById(fe)}if(!W)throw"Can not find container in document with id "+fe}return this._setAttr("container",W),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),W.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var W=this.children,ne=W.length,fe;for(fe=0;fe<ne;fe++)W[fe].clear();return this}clone(W){return W||(W={}),W.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,W)}destroy(){super.destroy();var W=this.content;W&&t.Util._isInDocument(W)&&this.container().removeChild(W);var ne=e.stages.indexOf(this);return ne>-1&&e.stages.splice(ne,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const W=this._pointerPositions[0]||this._changedPointerPositions[0];return W?{x:W.x,y:W.y}:(t.Util.warn(ie),null)}_getPointerById(W){return this._pointerPositions.find(ne=>ne.id===W)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(W){W=W||{},W.x=W.x||0,W.y=W.y||0,W.width=W.width||this.width(),W.height=W.height||this.height();var ne=new o.SceneCanvas({width:W.width,height:W.height,pixelRatio:W.pixelRatio||1}),fe=ne.getContext()._context,pe=this.children;return(W.x||W.y)&&fe.translate(-1*W.x,-1*W.y),pe.forEach(function(ve){if(ve.isVisible()){var ye=ve._toKonvaCanvas(W);fe.drawImage(ye._canvas,W.x,W.y,ye.getWidth()/ye.getPixelRatio(),ye.getHeight()/ye.getPixelRatio())}}),ne}getIntersection(W){if(!W)return null;var ne=this.children,fe=ne.length,pe=fe-1,ve;for(ve=pe;ve>=0;ve--){const ye=ne[ve].getIntersection(W);if(ye)return ye}return null}_resizeDOM(){var W=this.width(),ne=this.height();this.content&&(this.content.style.width=W+f,this.content.style.height=ne+f),this.bufferCanvas.setSize(W,ne),this.bufferHitCanvas.setSize(W,ne),this.children.forEach(fe=>{fe.setSize({width:W,height:ne}),fe.draw()})}add(W,...ne){if(arguments.length>1){for(var fe=0;fe<arguments.length;fe++)this.add(arguments[fe]);return this}super.add(W);var pe=this.children.length;return pe>D&&t.Util.warn("The stage has "+pe+" 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."),W.setSize({width:this.width(),height:this.height()}),W.draw(),i.Konva.isBrowser&&this.content.appendChild(W.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(W){return l.hasPointerCapture(W,this)}setPointerCapture(W){l.setPointerCapture(W,this)}releaseCapture(W){l.releaseCapture(W,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&V.forEach(([W,ne])=>{this.content.addEventListener(W,fe=>{this[ne](fe)},{passive:!1})})}_pointerenter(W){this.setPointersPositions(W);const ne=Z(W.type);this._fire(ne.pointerenter,{evt:W,target:this,currentTarget:this})}_pointerover(W){this.setPointersPositions(W);const ne=Z(W.type);this._fire(ne.pointerover,{evt:W,target:this,currentTarget:this})}_getTargetShape(W){let ne=this[W+"targetShape"];return ne&&!ne.getStage()&&(ne=null),ne}_pointerleave(W){const ne=Z(W.type),fe=q(W.type);if(ne){this.setPointersPositions(W);var pe=this._getTargetShape(fe),ve=!s.DD.isDragging||i.Konva.hitOnDragEnabled;pe&&ve?(pe._fireAndBubble(ne.pointerout,{evt:W}),pe._fireAndBubble(ne.pointerleave,{evt:W}),this._fire(ne.pointerleave,{evt:W,target:this,currentTarget:this}),this[fe+"targetShape"]=null):ve&&(this._fire(ne.pointerleave,{evt:W,target:this,currentTarget:this}),this._fire(ne.pointerout,{evt:W,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(W){const ne=Z(W.type),fe=q(W.type);if(ne){this.setPointersPositions(W);var pe=!1;this._changedPointerPositions.forEach(ve=>{var ye=this.getIntersection(ve);if(s.DD.justDragged=!1,i.Konva["_"+fe+"ListenClick"]=!0,!(ye&&ye.isListening()))return;i.Konva.capturePointerEventsEnabled&&ye.setPointerCapture(ve.id),this[fe+"ClickStartShape"]=ye,ye._fireAndBubble(ne.pointerdown,{evt:W,pointerId:ve.id}),pe=!0;const Me=W.type.indexOf("touch")>=0;ye.preventDefault()&&W.cancelable&&Me&&W.preventDefault()}),pe||this._fire(ne.pointerdown,{evt:W,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(W){const ne=Z(W.type),fe=q(W.type);if(!ne)return;s.DD.isDragging&&s.DD.node.preventDefault()&&W.cancelable&&W.preventDefault(),this.setPointersPositions(W);var pe=!s.DD.isDragging||i.Konva.hitOnDragEnabled;if(!pe)return;var ve={};let ye=!1;var We=this._getTargetShape(fe);this._changedPointerPositions.forEach(Me=>{const Ee=l.getCapturedShape(Me.id)||this.getIntersection(Me),lt=Me.id,_e={evt:W,pointerId:lt};var jt=We!==Ee;if(jt&&We&&(We._fireAndBubble(ne.pointerout,Object.assign({},_e),Ee),We._fireAndBubble(ne.pointerleave,Object.assign({},_e),Ee)),Ee){if(ve[Ee._id])return;ve[Ee._id]=!0}Ee&&Ee.isListening()?(ye=!0,jt&&(Ee._fireAndBubble(ne.pointerover,Object.assign({},_e),We),Ee._fireAndBubble(ne.pointerenter,Object.assign({},_e),We),this[fe+"targetShape"]=Ee),Ee._fireAndBubble(ne.pointermove,Object.assign({},_e))):We&&(this._fire(ne.pointerover,{evt:W,target:this,currentTarget:this,pointerId:lt}),this[fe+"targetShape"]=null)}),ye||this._fire(ne.pointermove,{evt:W,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(W){const ne=Z(W.type),fe=q(W.type);if(!ne)return;this.setPointersPositions(W);const pe=this[fe+"ClickStartShape"],ve=this[fe+"ClickEndShape"];var ye={};let We=!1;this._changedPointerPositions.forEach(Me=>{const Ee=l.getCapturedShape(Me.id)||this.getIntersection(Me);if(Ee){if(Ee.releaseCapture(Me.id),ye[Ee._id])return;ye[Ee._id]=!0}const lt=Me.id,_e={evt:W,pointerId:lt};let jt=!1;i.Konva["_"+fe+"InDblClickWindow"]?(jt=!0,clearTimeout(this[fe+"DblTimeout"])):s.DD.justDragged||(i.Konva["_"+fe+"InDblClickWindow"]=!0,clearTimeout(this[fe+"DblTimeout"])),this[fe+"DblTimeout"]=setTimeout(function(){i.Konva["_"+fe+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),Ee&&Ee.isListening()?(We=!0,this[fe+"ClickEndShape"]=Ee,Ee._fireAndBubble(ne.pointerup,Object.assign({},_e)),i.Konva["_"+fe+"ListenClick"]&&pe&&pe===Ee&&(Ee._fireAndBubble(ne.pointerclick,Object.assign({},_e)),jt&&ve&&ve===Ee&&Ee._fireAndBubble(ne.pointerdblclick,Object.assign({},_e)))):(this[fe+"ClickEndShape"]=null,i.Konva["_"+fe+"ListenClick"]&&this._fire(ne.pointerclick,{evt:W,target:this,currentTarget:this,pointerId:lt}),jt&&this._fire(ne.pointerdblclick,{evt:W,target:this,currentTarget:this,pointerId:lt}))}),We||this._fire(ne.pointerup,{evt:W,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+fe+"ListenClick"]=!1,W.cancelable&&fe!=="touch"&&W.preventDefault()}_contextmenu(W){this.setPointersPositions(W);var ne=this.getIntersection(this.getPointerPosition());ne&&ne.isListening()?ne._fireAndBubble(G,{evt:W}):this._fire(G,{evt:W,target:this,currentTarget:this})}_wheel(W){this.setPointersPositions(W);var ne=this.getIntersection(this.getPointerPosition());ne&&ne.isListening()?ne._fireAndBubble(B,{evt:W}):this._fire(B,{evt:W,target:this,currentTarget:this})}_pointercancel(W){this.setPointersPositions(W);const ne=l.getCapturedShape(W.pointerId)||this.getIntersection(this.getPointerPosition());ne&&ne._fireAndBubble(C,l.createEvent(W)),l.releaseCapture(W.pointerId)}_lostpointercapture(W){l.releaseCapture(W.pointerId)}setPointersPositions(W){var ne=this._getContentPosition(),fe=null,pe=null;W=W||window.event,W.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(W.touches,ve=>{this._pointerPositions.push({id:ve.identifier,x:(ve.clientX-ne.left)/ne.scaleX,y:(ve.clientY-ne.top)/ne.scaleY})}),Array.prototype.forEach.call(W.changedTouches||W.touches,ve=>{this._changedPointerPositions.push({id:ve.identifier,x:(ve.clientX-ne.left)/ne.scaleX,y:(ve.clientY-ne.top)/ne.scaleY})})):(fe=(W.clientX-ne.left)/ne.scaleX,pe=(W.clientY-ne.top)/ne.scaleY,this.pointerPos={x:fe,y:pe},this._pointerPositions=[{x:fe,y:pe,id:t.Util._getFirstPointerId(W)}],this._changedPointerPositions=[{x:fe,y:pe,id:t.Util._getFirstPointerId(W)}])}_setPointerPosition(W){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(W)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var W=this.content.getBoundingClientRect();return{top:W.top,left:W.left,scaleX:W.width/this.content.clientWidth||1,scaleY:W.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var W=this.container();if(!W)throw"Stage has no container. A container is required.";W.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"),W.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.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(W){W.batchDraw()}),this}}e.Stage=se,se.prototype.nodeType=u,(0,a._registerNode)(se),n.Factory.addGetterSetter(se,"container")})(KU);var Pm={},rr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=rt,n=Sn,r=nt,i=fn,o=ke,s=rt,a=Vi;var l="hasShadow",u="shadowRGBA",d="patternImage",f="linearGradient",p="radialGradient";let g;function m(){return g||(g=n.Util.createCanvasElement().getContext("2d"),g)}e.shapes={};function v(k){const O=this.attrs.fillRule;O?k.fill(O):k.fill()}function x(k){k.stroke()}function _(k){k.fill()}function b(k){k.stroke()}function y(){this._clearCache(l)}function S(){this._clearCache(u)}function C(){this._clearCache(d)}function T(){this._clearCache(f)}function E(){this._clearCache(p)}class P extends i.Node{constructor(O){super(O);let M;for(;M=n.Util.getRandomColor(),!(M&&!(M in e.shapes)););this.colorKey=M,e.shapes[M]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.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(l,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(d,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var O=m();const M=O.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(M&&M.setTransform){const G=new n.Transform;G.translate(this.fillPatternX(),this.fillPatternY()),G.rotate(t.Konva.getAngle(this.fillPatternRotation())),G.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),G.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const U=G.getMatrix(),A=typeof DOMMatrix>"u"?{a:U[0],b:U[1],c:U[2],d:U[3],e:U[4],f:U[5]}:new DOMMatrix(U);M.setTransform(A)}return M}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var O=this.fillLinearGradientColorStops();if(O){for(var M=m(),G=this.fillLinearGradientStartPoint(),U=this.fillLinearGradientEndPoint(),A=M.createLinearGradient(G.x,G.y,U.x,U.y),N=0;N<O.length;N+=2)A.addColorStop(O[N],O[N+1]);return A}}_getRadialGradient(){return this._getCache(p,this.__getRadialGradient)}__getRadialGradient(){var O=this.fillRadialGradientColorStops();if(O){for(var M=m(),G=this.fillRadialGradientStartPoint(),U=this.fillRadialGradientEndPoint(),A=M.createRadialGradient(G.x,G.y,this.fillRadialGradientStartRadius(),U.x,U.y,this.fillRadialGradientEndRadius()),N=0;N<O.length;N+=2)A.addColorStop(O[N],O[N+1]);return A}}getShadowRGBA(){return this._getCache(u,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var O=n.Util.colorToRGBA(this.shadowColor());if(O)return"rgba("+O.r+","+O.g+","+O.b+","+O.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 O=this.hitStrokeWidth();return O==="auto"?this.hasStroke():this.strokeEnabled()&&!!O}intersects(O){var M=this.getStage(),G=M.bufferHitCanvas,U;return G.getContext().clear(),this.drawHit(G,null,!0),U=G.context.getImageData(Math.round(O.x),Math.round(O.y),1,1).data,U[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(O){var M;if(!this.getStage()||!((M=this.attrs.perfectDrawEnabled)!==null&&M!==void 0?M:!0))return!1;const U=O||this.hasFill(),A=this.hasStroke(),N=this.getAbsoluteOpacity()!==1;if(U&&A&&N)return!0;const F=this.hasShadow(),B=this.shadowForStrokeEnabled();return!!(U&&A&&F&&B)}setStrokeHitEnabled(O){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),O?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var O=this.size();return{x:this._centroid?-O.width/2:0,y:this._centroid?-O.height/2:0,width:O.width,height:O.height}}getClientRect(O={}){const M=O.skipTransform,G=O.relativeTo,U=this.getSelfRect(),N=!O.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,F=U.width+N,B=U.height+N,D=!O.skipShadow&&this.hasShadow(),V=D?this.shadowOffsetX():0,j=D?this.shadowOffsetY():0,q=F+Math.abs(V),Z=B+Math.abs(j),ee=D&&this.shadowBlur()||0,ie=q+ee*2,se=Z+ee*2,le={width:ie,height:se,x:-(N/2+ee)+Math.min(V,0)+U.x,y:-(N/2+ee)+Math.min(j,0)+U.y};return M?le:this._transformedRect(le,G)}drawScene(O,M){var G=this.getLayer(),U=O||G.getCanvas(),A=U.getContext(),N=this._getCanvasCache(),F=this.getSceneFunc(),B=this.hasShadow(),D,V,j,q=U.isCache,Z=M===this;if(!this.isVisible()&&!Z)return this;if(N){A.save();var ee=this.getAbsoluteTransform(M).getMatrix();return A.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(A),A.restore(),this}if(!F)return this;if(A.save(),this._useBufferCanvas()&&!q){D=this.getStage(),V=D.bufferCanvas,j=V.getContext(),j.clear(),j.save(),j._applyLineJoin(this);var ie=this.getAbsoluteTransform(M).getMatrix();j.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),F.call(this,j,this),j.restore();var se=V.pixelRatio;B&&A._applyShadow(this),A._applyOpacity(this),A._applyGlobalCompositeOperation(this),A.drawImage(V._canvas,0,0,V.width/se,V.height/se)}else{if(A._applyLineJoin(this),!Z){var ie=this.getAbsoluteTransform(M).getMatrix();A.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),A._applyOpacity(this),A._applyGlobalCompositeOperation(this)}B&&A._applyShadow(this),F.call(this,A,this)}return A.restore(),this}drawHit(O,M,G=!1){if(!this.shouldDrawHit(M,G))return this;var U=this.getLayer(),A=O||U.hitCanvas,N=A&&A.getContext(),F=this.hitFunc()||this.sceneFunc(),B=this._getCanvasCache(),D=B&&B.hit;if(this.colorKey||n.Util.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()"),D){N.save();var V=this.getAbsoluteTransform(M).getMatrix();return N.transform(V[0],V[1],V[2],V[3],V[4],V[5]),this._drawCachedHitCanvas(N),N.restore(),this}if(!F)return this;if(N.save(),N._applyLineJoin(this),!(this===M)){var q=this.getAbsoluteTransform(M).getMatrix();N.transform(q[0],q[1],q[2],q[3],q[4],q[5])}return F.call(this,N,this),N.restore(),this}drawHitFromCache(O=0){var M=this._getCanvasCache(),G=this._getCachedSceneCanvas(),U=M.hit,A=U.getContext(),N=U.getWidth(),F=U.getHeight(),B,D,V,j,q,Z;A.clear(),A.drawImage(G._canvas,0,0,N,F);try{for(B=A.getImageData(0,0,N,F),D=B.data,V=D.length,j=n.Util._hexToRgb(this.colorKey),q=0;q<V;q+=4)Z=D[q+3],Z>O?(D[q]=j.r,D[q+1]=j.g,D[q+2]=j.b,D[q+3]=255):D[q+3]=0;A.putImageData(B,0,0)}catch(ee){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ee.message)}return this}hasPointerCapture(O){return a.hasPointerCapture(O,this)}setPointerCapture(O){a.setPointerCapture(O,this)}releaseCapture(O){a.releaseCapture(O,this)}}e.Shape=P,P.prototype._fillFunc=v,P.prototype._strokeFunc=x,P.prototype._fillFuncHit=_,P.prototype._strokeFuncHit=b,P.prototype._centroid=!1,P.prototype.nodeType="Shape",(0,s._registerNode)(P),P.prototype.eventListeners={},P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",y),P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",C),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",T),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",E),r.Factory.addGetterSetter(P,"stroke",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(P,"strokeWidth",2,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(P,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(P,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(P,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(P,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),r.Factory.addGetterSetter(P,"lineJoin"),r.Factory.addGetterSetter(P,"lineCap"),r.Factory.addGetterSetter(P,"sceneFunc"),r.Factory.addGetterSetter(P,"hitFunc"),r.Factory.addGetterSetter(P,"dash"),r.Factory.addGetterSetter(P,"dashOffset",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowColor",void 0,(0,o.getStringValidator)()),r.Factory.addGetterSetter(P,"shadowBlur",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowOpacity",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(P,"shadowOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"shadowOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternImage"),r.Factory.addGetterSetter(P,"fill",void 0,(0,o.getStringOrGradientValidator)()),r.Factory.addGetterSetter(P,"fillPatternX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternY",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(P,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(P,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(P,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(P,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(P,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(P,"fillEnabled",!0),r.Factory.addGetterSetter(P,"strokeEnabled",!0),r.Factory.addGetterSetter(P,"shadowEnabled",!0),r.Factory.addGetterSetter(P,"dashEnabled",!0),r.Factory.addGetterSetter(P,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(P,"fillPriority","color"),r.Factory.addComponentsGetterSetter(P,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(P,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(P,"fillPatternScaleX",1,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(P,"fillPatternScaleY",1,(0,o.getNumberValidator)()),r.Factory.addComponentsGetterSetter(P,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(P,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(P,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(P,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(P,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(P,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(P,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(P,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(P,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(P,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(P,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(P,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(P,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(P,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(P,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(P,"fillPatternRotation",0),r.Factory.addGetterSetter(P,"fillRule",void 0,(0,o.getStringValidator)()),r.Factory.backCompat(P,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(rr);Object.defineProperty(Pm,"__esModule",{value:!0});Pm.Layer=void 0;const ra=Sn,$x=vc,hd=fn,vE=nt,qO=Yo,KSe=ke,XSe=rr,YSe=rt;var QSe="#",ZSe="beforeDraw",JSe="draw",QU=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],e2e=QU.length;class Vf extends $x.Container{constructor(t){super(t),this.canvas=new qO.SceneCanvas,this.hitCanvas=new qO.HitCanvas({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(){hd.Node.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=hd.Node.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(hd.Node.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(hd.Node.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 hd.Node.prototype.remove.call(this),t&&t.parentNode&&ra.Util._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"&&ra.Util.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(),hd.Node.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(){ra.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){ra.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,ra.Util.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<e2e;i++){const o=QU[i],s=this._getIntersection({x:t.x+o.x*n,y:t.y+o.y*n}),a=s.shape;if(a)return a;if(r=!!s.antialiased,!s.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=ra.Util._rgbToHex(r[0],r[1],r[2]),s=XSe.shapes[QSe+o];return s?{shape:s}:{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(ZSe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),$x.Container.prototype.drawScene.call(this,i,n),this._fire(JSe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),$x.Container.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){ra.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return ra.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return ra.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Pm.Layer=Vf;Vf.prototype.nodeType="Layer";(0,YSe._registerNode)(Vf);vE.Factory.addGetterSetter(Vf,"imageSmoothingEnabled",!0);vE.Factory.addGetterSetter(Vf,"clearBeforeDraw",!0);vE.Factory.addGetterSetter(Vf,"hitGraphEnabled",!0,(0,KSe.getBooleanValidator)());var uS={};Object.defineProperty(uS,"__esModule",{value:!0});uS.FastLayer=void 0;const t2e=Sn,n2e=Pm,r2e=rt;class _E extends n2e.Layer{constructor(t){super(t),this.listening(!1),t2e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}uS.FastLayer=_E;_E.prototype.nodeType="FastLayer";(0,r2e._registerNode)(_E);var jf={};Object.defineProperty(jf,"__esModule",{value:!0});jf.Group=void 0;const i2e=Sn,o2e=vc,s2e=rt;class bE extends o2e.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&i2e.Util.throw("You may only add groups and shapes to groups.")}}jf.Group=bE;bE.prototype.nodeType="Group";(0,s2e._registerNode)(bE);var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.Animation=void 0;const Fx=rt,KO=Sn;var Bx=function(){return Fx.glob.performance&&Fx.glob.performance.now?function(){return Fx.glob.performance.now()}:function(){return new Date().getTime()}}();class ws{constructor(t,n){this.id=ws.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Bx(),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=ws,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=Bx(),ws._addAnimation(this),this}stop(){return ws._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,s,a,l,u,d,f;for(s=0;s<n.length;s++)if(r=n[s],i=r.layers,o=r.func,r._updateFrameObject(Bx()),l=i.length,o?f=o.call(r,r.frame)!==!1:f=!0,!!f)for(a=0;a<l;a++)u=i[a],u._id!==void 0&&(t[u._id]=u);for(d in t)t.hasOwnProperty(d)&&t[d].batchDraw()}static _animationLoop(){var t=ws;t.animations.length?(t._runFrames(),KO.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,KO.Util.requestAnimFrame(this._animationLoop))}}Gf.Animation=ws;ws.animations=[];ws.animIdCounter=0;ws.animRunning=!1;var ZU={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=Sn,n=Gf,r=fn,i=rt;var o={node:1,duration:1,easing:1,onFinish:1,yoyo:1},s=1,a=2,l=3,u=0,d=["fill","stroke","shadowColor"];class f{constructor(m,v,x,_,b,y,S){this.prop=m,this.propFunc=v,this.begin=_,this._pos=_,this.duration=y,this._change=0,this.prevPos=0,this.yoyo=S,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=x,this._change=b-this.begin,this.pause()}fire(m){var v=this[m];v&&v()}setTime(m){m>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():m<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=m,this.update())}getTime(){return this._time}setPosition(m){this.prevPos=this._pos,this.propFunc(m),this._pos=m}getPosition(m){return m===void 0&&(m=this._time),this.func(m,this.begin,this._change,this.duration)}play(){this.state=a,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=l,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(m){this.pause(),this._time=m,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 m=this.getTimer()-this._startTime;this.state===a?this.setTime(m):this.state===l&&this.setTime(this.duration-m)}pause(){this.state=s,this.fire("onPause")}getTimer(){return new Date().getTime()}}class p{constructor(m){var v=this,x=m.node,_=x._id,b,y=m.easing||e.Easings.Linear,S=!!m.yoyo,C;typeof m.duration>"u"?b=.3:m.duration===0?b=.001:b=m.duration,this.node=x,this._id=u++;var T=x.getLayer()||(x instanceof i.Konva.Stage?x.getLayers():null);T||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){v.tween.onEnterFrame()},T),this.tween=new f(C,function(E){v._tweenFunc(E)},y,0,1,b*1e3,S),this._addListeners(),p.attrs[_]||(p.attrs[_]={}),p.attrs[_][this._id]||(p.attrs[_][this._id]={}),p.tweens[_]||(p.tweens[_]={});for(C in m)o[C]===void 0&&this._addAttr(C,m[C]);this.reset(),this.onFinish=m.onFinish,this.onReset=m.onReset,this.onUpdate=m.onUpdate}_addAttr(m,v){var x=this.node,_=x._id,b,y,S,C,T,E,P,k;if(S=p.tweens[_][m],S&&delete p.attrs[_][S][m],b=x.getAttr(m),t.Util._isArray(v))if(y=[],T=Math.max(v.length,b.length),m==="points"&&v.length!==b.length&&(v.length>b.length?(P=b,b=t.Util._prepareArrayForTween(b,v,x.closed())):(E=v,v=t.Util._prepareArrayForTween(v,b,x.closed()))),m.indexOf("fill")===0)for(C=0;C<T;C++)if(C%2===0)y.push(v[C]-b[C]);else{var O=t.Util.colorToRGBA(b[C]);k=t.Util.colorToRGBA(v[C]),b[C]=O,y.push({r:k.r-O.r,g:k.g-O.g,b:k.b-O.b,a:k.a-O.a})}else for(C=0;C<T;C++)y.push(v[C]-b[C]);else d.indexOf(m)!==-1?(b=t.Util.colorToRGBA(b),k=t.Util.colorToRGBA(v),y={r:k.r-b.r,g:k.g-b.g,b:k.b-b.b,a:k.a-b.a}):y=v-b;p.attrs[_][this._id][m]={start:b,diff:y,end:v,trueEnd:E,trueStart:P},p.tweens[_][m]=this._id}_tweenFunc(m){var v=this.node,x=p.attrs[v._id][this._id],_,b,y,S,C,T,E,P;for(_ in x){if(b=x[_],y=b.start,S=b.diff,P=b.end,t.Util._isArray(y))if(C=[],E=Math.max(y.length,P.length),_.indexOf("fill")===0)for(T=0;T<E;T++)T%2===0?C.push((y[T]||0)+S[T]*m):C.push("rgba("+Math.round(y[T].r+S[T].r*m)+","+Math.round(y[T].g+S[T].g*m)+","+Math.round(y[T].b+S[T].b*m)+","+(y[T].a+S[T].a*m)+")");else for(T=0;T<E;T++)C.push((y[T]||0)+S[T]*m);else d.indexOf(_)!==-1?C="rgba("+Math.round(y.r+S.r*m)+","+Math.round(y.g+S.g*m)+","+Math.round(y.b+S.b*m)+","+(y.a+S.a*m)+")":C=y+S*m;v.setAttr(_,C)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var m=this.node,v=p.attrs[m._id][this._id];v.points&&v.points.trueEnd&&m.setAttr("points",v.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var m=this.node,v=p.attrs[m._id][this._id];v.points&&v.points.trueStart&&m.points(v.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(m){return this.tween.seek(m*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var m=this.node._id,v=this._id,x=p.tweens[m],_;this.pause();for(_ in x)delete p.tweens[m][_];delete p.attrs[m][v]}}e.Tween=p,p.attrs={},p.tweens={},r.Node.prototype.to=function(g){var m=g.onFinish;g.node=this,g.onFinish=function(){this.destroy(),m&&m()};var v=new p(g);v.play()},e.Easings={BackEaseIn(g,m,v,x){var _=1.70158;return v*(g/=x)*g*((_+1)*g-_)+m},BackEaseOut(g,m,v,x){var _=1.70158;return v*((g=g/x-1)*g*((_+1)*g+_)+1)+m},BackEaseInOut(g,m,v,x){var _=1.70158;return(g/=x/2)<1?v/2*(g*g*(((_*=1.525)+1)*g-_))+m:v/2*((g-=2)*g*(((_*=1.525)+1)*g+_)+2)+m},ElasticEaseIn(g,m,v,x,_,b){var y=0;return g===0?m:(g/=x)===1?m+v:(b||(b=x*.3),!_||_<Math.abs(v)?(_=v,y=b/4):y=b/(2*Math.PI)*Math.asin(v/_),-(_*Math.pow(2,10*(g-=1))*Math.sin((g*x-y)*(2*Math.PI)/b))+m)},ElasticEaseOut(g,m,v,x,_,b){var y=0;return g===0?m:(g/=x)===1?m+v:(b||(b=x*.3),!_||_<Math.abs(v)?(_=v,y=b/4):y=b/(2*Math.PI)*Math.asin(v/_),_*Math.pow(2,-10*g)*Math.sin((g*x-y)*(2*Math.PI)/b)+v+m)},ElasticEaseInOut(g,m,v,x,_,b){var y=0;return g===0?m:(g/=x/2)===2?m+v:(b||(b=x*(.3*1.5)),!_||_<Math.abs(v)?(_=v,y=b/4):y=b/(2*Math.PI)*Math.asin(v/_),g<1?-.5*(_*Math.pow(2,10*(g-=1))*Math.sin((g*x-y)*(2*Math.PI)/b))+m:_*Math.pow(2,-10*(g-=1))*Math.sin((g*x-y)*(2*Math.PI)/b)*.5+v+m)},BounceEaseOut(g,m,v,x){return(g/=x)<1/2.75?v*(7.5625*g*g)+m:g<2/2.75?v*(7.5625*(g-=1.5/2.75)*g+.75)+m:g<2.5/2.75?v*(7.5625*(g-=2.25/2.75)*g+.9375)+m:v*(7.5625*(g-=2.625/2.75)*g+.984375)+m},BounceEaseIn(g,m,v,x){return v-e.Easings.BounceEaseOut(x-g,0,v,x)+m},BounceEaseInOut(g,m,v,x){return g<x/2?e.Easings.BounceEaseIn(g*2,0,v,x)*.5+m:e.Easings.BounceEaseOut(g*2-x,0,v,x)*.5+v*.5+m},EaseIn(g,m,v,x){return v*(g/=x)*g+m},EaseOut(g,m,v,x){return-v*(g/=x)*(g-2)+m},EaseInOut(g,m,v,x){return(g/=x/2)<1?v/2*g*g+m:-v/2*(--g*(g-2)-1)+m},StrongEaseIn(g,m,v,x){return v*(g/=x)*g*g*g*g+m},StrongEaseOut(g,m,v,x){return v*((g=g/x-1)*g*g*g*g+1)+m},StrongEaseInOut(g,m,v,x){return(g/=x/2)<1?v/2*g*g*g*g*g+m:v/2*((g-=2)*g*g*g*g+2)+m},Linear(g,m,v,x){return v*g/x+m}}})(ZU);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=rt,n=Sn,r=fn,i=vc,o=KU,s=Pm,a=uS,l=jf,u=aS,d=rr,f=Gf,p=ZU,g=_a,m=Yo;e.Konva=n.Util._assign(t.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:i.Container,Stage:o.Stage,stages:o.stages,Layer:s.Layer,FastLayer:a.FastLayer,Group:l.Group,DD:u.DD,Shape:d.Shape,shapes:d.shapes,Animation:f.Animation,Tween:p.Tween,Easings:p.Easings,Context:g.Context,Canvas:m.Canvas}),e.default=e.Konva})(GU);var cS={};Object.defineProperty(cS,"__esModule",{value:!0});cS.Arc=void 0;const dS=nt,a2e=rr,XO=rt,fS=ke,l2e=rt;class Ba extends a2e.Shape{_sceneFunc(t){var n=XO.Konva.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=XO.Konva.getAngle(r?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),s=1,a=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),d=s*n,f=a*(a>0?t:n),p=l*(l>0?n:t);return{x:u,y:r?-1*p:f,width:d-u,height:p-f}}}cS.Arc=Ba;Ba.prototype._centroid=!0;Ba.prototype.className="Arc";Ba.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,l2e._registerNode)(Ba);dS.Factory.addGetterSetter(Ba,"innerRadius",0,(0,fS.getNumberValidator)());dS.Factory.addGetterSetter(Ba,"outerRadius",0,(0,fS.getNumberValidator)());dS.Factory.addGetterSetter(Ba,"angle",0,(0,fS.getNumberValidator)());dS.Factory.addGetterSetter(Ba,"clockwise",!1,(0,fS.getBooleanValidator)());var hS={},Rm={};Object.defineProperty(Rm,"__esModule",{value:!0});Rm.Line=void 0;const pS=nt,u2e=rr,JU=ke,c2e=rt;function a5(e,t,n,r,i,o,s){var a=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=s*a/(a+l),d=s*l/(a+l),f=n-u*(i-e),p=r-u*(o-t),g=n+d*(i-e),m=r+d*(o-t);return[f,p,g,m]}function YO(e,t){var n=e.length,r=[],i,o;for(i=2;i<n-2;i+=2)o=a5(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 u2e.Shape{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(),s=this.bezier(),a,l,u;if(r){if(t.beginPath(),t.moveTo(n[0],n[1]),i!==0&&r>4){for(a=this.getTensionPoints(),l=a.length,u=o?0:4,o||t.quadraticCurveTo(a[0],a[1],a[2],a[3]);u<l-2;)t.bezierCurveTo(a[u++],a[u++],a[u++],a[u++],a[u++],a[u++]);o||t.quadraticCurveTo(a[l-2],a[l-1],n[r-2],n[r-1])}else if(s)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():YO(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),n=t.length,r=this.tension(),i=a5(t[n-2],t[n-1],t[0],t[1],t[2],t[3],r),o=a5(t[n-4],t[n-3],t[n-2],t[n-1],t[0],t[1],r),s=YO(t,r),a=[i[2],i[3]].concat(s).concat([o[0],o[1],t[n-2],t[n-1],o[2],o[3],i[0],i[1],t[0],t[1]]);return a}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],s,a,l=0;l<t.length/2;l++)s=t[l*2],a=t[l*2+1],n=Math.min(n,s),r=Math.max(r,s),i=Math.min(i,a),o=Math.max(o,a);return{x:n,y:i,width:r-n,height:o-i}}}Rm.Line=ru;ru.prototype.className="Line";ru.prototype._attrsAffectingSize=["points","bezier","tension"];(0,c2e._registerNode)(ru);pS.Factory.addGetterSetter(ru,"closed",!1);pS.Factory.addGetterSetter(ru,"bezier",!1);pS.Factory.addGetterSetter(ru,"tension",0,(0,JU.getNumberValidator)());pS.Factory.addGetterSetter(ru,"points",[],(0,JU.getNumberArrayValidator)());var Hf={},ez={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const t=(s,a,l)=>{let u,d,f;u=l/2,d=0;for(let g=0;g<20;g++)f=u*e.tValues[20][g]+u,d+=e.cValues[20][g]*r(s,a,f);return u*d};e.getCubicArcLength=t;const n=(s,a,l)=>{l===void 0&&(l=1);const u=s[0]-2*s[1]+s[2],d=a[0]-2*a[1]+a[2],f=2*s[1]-2*s[0],p=2*a[1]-2*a[0],g=4*(u*u+d*d),m=4*(u*f+d*p),v=f*f+p*p;if(g===0)return l*Math.sqrt(Math.pow(s[2]-s[0],2)+Math.pow(a[2]-a[0],2));const x=m/(2*g),_=v/g,b=l+x,y=_-x*x,S=b*b+y>0?Math.sqrt(b*b+y):0,C=x*x+y>0?Math.sqrt(x*x+y):0,T=x+Math.sqrt(x*x+y)!==0?y*Math.log(Math.abs((b+S)/(x+C))):0;return Math.sqrt(g)/2*(b*S-x*C+T)};e.getQuadraticArcLength=n;function r(s,a,l){const u=i(1,l,s),d=i(1,l,a),f=u*u+d*d;return Math.sqrt(f)}const i=(s,a,l)=>{const u=l.length-1;let d,f;if(u===0)return 0;if(s===0){f=0;for(let p=0;p<=u;p++)f+=e.binomialCoefficients[u][p]*Math.pow(1-a,u-p)*Math.pow(a,p)*l[p];return f}else{d=new Array(u);for(let p=0;p<u;p++)d[p]=u*(l[p+1]-l[p]);return i(s-1,a,d)}},o=(s,a,l)=>{let u=1,d=s/a,f=(s-l(d))/a,p=0;for(;u>.001;){const g=l(d+f),m=Math.abs(s-g)/a;if(m<u)u=m,d+=f;else{const v=l(d-f),x=Math.abs(s-v)/a;x<u?(u=x,d-=f):f/=2}if(p++,p>500)break}return d};e.t2length=o})(ez);Object.defineProperty(Hf,"__esModule",{value:!0});Hf.Path=void 0;const d2e=nt,f2e=rr,h2e=rt,pd=ez;class Qn extends f2e.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Qn.parsePathData(this.data()),this.pathLength=Qn.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,i=0;i<n.length;i++){var o=n[i].command,s=n[i].points;switch(o){case"L":t.lineTo(s[0],s[1]);break;case"M":t.moveTo(s[0],s[1]);break;case"C":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"Q":t.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case"A":var a=s[0],l=s[1],u=s[2],d=s[3],f=s[4],p=s[5],g=s[6],m=s[7],v=u>d?u:d,x=u>d?1:u/d,_=u>d?d/u:1;t.translate(a,l),t.rotate(g),t.scale(x,_),t.arc(0,0,v,f,f+p,1-m),t.scale(1/x,1/_),t.rotate(-g),t.translate(-a,-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 d=u.points[4],f=u.points[5],p=u.points[4]+f,g=Math.PI/180;if(Math.abs(d-p)<g&&(g=Math.abs(d-p)),f<0)for(let m=d-g;m>p;m-=g){const v=Qn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],m,0);t.push(v.x,v.y)}else for(let m=d+g;m<p;m+=g){const v=Qn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],m,0);t.push(v.x,v.y)}}else if(u.command==="C")for(let m=0;m<=1;m+=.01){const v=Qn.getPointOnCubicBezier(m,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(v.x,v.y)}else t=t.concat(u.points)});for(var n=t[0],r=t[0],i=t[1],o=t[1],s,a,l=0;l<t.length/2;l++)s=t[l*2],a=t[l*2+1],isNaN(s)||(n=Math.min(n,s),r=Math.max(r,s)),isNaN(a)||(i=Math.min(i,a),o=Math.max(o,a));return{x:n,y:i,width:r-n,height:o-i}}getLength(){return this.pathLength}getPointAtLength(t){return Qn.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPathLength(t){let n=0;for(var r=0;r<t.length;++r)n+=t[r].pathLength;return n}static getPointAtLengthOfDataArray(t,n){var r,i=0,o=n.length;if(!o)return null;for(;i<o&&t>n[i].pathLength;)t-=n[i].pathLength,++i;if(i===o)return r=n[i-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[i].points.slice(0,2),{x:r[0],y:r[1]};var s=n[i],a=s.points;switch(s.command){case"L":return Qn.getPointOnLine(t,s.start.x,s.start.y,a[0],a[1]);case"C":return Qn.getPointOnCubicBezier((0,pd.t2length)(t,Qn.getPathLength(n),v=>(0,pd.getCubicArcLength)([s.start.x,a[0],a[2],a[4]],[s.start.y,a[1],a[3],a[5]],v)),s.start.x,s.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Qn.getPointOnQuadraticBezier((0,pd.t2length)(t,Qn.getPathLength(n),v=>(0,pd.getQuadraticArcLength)([s.start.x,a[0],a[2]],[s.start.y,a[1],a[3]],v)),s.start.x,s.start.y,a[0],a[1],a[2],a[3]);case"A":var l=a[0],u=a[1],d=a[2],f=a[3],p=a[4],g=a[5],m=a[6];return p+=g*t/s.pathLength,Qn.getPointOnEllipticalArc(l,u,d,f,p,m)}return null}static getPointOnLine(t,n,r,i,o,s,a){s===void 0&&(s=n),a===void 0&&(a=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i<n&&(u*=-1);var d=l*u,f;if(i===n)f={x:s,y:a+d};else if((a-r)/(s-n+1e-8)===l)f={x:s+u,y:a+d};else{var p,g,m=this.getLineLength(n,r,i,o),v=(s-n)*(i-n)+(a-r)*(o-r);v=v/(m*m),p=n+v*(i-n),g=r+v*(o-r);var x=this.getLineLength(s,a,p,g),_=Math.sqrt(t*t-x*x);u=Math.sqrt(_*_/(1+l*l)),i<n&&(u*=-1),d=l*u,f={x:p+u,y:g+d}}return f}static getPointOnCubicBezier(t,n,r,i,o,s,a,l,u){function d(x){return x*x*x}function f(x){return 3*x*x*(1-x)}function p(x){return 3*x*(1-x)*(1-x)}function g(x){return(1-x)*(1-x)*(1-x)}var m=l*d(t)+s*f(t)+i*p(t)+n*g(t),v=u*d(t)+a*f(t)+o*p(t)+r*g(t);return{x:m,y:v}}static getPointOnQuadraticBezier(t,n,r,i,o,s,a){function l(g){return g*g}function u(g){return 2*g*(1-g)}function d(g){return(1-g)*(1-g)}var f=s*l(t)+i*u(t)+n*d(t),p=a*l(t)+o*u(t)+r*d(t);return{x:f,y:p}}static getPointOnEllipticalArc(t,n,r,i,o,s){var a=Math.cos(s),l=Math.sin(s),u={x:r*Math.cos(o),y:i*Math.sin(o)};return{x:t+(u.x*a-u.y*l),y:n+(u.x*l+u.y*a)}}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("|"),s=[],a=[],l=0,u=0,d=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,f;for(i=1;i<o.length;i++){var p=o[i],g=p.charAt(0);for(p=p.slice(1),a.length=0;f=d.exec(p);)a.push(f[0]);for(var m=[],v=0,x=a.length;v<x;v++){if(a[v]==="00"){m.push(0,0);continue}var _=parseFloat(a[v]);isNaN(_)?m.push(0):m.push(_)}for(;m.length>0&&!isNaN(m[0]);){var b=null,y=[],S=l,C=u,T,E,P,k,O,M,G,U,A,N;switch(g){case"l":l+=m.shift(),u+=m.shift(),b="L",y.push(l,u);break;case"L":l=m.shift(),u=m.shift(),y.push(l,u);break;case"m":var F=m.shift(),B=m.shift();if(l+=F,u+=B,b="M",s.length>2&&s[s.length-1].command==="z"){for(var D=s.length-2;D>=0;D--)if(s[D].command==="M"){l=s[D].points[0]+F,u=s[D].points[1]+B;break}}y.push(l,u),g="l";break;case"M":l=m.shift(),u=m.shift(),b="M",y.push(l,u),g="L";break;case"h":l+=m.shift(),b="L",y.push(l,u);break;case"H":l=m.shift(),b="L",y.push(l,u);break;case"v":u+=m.shift(),b="L",y.push(l,u);break;case"V":u=m.shift(),b="L",y.push(l,u);break;case"C":y.push(m.shift(),m.shift(),m.shift(),m.shift()),l=m.shift(),u=m.shift(),y.push(l,u);break;case"c":y.push(l+m.shift(),u+m.shift(),l+m.shift(),u+m.shift()),l+=m.shift(),u+=m.shift(),b="C",y.push(l,u);break;case"S":E=l,P=u,T=s[s.length-1],T.command==="C"&&(E=l+(l-T.points[2]),P=u+(u-T.points[3])),y.push(E,P,m.shift(),m.shift()),l=m.shift(),u=m.shift(),b="C",y.push(l,u);break;case"s":E=l,P=u,T=s[s.length-1],T.command==="C"&&(E=l+(l-T.points[2]),P=u+(u-T.points[3])),y.push(E,P,l+m.shift(),u+m.shift()),l+=m.shift(),u+=m.shift(),b="C",y.push(l,u);break;case"Q":y.push(m.shift(),m.shift()),l=m.shift(),u=m.shift(),y.push(l,u);break;case"q":y.push(l+m.shift(),u+m.shift()),l+=m.shift(),u+=m.shift(),b="Q",y.push(l,u);break;case"T":E=l,P=u,T=s[s.length-1],T.command==="Q"&&(E=l+(l-T.points[0]),P=u+(u-T.points[1])),l=m.shift(),u=m.shift(),b="Q",y.push(E,P,l,u);break;case"t":E=l,P=u,T=s[s.length-1],T.command==="Q"&&(E=l+(l-T.points[0]),P=u+(u-T.points[1])),l+=m.shift(),u+=m.shift(),b="Q",y.push(E,P,l,u);break;case"A":k=m.shift(),O=m.shift(),M=m.shift(),G=m.shift(),U=m.shift(),A=l,N=u,l=m.shift(),u=m.shift(),b="A",y=this.convertEndpointToCenterParameterization(A,N,l,u,G,U,k,O,M);break;case"a":k=m.shift(),O=m.shift(),M=m.shift(),G=m.shift(),U=m.shift(),A=l,N=u,l+=m.shift(),u+=m.shift(),b="A",y=this.convertEndpointToCenterParameterization(A,N,l,u,G,U,k,O,M);break}s.push({command:b||g,points:y,start:{x:S,y:C},pathLength:this.calcLength(S,C,b||g,y)})}(g==="z"||g==="Z")&&s.push({command:"z",points:[],start:void 0,pathLength:0})}return s}static calcLength(t,n,r,i){var o,s,a,l,u=Qn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":return(0,pd.getCubicArcLength)([t,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case"Q":return(0,pd.getQuadraticArcLength)([t,i[0],i[2]],[n,i[1],i[3]],1);case"A":o=0;var d=i[4],f=i[5],p=i[4]+f,g=Math.PI/180;if(Math.abs(d-p)<g&&(g=Math.abs(d-p)),s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],d,0),f<0)for(l=d-g;l>p;l-=g)a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(s.x,s.y,a.x,a.y),s=a;else for(l=d+g;l<p;l+=g)a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(s.x,s.y,a.x,a.y),s=a;return a=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],p,0),o+=u.getLineLength(s.x,s.y,a.x,a.y),o}return 0}static convertEndpointToCenterParameterization(t,n,r,i,o,s,a,l,u){var d=u*(Math.PI/180),f=Math.cos(d)*(t-r)/2+Math.sin(d)*(n-i)/2,p=-1*Math.sin(d)*(t-r)/2+Math.cos(d)*(n-i)/2,g=f*f/(a*a)+p*p/(l*l);g>1&&(a*=Math.sqrt(g),l*=Math.sqrt(g));var m=Math.sqrt((a*a*(l*l)-a*a*(p*p)-l*l*(f*f))/(a*a*(p*p)+l*l*(f*f)));o===s&&(m*=-1),isNaN(m)&&(m=0);var v=m*a*p/l,x=m*-l*f/a,_=(t+r)/2+Math.cos(d)*v-Math.sin(d)*x,b=(n+i)/2+Math.sin(d)*v+Math.cos(d)*x,y=function(O){return Math.sqrt(O[0]*O[0]+O[1]*O[1])},S=function(O,M){return(O[0]*M[0]+O[1]*M[1])/(y(O)*y(M))},C=function(O,M){return(O[0]*M[1]<O[1]*M[0]?-1:1)*Math.acos(S(O,M))},T=C([1,0],[(f-v)/a,(p-x)/l]),E=[(f-v)/a,(p-x)/l],P=[(-1*f-v)/a,(-1*p-x)/l],k=C(E,P);return S(E,P)<=-1&&(k=Math.PI),S(E,P)>=1&&(k=0),s===0&&k>0&&(k=k-2*Math.PI),s===1&&k<0&&(k=k+2*Math.PI),[_,b,a,l,T,k,d,s]}}Hf.Path=Qn;Qn.prototype.className="Path";Qn.prototype._attrsAffectingSize=["data"];(0,h2e._registerNode)(Qn);d2e.Factory.addGetterSetter(Qn,"data");Object.defineProperty(hS,"__esModule",{value:!0});hS.Arrow=void 0;const gS=nt,p2e=Rm,tz=ke,g2e=rt,QO=Hf;class bc extends p2e.Line{_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 s=this.pointerLength(),a=r.length,l,u;if(o){const p=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[a-2],r[a-1]],g=QO.Path.calcLength(i[i.length-4],i[i.length-3],"C",p),m=QO.Path.getPointOnQuadraticBezier(Math.min(1,1-s/g),p[0],p[1],p[2],p[3],p[4],p[5]);l=r[a-2]-m.x,u=r[a-1]-m.y}else l=r[a-2]-r[a-4],u=r[a-1]-r[a-3];var d=(Math.atan2(u,l)+n)%n,f=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[a-2],r[a-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-s,f/2),t.lineTo(-s,-f/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(-s,f/2),t.lineTo(-s,-f/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}}}hS.Arrow=bc;bc.prototype.className="Arrow";(0,g2e._registerNode)(bc);gS.Factory.addGetterSetter(bc,"pointerLength",10,(0,tz.getNumberValidator)());gS.Factory.addGetterSetter(bc,"pointerWidth",10,(0,tz.getNumberValidator)());gS.Factory.addGetterSetter(bc,"pointerAtBeginning",!1);gS.Factory.addGetterSetter(bc,"pointerAtEnding",!0);var mS={};Object.defineProperty(mS,"__esModule",{value:!0});mS.Circle=void 0;const m2e=nt,y2e=rr,v2e=ke,_2e=rt;let Wf=class extends y2e.Shape{_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)}};mS.Circle=Wf;Wf.prototype._centroid=!0;Wf.prototype.className="Circle";Wf.prototype._attrsAffectingSize=["radius"];(0,_2e._registerNode)(Wf);m2e.Factory.addGetterSetter(Wf,"radius",0,(0,v2e.getNumberValidator)());var yS={};Object.defineProperty(yS,"__esModule",{value:!0});yS.Ellipse=void 0;const SE=nt,b2e=rr,nz=ke,S2e=rt;class iu extends b2e.Shape{_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)}}yS.Ellipse=iu;iu.prototype.className="Ellipse";iu.prototype._centroid=!0;iu.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,S2e._registerNode)(iu);SE.Factory.addComponentsGetterSetter(iu,"radius",["x","y"]);SE.Factory.addGetterSetter(iu,"radiusX",0,(0,nz.getNumberValidator)());SE.Factory.addGetterSetter(iu,"radiusY",0,(0,nz.getNumberValidator)());var vS={};Object.defineProperty(vS,"__esModule",{value:!0});vS.Image=void 0;const Ux=Sn,Sc=nt,w2e=rr,x2e=rt,Om=ke;let Us=class rz extends w2e.Shape{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.cornerRadius(),o=this.attrs.image;let s;if(o){const a=this.attrs.cropWidth,l=this.attrs.cropHeight;a&&l?s=[o,this.cropX(),this.cropY(),a,l,0,0,n,r]:s=[o,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?Ux.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),o&&(i&&t.clip(),t.drawImage.apply(t,s))}_hitFunc(t){var n=this.width(),r=this.height(),i=this.cornerRadius();t.beginPath(),i?Ux.Util.drawRoundedRectPath(t,n,r,i):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=Ux.Util.createImageElement();i.onload=function(){var o=new rz({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}};vS.Image=Us;Us.prototype.className="Image";(0,x2e._registerNode)(Us);Sc.Factory.addGetterSetter(Us,"cornerRadius",0,(0,Om.getNumberOrArrayOfNumbersValidator)(4));Sc.Factory.addGetterSetter(Us,"image");Sc.Factory.addComponentsGetterSetter(Us,"crop",["x","y","width","height"]);Sc.Factory.addGetterSetter(Us,"cropX",0,(0,Om.getNumberValidator)());Sc.Factory.addGetterSetter(Us,"cropY",0,(0,Om.getNumberValidator)());Sc.Factory.addGetterSetter(Us,"cropWidth",0,(0,Om.getNumberValidator)());Sc.Factory.addGetterSetter(Us,"cropHeight",0,(0,Om.getNumberValidator)());var Rf={};Object.defineProperty(Rf,"__esModule",{value:!0});Rf.Tag=Rf.Label=void 0;const _S=nt,C2e=rr,T2e=jf,wE=ke,iz=rt;var oz=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],E2e="Change.konva",A2e="none",l5="up",u5="right",c5="down",d5="left",P2e=oz.length;class xE extends T2e.Group{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<P2e;r++)t.on(oz[r]+E2e,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),n=this.getTag(),r,i,o,s,a,l,u;if(t&&n){switch(r=t.width(),i=t.height(),o=n.pointerDirection(),s=n.pointerWidth(),u=n.pointerHeight(),a=0,l=0,o){case l5:a=r/2,l=-1*u;break;case u5:a=r+s,l=i/2;break;case c5:a=r/2,l=i+u;break;case d5:a=-1*s,l=i/2;break}n.setAttrs({x:-1*a,y:-1*l,width:r,height:i}),t.setAttrs({x:-1*a,y:-1*l})}}}Rf.Label=xE;xE.prototype.className="Label";(0,iz._registerNode)(xE);class wc extends C2e.Shape{_sceneFunc(t){var n=this.width(),r=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),s=this.pointerHeight(),a=this.cornerRadius();let l=0,u=0,d=0,f=0;typeof a=="number"?l=u=d=f=Math.min(a,n/2,r/2):(l=Math.min(a[0]||0,n/2,r/2),u=Math.min(a[1]||0,n/2,r/2),f=Math.min(a[2]||0,n/2,r/2),d=Math.min(a[3]||0,n/2,r/2)),t.beginPath(),t.moveTo(l,0),i===l5&&(t.lineTo((n-o)/2,0),t.lineTo(n/2,-1*s),t.lineTo((n+o)/2,0)),t.lineTo(n-u,0),t.arc(n-u,u,u,Math.PI*3/2,0,!1),i===u5&&(t.lineTo(n,(r-s)/2),t.lineTo(n+o,r/2),t.lineTo(n,(r+s)/2)),t.lineTo(n,r-f),t.arc(n-f,r-f,f,0,Math.PI/2,!1),i===c5&&(t.lineTo((n+o)/2,r),t.lineTo(n/2,r+s),t.lineTo((n-o)/2,r)),t.lineTo(d,r),t.arc(d,r-d,d,Math.PI/2,Math.PI,!1),i===d5&&(t.lineTo(0,(r+s)/2),t.lineTo(-1*o,r/2),t.lineTo(0,(r-s)/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(),s=this.width(),a=this.height();return o===l5?(n-=i,a+=i):o===c5?a+=i:o===d5?(t-=r*1.5,s+=r):o===u5&&(s+=r*1.5),{x:t,y:n,width:s,height:a}}}Rf.Tag=wc;wc.prototype.className="Tag";(0,iz._registerNode)(wc);_S.Factory.addGetterSetter(wc,"pointerDirection",A2e);_S.Factory.addGetterSetter(wc,"pointerWidth",0,(0,wE.getNumberValidator)());_S.Factory.addGetterSetter(wc,"pointerHeight",0,(0,wE.getNumberValidator)());_S.Factory.addGetterSetter(wc,"cornerRadius",0,(0,wE.getNumberOrArrayOfNumbersValidator)(4));var km={};Object.defineProperty(km,"__esModule",{value:!0});km.Rect=void 0;const R2e=nt,O2e=rr,k2e=rt,I2e=Sn,M2e=ke;let bS=class extends O2e.Shape{_sceneFunc(t){var n=this.cornerRadius(),r=this.width(),i=this.height();t.beginPath(),n?I2e.Util.drawRoundedRectPath(t,r,i,n):t.rect(0,0,r,i),t.closePath(),t.fillStrokeShape(this)}};km.Rect=bS;bS.prototype.className="Rect";(0,k2e._registerNode)(bS);R2e.Factory.addGetterSetter(bS,"cornerRadius",0,(0,M2e.getNumberOrArrayOfNumbersValidator)(4));var SS={};Object.defineProperty(SS,"__esModule",{value:!0});SS.RegularPolygon=void 0;const sz=nt,N2e=rr,az=ke,L2e=rt;class xc extends N2e.Shape{_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(s=>{n=Math.min(n,s.x),r=Math.max(r,s.x),i=Math.min(i,s.y),o=Math.max(o,s.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)}}SS.RegularPolygon=xc;xc.prototype.className="RegularPolygon";xc.prototype._centroid=!0;xc.prototype._attrsAffectingSize=["radius"];(0,L2e._registerNode)(xc);sz.Factory.addGetterSetter(xc,"radius",0,(0,az.getNumberValidator)());sz.Factory.addGetterSetter(xc,"sides",0,(0,az.getNumberValidator)());var wS={};Object.defineProperty(wS,"__esModule",{value:!0});wS.Ring=void 0;const lz=nt,D2e=rr,uz=ke,$2e=rt;var ZO=Math.PI*2;class Cc extends D2e.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,ZO,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),ZO,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)}}wS.Ring=Cc;Cc.prototype.className="Ring";Cc.prototype._centroid=!0;Cc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,$2e._registerNode)(Cc);lz.Factory.addGetterSetter(Cc,"innerRadius",0,(0,uz.getNumberValidator)());lz.Factory.addGetterSetter(Cc,"outerRadius",0,(0,uz.getNumberValidator)());var xS={};Object.defineProperty(xS,"__esModule",{value:!0});xS.Sprite=void 0;const Tc=nt,F2e=rr,B2e=Gf,cz=ke,U2e=rt;class zs extends F2e.Shape{constructor(t){super(t),this._updated=!0,this.anim=new B2e.Animation(()=>{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],s=this.frameOffsets(),a=o[i+0],l=o[i+1],u=o[i+2],d=o[i+3],f=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,d),t.closePath(),t.fillStrokeShape(this)),f)if(s){var p=s[n],g=r*2;t.drawImage(f,a,l,u,d,p[g+0],p[g+1],u,d)}else t.drawImage(f,a,l,u,d,0,0,u,d)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],s=this.frameOffsets(),a=o[i+2],l=o[i+3];if(t.beginPath(),s){var u=s[n],d=r*2;t.rect(u[d+0],u[d+1],a,l)}else t.rect(0,0,a,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)}}xS.Sprite=zs;zs.prototype.className="Sprite";(0,U2e._registerNode)(zs);Tc.Factory.addGetterSetter(zs,"animation");Tc.Factory.addGetterSetter(zs,"animations");Tc.Factory.addGetterSetter(zs,"frameOffsets");Tc.Factory.addGetterSetter(zs,"image");Tc.Factory.addGetterSetter(zs,"frameIndex",0,(0,cz.getNumberValidator)());Tc.Factory.addGetterSetter(zs,"frameRate",17,(0,cz.getNumberValidator)());Tc.Factory.backCompat(zs,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var CS={};Object.defineProperty(CS,"__esModule",{value:!0});CS.Star=void 0;const CE=nt,z2e=rr,TE=ke,V2e=rt;class ou extends z2e.Shape{_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 s=o%2===0?r:n,a=s*Math.sin(o*Math.PI/i),l=-1*s*Math.cos(o*Math.PI/i);t.lineTo(a,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)}}CS.Star=ou;ou.prototype.className="Star";ou.prototype._centroid=!0;ou.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,V2e._registerNode)(ou);CE.Factory.addGetterSetter(ou,"numPoints",5,(0,TE.getNumberValidator)());CE.Factory.addGetterSetter(ou,"innerRadius",0,(0,TE.getNumberValidator)());CE.Factory.addGetterSetter(ou,"outerRadius",0,(0,TE.getNumberValidator)());var uc={};Object.defineProperty(uc,"__esModule",{value:!0});uc.Text=uc.stringToArray=void 0;const f5=Sn,di=nt,j2e=rr,su=ke,G2e=rt;function dz(e){return Array.from(e)}uc.stringToArray=dz;var gd="auto",H2e="center",Zh="justify",W2e="Change.konva",q2e="2d",JO="-",fz="left",K2e="text",X2e="Text",Y2e="top",Q2e="bottom",ek="middle",hz="normal",Z2e="px ",D0=" ",J2e="right",ewe="word",twe="char",tk="none",zx="…",pz=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],nwe=pz.length;function rwe(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 $0;function Vx(){return $0||($0=f5.Util.createCanvasElement().getContext(q2e),$0)}function iwe(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function owe(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function swe(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class Ln extends j2e.Shape{constructor(t){super(swe(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n<nwe;n++)this.on(pz[n]+W2e,this._setTextData);this._setTextData()}_sceneFunc(t){var n=this.textArr,r=n.length;if(this.text()){var i=this.padding(),o=this.fontSize(),s=this.lineHeight()*o,a=this.verticalAlign(),l=0,u=this.align(),d=this.getWidth(),f=this.letterSpacing(),p=this.fill(),g=this.textDecoration(),m=g.indexOf("underline")!==-1,v=g.indexOf("line-through")!==-1,x,_=0,_=s/2,b=0,y=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",ek),t.setAttr("textAlign",fz),a===ek?l=(this.getHeight()-r*s-i*2)/2:a===Q2e&&(l=this.getHeight()-r*s-i*2),t.translate(i,l+i),x=0;x<r;x++){var b=0,y=0,S=n[x],C=S.text,T=S.width,E=S.lastInParagraph,P,k,O;if(t.save(),u===J2e?b+=d-T-i*2:u===H2e&&(b+=(d-T-i*2)/2),m){t.save(),t.beginPath(),t.moveTo(b,_+y+Math.round(o/2)),P=C.split(" ").length-1,k=P===0,O=u===Zh&&!E?d-i*2:T,t.lineTo(b+Math.round(O),_+y+Math.round(o/2)),t.lineWidth=o/15;const F=this._getLinearGradient();t.strokeStyle=F||p,t.stroke(),t.restore()}if(v){t.save(),t.beginPath(),t.moveTo(b,_+y),P=C.split(" ").length-1,k=P===0,O=u===Zh&&E&&!k?d-i*2:T,t.lineTo(b+Math.round(O),_+y),t.lineWidth=o/15;const F=this._getLinearGradient();t.strokeStyle=F||p,t.stroke(),t.restore()}if(f!==0||u===Zh){P=C.split(" ").length-1;for(var M=dz(C),G=0;G<M.length;G++){var U=M[G];U===" "&&!E&&u===Zh&&(b+=(d-i*2-T)/P),this._partialTextX=b,this._partialTextY=_+y,this._partialText=U,t.fillStrokeShape(this),b+=this.measureSize(U).width+f}}else this._partialTextX=b,this._partialTextY=_+y,this._partialText=C,t.fillStrokeShape(this);t.restore(),r>1&&(_+=s)}}}_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=f5.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(K2e,n),this}getWidth(){var t=this.attrs.width===gd||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===gd||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 f5.Util.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=Vx(),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()+D0+this.fontVariant()+D0+(this.fontSize()+Z2e)+rwe(this.fontFamily())}_addTextLine(t){this.align()===Zh&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Vx().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,s=this.attrs.height,a=o!==gd&&o!==void 0,l=s!==gd&&s!==void 0,u=this.padding(),d=o-u*2,f=s-u*2,p=0,g=this.wrap(),m=g!==tk,v=g!==twe&&m,x=this.ellipsis();this.textArr=[],Vx().font=this._getContextFont();for(var _=x?this._getTextWidth(zx):0,b=0,y=t.length;b<y;++b){var S=t[b],C=this._getTextWidth(S);if(a&&C>d)for(;S.length>0;){for(var T=0,E=S.length,P="",k=0;T<E;){var O=T+E>>>1,M=S.slice(0,O+1),G=this._getTextWidth(M)+_;G<=d?(T=O+1,P=M,k=G):E=O}if(P){if(v){var U,A=S[P.length],N=A===D0||A===JO;N&&k<=d?U=P.length:U=Math.max(P.lastIndexOf(D0),P.lastIndexOf(JO))+1,U>0&&(T=U,P=P.slice(0,T),k=this._getTextWidth(P))}P=P.trimRight(),this._addTextLine(P),r=Math.max(r,k),p+=i;var F=this._shouldHandleEllipsis(p);if(F){this._tryToAddEllipsisToLastLine();break}if(S=S.slice(T),S=S.trimLeft(),S.length>0&&(C=this._getTextWidth(S),C<=d)){this._addTextLine(S),p+=i,r=Math.max(r,C);break}}else break}else this._addTextLine(S),p+=i,r=Math.max(r,C),this._shouldHandleEllipsis(p)&&b<y-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&p+i>f)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==gd&&i!==void 0,s=this.padding(),a=i-s*2,l=this.wrap(),u=l!==tk;return!u||o&&t+r>a}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==gd&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),s=this.textArr[this.textArr.length-1];if(!(!s||!o)){if(n){var a=this._getTextWidth(s.text+zx)<i;a||(s.text=s.text.slice(0,s.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(s.text+zx)}}getStrokeScaleEnabled(){return!0}}uc.Text=Ln;Ln.prototype._fillFunc=iwe;Ln.prototype._strokeFunc=owe;Ln.prototype.className=X2e;Ln.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];(0,G2e._registerNode)(Ln);di.Factory.overWriteSetter(Ln,"width",(0,su.getNumberOrAutoValidator)());di.Factory.overWriteSetter(Ln,"height",(0,su.getNumberOrAutoValidator)());di.Factory.addGetterSetter(Ln,"fontFamily","Arial");di.Factory.addGetterSetter(Ln,"fontSize",12,(0,su.getNumberValidator)());di.Factory.addGetterSetter(Ln,"fontStyle",hz);di.Factory.addGetterSetter(Ln,"fontVariant",hz);di.Factory.addGetterSetter(Ln,"padding",0,(0,su.getNumberValidator)());di.Factory.addGetterSetter(Ln,"align",fz);di.Factory.addGetterSetter(Ln,"verticalAlign",Y2e);di.Factory.addGetterSetter(Ln,"lineHeight",1,(0,su.getNumberValidator)());di.Factory.addGetterSetter(Ln,"wrap",ewe);di.Factory.addGetterSetter(Ln,"ellipsis",!1,(0,su.getBooleanValidator)());di.Factory.addGetterSetter(Ln,"letterSpacing",0,(0,su.getNumberValidator)());di.Factory.addGetterSetter(Ln,"text","",(0,su.getStringValidator)());di.Factory.addGetterSetter(Ln,"textDecoration","");var TS={};Object.defineProperty(TS,"__esModule",{value:!0});TS.TextPath=void 0;const jx=Sn,rs=nt,awe=rr,Jh=Hf,Gx=uc,gz=ke,lwe=rt;var uwe="",mz="normal";function yz(e){e.fillText(this.partialText,0,0)}function vz(e){e.strokeText(this.partialText,0,0)}class ir extends awe.Shape{constructor(t){super(t),this.dummyCanvas=jx.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return Jh.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const n=this.pathLength;return t-1>n?null:Jh.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=Jh.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_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 s=0;s<o.length;s++){t.save();var a=o[s].p0;t.translate(a.x,a.y),t.rotate(o[s].rotation),this.partialText=o[s].text,t.fillStrokeShape(this),n==="underline"&&(s===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 jx.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return Gx.Text.prototype.setText.call(this,t)}_getContextFont(){return Gx.Text.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.fontSize()}`,10)}}_setTextData(){const{width:t,height:n}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=n,this.glyphInfo=[],!this.attrs.data)return null;const r=this.letterSpacing(),i=this.align(),o=this.kerningFunc(),s=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0);let a=0;i==="center"&&(a=Math.max(0,this.pathLength/2-s/2)),i==="right"&&(a=Math.max(0,this.pathLength-s));const l=(0,Gx.stringToArray)(this.text());let u=a;for(var d=0;d<l.length;d++){const f=this._getPointAtLength(u);if(!f)return;let p=this._getTextSize(l[d]).width+r;if(l[d]===" "&&i==="justify"){const b=this.text().split(" ").length-1;p+=(this.pathLength-s)/b}const g=this._getPointAtLength(u+p);if(!g)return;const m=Jh.Path.getLineLength(f.x,f.y,g.x,g.y);let v=0;if(o)try{v=o(l[d-1],l[d])*this.fontSize()}catch{v=0}f.x+=v,g.x+=v,this.textWidth+=v;const x=Jh.Path.getPointOnLine(v+m/2,f.x,f.y,g.x,g.y),_=Math.atan2(g.y-f.y,g.x-f.x);this.glyphInfo.push({transposeX:x.x,transposeY:x.y,text:l[d],rotation:_,p0:f,p1:g}),u+=p}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(d){t.push(d.p0.x),t.push(d.p0.y),t.push(d.p1.x),t.push(d.p1.y)});for(var n=t[0]||0,r=t[0]||0,i=t[1]||0,o=t[1]||0,s,a,l=0;l<t.length/2;l++)s=t[l*2],a=t[l*2+1],n=Math.min(n,s),r=Math.max(r,s),i=Math.min(i,a),o=Math.max(o,a);var u=this.fontSize();return{x:n-u/2,y:i-u/2,width:r-n+u,height:o-i+u}}destroy(){return jx.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}TS.TextPath=ir;ir.prototype._fillFunc=yz;ir.prototype._strokeFunc=vz;ir.prototype._fillFuncHit=yz;ir.prototype._strokeFuncHit=vz;ir.prototype.className="TextPath";ir.prototype._attrsAffectingSize=["text","fontSize","data"];(0,lwe._registerNode)(ir);rs.Factory.addGetterSetter(ir,"data");rs.Factory.addGetterSetter(ir,"fontFamily","Arial");rs.Factory.addGetterSetter(ir,"fontSize",12,(0,gz.getNumberValidator)());rs.Factory.addGetterSetter(ir,"fontStyle",mz);rs.Factory.addGetterSetter(ir,"align","left");rs.Factory.addGetterSetter(ir,"letterSpacing",0,(0,gz.getNumberValidator)());rs.Factory.addGetterSetter(ir,"textBaseline","middle");rs.Factory.addGetterSetter(ir,"fontVariant",mz);rs.Factory.addGetterSetter(ir,"text",uwe);rs.Factory.addGetterSetter(ir,"textDecoration",null);rs.Factory.addGetterSetter(ir,"kerningFunc",null);var ES={};Object.defineProperty(ES,"__esModule",{value:!0});ES.Transformer=void 0;const zt=Sn,Ft=nt,nk=fn,cwe=rr,dwe=km,rk=jf,Do=rt,au=ke,fwe=rt;var _z="tr-konva",hwe=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(e=>e+`.${_z}`).join(" "),ik="nodesRect",pwe=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],gwe={"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 mwe="ontouchstart"in Do.Konva._global;function ywe(e,t){if(e==="rotater")return"crosshair";t+=zt.Util.degToRad(gwe[e]||0);var n=(zt.Util.radToDeg(t)%360+360)%360;return zt.Util._inRange(n,315+22.5,360)||zt.Util._inRange(n,0,22.5)?"ns-resize":zt.Util._inRange(n,45-22.5,45+22.5)?"nesw-resize":zt.Util._inRange(n,90-22.5,90+22.5)?"ew-resize":zt.Util._inRange(n,135-22.5,135+22.5)?"nwse-resize":zt.Util._inRange(n,180-22.5,180+22.5)?"ns-resize":zt.Util._inRange(n,225-22.5,225+22.5)?"nesw-resize":zt.Util._inRange(n,270-22.5,270+22.5)?"ew-resize":zt.Util._inRange(n,315-22.5,315+22.5)?"nwse-resize":(zt.Util.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var e_=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],ok=1e8;function vwe(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 bz(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 _we(e,t){const n=vwe(e);return bz(e,t,n)}function bwe(e,t,n){let r=t;for(let i=0;i<e.length;i++){const o=Do.Konva.getAngle(e[i]),s=Math.abs(o-t)%(Math.PI*2);Math.min(s,Math.PI*2-s)<n&&(r=o)}return r}class xt extends rk.Group{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(hwe,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return zt.Util.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 _z+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const n=t.filter(i=>i.isAncestorOf(this)?(zt.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=n,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const o=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},s=i._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");i.on(s,o),i.on(pwe.map(a=>a+`.${this._getEventNamespace()}`).join(" "),o),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,o),this._proxyDrag(i)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&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,s=i.y-n.y;this.nodes().forEach(a=>{if(a===t||a.isDragging())return;const l=a.getAbsolutePosition();a.setAbsolutePosition({x:l.x+o,y:l.y+s}),a.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(ik),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(ik,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),s=t.getAbsolutePosition(r),a=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(Do.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),d={x:s.x+a*Math.cos(u)+l*Math.sin(-u),y:s.y+l*Math.cos(u)+a*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return bz(d,-Do.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-ok,y:-ok,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const d=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var f=[{x:d.x,y:d.y},{x:d.x+d.width,y:d.y},{x:d.x+d.width,y:d.y+d.height},{x:d.x,y:d.y+d.height}],p=u.getAbsoluteTransform();f.forEach(function(g){var m=p.point(g);n.push(m)})});const r=new zt.Transform;r.rotate(-Do.Konva.getAngle(this.rotation()));var i,o,s,a;n.forEach(function(u){var d=r.point(u);i===void 0&&(i=s=d.x,o=a=d.y),i=Math.min(i,d.x),o=Math.min(o,d.y),s=Math.max(s,d.x),a=Math.max(a,d.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:s-i,height:a-o,rotation:Do.Konva.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(),e_.forEach((function(t){this._createAnchor(t)}).bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new dwe.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:mwe?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=Do.Konva.getAngle(this.rotation()),o=ywe(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 cwe.Shape({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()*zt.Util._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 s=t.target.getAbsolutePosition(),a=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-s.x,y:a.y-s.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),s=o.getStage();s.setPointersPositions(t);const a=s.getPointerPosition();let l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const d=o.getAbsolutePosition();if(!(u.x===d.x&&u.y===d.y)){if(this._movingAnchorName==="rotater"){var f=this._getNodeRect();n=o.x()-f.width/2,r=-o.y()+f.height/2;let U=Math.atan2(-r,n)+Math.PI/2;f.height<0&&(U-=Math.PI);var p=Do.Konva.getAngle(this.rotation());const A=p+U,N=Do.Konva.getAngle(this.rotationSnapTolerance()),B=bwe(this.rotationSnaps(),A,N)-f.rotation,D=_we(f,B);this._fitNodesInto(D,t);return}var g=this.shiftBehavior(),m;g==="inverted"?m=this.keepRatio()&&!t.shiftKey:g==="none"?m=this.keepRatio():m=this.keepRatio()||t.shiftKey;var y=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(m){var v=y?{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(v.x-o.x(),2)+Math.pow(v.y-o.y(),2));var x=this.findOne(".top-left").x()>v.x?-1:1,_=this.findOne(".top-left").y()>v.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,this.findOne(".top-left").x(v.x-n),this.findOne(".top-left").y(v.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(m){var v=y?{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()-v.x,2)+Math.pow(v.y-o.y(),2));var x=this.findOne(".top-right").x()<v.x?-1:1,_=this.findOne(".top-right").y()>v.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,this.findOne(".top-right").x(v.x+n),this.findOne(".top-right").y(v.y-r)}var b=o.position();this.findOne(".top-left").y(b.y),this.findOne(".bottom-right").x(b.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(m){var v=y?{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(v.x-o.x(),2)+Math.pow(o.y()-v.y,2));var x=v.x<o.x()?-1:1,_=o.y()<v.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,o.x(v.x-n),o.y(v.y+r)}b=o.position(),this.findOne(".top-left").x(b.x),this.findOne(".bottom-right").y(b.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(m){var v=y?{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()-v.x,2)+Math.pow(o.y()-v.y,2));var x=this.findOne(".bottom-right").x()<v.x?-1:1,_=this.findOne(".bottom-right").y()<v.y?-1:1;n=i*this.cos*x,r=i*this.sin*_,this.findOne(".bottom-right").x(v.x+n),this.findOne(".bottom-right").y(v.y+r)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var y=this.centeredScaling()||t.altKey;if(y){var S=this.findOne(".top-left"),C=this.findOne(".bottom-right"),T=S.x(),E=S.y(),P=this.getWidth()-C.x(),k=this.getHeight()-C.y();C.move({x:-T,y:-E}),S.move({x:P,y:k})}var O=this.findOne(".top-left").getAbsolutePosition();n=O.x,r=O.y;var M=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),G=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:n,y:r,width:M,height:G,rotation:Do.Konva.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(zt.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(zt.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var s=new zt.Transform;if(s.rotate(Do.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const f=s.point({x:-this.padding()*2,y:0});if(t.x+=f.x,t.y+=f.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const f=s.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const f=s.point({x:0,y:-this.padding()*2});if(t.x+=f.x,t.y+=f.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const f=s.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=f.x,this._anchorDragOffset.y-=f.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const f=this.boundBoxFunc()(r,t);f?t=f:zt.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,l=new zt.Transform;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/a,r.height/a);const u=new zt.Transform;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/a,t.height/a);const d=u.multiply(l.invert());this._nodes.forEach(f=>{var p;const g=f.getParent().getAbsoluteTransform(),m=f.getTransform().copy();m.translate(f.offsetX(),f.offsetY());const v=new zt.Transform;v.multiply(g.copy().invert()).multiply(d).multiply(g).multiply(m);const x=v.decompose();f.setAttrs(x),this._fire("transform",{evt:n,target:f}),f._fire("transform",{evt:n,target:f}),(p=f.getLayer())===null||p===void 0||p.batchDraw()}),this.rotation(zt.Util._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(zt.Util._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),s=this.resizeEnabled(),a=this.padding(),l=this.anchorSize();const u=this.find("._anchor");u.forEach(f=>{f.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+a,offsetY:l/2+a,visible:s&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+a,visible:s&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-a,offsetY:l/2+a,visible:s&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+a,visible:s&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-a,visible:s&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+a,offsetY:l/2-a,visible:s&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-a,visible:s&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-a,offsetY:l/2-a,visible:s&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*zt.Util._sign(i)-a,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});const d=this.anchorStyleFunc();d&&u.forEach(f=>{d(f)}),(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=""),rk.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return nk.Node.prototype.toObject.call(this)}clone(t){var n=nk.Node.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}ES.Transformer=xt;function Swe(e){return e instanceof Array||zt.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){e_.indexOf(t)===-1&&zt.Util.warn("Unknown anchor name: "+t+". Available names are: "+e_.join(", "))}),e||[]}xt.prototype.className="Transformer";(0,fwe._registerNode)(xt);Ft.Factory.addGetterSetter(xt,"enabledAnchors",e_,Swe);Ft.Factory.addGetterSetter(xt,"flipEnabled",!0,(0,au.getBooleanValidator)());Ft.Factory.addGetterSetter(xt,"resizeEnabled",!0);Ft.Factory.addGetterSetter(xt,"anchorSize",10,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"rotateEnabled",!0);Ft.Factory.addGetterSetter(xt,"rotationSnaps",[]);Ft.Factory.addGetterSetter(xt,"rotateAnchorOffset",50,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"rotationSnapTolerance",5,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"borderEnabled",!0);Ft.Factory.addGetterSetter(xt,"anchorStroke","rgb(0, 161, 255)");Ft.Factory.addGetterSetter(xt,"anchorStrokeWidth",1,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"anchorFill","white");Ft.Factory.addGetterSetter(xt,"anchorCornerRadius",0,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"borderStroke","rgb(0, 161, 255)");Ft.Factory.addGetterSetter(xt,"borderStrokeWidth",1,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"borderDash");Ft.Factory.addGetterSetter(xt,"keepRatio",!0);Ft.Factory.addGetterSetter(xt,"shiftBehavior","default");Ft.Factory.addGetterSetter(xt,"centeredScaling",!1);Ft.Factory.addGetterSetter(xt,"ignoreStroke",!1);Ft.Factory.addGetterSetter(xt,"padding",0,(0,au.getNumberValidator)());Ft.Factory.addGetterSetter(xt,"node");Ft.Factory.addGetterSetter(xt,"nodes");Ft.Factory.addGetterSetter(xt,"boundBoxFunc");Ft.Factory.addGetterSetter(xt,"anchorDragBoundFunc");Ft.Factory.addGetterSetter(xt,"anchorStyleFunc");Ft.Factory.addGetterSetter(xt,"shouldOverdrawWholeArea",!1);Ft.Factory.addGetterSetter(xt,"useSingleNodeRotation",!0);Ft.Factory.backCompat(xt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var AS={};Object.defineProperty(AS,"__esModule",{value:!0});AS.Wedge=void 0;const PS=nt,wwe=rr,xwe=rt,Sz=ke,Cwe=rt;class Ua extends wwe.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,xwe.Konva.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)}}AS.Wedge=Ua;Ua.prototype.className="Wedge";Ua.prototype._centroid=!0;Ua.prototype._attrsAffectingSize=["radius"];(0,Cwe._registerNode)(Ua);PS.Factory.addGetterSetter(Ua,"radius",0,(0,Sz.getNumberValidator)());PS.Factory.addGetterSetter(Ua,"angle",0,(0,Sz.getNumberValidator)());PS.Factory.addGetterSetter(Ua,"clockwise",!1);PS.Factory.backCompat(Ua,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var RS={};Object.defineProperty(RS,"__esModule",{value:!0});RS.Blur=void 0;const sk=nt,Twe=fn,Ewe=ke;function ak(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var Awe=[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],Pwe=[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 Rwe(e,t){var n=e.data,r=e.width,i=e.height,o,s,a,l,u,d,f,p,g,m,v,x,_,b,y,S,C,T,E,P,k,O,M,G,U=t+t+1,A=r-1,N=i-1,F=t+1,B=F*(F+1)/2,D=new ak,V=null,j=D,q=null,Z=null,ee=Awe[t],ie=Pwe[t];for(a=1;a<U;a++)j=j.next=new ak,a===F&&(V=j);for(j.next=D,f=d=0,s=0;s<i;s++){for(S=C=T=E=p=g=m=v=0,x=F*(P=n[d]),_=F*(k=n[d+1]),b=F*(O=n[d+2]),y=F*(M=n[d+3]),p+=B*P,g+=B*k,m+=B*O,v+=B*M,j=D,a=0;a<F;a++)j.r=P,j.g=k,j.b=O,j.a=M,j=j.next;for(a=1;a<F;a++)l=d+((A<a?A:a)<<2),p+=(j.r=P=n[l])*(G=F-a),g+=(j.g=k=n[l+1])*G,m+=(j.b=O=n[l+2])*G,v+=(j.a=M=n[l+3])*G,S+=P,C+=k,T+=O,E+=M,j=j.next;for(q=D,Z=V,o=0;o<r;o++)n[d+3]=M=v*ee>>ie,M!==0?(M=255/M,n[d]=(p*ee>>ie)*M,n[d+1]=(g*ee>>ie)*M,n[d+2]=(m*ee>>ie)*M):n[d]=n[d+1]=n[d+2]=0,p-=x,g-=_,m-=b,v-=y,x-=q.r,_-=q.g,b-=q.b,y-=q.a,l=f+((l=o+t+1)<A?l:A)<<2,S+=q.r=n[l],C+=q.g=n[l+1],T+=q.b=n[l+2],E+=q.a=n[l+3],p+=S,g+=C,m+=T,v+=E,q=q.next,x+=P=Z.r,_+=k=Z.g,b+=O=Z.b,y+=M=Z.a,S-=P,C-=k,T-=O,E-=M,Z=Z.next,d+=4;f+=r}for(o=0;o<r;o++){for(C=T=E=S=g=m=v=p=0,d=o<<2,x=F*(P=n[d]),_=F*(k=n[d+1]),b=F*(O=n[d+2]),y=F*(M=n[d+3]),p+=B*P,g+=B*k,m+=B*O,v+=B*M,j=D,a=0;a<F;a++)j.r=P,j.g=k,j.b=O,j.a=M,j=j.next;for(u=r,a=1;a<=t;a++)d=u+o<<2,p+=(j.r=P=n[d])*(G=F-a),g+=(j.g=k=n[d+1])*G,m+=(j.b=O=n[d+2])*G,v+=(j.a=M=n[d+3])*G,S+=P,C+=k,T+=O,E+=M,j=j.next,a<N&&(u+=r);for(d=o,q=D,Z=V,s=0;s<i;s++)l=d<<2,n[l+3]=M=v*ee>>ie,M>0?(M=255/M,n[l]=(p*ee>>ie)*M,n[l+1]=(g*ee>>ie)*M,n[l+2]=(m*ee>>ie)*M):n[l]=n[l+1]=n[l+2]=0,p-=x,g-=_,m-=b,v-=y,x-=q.r,_-=q.g,b-=q.b,y-=q.a,l=o+((l=s+F)<N?l:N)*r<<2,p+=S+=q.r=n[l],g+=C+=q.g=n[l+1],m+=T+=q.b=n[l+2],v+=E+=q.a=n[l+3],q=q.next,x+=P=Z.r,_+=k=Z.g,b+=O=Z.b,y+=M=Z.a,S-=P,C-=k,T-=O,E-=M,Z=Z.next,d+=r}}const Owe=function(t){var n=Math.round(this.blurRadius());n>0&&Rwe(t,n)};RS.Blur=Owe;sk.Factory.addGetterSetter(Twe.Node,"blurRadius",0,(0,Ewe.getNumberValidator)(),sk.Factory.afterSetFilter);var OS={};Object.defineProperty(OS,"__esModule",{value:!0});OS.Brighten=void 0;const lk=nt,kwe=fn,Iwe=ke,Mwe=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};OS.Brighten=Mwe;lk.Factory.addGetterSetter(kwe.Node,"brightness",0,(0,Iwe.getNumberValidator)(),lk.Factory.afterSetFilter);var kS={};Object.defineProperty(kS,"__esModule",{value:!0});kS.Contrast=void 0;const uk=nt,Nwe=fn,Lwe=ke,Dwe=function(e){var t=Math.pow((this.contrast()+100)/100,2),n=e.data,r=n.length,i=150,o=150,s=150,a;for(a=0;a<r;a+=4)i=n[a],o=n[a+1],s=n[a+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,s/=255,s-=.5,s*=t,s+=.5,s*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,s=s<0?0:s>255?255:s,n[a]=i,n[a+1]=o,n[a+2]=s};kS.Contrast=Dwe;uk.Factory.addGetterSetter(Nwe.Node,"contrast",0,(0,Lwe.getNumberValidator)(),uk.Factory.afterSetFilter);var IS={};Object.defineProperty(IS,"__esModule",{value:!0});IS.Emboss=void 0;const Wl=nt,MS=fn,$we=Sn,wz=ke,Fwe=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,s=0,a=e.data,l=e.width,u=e.height,d=l*4,f=u;switch(r){case"top-left":o=-1,s=-1;break;case"top":o=-1,s=0;break;case"top-right":o=-1,s=1;break;case"right":o=0,s=1;break;case"bottom-right":o=1,s=1;break;case"bottom":o=1,s=0;break;case"bottom-left":o=1,s=-1;break;case"left":o=0,s=-1;break;default:$we.Util.error("Unknown emboss direction: "+r)}do{var p=(f-1)*d,g=o;f+g<1&&(g=0),f+g>u&&(g=0);var m=(f-1+g)*l*4,v=l;do{var x=p+(v-1)*4,_=s;v+_<1&&(_=0),v+_>l&&(_=0);var b=m+(v-1+_)*4,y=a[x]-a[b],S=a[x+1]-a[b+1],C=a[x+2]-a[b+2],T=y,E=T>0?T:-T,P=S>0?S:-S,k=C>0?C:-C;if(P>E&&(T=S),k>E&&(T=C),T*=t,i){var O=a[x]+T,M=a[x+1]+T,G=a[x+2]+T;a[x]=O>255?255:O<0?0:O,a[x+1]=M>255?255:M<0?0:M,a[x+2]=G>255?255:G<0?0:G}else{var U=n-T;U<0?U=0:U>255&&(U=255),a[x]=a[x+1]=a[x+2]=U}}while(--v)}while(--f)};IS.Emboss=Fwe;Wl.Factory.addGetterSetter(MS.Node,"embossStrength",.5,(0,wz.getNumberValidator)(),Wl.Factory.afterSetFilter);Wl.Factory.addGetterSetter(MS.Node,"embossWhiteLevel",.5,(0,wz.getNumberValidator)(),Wl.Factory.afterSetFilter);Wl.Factory.addGetterSetter(MS.Node,"embossDirection","top-left",null,Wl.Factory.afterSetFilter);Wl.Factory.addGetterSetter(MS.Node,"embossBlend",!1,null,Wl.Factory.afterSetFilter);var NS={};Object.defineProperty(NS,"__esModule",{value:!0});NS.Enhance=void 0;const ck=nt,Bwe=fn,Uwe=ke;function Hx(e,t,n,r,i){var o=n-t,s=i-r,a;return o===0?r+s/2:s===0?r:(a=(e-t)/o,a=s*a+r,a)}const zwe=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,s=t[1],a=s,l,u=t[2],d=u,f,p,g=this.enhance();if(g!==0){for(p=0;p<n;p+=4)o=t[p+0],o<r?r=o:o>i&&(i=o),l=t[p+1],l<s?s=l:l>a&&(a=l),f=t[p+2],f<u?u=f:f>d&&(d=f);i===r&&(i=255,r=0),a===s&&(a=255,s=0),d===u&&(d=255,u=0);var m,v,x,_,b,y,S,C,T;for(g>0?(v=i+g*(255-i),x=r-g*(r-0),b=a+g*(255-a),y=s-g*(s-0),C=d+g*(255-d),T=u-g*(u-0)):(m=(i+r)*.5,v=i+g*(i-m),x=r+g*(r-m),_=(a+s)*.5,b=a+g*(a-_),y=s+g*(s-_),S=(d+u)*.5,C=d+g*(d-S),T=u+g*(u-S)),p=0;p<n;p+=4)t[p+0]=Hx(t[p+0],r,i,x,v),t[p+1]=Hx(t[p+1],s,a,y,b),t[p+2]=Hx(t[p+2],u,d,T,C)}};NS.Enhance=zwe;ck.Factory.addGetterSetter(Bwe.Node,"enhance",0,(0,Uwe.getNumberValidator)(),ck.Factory.afterSetFilter);var LS={};Object.defineProperty(LS,"__esModule",{value:!0});LS.Grayscale=void 0;const Vwe=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};LS.Grayscale=Vwe;var DS={};Object.defineProperty(DS,"__esModule",{value:!0});DS.HSL=void 0;const Of=nt,EE=fn,AE=ke;Of.Factory.addGetterSetter(EE.Node,"hue",0,(0,AE.getNumberValidator)(),Of.Factory.afterSetFilter);Of.Factory.addGetterSetter(EE.Node,"saturation",0,(0,AE.getNumberValidator)(),Of.Factory.afterSetFilter);Of.Factory.addGetterSetter(EE.Node,"luminance",0,(0,AE.getNumberValidator)(),Of.Factory.afterSetFilter);const jwe=function(e){var t=e.data,n=t.length,r=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,s=this.luminance()*127,a,l=r*i*Math.cos(o*Math.PI/180),u=r*i*Math.sin(o*Math.PI/180),d=.299*r+.701*l+.167*u,f=.587*r-.587*l+.33*u,p=.114*r-.114*l-.497*u,g=.299*r-.299*l-.328*u,m=.587*r+.413*l+.035*u,v=.114*r-.114*l+.293*u,x=.299*r-.3*l+1.25*u,_=.587*r-.586*l-1.05*u,b=.114*r+.886*l-.2*u,y,S,C,T;for(a=0;a<n;a+=4)y=t[a+0],S=t[a+1],C=t[a+2],T=t[a+3],t[a+0]=d*y+f*S+p*C+s,t[a+1]=g*y+m*S+v*C+s,t[a+2]=x*y+_*S+b*C+s,t[a+3]=T};DS.HSL=jwe;var $S={};Object.defineProperty($S,"__esModule",{value:!0});$S.HSV=void 0;const kf=nt,PE=fn,RE=ke,Gwe=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,s,a=r*i*Math.cos(o*Math.PI/180),l=r*i*Math.sin(o*Math.PI/180),u=.299*r+.701*a+.167*l,d=.587*r-.587*a+.33*l,f=.114*r-.114*a-.497*l,p=.299*r-.299*a-.328*l,g=.587*r+.413*a+.035*l,m=.114*r-.114*a+.293*l,v=.299*r-.3*a+1.25*l,x=.587*r-.586*a-1.05*l,_=.114*r+.886*a-.2*l,b,y,S,C;for(s=0;s<n;s+=4)b=t[s+0],y=t[s+1],S=t[s+2],C=t[s+3],t[s+0]=u*b+d*y+f*S,t[s+1]=p*b+g*y+m*S,t[s+2]=v*b+x*y+_*S,t[s+3]=C};$S.HSV=Gwe;kf.Factory.addGetterSetter(PE.Node,"hue",0,(0,RE.getNumberValidator)(),kf.Factory.afterSetFilter);kf.Factory.addGetterSetter(PE.Node,"saturation",0,(0,RE.getNumberValidator)(),kf.Factory.afterSetFilter);kf.Factory.addGetterSetter(PE.Node,"value",0,(0,RE.getNumberValidator)(),kf.Factory.afterSetFilter);var FS={};Object.defineProperty(FS,"__esModule",{value:!0});FS.Invert=void 0;const Hwe=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]};FS.Invert=Hwe;var BS={};Object.defineProperty(BS,"__esModule",{value:!0});BS.Kaleidoscope=void 0;const t_=nt,xz=fn,dk=Sn,Cz=ke;var Wwe=function(e,t,n){var r=e.data,i=t.data,o=e.width,s=e.height,a=n.polarCenterX||o/2,l=n.polarCenterY||s/2,u,d,f,p=0,g=0,m=0,v=0,x,_=Math.sqrt(a*a+l*l);d=o-a,f=s-l,x=Math.sqrt(d*d+f*f),_=x>_?x:_;var b=s,y=o,S,C,T=360/y*Math.PI/180,E,P;for(C=0;C<y;C+=1)for(E=Math.sin(C*T),P=Math.cos(C*T),S=0;S<b;S+=1)d=Math.floor(a+_*S/b*P),f=Math.floor(l+_*S/b*E),u=(f*o+d)*4,p=r[u+0],g=r[u+1],m=r[u+2],v=r[u+3],u=(C+S*o)*4,i[u+0]=p,i[u+1]=g,i[u+2]=m,i[u+3]=v},qwe=function(e,t,n){var r=e.data,i=t.data,o=e.width,s=e.height,a=n.polarCenterX||o/2,l=n.polarCenterY||s/2,u,d,f,p,g,m=0,v=0,x=0,_=0,b,y=Math.sqrt(a*a+l*l);d=o-a,f=s-l,b=Math.sqrt(d*d+f*f),y=b>y?b:y;var S=s,C=o,T,E,P=n.polarRotation||0,k,O;for(d=0;d<o;d+=1)for(f=0;f<s;f+=1)p=d-a,g=f-l,T=Math.sqrt(p*p+g*g)*S/y,E=(Math.atan2(g,p)*180/Math.PI+360+P)%360,E=E*C/360,k=Math.floor(E),O=Math.floor(T),u=(O*o+k)*4,m=r[u+0],v=r[u+1],x=r[u+2],_=r[u+3],u=(f*o+d)*4,i[u+0]=m,i[u+1]=v,i[u+2]=x,i[u+3]=_};const Kwe=function(e){var t=e.width,n=e.height,r,i,o,s,a,l,u,d,f,p,g=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),v=Math.floor(t*(m%360)/360);if(!(g<1)){var x=dk.Util.createCanvasElement();x.width=t,x.height=n;var _=x.getContext("2d").getImageData(0,0,t,n);dk.Util.releaseCanvas(x),Wwe(e,_,{polarCenterX:t/2,polarCenterY:n/2});for(var b=t/Math.pow(2,g);b<=8;)b=b*2,g-=1;b=Math.ceil(b);var y=b,S=0,C=y,T=1;for(v+b>t&&(S=y,C=0,T=-1),i=0;i<n;i+=1)for(r=S;r!==C;r+=T)o=Math.round(r+v)%t,f=(t*i+o)*4,a=_.data[f+0],l=_.data[f+1],u=_.data[f+2],d=_.data[f+3],p=(t*i+r)*4,_.data[p+0]=a,_.data[p+1]=l,_.data[p+2]=u,_.data[p+3]=d;for(i=0;i<n;i+=1)for(y=Math.floor(b),s=0;s<g;s+=1){for(r=0;r<y+1;r+=1)f=(t*i+r)*4,a=_.data[f+0],l=_.data[f+1],u=_.data[f+2],d=_.data[f+3],p=(t*i+y*2-r-1)*4,_.data[p+0]=a,_.data[p+1]=l,_.data[p+2]=u,_.data[p+3]=d;y*=2}qwe(_,e,{polarRotation:0})}};BS.Kaleidoscope=Kwe;t_.Factory.addGetterSetter(xz.Node,"kaleidoscopePower",2,(0,Cz.getNumberValidator)(),t_.Factory.afterSetFilter);t_.Factory.addGetterSetter(xz.Node,"kaleidoscopeAngle",0,(0,Cz.getNumberValidator)(),t_.Factory.afterSetFilter);var US={};Object.defineProperty(US,"__esModule",{value:!0});US.Mask=void 0;const fk=nt,Xwe=fn,Ywe=ke;function F0(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 ep(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 Qwe(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 Zwe(e,t){var n=F0(e,0,0),r=F0(e,e.width-1,0),i=F0(e,0,e.height-1),o=F0(e,e.width-1,e.height-1),s=t||10;if(ep(n,r)<s&&ep(r,o)<s&&ep(o,i)<s&&ep(i,n)<s){for(var a=Qwe([r,n,o,i]),l=[],u=0;u<e.width*e.height;u++){var d=ep(a,[e.data[u*4],e.data[u*4+1],e.data[u*4+2]]);l[u]=d<s?0:255}return l}}function Jwe(e,t){for(var n=0;n<e.width*e.height;n++)e.data[4*n+3]=t[n]}function exe(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),s=[],a=0;a<n;a++)for(var l=0;l<t;l++){for(var u=a*t+l,d=0,f=0;f<i;f++)for(var p=0;p<i;p++){var g=a+f-o,m=l+p-o;if(g>=0&&g<n&&m>=0&&m<t){var v=g*t+m,x=r[f*i+p];d+=e[v]*x}}s[u]=d===255*8?255:0}return s}function txe(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),s=[],a=0;a<n;a++)for(var l=0;l<t;l++){for(var u=a*t+l,d=0,f=0;f<i;f++)for(var p=0;p<i;p++){var g=a+f-o,m=l+p-o;if(g>=0&&g<n&&m>=0&&m<t){var v=g*t+m,x=r[f*i+p];d+=e[v]*x}}s[u]=d>=255*4?255:0}return s}function nxe(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),s=[],a=0;a<n;a++)for(var l=0;l<t;l++){for(var u=a*t+l,d=0,f=0;f<i;f++)for(var p=0;p<i;p++){var g=a+f-o,m=l+p-o;if(g>=0&&g<n&&m>=0&&m<t){var v=g*t+m,x=r[f*i+p];d+=e[v]*x}}s[u]=d}return s}const rxe=function(e){var t=this.threshold(),n=Zwe(e,t);return n&&(n=exe(n,e.width,e.height),n=txe(n,e.width,e.height),n=nxe(n,e.width,e.height),Jwe(e,n)),e};US.Mask=rxe;fk.Factory.addGetterSetter(Xwe.Node,"threshold",0,(0,Ywe.getNumberValidator)(),fk.Factory.afterSetFilter);var zS={};Object.defineProperty(zS,"__esModule",{value:!0});zS.Noise=void 0;const hk=nt,ixe=fn,oxe=ke,sxe=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()};zS.Noise=sxe;hk.Factory.addGetterSetter(ixe.Node,"noise",.2,(0,oxe.getNumberValidator)(),hk.Factory.afterSetFilter);var VS={};Object.defineProperty(VS,"__esModule",{value:!0});VS.Pixelate=void 0;const pk=nt,axe=Sn,lxe=fn,uxe=ke,cxe=function(e){var t=Math.ceil(this.pixelSize()),n=e.width,r=e.height,i,o,s,a,l,u,d,f=Math.ceil(n/t),p=Math.ceil(r/t),g,m,v,x,_,b,y,S=e.data;if(t<=0){axe.Util.error("pixelSize value can not be <= 0");return}for(_=0;_<f;_+=1)for(b=0;b<p;b+=1){for(a=0,l=0,u=0,d=0,g=_*t,m=g+t,v=b*t,x=v+t,y=0,i=g;i<m;i+=1)if(!(i>=n))for(o=v;o<x;o+=1)o>=r||(s=(n*o+i)*4,a+=S[s+0],l+=S[s+1],u+=S[s+2],d+=S[s+3],y+=1);for(a=a/y,l=l/y,u=u/y,d=d/y,i=g;i<m;i+=1)if(!(i>=n))for(o=v;o<x;o+=1)o>=r||(s=(n*o+i)*4,S[s+0]=a,S[s+1]=l,S[s+2]=u,S[s+3]=d)}};VS.Pixelate=cxe;pk.Factory.addGetterSetter(lxe.Node,"pixelSize",8,(0,uxe.getNumberValidator)(),pk.Factory.afterSetFilter);var jS={};Object.defineProperty(jS,"__esModule",{value:!0});jS.Posterize=void 0;const gk=nt,dxe=fn,fxe=ke,hxe=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};jS.Posterize=hxe;gk.Factory.addGetterSetter(dxe.Node,"levels",.5,(0,fxe.getNumberValidator)(),gk.Factory.afterSetFilter);var GS={};Object.defineProperty(GS,"__esModule",{value:!0});GS.RGB=void 0;const n_=nt,OE=fn,pxe=ke,gxe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),s,a;for(s=0;s<n;s+=4)a=(.34*t[s]+.5*t[s+1]+.16*t[s+2])/255,t[s]=a*r,t[s+1]=a*i,t[s+2]=a*o,t[s+3]=t[s+3]};GS.RGB=gxe;n_.Factory.addGetterSetter(OE.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});n_.Factory.addGetterSetter(OE.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});n_.Factory.addGetterSetter(OE.Node,"blue",0,pxe.RGBComponent,n_.Factory.afterSetFilter);var HS={};Object.defineProperty(HS,"__esModule",{value:!0});HS.RGBA=void 0;const Dg=nt,WS=fn,mxe=ke,yxe=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),s=this.alpha(),a,l;for(a=0;a<n;a+=4)l=1-s,t[a]=r*s+t[a]*l,t[a+1]=i*s+t[a+1]*l,t[a+2]=o*s+t[a+2]*l};HS.RGBA=yxe;Dg.Factory.addGetterSetter(WS.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Dg.Factory.addGetterSetter(WS.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Dg.Factory.addGetterSetter(WS.Node,"blue",0,mxe.RGBComponent,Dg.Factory.afterSetFilter);Dg.Factory.addGetterSetter(WS.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var qS={};Object.defineProperty(qS,"__esModule",{value:!0});qS.Sepia=void 0;const vxe=function(e){var t=e.data,n=t.length,r,i,o,s;for(r=0;r<n;r+=4)i=t[r+0],o=t[r+1],s=t[r+2],t[r+0]=Math.min(255,i*.393+o*.769+s*.189),t[r+1]=Math.min(255,i*.349+o*.686+s*.168),t[r+2]=Math.min(255,i*.272+o*.534+s*.131)};qS.Sepia=vxe;var KS={};Object.defineProperty(KS,"__esModule",{value:!0});KS.Solarize=void 0;const _xe=function(e){var t=e.data,n=e.width,r=e.height,i=n*4,o=r;do{var s=(o-1)*i,a=n;do{var l=s+(a-1)*4,u=t[l],d=t[l+1],f=t[l+2];u>127&&(u=255-u),d>127&&(d=255-d),f>127&&(f=255-f),t[l]=u,t[l+1]=d,t[l+2]=f}while(--a)}while(--o)};KS.Solarize=_xe;var XS={};Object.defineProperty(XS,"__esModule",{value:!0});XS.Threshold=void 0;const mk=nt,bxe=fn,Sxe=ke,wxe=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};XS.Threshold=wxe;mk.Factory.addGetterSetter(bxe.Node,"threshold",.5,(0,Sxe.getNumberValidator)(),mk.Factory.afterSetFilter);Object.defineProperty(iS,"__esModule",{value:!0});iS.Konva=void 0;const yk=GU,xxe=cS,Cxe=hS,Txe=mS,Exe=yS,Axe=vS,vk=Rf,Pxe=Rm,Rxe=Hf,Oxe=km,kxe=SS,Ixe=wS,Mxe=xS,Nxe=CS,Lxe=uc,Dxe=TS,$xe=ES,Fxe=AS,Bxe=RS,Uxe=OS,zxe=kS,Vxe=IS,jxe=NS,Gxe=LS,Hxe=DS,Wxe=$S,qxe=FS,Kxe=BS,Xxe=US,Yxe=zS,Qxe=VS,Zxe=jS,Jxe=GS,eCe=HS,tCe=qS,nCe=KS,rCe=XS;iS.Konva=yk.Konva.Util._assign(yk.Konva,{Arc:xxe.Arc,Arrow:Cxe.Arrow,Circle:Txe.Circle,Ellipse:Exe.Ellipse,Image:Axe.Image,Label:vk.Label,Tag:vk.Tag,Line:Pxe.Line,Path:Rxe.Path,Rect:Oxe.Rect,RegularPolygon:kxe.RegularPolygon,Ring:Ixe.Ring,Sprite:Mxe.Sprite,Star:Nxe.Star,Text:Lxe.Text,TextPath:Dxe.TextPath,Transformer:$xe.Transformer,Wedge:Fxe.Wedge,Filters:{Blur:Bxe.Blur,Brighten:Uxe.Brighten,Contrast:zxe.Contrast,Emboss:Vxe.Emboss,Enhance:jxe.Enhance,Grayscale:Gxe.Grayscale,HSL:Hxe.HSL,HSV:Wxe.HSV,Invert:qxe.Invert,Kaleidoscope:Kxe.Kaleidoscope,Mask:Xxe.Mask,Noise:Yxe.Noise,Pixelate:Qxe.Pixelate,Posterize:Zxe.Posterize,RGB:Jxe.RGB,RGBA:eCe.RGBA,Sepia:tCe.Sepia,Solarize:nCe.Solarize,Threshold:rCe.Threshold}});var iCe=mE.exports;Object.defineProperty(iCe,"__esModule",{value:!0});const oCe=iS;mE.exports=oCe.Konva;var sCe=mE.exports;const tp=dc(sCe),aCe=async(e,t,n)=>{const{width:r,height:i}=t,o=document.createElement("div"),s=new tp.Stage({container:o,width:r,height:i}),a=new tp.Layer,l=new tp.Layer;return a.add(new tp.Rect({...t,fill:n?"black":"white"})),e.forEach(u=>l.add(new tp.Line({points:u.points,stroke:n?"white":"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),s.add(a),s.add(l),o.remove(),s},lCe=async(e,t,n)=>new Promise((r,i)=>{const o=document.createElement("canvas");o.width=t,o.height=n;const s=o.getContext("2d"),a=new Image;if(!s){o.remove(),i("Unable to get context");return}a.onload=function(){s.drawImage(a,0,0),o.remove(),r(s.getImageData(0,0,t,n))},a.src=e}),_k=async(e,t)=>{const n=e.toDataURL(t);return await lCe(n,t.width,t.height)},uCe=async(e,t,n,r,i)=>{const o=Ie("canvas"),s=nS(),a=b_e();if(!s||!a){o.error("Unable to find canvas / stage");return}const l={...t,...n},u=s.clone();u.scale({x:1,y:1});const d=u.getAbsolutePosition(),f={x:l.x+d.x,y:l.y+d.y,width:l.width,height:l.height},p=await Q1(u,f),g=await _k(u,f),m=await aCe(r?e.objects.filter(i$):[],l,i),v=await Q1(m,l),x=await _k(m,l);return{baseBlob:p,baseImageData:g,maskBlob:v,maskImageData:x}},cCe=e=>{let t=!0,n=!1;const r=e.length;let i=3;for(i;i<r;i+=4)if(e[i]===255?t=!1:n=!0,!t&&n)return{isFullyTransparent:t,isPartiallyTransparent:n};return{isFullyTransparent:t,isPartiallyTransparent:n}},dCe=e=>{const t=e.length;let n=0;for(n;n<t;)if(e[n++]===0&&e[n++]===0&&e[n++]===0&&e[n++]===255)return!0;return!1},fCe=(e,t)=>{const{isPartiallyTransparent:n,isFullyTransparent:r}=cCe(e.data),i=dCe(t.data);return n?r?"txt2img":"outpaint":i?"inpaint":"img2img"},hCe=e=>OD(e,n=>n.isEnabled&&(!!n.processedControlImage||n.processorType==="none"&&!!n.controlImage)),YS=(e,t,n)=>{const{isEnabled:r,controlNets:i}=e.controlNet,o=hCe(i),s=t.nodes[It];if(r&&o.length&&o.length){const a={id:O0,type:"collect",is_intermediate:!0};t.nodes[O0]=a,t.edges.push({source:{node_id:O0,field:"collection"},destination:{node_id:n,field:"control"}}),o.forEach(l=>{const{controlNetId:u,controlImage:d,processedControlImage:f,beginStepPct:p,endStepPct:g,controlMode:m,resizeMode:v,model:x,processorType:_,weight:b}=l,y={id:`control_net_${u}`,type:"controlnet",is_intermediate:!0,begin_step_percent:p,end_step_percent:g,control_mode:m,resize_mode:v,control_model:x,control_weight:b};if(f&&_!=="none")y.image={image_name:f};else if(d)y.image={image_name:d};else return;if(t.nodes[y.id]=y,s){const S=rb(y,["id","type"]);s.controlnets.push(S)}t.edges.push({source:{node_id:y.id,field:"control"},destination:{node_id:O0,field:"item"}})})}},qf=(e,t)=>{const{positivePrompt:n,iterations:r,seed:i,shouldRandomizeSeed:o}=e.generation,{combinatorial:s,isEnabled:a,maxPrompts:l}=e.dynamicPrompts,u=t.nodes[It];if(a){tle(t.nodes[vt],"prompt");const d={id:Lx,type:"dynamic_prompt",is_intermediate:!0,max_prompts:s?l:r,combinatorial:s,prompt:n},f={id:vi,type:"iterate",is_intermediate:!0};if(t.nodes[Lx]=d,t.nodes[vi]=f,t.edges.push({source:{node_id:Lx,field:"prompt_collection"},destination:{node_id:vi,field:"collection"}},{source:{node_id:vi,field:"item"},destination:{node_id:vt,field:"prompt"}}),u&&t.edges.push({source:{node_id:vi,field:"item"},destination:{node_id:It,field:"positive_prompt"}}),o){const p={id:ms,type:"rand_int",is_intermediate:!0};t.nodes[ms]=p,t.edges.push({source:{node_id:ms,field:"a"},destination:{node_id:mt,field:"seed"}}),u&&t.edges.push({source:{node_id:ms,field:"a"},destination:{node_id:It,field:"seed"}})}else t.nodes[mt].seed=i,u&&(u.seed=i)}else{u&&(u.positive_prompt=n);const d={id:fa,type:"range_of_size",is_intermediate:!0,size:r,step:1},f={id:vi,type:"iterate",is_intermediate:!0};if(t.nodes[vi]=f,t.nodes[fa]=d,t.edges.push({source:{node_id:fa,field:"collection"},destination:{node_id:vi,field:"collection"}}),t.edges.push({source:{node_id:vi,field:"item"},destination:{node_id:mt,field:"seed"}}),u&&t.edges.push({source:{node_id:vi,field:"item"},destination:{node_id:It,field:"seed"}}),o){const p={id:ms,type:"rand_int",is_intermediate:!0};t.nodes[ms]=p,t.edges.push({source:{node_id:ms,field:"a"},destination:{node_id:fa,field:"start"}})}else d.start=i}},Im=(e,t,n,r=Or)=>{const{loras:i}=e.lora,o=FD(i),s=t.nodes[It];o>0&&(t.edges=t.edges.filter(u=>!(u.source.node_id===Or&&["unet"].includes(u.source.field))&&!(u.source.node_id===rS&&["unet"].includes(u.source.field))),t.edges=t.edges.filter(u=>!(u.source.node_id===qt&&["clip"].includes(u.source.field))));let a="",l=0;tc(i,u=>{const{model_name:d,base_model:f,weight:p}=u,g=`${nSe}_${d.replace(".","_")}`,m={type:"lora_loader",id:g,is_intermediate:!0,lora:{model_name:d,base_model:f},weight:p};s&&s.loras.push({lora:{model_name:d,base_model:f},weight:p}),t.nodes[g]=m,l===0?(t.edges.push({source:{node_id:r,field:"unet"},destination:{node_id:g,field:"unet"}}),t.edges.push({source:{node_id:qt,field:"clip"},destination:{node_id:g,field:"clip"}})):(t.edges.push({source:{node_id:a,field:"unet"},destination:{node_id:g,field:"unet"}}),t.edges.push({source:{node_id:a,field:"clip"},destination:{node_id:g,field:"clip"}})),l===o-1&&(t.edges.push({source:{node_id:g,field:"unet"},destination:{node_id:n,field:"unet"}}),t.edges.push({source:{node_id:g,field:"clip"},destination:{node_id:vt,field:"clip"}}),t.edges.push({source:{node_id:g,field:"clip"},destination:{node_id:Pt,field:"clip"}})),a=g,l+=1})},Tz=si(e=>e.ui,e=>JD[e.activeTab],{memoizeOptions:{equalityCheck:nb}}),rMe=si(e=>e.ui,e=>e.activeTab,{memoizeOptions:{equalityCheck:nb}}),iMe=si(e=>e.ui,e=>e,{memoizeOptions:{equalityCheck:nb}}),Ec=(e,t,n=Rt)=>{const i=Tz(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,o=t.nodes[n],s=t.nodes[It];if(!o)return;o.is_intermediate=!0;const a={id:Dd,type:"img_nsfw",is_intermediate:i};t.nodes[Dd]=a,t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:Dd,field:"image"}}),s&&t.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Dd,field:"metadata"}})},Mm=(e,t,n=Or)=>{const{vae:r}=e.generation,i=!r,o=t.nodes[It];i||(t.nodes[Qh]={type:"vae_loader",id:Qh,is_intermediate:!0,vae_model:r});const s=n==rS;(t.id===gE||t.id===Z1)&&t.edges.push({source:{node_id:i?n:Qh,field:i&&s?"vae_decoder":"vae"},destination:{node_id:Rt,field:"vae"}}),t.id===Z1&&t.edges.push({source:{node_id:i?n:Qh,field:i&&s?"vae_decoder":"vae"},destination:{node_id:un,field:"vae"}}),t.id===jU&&t.edges.push({source:{node_id:i?n:Qh,field:i&&s?"vae_decoder":"vae"},destination:{node_id:ds,field:"vae"}}),r&&o&&(o.vae=r)},Ac=(e,t,n=Rt)=>{const i=Tz(e)==="unifiedCanvas"?!e.canvas.shouldAutoSave:!1,o=t.nodes[n],s=t.nodes[Dd],a=t.nodes[It];if(!o)return;const l={id:Yh,type:"img_watermark",is_intermediate:i};t.nodes[Yh]=l,o.is_intermediate=!0,s?(s.is_intermediate=!0,t.edges.push({source:{node_id:Dd,field:"image"},destination:{node_id:Yh,field:"image"}})):t.edges.push({source:{node_id:n,field:"image"},destination:{node_id:Yh,field:"image"}}),a&&t.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Yh,field:"metadata"}})},pCe=(e,t)=>{const n=Ie("nodes"),{positivePrompt:r,negativePrompt:i,model:o,cfgScale:s,scheduler:a,steps:l,img2imgStrength:u,clipSkip:d,shouldUseCpuNoise:f,shouldUseNoiseSettings:p}=e.generation,{width:g,height:m}=e.canvas.boundingBoxDimensions,{shouldAutoSave:v}=e.canvas;if(!o)throw n.error("No model found in state"),new Error("No model found in state");const x=p?f:La.shouldUseCpuNoise,_={id:Z1,nodes:{[vt]:{type:"compel",id:vt,is_intermediate:!0,prompt:r},[Pt]:{type:"compel",id:Pt,is_intermediate:!0,prompt:i},[mt]:{type:"noise",id:mt,is_intermediate:!0,use_cpu:x},[Or]:{type:"main_model_loader",id:Or,is_intermediate:!0,model:o},[qt]:{type:"clip_skip",id:qt,is_intermediate:!0,skipped_layers:d},[Bn]:{type:"l2l",id:Bn,is_intermediate:!0,cfg_scale:s,scheduler:a,steps:l,strength:u},[un]:{type:"i2l",id:un,is_intermediate:!0},[Rt]:{type:"l2i",id:Rt,is_intermediate:!v}},edges:[{source:{node_id:Or,field:"clip"},destination:{node_id:qt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:Bn,field:"latents"},destination:{node_id:Rt,field:"latents"}},{source:{node_id:un,field:"latents"},destination:{node_id:Bn,field:"latents"}},{source:{node_id:mt,field:"noise"},destination:{node_id:Bn,field:"noise"}},{source:{node_id:Or,field:"unet"},destination:{node_id:Bn,field:"unet"}},{source:{node_id:Pt,field:"conditioning"},destination:{node_id:Bn,field:"negative_conditioning"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:Bn,field:"positive_conditioning"}}]};if(t.width!==g||t.height!==m){const b={id:ii,type:"img_resize",image:{image_name:t.image_name},is_intermediate:!0,width:g,height:m};_.nodes[ii]=b,_.edges.push({source:{node_id:ii,field:"image"},destination:{node_id:un,field:"image"}}),_.edges.push({source:{node_id:ii,field:"width"},destination:{node_id:mt,field:"width"}}),_.edges.push({source:{node_id:ii,field:"height"},destination:{node_id:mt,field:"height"}})}else _.nodes[un].image={image_name:t.image_name},_.edges.push({source:{node_id:un,field:"width"},destination:{node_id:mt,field:"width"}}),_.edges.push({source:{node_id:un,field:"height"},destination:{node_id:mt,field:"height"}});return _.nodes[It]={id:It,type:"metadata_accumulator",generation_mode:"img2img",cfg_scale:s,height:m,width:g,positive_prompt:"",negative_prompt:i,model:o,seed:0,steps:l,rand_device:x?"cpu":"cuda",scheduler:a,vae:void 0,controlnets:[],loras:[],clip_skip:d,strength:u,init_image:t.image_name},_.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Rt,field:"metadata"}}),Im(e,_,Bn),Mm(e,_),qf(e,_),YS(e,_,Bn),e.system.shouldUseNSFWChecker&&Ec(e,_),e.system.shouldUseWatermarker&&Ac(e,_),_},gCe=(e,t,n)=>{const r=Ie("nodes"),{positivePrompt:i,negativePrompt:o,model:s,cfgScale:a,scheduler:l,steps:u,img2imgStrength:d,shouldFitToWidthHeight:f,iterations:p,seed:g,shouldRandomizeSeed:m,seamSize:v,seamBlur:x,seamSteps:_,seamStrength:b,tileSize:y,infillMethod:S,clipSkip:C}=e.generation;if(!s)throw r.error("No model found in state"),new Error("No model found in state");const{width:T,height:E}=e.canvas.boundingBoxDimensions,{scaledBoundingBoxDimensions:P,boundingBoxScaleMethod:k,shouldAutoSave:O}=e.canvas,M={id:jU,nodes:{[ds]:{is_intermediate:!O,type:"inpaint",id:ds,steps:u,width:T,height:E,cfg_scale:a,scheduler:l,image:{image_name:t.image_name},strength:d,fit:f,mask:{image_name:n.image_name},seam_size:v,seam_blur:x,seam_strength:b,seam_steps:_,tile_size:S==="tile"?y:void 0,infill_method:S,inpaint_width:k!=="none"?P.width:void 0,inpaint_height:k!=="none"?P.height:void 0},[vt]:{type:"compel",id:vt,is_intermediate:!0,prompt:i},[Pt]:{type:"compel",id:Pt,is_intermediate:!0,prompt:o},[Or]:{type:"main_model_loader",id:Or,is_intermediate:!0,model:s},[qt]:{type:"clip_skip",id:qt,is_intermediate:!0,skipped_layers:C},[fa]:{type:"range_of_size",id:fa,is_intermediate:!0,size:p,step:1},[vi]:{type:"iterate",id:vi,is_intermediate:!0}},edges:[{source:{node_id:Or,field:"unet"},destination:{node_id:ds,field:"unet"}},{source:{node_id:Or,field:"clip"},destination:{node_id:qt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:Pt,field:"conditioning"},destination:{node_id:ds,field:"negative_conditioning"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:ds,field:"positive_conditioning"}},{source:{node_id:fa,field:"collection"},destination:{node_id:vi,field:"collection"}},{source:{node_id:vi,field:"item"},destination:{node_id:ds,field:"seed"}}]};if(Im(e,M,ds),Mm(e,M),m){const G={id:ms,type:"rand_int"};M.nodes[ms]=G,M.edges.push({source:{node_id:ms,field:"a"},destination:{node_id:fa,field:"start"}})}else M.nodes[fa].start=g;return e.system.shouldUseNSFWChecker&&Ec(e,M,ds),e.system.shouldUseWatermarker&&Ac(e,M,ds),M},mCe=e=>{const t=Ie("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:s,steps:a,clipSkip:l,shouldUseCpuNoise:u,shouldUseNoiseSettings:d}=e.generation,{width:f,height:p}=e.canvas.boundingBoxDimensions,{shouldAutoSave:g}=e.canvas;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const m=d?u:La.shouldUseCpuNoise,v=i.model_type==="onnx",x=v?rS:Or,_=v?"onnx_model_loader":"main_model_loader",b=v?{type:"t2l_onnx",id:cr,is_intermediate:!0,cfg_scale:o,scheduler:s,steps:a}:{type:"t2l",id:cr,is_intermediate:!0,cfg_scale:o,scheduler:s,steps:a},y={id:gE,nodes:{[vt]:{type:v?"prompt_onnx":"compel",id:vt,is_intermediate:!0,prompt:n},[Pt]:{type:v?"prompt_onnx":"compel",id:Pt,is_intermediate:!0,prompt:r},[mt]:{type:"noise",id:mt,is_intermediate:!0,width:f,height:p,use_cpu:m},[b.id]:b,[x]:{type:_,id:x,is_intermediate:!0,model:i},[qt]:{type:"clip_skip",id:qt,is_intermediate:!0,skipped_layers:l},[Rt]:{type:v?"l2i_onnx":"l2i",id:Rt,is_intermediate:!g}},edges:[{source:{node_id:Pt,field:"conditioning"},destination:{node_id:cr,field:"negative_conditioning"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:cr,field:"positive_conditioning"}},{source:{node_id:x,field:"clip"},destination:{node_id:qt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:x,field:"unet"},destination:{node_id:cr,field:"unet"}},{source:{node_id:cr,field:"latents"},destination:{node_id:Rt,field:"latents"}},{source:{node_id:mt,field:"noise"},destination:{node_id:cr,field:"noise"}}]};return y.nodes[It]={id:It,type:"metadata_accumulator",generation_mode:"txt2img",cfg_scale:o,height:p,width:f,positive_prompt:"",negative_prompt:r,model:i,seed:0,steps:a,rand_device:m?"cpu":"cuda",scheduler:s,vae:void 0,controlnets:[],loras:[],clip_skip:l},y.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Rt,field:"metadata"}}),Im(e,y,cr,x),Mm(e,y,x),qf(e,y),YS(e,y,cr),e.system.shouldUseNSFWChecker&&Ec(e,y),e.system.shouldUseWatermarker&&Ac(e,y),y},yCe=(e,t,n,r)=>{let i;if(t==="txt2img")i=mCe(e);else if(t==="img2img"){if(!n)throw new Error("Missing canvas init image");i=pCe(e,n)}else{if(!n||!r)throw new Error("Missing canvas init and mask images");i=gCe(e,n,r)}return i},vCe=()=>{Pe({predicate:e=>Em.match(e)&&e.payload==="unifiedCanvas",effect:async(e,{getState:t,dispatch:n,take:r})=>{const i=Ie("session"),o=t(),{layerState:s,boundingBoxCoordinates:a,boundingBoxDimensions:l,isMaskEnabled:u,shouldPreserveMaskedArea:d}=o.canvas,f=await uCe(s,a,l,u,d);if(!f){i.error("Unable to create canvas data");return}const{baseBlob:p,baseImageData:g,maskBlob:m,maskImageData:v}=f,x=fCe(g,v);if(o.system.enableImageDebugging){const E=await FO(p),P=await FO(m);lSe([{base64:P,caption:"mask b64"},{base64:E,caption:"image b64"}])}i.debug(`Generation mode: ${x}`);let _,b;["img2img","inpaint","outpaint"].includes(x)&&(_=await n(Se.endpoints.uploadImage.initiate({file:new File([p],"canvasInitImage.png",{type:"image/png"}),image_category:"general",is_intermediate:!0})).unwrap()),["inpaint","outpaint"].includes(x)&&(b=await n(Se.endpoints.uploadImage.initiate({file:new File([m],"canvasMaskImage.png",{type:"image/png"}),image_category:"mask",is_intermediate:!0})).unwrap());const y=yCe(o,x,_,b);i.debug({graph:Da(y)},"Canvas graph built"),n(MU(y));const{requestId:S}=n(Mr({graph:y})),[C]=await r(E=>Mr.fulfilled.match(E)&&E.meta.requestId===S),T=C.payload.id;["img2img","inpaint"].includes(x)&&_&&n(Se.endpoints.changeImageSessionId.initiate({imageDTO:_,session_id:T})),["inpaint"].includes(x)&&b&&n(Se.endpoints.changeImageSessionId.initiate({imageDTO:b,session_id:T})),o.canvas.layerState.stagingArea.boundingBox||n(jue({sessionId:T,boundingBox:{...o.canvas.boundingBoxCoordinates,...o.canvas.boundingBoxDimensions}})),n(Gue(T)),n(yc())}})},_Ce=e=>{const t=Ie("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:s,steps:a,initialImage:l,img2imgStrength:u,shouldFitToWidthHeight:d,width:f,height:p,clipSkip:g,shouldUseCpuNoise:m,shouldUseNoiseSettings:v,vaePrecision:x}=e.generation;if(!l)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const _=v?m:La.shouldUseCpuNoise,b={id:Z1,nodes:{[Or]:{type:"main_model_loader",id:Or,model:i},[qt]:{type:"clip_skip",id:qt,skipped_layers:g},[vt]:{type:"compel",id:vt,prompt:n},[Pt]:{type:"compel",id:Pt,prompt:r},[mt]:{type:"noise",id:mt,use_cpu:_},[Rt]:{type:"l2i",id:Rt,fp32:x==="fp32"},[Bn]:{type:"l2l",id:Bn,cfg_scale:o,scheduler:s,steps:a,strength:u},[un]:{type:"i2l",id:un,fp32:x==="fp32"}},edges:[{source:{node_id:Or,field:"unet"},destination:{node_id:Bn,field:"unet"}},{source:{node_id:Or,field:"clip"},destination:{node_id:qt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:Bn,field:"latents"},destination:{node_id:Rt,field:"latents"}},{source:{node_id:un,field:"latents"},destination:{node_id:Bn,field:"latents"}},{source:{node_id:mt,field:"noise"},destination:{node_id:Bn,field:"noise"}},{source:{node_id:Pt,field:"conditioning"},destination:{node_id:Bn,field:"negative_conditioning"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:Bn,field:"positive_conditioning"}}]};if(d&&(l.width!==f||l.height!==p)){const y={id:ii,type:"img_resize",image:{image_name:l.imageName},is_intermediate:!0,width:f,height:p};b.nodes[ii]=y,b.edges.push({source:{node_id:ii,field:"image"},destination:{node_id:un,field:"image"}}),b.edges.push({source:{node_id:ii,field:"width"},destination:{node_id:mt,field:"width"}}),b.edges.push({source:{node_id:ii,field:"height"},destination:{node_id:mt,field:"height"}})}else b.nodes[un].image={image_name:l.imageName},b.edges.push({source:{node_id:un,field:"width"},destination:{node_id:mt,field:"width"}}),b.edges.push({source:{node_id:un,field:"height"},destination:{node_id:mt,field:"height"}});return b.nodes[It]={id:It,type:"metadata_accumulator",generation_mode:"img2img",cfg_scale:o,height:p,width:f,positive_prompt:"",negative_prompt:r,model:i,seed:0,steps:a,rand_device:_?"cpu":"cuda",scheduler:s,vae:void 0,controlnets:[],loras:[],clip_skip:g,strength:u,init_image:l.imageName},b.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Rt,field:"metadata"}}),Im(e,b,Bn),Mm(e,b),qf(e,b),YS(e,b,Bn),e.system.shouldUseNSFWChecker&&Ec(e,b),e.system.shouldUseWatermarker&&Ac(e,b),b},Ez=(e,t,n)=>{const{positivePrompt:r,negativePrompt:i}=e.generation,{refinerModel:o,refinerAestheticScore:s,positiveStylePrompt:a,negativeStylePrompt:l,refinerSteps:u,refinerScheduler:d,refinerCFGScale:f,refinerStart:p}=e.sdxl;if(!o)return;const g=t.nodes[It];g&&(g.refiner_model=o,g.refiner_aesthetic_store=s,g.refiner_cfg_scale=f,g.refiner_scheduler=d,g.refiner_start=p,g.refiner_steps=u),t.edges=t.edges.filter(m=>!(m.source.node_id===n&&["latents"].includes(m.source.field))),t.edges=t.edges.filter(m=>!(m.source.node_id===Zn&&["vae"].includes(m.source.field))),n===fs&&t.edges.push({source:{node_id:Zn,field:"vae"},destination:{node_id:un,field:"vae"}}),t.nodes[fd]={type:"sdxl_refiner_model_loader",id:fd,model:o},t.nodes[k0]={type:"sdxl_refiner_compel_prompt",id:k0,style:`${r} ${a}`,aesthetic_score:s},t.nodes[I0]={type:"sdxl_refiner_compel_prompt",id:I0,style:`${i} ${l}`,aesthetic_score:s},t.nodes[bu]={type:"l2l_sdxl",id:bu,cfg_scale:f,steps:u/(1-Math.min(p,.99)),scheduler:d,denoising_start:p,denoising_end:1},t.edges.push({source:{node_id:fd,field:"unet"},destination:{node_id:bu,field:"unet"}},{source:{node_id:fd,field:"vae"},destination:{node_id:Rt,field:"vae"}},{source:{node_id:fd,field:"clip2"},destination:{node_id:k0,field:"clip2"}},{source:{node_id:fd,field:"clip2"},destination:{node_id:I0,field:"clip2"}},{source:{node_id:k0,field:"conditioning"},destination:{node_id:bu,field:"positive_conditioning"}},{source:{node_id:I0,field:"conditioning"},destination:{node_id:bu,field:"negative_conditioning"}},{source:{node_id:n,field:"latents"},destination:{node_id:bu,field:"latents"}},{source:{node_id:bu,field:"latents"},destination:{node_id:Rt,field:"latents"}})},bCe=e=>{const t=Ie("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:s,steps:a,initialImage:l,shouldFitToWidthHeight:u,width:d,height:f,clipSkip:p,shouldUseCpuNoise:g,shouldUseNoiseSettings:m,vaePrecision:v}=e.generation,{positiveStylePrompt:x,negativeStylePrompt:_,shouldConcatSDXLStylePrompt:b,shouldUseSDXLRefiner:y,refinerStart:S,sdxlImg2ImgDenoisingStrength:C}=e.sdxl;if(!l)throw t.error("No initial image found in state"),new Error("No initial image found in state");if(!i)throw t.error("No model found in state"),new Error("No model found in state");const T=m?g:La.shouldUseCpuNoise,E={id:iSe,nodes:{[Zn]:{type:"sdxl_model_loader",id:Zn,model:i},[vt]:{type:"sdxl_compel_prompt",id:vt,prompt:n,style:b?`${n} ${x}`:x},[Pt]:{type:"sdxl_compel_prompt",id:Pt,prompt:r,style:b?`${r} ${_}`:_},[mt]:{type:"noise",id:mt,use_cpu:T},[Rt]:{type:"l2i",id:Rt,fp32:v==="fp32"},[fs]:{type:"l2l_sdxl",id:fs,cfg_scale:o,scheduler:s,steps:a,denoising_start:y?Math.min(S,1-C):1-C,denoising_end:y?S:1},[un]:{type:"i2l",id:un,fp32:v==="fp32"}},edges:[{source:{node_id:Zn,field:"unet"},destination:{node_id:fs,field:"unet"}},{source:{node_id:Zn,field:"vae"},destination:{node_id:Rt,field:"vae"}},{source:{node_id:Zn,field:"vae"},destination:{node_id:un,field:"vae"}},{source:{node_id:Zn,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:Zn,field:"clip2"},destination:{node_id:vt,field:"clip2"}},{source:{node_id:Zn,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:Zn,field:"clip2"},destination:{node_id:Pt,field:"clip2"}},{source:{node_id:fs,field:"latents"},destination:{node_id:Rt,field:"latents"}},{source:{node_id:un,field:"latents"},destination:{node_id:fs,field:"latents"}},{source:{node_id:mt,field:"noise"},destination:{node_id:fs,field:"noise"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:fs,field:"positive_conditioning"}},{source:{node_id:Pt,field:"conditioning"},destination:{node_id:fs,field:"negative_conditioning"}}]};if(u&&(l.width!==d||l.height!==f)){const P={id:ii,type:"img_resize",image:{image_name:l.imageName},is_intermediate:!0,width:d,height:f};E.nodes[ii]=P,E.edges.push({source:{node_id:ii,field:"image"},destination:{node_id:un,field:"image"}}),E.edges.push({source:{node_id:ii,field:"width"},destination:{node_id:mt,field:"width"}}),E.edges.push({source:{node_id:ii,field:"height"},destination:{node_id:mt,field:"height"}})}else E.nodes[un].image={image_name:l.imageName},E.edges.push({source:{node_id:un,field:"width"},destination:{node_id:mt,field:"width"}}),E.edges.push({source:{node_id:un,field:"height"},destination:{node_id:mt,field:"height"}});return E.nodes[It]={id:It,type:"metadata_accumulator",generation_mode:"sdxl_img2img",cfg_scale:o,height:f,width:d,positive_prompt:"",negative_prompt:r,model:i,seed:0,steps:a,rand_device:T?"cpu":"cuda",scheduler:s,vae:void 0,controlnets:[],loras:[],clip_skip:p,strength:C,init_image:l.imageName,positive_style_prompt:x,negative_style_prompt:_},E.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Rt,field:"metadata"}}),y&&Ez(e,E,fs),qf(e,E),e.system.shouldUseNSFWChecker&&Ec(e,E),e.system.shouldUseWatermarker&&Ac(e,E),E},SCe=()=>{Pe({predicate:e=>Em.match(e)&&e.payload==="img2img",effect:async(e,{getState:t,dispatch:n,take:r})=>{const i=Ie("session"),o=t(),s=o.generation.model;let a;s&&s.base_model==="sdxl"?a=bCe(o):a=_Ce(o),n(IU(a)),i.debug({graph:Da(a)},"Image to Image graph built"),n(Mr({graph:a})),await r(Mr.fulfilled.match),n(yc())}})};let B0;const wCe=new Uint8Array(16);function xCe(){if(!B0&&(B0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!B0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return B0(wCe)}const Er=[];for(let e=0;e<256;++e)Er.push((e+256).toString(16).slice(1));function CCe(e,t=0){return(Er[e[t+0]]+Er[e[t+1]]+Er[e[t+2]]+Er[e[t+3]]+"-"+Er[e[t+4]]+Er[e[t+5]]+"-"+Er[e[t+6]]+Er[e[t+7]]+"-"+Er[e[t+8]]+Er[e[t+9]]+"-"+Er[e[t+10]]+Er[e[t+11]]+Er[e[t+12]]+Er[e[t+13]]+Er[e[t+14]]+Er[e[t+15]]).toLowerCase()}const TCe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bk={randomUUID:TCe};function ECe(e,t,n){if(bk.randomUUID&&!t&&!e)return bk.randomUUID();e=e||{};const r=e.random||(e.rng||xCe)();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 CCe(r)}const ACe=e=>{if(e.type==="color"&&e.value){const t=zr(e.value),{r:n,g:r,b:i,a:o}=e.value,s=Math.max(0,Math.min(o*255,255));return Object.assign(t,{r:n,g:r,b:i,a:s}),t}return e.value},PCe=e=>{const{nodes:t,edges:n}=e.nodes,i=t.filter(a=>a.type!=="progress_image").reduce((a,l)=>{const{id:u,data:d}=l,{type:f,inputs:p}=d,g=_T(p,(v,x,_)=>{const b=ACe(x);return v[_]=b,v},{}),m={type:f,id:u,...g};return Object.assign(a,{[u]:m}),a},{}),o=n.reduce((a,l)=>{const{source:u,target:d,sourceHandle:f,targetHandle:p}=l;return a.push({source:{node_id:u,field:f},destination:{node_id:d,field:p}}),a},[]);return o.forEach(a=>{const l=i[a.destination.node_id],u=a.destination.field;i[a.destination.node_id]=rb(l,u)}),{id:ECe(),nodes:i,edges:o}},RCe=()=>{Pe({predicate:e=>Em.match(e)&&e.payload==="nodes",effect:async(e,{getState:t,dispatch:n,take:r})=>{const i=Ie("session"),o=t(),s=PCe(o);n(NU(s)),i.debug({graph:Da(s)},"Nodes graph built"),n(Mr({graph:s})),await r(Mr.fulfilled.match),n(yc())}})},OCe=e=>{const t=Ie("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:s,steps:a,width:l,height:u,clipSkip:d,shouldUseCpuNoise:f,shouldUseNoiseSettings:p,vaePrecision:g}=e.generation,{positiveStylePrompt:m,negativeStylePrompt:v,shouldConcatSDXLStylePrompt:x,shouldUseSDXLRefiner:_,refinerStart:b}=e.sdxl,y=p?f:La.shouldUseCpuNoise;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const S={id:rSe,nodes:{[Zn]:{type:"sdxl_model_loader",id:Zn,model:i},[vt]:{type:"sdxl_compel_prompt",id:vt,prompt:n,style:x?`${n} ${m}`:m},[Pt]:{type:"sdxl_compel_prompt",id:Pt,prompt:r,style:x?`${r} ${v}`:v},[mt]:{type:"noise",id:mt,width:l,height:u,use_cpu:y},[il]:{type:"t2l_sdxl",id:il,cfg_scale:o,scheduler:s,steps:a,denoising_end:_?b:1},[Rt]:{type:"l2i",id:Rt,fp32:g==="fp32"}},edges:[{source:{node_id:Zn,field:"unet"},destination:{node_id:il,field:"unet"}},{source:{node_id:Zn,field:"vae"},destination:{node_id:Rt,field:"vae"}},{source:{node_id:Zn,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:Zn,field:"clip2"},destination:{node_id:vt,field:"clip2"}},{source:{node_id:Zn,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:Zn,field:"clip2"},destination:{node_id:Pt,field:"clip2"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:il,field:"positive_conditioning"}},{source:{node_id:Pt,field:"conditioning"},destination:{node_id:il,field:"negative_conditioning"}},{source:{node_id:mt,field:"noise"},destination:{node_id:il,field:"noise"}},{source:{node_id:il,field:"latents"},destination:{node_id:Rt,field:"latents"}}]};return S.nodes[It]={id:It,type:"metadata_accumulator",generation_mode:"sdxl_txt2img",cfg_scale:o,height:u,width:l,positive_prompt:"",negative_prompt:r,model:i,seed:0,steps:a,rand_device:y?"cpu":"cuda",scheduler:s,vae:void 0,controlnets:[],loras:[],clip_skip:d,positive_style_prompt:m,negative_style_prompt:v},S.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Rt,field:"metadata"}}),_&&Ez(e,S,il),qf(e,S),e.system.shouldUseNSFWChecker&&Ec(e,S),e.system.shouldUseWatermarker&&Ac(e,S),S},kCe=e=>{const t=Ie("nodes"),{positivePrompt:n,negativePrompt:r,model:i,cfgScale:o,scheduler:s,steps:a,width:l,height:u,clipSkip:d,shouldUseCpuNoise:f,shouldUseNoiseSettings:p,vaePrecision:g}=e.generation,m=p?f:La.shouldUseCpuNoise;if(!i)throw t.error("No model found in state"),new Error("No model found in state");const v=i.model_type==="onnx",x=v?rS:Or,_=v?"onnx_model_loader":"main_model_loader",b=v?{type:"t2l_onnx",id:cr,is_intermediate:!0,cfg_scale:o,scheduler:s,steps:a}:{type:"t2l",id:cr,is_intermediate:!0,cfg_scale:o,scheduler:s,steps:a},y={id:gE,nodes:{[vt]:{type:v?"prompt_onnx":"compel",id:vt,prompt:n,is_intermediate:!0},[Pt]:{type:v?"prompt_onnx":"compel",id:Pt,prompt:r,is_intermediate:!0},[mt]:{type:"noise",id:mt,width:l,height:u,use_cpu:m,is_intermediate:!0},[b.id]:b,[x]:{type:_,id:x,is_intermediate:!0,model:i},[qt]:{type:"clip_skip",id:qt,skipped_layers:d,is_intermediate:!0},[Rt]:{type:v?"l2i_onnx":"l2i",id:Rt,fp32:g==="fp32"}},edges:[{source:{node_id:x,field:"clip"},destination:{node_id:qt,field:"clip"}},{source:{node_id:x,field:"unet"},destination:{node_id:cr,field:"unet"}},{source:{node_id:qt,field:"clip"},destination:{node_id:vt,field:"clip"}},{source:{node_id:qt,field:"clip"},destination:{node_id:Pt,field:"clip"}},{source:{node_id:vt,field:"conditioning"},destination:{node_id:cr,field:"positive_conditioning"}},{source:{node_id:Pt,field:"conditioning"},destination:{node_id:cr,field:"negative_conditioning"}},{source:{node_id:cr,field:"latents"},destination:{node_id:Rt,field:"latents"}},{source:{node_id:mt,field:"noise"},destination:{node_id:cr,field:"noise"}}]};return y.nodes[It]={id:It,type:"metadata_accumulator",generation_mode:"txt2img",cfg_scale:o,height:u,width:l,positive_prompt:"",negative_prompt:r,model:i,seed:0,steps:a,rand_device:m?"cpu":"cuda",scheduler:s,vae:void 0,controlnets:[],loras:[],clip_skip:d},y.edges.push({source:{node_id:It,field:"metadata"},destination:{node_id:Rt,field:"metadata"}}),Im(e,y,cr,x),Mm(e,y,x),qf(e,y),YS(e,y,cr),e.system.shouldUseNSFWChecker&&Ec(e,y),e.system.shouldUseWatermarker&&Ac(e,y),y},ICe=()=>{Pe({predicate:e=>Em.match(e)&&e.payload==="txt2img",effect:async(e,{getState:t,dispatch:n,take:r})=>{const i=Ie("session"),o=t(),s=o.generation.model;let a;s&&s.base_model==="sdxl"?a=OCe(o):a=kCe(o),n(kU(a)),i.debug({graph:Da(a)},"Text to Image graph built"),n(Mr({graph:a})),await r(Mr.fulfilled.match),n(yc())}})},Az=vL(),Pe=Az.startListening;j_e();G_e();q_e();N_e();L_e();D_e();$_e();F_e();h_e();V_e();vCe();RCe();ICe();SCe();Bbe();P_e();T_e();x_e();A_e();Jbe();a_e();Vbe();jbe();Hbe();Wbe();Kbe();Ube();zbe();Qbe();Zbe();Xbe();Ybe();qbe();Mbe();Nbe();Lbe();Dbe();$be();Fbe();Obe();kbe();Ibe();k_e();O_e();I_e();M_e();U_e();z_e();p_e();Cbe();B_e();K_e();d_e();Y_e();u_e();l_e();aSe();tSe();const MCe={canvas:Hue,gallery:Jde,generation:xue,nodes:Bve,postprocessing:Uve,system:h1e,config:rle,ui:Tue,hotkeys:y1e,controlNet:Yde,dynamicPrompts:Zde,deleteImageModal:rfe,changeBoardModal:ofe,lora:afe,modelmanager:m1e,sdxl:jve,[Gl.reducerPath]:Gl.reducer},NCe=Ff(MCe),LCe=V1e(NCe),DCe=["canvas","gallery","generation","sdxl","nodes","postprocessing","system","ui","controlNet","dynamicPrompts","lora","modelmanager"],$Ce=ZN({reducer:LCe,enhancers:e=>e.concat(j1e(window.localStorage,DCe,{persistDebounce:300,serialize:e_e,unserialize:n_e,prefix:G1e})).concat(bL()),middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(Gl.middleware).concat(S1e).prepend(Az.middleware),devTools:{actionSanitizer:i_e,stateSanitizer:s_e,trace:!0,predicate:(e,t)=>!o_e.includes(t.type)}}),oMe=e=>e,FCe=e=>{const{socket:t,storeApi:n}=e,{dispatch:r,getState:i}=n;t.on("connect",()=>{Ie("socketio").debug("Connected"),r(j$());const{sessionId:s}=i().system;s&&(t.emit("subscribe",{session:s}),r(MT({sessionId:s})))}),t.on("connect_error",o=>{o&&o.message&&o.data==="ERR_UNAUTHENTICATED"&&r(Un(Ku({title:o.message,status:"error",duration:1e4})))}),t.on("disconnect",()=>{r(H$())}),t.on("invocation_started",o=>{r(Y$({data:o}))}),t.on("generator_progress",o=>{r(nF({data:o}))}),t.on("invocation_error",o=>{r(J$({data:o}))}),t.on("invocation_complete",o=>{r(NT({data:o}))}),t.on("graph_execution_state_complete",o=>{r(eF({data:o}))}),t.on("model_load_started",o=>{r(iF({data:o}))}),t.on("model_load_completed",o=>{r(oF({data:o}))}),t.on("session_retrieval_error",o=>{r(sF({data:o}))}),t.on("invocation_retrieval_error",o=>{r(lF({data:o}))})},Ds=Object.create(null);Ds.open="0";Ds.close="1";Ds.ping="2";Ds.pong="3";Ds.message="4";Ds.upgrade="5";Ds.noop="6";const Sv=Object.create(null);Object.keys(Ds).forEach(e=>{Sv[Ds[e]]=e});const BCe={type:"error",data:"parser error"},Pz=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Rz=typeof ArrayBuffer=="function",Oz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,kE=({type:e,data:t},n,r)=>Pz&&t instanceof Blob?n?r(t):Sk(t,r):Rz&&(t instanceof ArrayBuffer||Oz(t))?n?r(t):Sk(new Blob([t]),r):r(Ds[e]+(t||"")),Sk=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function wk(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Wx;function UCe(e,t){if(Pz&&e.data instanceof Blob)return e.data.arrayBuffer().then(wk).then(t);if(Rz&&(e.data instanceof ArrayBuffer||Oz(e.data)))return t(wk(e.data));kE(e,!1,n=>{Wx||(Wx=new TextEncoder),t(Wx.encode(n))})}const xk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hp=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<xk.length;e++)hp[xk.charCodeAt(e)]=e;const zCe=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)o=hp[e.charCodeAt(r)],s=hp[e.charCodeAt(r+1)],a=hp[e.charCodeAt(r+2)],l=hp[e.charCodeAt(r+3)],d[i++]=o<<2|s>>4,d[i++]=(s&15)<<4|a>>2,d[i++]=(a&3)<<6|l&63;return u},VCe=typeof ArrayBuffer=="function",IE=(e,t)=>{if(typeof e!="string")return{type:"message",data:kz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:jCe(e.substring(1),t)}:Sv[n]?e.length>1?{type:Sv[n],data:e.substring(1)}:{type:Sv[n]}:BCe},jCe=(e,t)=>{if(VCe){const n=zCe(e);return kz(n,t)}else return{base64:!0,data:e}},kz=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Iz=String.fromCharCode(30),GCe=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{kE(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Iz))})})},HCe=(e,t)=>{const n=e.split(Iz),r=[];for(let i=0;i<n.length;i++){const o=IE(n[i],t);if(r.push(o),o.type==="error")break}return r};let qx;function WCe(e,t,n){qx||(qx=new TextDecoder);const r=t||e[0]<48||e[0]>54;return IE(r?e:qx.decode(e),n)}const Mz=4;function Gn(e){if(e)return qCe(e)}function qCe(e){for(var t in Gn.prototype)e[t]=Gn.prototype[t];return e}Gn.prototype.on=Gn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Gn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Gn.prototype.off=Gn.prototype.removeListener=Gn.prototype.removeAllListeners=Gn.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};Gn.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};Gn.prototype.emitReserved=Gn.prototype.emit;Gn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Gn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const yo=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Nz(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const KCe=yo.setTimeout,XCe=yo.clearTimeout;function QS(e,t){t.useNativeTimers?(e.setTimeoutFn=KCe.bind(yo),e.clearTimeoutFn=XCe.bind(yo)):(e.setTimeoutFn=yo.setTimeout.bind(yo),e.clearTimeoutFn=yo.clearTimeout.bind(yo))}const YCe=1.33;function QCe(e){return typeof e=="string"?ZCe(e):Math.ceil((e.byteLength||e.size)*YCe)}function ZCe(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}function JCe(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function e3e(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}class t3e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ME extends Gn{constructor(t){super(),this.writable=!1,QS(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new t3e(t,n,r)),this}open(){return 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=IE(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=JCe(t);return n.length?"?"+n:""}}const Lz="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),h5=64,n3e={};let Ck=0,U0=0,Tk;function Ek(e){let t="";do t=Lz[e%h5]+t,e=Math.floor(e/h5);while(e>0);return t}function Dz(){const e=Ek(+new Date);return e!==Tk?(Ck=0,Tk=e):e+"."+Ek(Ck++)}for(;U0<h5;U0++)n3e[Lz[U0]]=U0;let $z=!1;try{$z=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const r3e=$z;function Fz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||r3e))return new XMLHttpRequest}catch{}if(!t)try{return new yo[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function i3e(){}const o3e=function(){return new Fz({xdomain:!1}).responseType!=null}();class s3e extends ME{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}const n=t&&t.forceBase64;this.supportsBinary=o3e&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}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)};HCe(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,GCe(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Dz()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new af(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}}let af=class wv extends Gn{constructor(t,n){super(),QS(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=Nz(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Fz(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=wv.requestsCount++,wv.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=i3e,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete wv.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()}};af.requestsCount=0;af.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ak);else if(typeof addEventListener=="function"){const e="onpagehide"in yo?"pagehide":"unload";addEventListener(e,Ak,!1)}}function Ak(){for(let e in af.requests)af.requests.hasOwnProperty(e)&&af.requests[e].abort()}const NE=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),z0=yo.WebSocket||yo.MozWebSocket,Pk=!0,a3e="arraybuffer",Rk=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class l3e extends ME{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=Rk?{}:Nz(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=Pk&&!Rk?n?new z0(t,n):new z0(t):new z0(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||a3e,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;kE(r,this.supportsBinary,o=>{const s={};try{Pk&&this.ws.send(o)}catch{}i&&NE(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Dz()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!z0}}function u3e(e,t){return e.type==="message"&&typeof e.data!="string"&&t[0]>=48&&t[0]<=54}class c3e extends ME{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=t.readable.getReader();this.writer=t.writable.getWriter();let r;const i=()=>{n.read().then(({done:s,value:a})=>{s||(!r&&a.byteLength===1&&a[0]===54?r=!0:(this.onPacket(WCe(a,r,"arraybuffer")),r=!1),i())}).catch(s=>{})};i();const o=this.query.sid?`0{"sid":"${this.query.sid}"}`:"0";this.writer.write(new TextEncoder().encode(o)).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;UCe(r,o=>{u3e(r,o)&&this.writer.write(Uint8Array.of(54)),this.writer.write(o).then(()=>{i&&NE(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const d3e={websocket:l3e,webtransport:c3e,polling:s3e},f3e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,h3e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function p5(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=f3e.exec(e||""),o={},s=14;for(;s--;)o[h3e[s]]=i[s]||"";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=p3e(o,o.path),o.queryKey=g3e(o,o.query),o}function p3e(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 g3e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Bz=class Sd extends Gn{constructor(t,n={}){super(),this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=p5(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=p5(n.host).host),QS(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","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=e3e(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=Mz,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new d3e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Sd.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Sd.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Sd.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const s=f=>{const p=new Error("probe error: "+f);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function a(){s("transport closed")}function l(){s("socket closed")}function u(f){n&&f.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Sd.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){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+=QCe(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Sd.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}};Bz.protocol=Mz;function m3e(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=p5(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 y3e=typeof ArrayBuffer=="function",v3e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Uz=Object.prototype.toString,_3e=typeof Blob=="function"||typeof Blob<"u"&&Uz.call(Blob)==="[object BlobConstructor]",b3e=typeof File=="function"||typeof File<"u"&&Uz.call(File)==="[object FileConstructor]";function LE(e){return y3e&&(e instanceof ArrayBuffer||v3e(e))||_3e&&e instanceof Blob||b3e&&e instanceof File}function xv(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(xv(e[n]))return!0;return!1}if(LE(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return xv(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&xv(e[n]))return!0;return!1}function S3e(e){const t=[],n=e.data,r=e;return r.data=g5(n,t),r.attachments=t.length,{packet:r,buffers:t}}function g5(e,t){if(!e)return e;if(LE(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]=g5(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]=g5(e[r],t));return n}return e}function w3e(e,t){return e.data=m5(e.data,t),delete e.attachments,e}function m5(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]=m5(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=m5(e[n],t));return e}const x3e=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],C3e=5;var pt;(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"})(pt||(pt={}));class T3e{constructor(t){this.replacer=t}encode(t){return(t.type===pt.EVENT||t.type===pt.ACK)&&xv(t)?this.encodeAsBinary({type:t.type===pt.EVENT?pt.BINARY_EVENT:pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===pt.BINARY_EVENT||t.type===pt.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=S3e(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Ok(e){return Object.prototype.toString.call(e)==="[object Object]"}class DE extends Gn{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);const r=n.type===pt.BINARY_EVENT;r||n.type===pt.BINARY_ACK?(n.type=r?pt.EVENT:pt.ACK,this.reconstructor=new E3e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(LE(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(pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===pt.BINARY_EVENT||r.type===pt.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}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 s=t.charAt(n);if(s==null||Number(s)!=s){--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(DE.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 pt.CONNECT:return Ok(n);case pt.DISCONNECT:return n===void 0;case pt.CONNECT_ERROR:return typeof n=="string"||Ok(n);case pt.EVENT:case pt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&x3e.indexOf(n[0])===-1);case pt.ACK:case pt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class E3e{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=w3e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const A3e=Object.freeze(Object.defineProperty({__proto__:null,Decoder:DE,Encoder:T3e,get PacketType(){return pt},protocol:C3e},Symbol.toStringTag,{value:"Module"}));function Uo(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const P3e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zz extends Gn{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Uo(t,"open",this.onopen.bind(this)),Uo(t,"packet",this.onpacket.bind(this)),Uo(t,"error",this.onerror.bind(this)),Uo(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(P3e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:pt.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}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){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...s)=>{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}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 pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):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 pt.EVENT:case pt.BINARY_EVENT:this.onevent(t);break;case pt.ACK:case pt.BINARY_ACK:this.onack(t);break;case pt.DISCONNECT:this.ondisconnect();break;case pt.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),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:pt.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,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}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:pt.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 Kf(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}Kf.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?e+n:e-n}return Math.min(e,this.max)|0};Kf.prototype.reset=function(){this.attempts=0};Kf.prototype.setMin=function(e){this.ms=e};Kf.prototype.setMax=function(e){this.max=e};Kf.prototype.setJitter=function(e){this.jitter=e};class y5 extends Gn{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,QS(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 Kf({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||A3e;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 Bz(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Uo(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=Uo(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Uo(t,"ping",this.onping.bind(this)),Uo(t,"data",this.ondata.bind(this)),Uo(t,"error",this.onerror.bind(this)),Uo(t,"close",this.onclose.bind(this)),Uo(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){NE(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new zz(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(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const np={};function Cv(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=m3e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=np[i]&&o in np[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new y5(r,t):(np[i]||(np[i]=new y5(r,t)),l=np[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Cv,{Manager:y5,Socket:zz,io:Cv,connect:Cv});const kk=()=>{let e=!1,n=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`;const r={timeout:6e4,path:"/ws/socket.io",autoConnect:!1};if(["nodes","package"].includes("production")){const s=wg.get();s&&(n=s.replace(/^https?\:\/\//i,""));const a=Sg.get();a&&(r.auth={token:a}),r.transports=["websocket","polling"]}const i=Cv(n,r);return s=>a=>l=>{const{dispatch:u,getState:d}=s;if(e||(FCe({storeApi:s,socket:i}),e=!0,i.connect()),Mr.fulfilled.match(l)){const f=l.payload.id,p=d().system.sessionId;p&&(i.emit("unsubscribe",{session:p}),u(K$({sessionId:p}))),i.emit("subscribe",{session:f}),u(MT({sessionId:f}))}a(l)}};function R3e(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 O3e(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 k3e=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(O3e(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=R3e(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}(),Ur="-ms-",r_="-moz-",Et="-webkit-",Vz="comm",$E="rule",FE="decl",I3e="@import",jz="@keyframes",M3e="@layer",N3e=Math.abs,ZS=String.fromCharCode,L3e=Object.assign;function D3e(e,t){return Rr(e,0)^45?(((t<<2^Rr(e,0))<<2^Rr(e,1))<<2^Rr(e,2))<<2^Rr(e,3):0}function Gz(e){return e.trim()}function $3e(e,t){return(e=t.exec(e))?e[0]:e}function At(e,t,n){return e.replace(t,n)}function v5(e,t){return e.indexOf(t)}function Rr(e,t){return e.charCodeAt(t)|0}function $g(e,t,n){return e.slice(t,n)}function ys(e){return e.length}function BE(e){return e.length}function V0(e,t){return t.push(e),e}function F3e(e,t){return e.map(t).join("")}var JS=1,If=1,Hz=0,Oi=0,zn=0,Xf="";function e2(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:JS,column:If,length:s,return:""}}function rp(e,t){return L3e(e2("",null,null,"",null,null,0),e,{length:-e.length},t)}function B3e(){return zn}function U3e(){return zn=Oi>0?Rr(Xf,--Oi):0,If--,zn===10&&(If=1,JS--),zn}function Hi(){return zn=Oi<Hz?Rr(Xf,Oi++):0,If++,zn===10&&(If=1,JS++),zn}function ks(){return Rr(Xf,Oi)}function Tv(){return Oi}function Nm(e,t){return $g(Xf,e,t)}function Fg(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 Wz(e){return JS=If=1,Hz=ys(Xf=e),Oi=0,[]}function qz(e){return Xf="",e}function Ev(e){return Gz(Nm(Oi-1,_5(e===91?e+2:e===40?e+1:e)))}function z3e(e){for(;(zn=ks())&&zn<33;)Hi();return Fg(e)>2||Fg(zn)>3?"":" "}function V3e(e,t){for(;--t&&Hi()&&!(zn<48||zn>102||zn>57&&zn<65||zn>70&&zn<97););return Nm(e,Tv()+(t<6&&ks()==32&&Hi()==32))}function _5(e){for(;Hi();)switch(zn){case e:return Oi;case 34:case 39:e!==34&&e!==39&&_5(zn);break;case 40:e===41&&_5(e);break;case 92:Hi();break}return Oi}function j3e(e,t){for(;Hi()&&e+zn!==47+10;)if(e+zn===42+42&&ks()===47)break;return"/*"+Nm(t,Oi-1)+"*"+ZS(e===47?e:Hi())}function G3e(e){for(;!Fg(ks());)Hi();return Nm(e,Oi)}function H3e(e){return qz(Av("",null,null,null,[""],e=Wz(e),0,[0],e))}function Av(e,t,n,r,i,o,s,a,l){for(var u=0,d=0,f=s,p=0,g=0,m=0,v=1,x=1,_=1,b=0,y="",S=i,C=o,T=r,E=y;x;)switch(m=b,b=Hi()){case 40:if(m!=108&&Rr(E,f-1)==58){v5(E+=At(Ev(b),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:E+=Ev(b);break;case 9:case 10:case 13:case 32:E+=z3e(m);break;case 92:E+=V3e(Tv()-1,7);continue;case 47:switch(ks()){case 42:case 47:V0(W3e(j3e(Hi(),Tv()),t,n),l);break;default:E+="/"}break;case 123*v:a[u++]=ys(E)*_;case 125*v:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+d:_==-1&&(E=At(E,/\f/g,"")),g>0&&ys(E)-f&&V0(g>32?Mk(E+";",r,n,f-1):Mk(At(E," ","")+";",r,n,f-2),l);break;case 59:E+=";";default:if(V0(T=Ik(E,t,n,u,d,i,a,y,S=[],C=[],f),o),b===123)if(d===0)Av(E,t,T,T,S,o,f,a,C);else switch(p===99&&Rr(E,3)===110?100:p){case 100:case 108:case 109:case 115:Av(e,T,T,r&&V0(Ik(e,T,T,0,0,i,a,y,i,S=[],f),C),i,C,f,a,r?S:C);break;default:Av(E,T,T,T,[""],C,0,a,C)}}u=d=g=0,v=_=1,y=E="",f=s;break;case 58:f=1+ys(E),g=m;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&U3e()==125)continue}switch(E+=ZS(b),b*v){case 38:_=d>0?1:(E+="\f",-1);break;case 44:a[u++]=(ys(E)-1)*_,_=1;break;case 64:ks()===45&&(E+=Ev(Hi())),p=ks(),d=f=ys(y=E+=G3e(Tv())),b++;break;case 45:m===45&&ys(E)==2&&(v=0)}}return o}function Ik(e,t,n,r,i,o,s,a,l,u,d){for(var f=i-1,p=i===0?o:[""],g=BE(p),m=0,v=0,x=0;m<r;++m)for(var _=0,b=$g(e,f+1,f=N3e(v=s[m])),y=e;_<g;++_)(y=Gz(v>0?p[_]+" "+b:At(b,/&\f/g,p[_])))&&(l[x++]=y);return e2(e,t,n,i===0?$E:a,l,u,d)}function W3e(e,t,n){return e2(e,t,n,Vz,ZS(B3e()),$g(e,2,-2),0)}function Mk(e,t,n,r){return e2(e,t,n,FE,$g(e,0,r),$g(e,r+1,-1),r)}function lf(e,t){for(var n="",r=BE(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function q3e(e,t,n,r){switch(e.type){case M3e:if(e.children.length)break;case I3e:case FE:return e.return=e.return||e.value;case Vz:return"";case jz:return e.return=e.value+"{"+lf(e.children,r)+"}";case $E:e.value=e.props.join(",")}return ys(n=lf(e.children,r))?e.return=e.value+"{"+n+"}":""}function K3e(e){var t=BE(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function X3e(e){return function(t){t.root||(t=t.return)&&e(t)}}var Nk=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 Kz(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Y3e=function(t,n,r){for(var i=0,o=0;i=o,o=ks(),i===38&&o===12&&(n[r]=1),!Fg(o);)Hi();return Nm(t,Oi)},Q3e=function(t,n){var r=-1,i=44;do switch(Fg(i)){case 0:i===38&&ks()===12&&(n[r]=1),t[r]+=Y3e(Oi-1,n,r);break;case 2:t[r]+=Ev(i);break;case 4:if(i===44){t[++r]=ks()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ZS(i)}while(i=Hi());return t},Z3e=function(t,n){return qz(Q3e(Wz(t),n))},Lk=new WeakMap,J3e=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&&!Lk.get(r))&&!i){Lk.set(t,!0);for(var o=[],s=Z3e(n,o),a=r.props,l=0,u=0;l<s.length;l++)for(var d=0;d<a.length;d++,u++)t.props[u]=o[l]?s[l].replace(/&\f/g,a[d]):a[d]+" "+s[l]}}},e5e=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Xz(e,t){switch(D3e(e,t)){case 5103:return Et+"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 Et+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Et+e+r_+e+Ur+e+e;case 6828:case 4268:return Et+e+Ur+e+e;case 6165:return Et+e+Ur+"flex-"+e+e;case 5187:return Et+e+At(e,/(\w+).+(:[^]+)/,Et+"box-$1$2"+Ur+"flex-$1$2")+e;case 5443:return Et+e+Ur+"flex-item-"+At(e,/flex-|-self/,"")+e;case 4675:return Et+e+Ur+"flex-line-pack"+At(e,/align-content|flex-|-self/,"")+e;case 5548:return Et+e+Ur+At(e,"shrink","negative")+e;case 5292:return Et+e+Ur+At(e,"basis","preferred-size")+e;case 6060:return Et+"box-"+At(e,"-grow","")+Et+e+Ur+At(e,"grow","positive")+e;case 4554:return Et+At(e,/([^-])(transform)/g,"$1"+Et+"$2")+e;case 6187:return At(At(At(e,/(zoom-|grab)/,Et+"$1"),/(image-set)/,Et+"$1"),e,"")+e;case 5495:case 3959:return At(e,/(image-set\([^]*)/,Et+"$1$`$1");case 4968:return At(At(e,/(.+:)(flex-)?(.*)/,Et+"box-pack:$3"+Ur+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Et+e+e;case 4095:case 3583:case 4068:case 2532:return At(e,/(.+)-inline(.+)/,Et+"$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(ys(e)-1-t>6)switch(Rr(e,t+1)){case 109:if(Rr(e,t+4)!==45)break;case 102:return At(e,/(.+:)(.+)-([^]+)/,"$1"+Et+"$2-$3$1"+r_+(Rr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~v5(e,"stretch")?Xz(At(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Rr(e,t+1)!==115)break;case 6444:switch(Rr(e,ys(e)-3-(~v5(e,"!important")&&10))){case 107:return At(e,":",":"+Et)+e;case 101:return At(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Et+(Rr(e,14)===45?"inline-":"")+"box$3$1"+Et+"$2$3$1"+Ur+"$2box$3")+e}break;case 5936:switch(Rr(e,t+11)){case 114:return Et+e+Ur+At(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Et+e+Ur+At(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Et+e+Ur+At(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Et+e+Ur+e+e}return e}var t5e=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case FE:t.return=Xz(t.value,t.length);break;case jz:return lf([rp(t,{value:At(t.value,"@","@"+Et)})],i);case $E:if(t.length)return F3e(t.props,function(o){switch($3e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return lf([rp(t,{props:[At(o,/:(read-\w+)/,":"+r_+"$1")]})],i);case"::placeholder":return lf([rp(t,{props:[At(o,/:(plac\w+)/,":"+Et+"input-$1")]}),rp(t,{props:[At(o,/:(plac\w+)/,":"+r_+"$1")]}),rp(t,{props:[At(o,/:(plac\w+)/,Ur+"input-$1")]})],i)}return""})}},n5e=[t5e],r5e=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(v){var x=v.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||n5e,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var x=v.getAttribute("data-emotion").split(" "),_=1;_<x.length;_++)o[x[_]]=!0;a.push(v)});var l,u=[J3e,e5e];{var d,f=[q3e,X3e(function(v){d.insert(v)})],p=K3e(u.concat(i,f)),g=function(x){return lf(H3e(x),p)};l=function(x,_,b,y){d=b,g(x?x+"{"+_.styles+"}":_.styles),y&&(m.inserted[_.name]=!0)}}var m={key:n,sheet:new k3e({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(a),m},i5e=!0;function o5e(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var Yz=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||i5e===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},Qz=function(t,n,r){Yz(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 s5e(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 a5e={animationIterationCount:1,aspectRatio: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},l5e=/[A-Z]|^ms/g,u5e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zz=function(t){return t.charCodeAt(1)===45},Dk=function(t){return t!=null&&typeof t!="boolean"},Kx=Kz(function(e){return Zz(e)?e:e.replace(l5e,"-$&").toLowerCase()}),$k=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(u5e,function(r,i,o){return vs={name:i,styles:o,next:vs},i})}return a5e[t]!==1&&!Zz(t)&&typeof n=="number"&&n!==0?n+"px":n};function Bg(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 vs={name:n.name,styles:n.styles,next:vs},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)vs={name:r.name,styles:r.styles,next:vs},r=r.next;var i=n.styles+";";return i}return c5e(e,t,n)}case"function":{if(e!==void 0){var o=vs,s=n(e);return vs=o,Bg(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function c5e(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Bg(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":Dk(s)&&(r+=Kx(o)+":"+$k(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var a=0;a<s.length;a++)Dk(s[a])&&(r+=Kx(o)+":"+$k(o,s[a])+";");else{var l=Bg(e,t,s);switch(o){case"animation":case"animationName":{r+=Kx(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var Fk=/label:\s*([^\s;\n{]+)\s*(;|$)/g,vs,UE=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="";vs=void 0;var s=t[0];s==null||s.raw===void 0?(i=!1,o+=Bg(r,n,s)):o+=s[0];for(var a=1;a<t.length;a++)o+=Bg(r,n,t[a]),i&&(o+=s[a]);Fk.lastIndex=0;for(var l="",u;(u=Fk.exec(o))!==null;)l+="-"+u[1];var d=s5e(o)+l;return{name:d,styles:o,next:vs}},d5e=function(t){return t()},Jz=EP["useInsertionEffect"]?EP["useInsertionEffect"]:!1,f5e=Jz||d5e,Bk=Jz||L.useLayoutEffect,eV=L.createContext(typeof HTMLElement<"u"?r5e({key:"css"}):null);eV.Provider;var tV=function(t){return L.forwardRef(function(n,r){var i=L.useContext(eV);return t(n,i,r)})},Ug=L.createContext({}),h5e=function(t,n){if(typeof n=="function"){var r=n(t);return r}return A1({},t,n)},p5e=Nk(function(e){return Nk(function(t){return h5e(e,t)})}),sMe=function(t){var n=L.useContext(Ug);return t.theme!==n&&(n=p5e(n)(t.theme)),L.createElement(Ug.Provider,{value:n},t.children)},aMe=tV(function(e,t){var n=e.styles,r=UE([n],void 0,L.useContext(Ug)),i=L.useRef();return Bk(function(){var o=t.key+"-global",s=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",o),s.hydrate([l])),i.current=[s,a],function(){s.flush()}},[t]),Bk(function(){var o=i.current,s=o[0],a=o[1];if(a){o[1]=!1;return}if(r.next!==void 0&&Qz(t,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function g5e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return UE(t)}var m5e=function(){var t=g5e.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_"}}},y5e=globalThis!=null&&globalThis.document?L.useLayoutEffect:L.useEffect;function nV(){const e=L.useContext(Ug);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var rV=L.createContext({});rV.displayName="ColorModeContext";function zE(){const e=L.useContext(rV);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function lMe(e,t){const{colorMode:n}=zE();return n==="dark"?t:e}function v5e(){const e=zE(),t=nV();return{...e,theme:t}}function _5e(e,t,n){var r,i;if(t==null)return t;const o=s=>{var a,l;return(l=(a=e.__breakpoints)==null?void 0:a.asArray)==null?void 0:l[s]};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function b5e(e,t,n){var r,i;if(t==null)return t;const o=s=>{var a,l;return(l=(a=e.__cssMap)==null?void 0:a[s])==null?void 0:l.value};return(i=(r=o(t))!=null?r:o(n))!=null?i:n}function uMe(e,t,n){const r=nV();return S5e(e,t,n)(r)}function S5e(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const s=i.filter(Boolean),a=r.map((l,u)=>{var d,f;if(e==="breakpoints")return _5e(o,l,(d=s[u])!=null?d:l);const p=`${e}.${l}`;return b5e(o,p,(f=s[u])!=null?f:l)});return Array.isArray(t)?a:a[0]}}var iV=(...e)=>e.filter(Boolean).join(" ");function w5e(){return!1}function ba(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var cMe=e=>{const{condition:t,message:n}=e;t&&w5e()&&console.warn(n)};function Fu(e,...t){return x5e(e)?e(...t):e}var x5e=e=>typeof e=="function",dMe=e=>e?"":void 0,fMe=e=>e?!0:void 0;function hMe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function pMe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var i_={exports:{}};i_.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",p="[object Error]",g="[object Function]",m="[object GeneratorFunction]",v="[object Map]",x="[object Number]",_="[object Null]",b="[object Object]",y="[object Proxy]",S="[object RegExp]",C="[object Set]",T="[object String]",E="[object Undefined]",P="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",M="[object Float32Array]",G="[object Float64Array]",U="[object Int8Array]",A="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",D="[object Uint16Array]",V="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,ee={};ee[M]=ee[G]=ee[U]=ee[A]=ee[N]=ee[F]=ee[B]=ee[D]=ee[V]=!0,ee[a]=ee[l]=ee[k]=ee[d]=ee[O]=ee[f]=ee[p]=ee[g]=ee[v]=ee[x]=ee[b]=ee[S]=ee[C]=ee[T]=ee[P]=!1;var ie=typeof He=="object"&&He&&He.Object===Object&&He,se=typeof self=="object"&&self&&self.Object===Object&&self,le=ie||se||Function("return this")(),W=t&&!t.nodeType&&t,ne=W&&!0&&e&&!e.nodeType&&e,fe=ne&&ne.exports===W,pe=fe&&ie.process,ve=function(){try{var H=ne&&ne.require&&ne.require("util").types;return H||pe&&pe.binding&&pe.binding("util")}catch{}}(),ye=ve&&ve.isTypedArray;function We(H,Y,re){switch(re.length){case 0:return H.call(Y);case 1:return H.call(Y,re[0]);case 2:return H.call(Y,re[0],re[1]);case 3:return H.call(Y,re[0],re[1],re[2])}return H.apply(Y,re)}function Me(H,Y){for(var re=-1,we=Array(H);++re<H;)we[re]=Y(re);return we}function Ee(H){return function(Y){return H(Y)}}function lt(H,Y){return H==null?void 0:H[Y]}function _e(H,Y){return function(re){return H(Y(re))}}var jt=Array.prototype,Hn=Function.prototype,Bt=Object.prototype,it=le["__core-js_shared__"],gt=Hn.toString,Jt=Bt.hasOwnProperty,Nr=function(){var H=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return H?"Symbol(src)_1."+H:""}(),yr=Bt.toString,hi=gt.call(Object),wn=RegExp("^"+gt.call(Jt).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),on=fe?le.Buffer:void 0,Wn=le.Symbol,sn=le.Uint8Array,Gt=on?on.allocUnsafe:void 0,vr=_e(Object.getPrototypeOf,Object),Lr=Object.create,Xr=Bt.propertyIsEnumerable,Ii=jt.splice,En=Wn?Wn.toStringTag:void 0,Yr=function(){try{var H=Lc(Object,"defineProperty");return H({},"",{}),H}catch{}}(),Vs=on?on.isBuffer:void 0,Ji=Math.max,js=Date.now,Xt=Lc(le,"Map"),Ot=Lc(Object,"create"),qn=function(){function H(){}return function(Y){if(!Oo(Y))return{};if(Lr)return Lr(Y);H.prototype=Y;var re=new H;return H.prototype=void 0,re}}();function Dn(H){var Y=-1,re=H==null?0:H.length;for(this.clear();++Y<re;){var we=H[Y];this.set(we[0],we[1])}}function or(){this.__data__=Ot?Ot(null):{},this.size=0}function _r(H){var Y=this.has(H)&&delete this.__data__[H];return this.size-=Y?1:0,Y}function br(H){var Y=this.__data__;if(Ot){var re=Y[H];return re===r?void 0:re}return Jt.call(Y,H)?Y[H]:void 0}function eo(H){var Y=this.__data__;return Ot?Y[H]!==void 0:Jt.call(Y,H)}function Sr(H,Y){var re=this.__data__;return this.size+=this.has(H)?0:1,re[H]=Ot&&Y===void 0?r:Y,this}Dn.prototype.clear=or,Dn.prototype.delete=_r,Dn.prototype.get=br,Dn.prototype.has=eo,Dn.prototype.set=Sr;function Kn(H){var Y=-1,re=H==null?0:H.length;for(this.clear();++Y<re;){var we=H[Y];this.set(we[0],we[1])}}function Mi(){this.__data__=[],this.size=0}function is(H){var Y=this.__data__,re=Ro(Y,H);if(re<0)return!1;var we=Y.length-1;return re==we?Y.pop():Ii.call(Y,re,1),--this.size,!0}function to(H){var Y=this.__data__,re=Ro(Y,H);return re<0?void 0:Y[re][1]}function za(H){return Ro(this.__data__,H)>-1}function Ao(H,Y){var re=this.__data__,we=Ro(re,H);return we<0?(++this.size,re.push([H,Y])):re[we][1]=Y,this}Kn.prototype.clear=Mi,Kn.prototype.delete=is,Kn.prototype.get=to,Kn.prototype.has=za,Kn.prototype.set=Ao;function wr(H){var Y=-1,re=H==null?0:H.length;for(this.clear();++Y<re;){var we=H[Y];this.set(we[0],we[1])}}function Gs(){this.size=0,this.__data__={hash:new Dn,map:new(Xt||Kn),string:new Dn}}function Zf(H){var Y=Nc(this,H).delete(H);return this.size-=Y?1:0,Y}function Jf(H){return Nc(this,H).get(H)}function eh(H){return Nc(this,H).has(H)}function th(H,Y){var re=Nc(this,H),we=re.size;return re.set(H,Y),this.size+=re.size==we?0:1,this}wr.prototype.clear=Gs,wr.prototype.delete=Zf,wr.prototype.get=Jf,wr.prototype.has=eh,wr.prototype.set=th;function Po(H){var Y=this.__data__=new Kn(H);this.size=Y.size}function nh(){this.__data__=new Kn,this.size=0}function rh(H){var Y=this.__data__,re=Y.delete(H);return this.size=Y.size,re}function kc(H){return this.__data__.get(H)}function ih(H){return this.__data__.has(H)}function oh(H,Y){var re=this.__data__;if(re instanceof Kn){var we=re.__data__;if(!Xt||we.length<n-1)return we.push([H,Y]),this.size=++re.size,this;re=this.__data__=new wr(we)}return re.set(H,Y),this.size=re.size,this}Po.prototype.clear=nh,Po.prototype.delete=rh,Po.prototype.get=kc,Po.prototype.has=ih,Po.prototype.set=oh;function sh(H,Y){var re=ph(H),we=!re&&hh(H),ot=!re&&!we&&iy(H),Mt=!re&&!we&&!ot&&sy(H),qe=re||we||ot||Mt,Je=qe?Me(H.length,String):[],_t=Je.length;for(var Qr in H)(Y||Jt.call(H,Qr))&&!(qe&&(Qr=="length"||ot&&(Qr=="offset"||Qr=="parent")||Mt&&(Qr=="buffer"||Qr=="byteLength"||Qr=="byteOffset")||Qm(Qr,_t)))&&Je.push(Qr);return Je}function os(H,Y,re){(re!==void 0&&!$c(H[Y],re)||re===void 0&&!(Y in H))&&Va(H,Y,re)}function ah(H,Y,re){var we=H[Y];(!(Jt.call(H,Y)&&$c(we,re))||re===void 0&&!(Y in H))&&Va(H,Y,re)}function Ro(H,Y){for(var re=H.length;re--;)if($c(H[re][0],Y))return re;return-1}function Va(H,Y,re){Y=="__proto__"&&Yr?Yr(H,Y,{configurable:!0,enumerable:!0,value:re,writable:!0}):H[Y]=re}var lh=Xm();function ja(H){return H==null?H===void 0?E:_:En&&En in Object(H)?Ym(H):ey(H)}function uu(H){return cu(H)&&ja(H)==a}function Ic(H){if(!Oo(H)||fh(H))return!1;var Y=gh(H)?wn:q;return Y.test(ry(H))}function Ga(H){return cu(H)&&oy(H.length)&&!!ee[ja(H)]}function g2(H){if(!Oo(H))return Jm(H);var Y=Hs(H),re=[];for(var we in H)we=="constructor"&&(Y||!Jt.call(H,we))||re.push(we);return re}function Gm(H,Y,re,we,ot){H!==Y&&lh(Y,function(Mt,qe){if(ot||(ot=new Po),Oo(Mt))m2(H,Y,qe,re,Gm,we,ot);else{var Je=we?we(Dc(H,qe),Mt,qe+"",H,Y,ot):void 0;Je===void 0&&(Je=Mt),os(H,qe,Je)}},ay)}function m2(H,Y,re,we,ot,Mt,qe){var Je=Dc(H,re),_t=Dc(Y,re),Qr=qe.get(_t);if(Qr){os(H,re,Qr);return}var xr=Mt?Mt(Je,_t,re+"",H,Y,qe):void 0,sr=xr===void 0;if(sr){var Bc=ph(_t),Uc=!Bc&&iy(_t),mh=!Bc&&!Uc&&sy(_t);xr=_t,Bc||Uc||mh?ph(Je)?xr=Je:b2(Je)?xr=v2(Je):Uc?(sr=!1,xr=Wm(_t,!0)):mh?(sr=!1,xr=uh(_t,!0)):xr=[]:S2(_t)||hh(_t)?(xr=Je,hh(Je)?xr=w2(Je):(!Oo(Je)||gh(Je))&&(xr=ch(_t))):sr=!1}sr&&(qe.set(_t,xr),ot(xr,_t,we,Mt,qe),qe.delete(_t)),os(H,re,xr)}function y2(H,Y){return ty(_2(H,Y,ly),H+"")}var Hm=Yr?function(H,Y){return Yr(H,"toString",{configurable:!0,enumerable:!1,value:Ut(Y),writable:!0})}:ly;function Wm(H,Y){if(Y)return H.slice();var re=H.length,we=Gt?Gt(re):new H.constructor(re);return H.copy(we),we}function qm(H){var Y=new H.constructor(H.byteLength);return new sn(Y).set(new sn(H)),Y}function uh(H,Y){var re=Y?qm(H.buffer):H.buffer;return new H.constructor(re,H.byteOffset,H.length)}function v2(H,Y){var re=-1,we=H.length;for(Y||(Y=Array(we));++re<we;)Y[re]=H[re];return Y}function Km(H,Y,re,we){var ot=!re;re||(re={});for(var Mt=-1,qe=Y.length;++Mt<qe;){var Je=Y[Mt],_t=we?we(re[Je],H[Je],Je,re,H):void 0;_t===void 0&&(_t=H[Je]),ot?Va(re,Je,_t):ah(re,Je,_t)}return re}function Mc(H){return y2(function(Y,re){var we=-1,ot=re.length,Mt=ot>1?re[ot-1]:void 0,qe=ot>2?re[2]:void 0;for(Mt=H.length>3&&typeof Mt=="function"?(ot--,Mt):void 0,qe&&Zm(re[0],re[1],qe)&&(Mt=ot<3?void 0:Mt,ot=1),Y=Object(Y);++we<ot;){var Je=re[we];Je&&H(Y,Je,we,Mt)}return Y})}function Xm(H){return function(Y,re,we){for(var ot=-1,Mt=Object(Y),qe=we(Y),Je=qe.length;Je--;){var _t=qe[H?Je:++ot];if(re(Mt[_t],_t,Mt)===!1)break}return Y}}function Nc(H,Y){var re=H.__data__;return dh(Y)?re[typeof Y=="string"?"string":"hash"]:re.map}function Lc(H,Y){var re=lt(H,Y);return Ic(re)?re:void 0}function Ym(H){var Y=Jt.call(H,En),re=H[En];try{H[En]=void 0;var we=!0}catch{}var ot=yr.call(H);return we&&(Y?H[En]=re:delete H[En]),ot}function ch(H){return typeof H.constructor=="function"&&!Hs(H)?qn(vr(H)):{}}function Qm(H,Y){var re=typeof H;return Y=Y??s,!!Y&&(re=="number"||re!="symbol"&&Z.test(H))&&H>-1&&H%1==0&&H<Y}function Zm(H,Y,re){if(!Oo(re))return!1;var we=typeof Y;return(we=="number"?Fc(re)&&Qm(Y,re.length):we=="string"&&Y in re)?$c(re[Y],H):!1}function dh(H){var Y=typeof H;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?H!=="__proto__":H===null}function fh(H){return!!Nr&&Nr in H}function Hs(H){var Y=H&&H.constructor,re=typeof Y=="function"&&Y.prototype||Bt;return H===re}function Jm(H){var Y=[];if(H!=null)for(var re in Object(H))Y.push(re);return Y}function ey(H){return yr.call(H)}function _2(H,Y,re){return Y=Ji(Y===void 0?H.length-1:Y,0),function(){for(var we=arguments,ot=-1,Mt=Ji(we.length-Y,0),qe=Array(Mt);++ot<Mt;)qe[ot]=we[Y+ot];ot=-1;for(var Je=Array(Y+1);++ot<Y;)Je[ot]=we[ot];return Je[Y]=re(qe),We(H,this,Je)}}function Dc(H,Y){if(!(Y==="constructor"&&typeof H[Y]=="function")&&Y!="__proto__")return H[Y]}var ty=ny(Hm);function ny(H){var Y=0,re=0;return function(){var we=js(),ot=o-(we-re);if(re=we,ot>0){if(++Y>=i)return arguments[0]}else Y=0;return H.apply(void 0,arguments)}}function ry(H){if(H!=null){try{return gt.call(H)}catch{}try{return H+""}catch{}}return""}function $c(H,Y){return H===Y||H!==H&&Y!==Y}var hh=uu(function(){return arguments}())?uu:function(H){return cu(H)&&Jt.call(H,"callee")&&!Xr.call(H,"callee")},ph=Array.isArray;function Fc(H){return H!=null&&oy(H.length)&&!gh(H)}function b2(H){return cu(H)&&Fc(H)}var iy=Vs||x2;function gh(H){if(!Oo(H))return!1;var Y=ja(H);return Y==g||Y==m||Y==u||Y==y}function oy(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=s}function Oo(H){var Y=typeof H;return H!=null&&(Y=="object"||Y=="function")}function cu(H){return H!=null&&typeof H=="object"}function S2(H){if(!cu(H)||ja(H)!=b)return!1;var Y=vr(H);if(Y===null)return!0;var re=Jt.call(Y,"constructor")&&Y.constructor;return typeof re=="function"&&re instanceof re&>.call(re)==hi}var sy=ye?Ee(ye):Ga;function w2(H){return Km(H,ay(H))}function ay(H){return Fc(H)?sh(H,!0):g2(H)}var Ht=Mc(function(H,Y,re,we){Gm(H,Y,re,we)});function Ut(H){return function(){return H}}function ly(H){return H}function x2(){return!1}e.exports=Ht})(i_,i_.exports);var C5e=i_.exports;const Ts=dc(C5e);var T5e=e=>/!(important)?$/.test(e),Uk=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,E5e=(e,t)=>n=>{const r=String(t),i=T5e(r),o=Uk(r),s=e?`${e}.${o}`:o;let a=ba(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:t;return a=Uk(a),i?`${a} !important`:a};function VE(e){const{scale:t,transform:n,compose:r}=e;return(o,s)=>{var a;const l=E5e(t,o)(s);let u=(a=n==null?void 0:n(l,s))!=null?a:l;return r&&(u=r(u,s)),u}}var j0=(...e)=>t=>e.reduce((n,r)=>r(n),t);function co(e,t){return n=>{const r={property:n,scale:e};return r.transform=VE({scale:e,transform:t}),r}}var A5e=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function P5e(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:A5e(t),transform:n?VE({scale:n,compose:r}):r}}var oV=["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 R5e(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...oV].join(" ")}function O5e(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...oV].join(" ")}var k5e={"--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(" ")},I5e={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 M5e(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 N5e={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},b5={"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"},L5e=new Set(Object.values(b5)),S5=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),D5e=e=>e.trim();function $5e(e,t){if(e==null||S5.has(e))return e;if(!(w5(e)||S5.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],s=i==null?void 0:i[2];if(!o||!s)return e;const a=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=s.split(",").map(D5e).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const d=l in b5?b5[l]:l;u.unshift(d);const f=u.map(p=>{if(L5e.has(p))return p;const g=p.indexOf(" "),[m,v]=g!==-1?[p.substr(0,g),p.substr(g+1)]:[p],x=w5(v)?v:v&&v.split(" "),_=`colors.${m}`,b=_ in t.__cssMap?t.__cssMap[_].varRef:m;return x?[b,...Array.isArray(x)?x:[x]].join(" "):b});return`${a}(${f.join(", ")})`}var w5=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),F5e=(e,t)=>$5e(e,t??{});function B5e(e){return/^var\(--.+\)$/.test(e)}var U5e=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},cs=e=>t=>`${e}(${t})`,bt={filter(e){return e!=="auto"?e:k5e},backdropFilter(e){return e!=="auto"?e:I5e},ring(e){return M5e(bt.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?R5e():e==="auto-gpu"?O5e():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=U5e(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(B5e(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:F5e,blur:cs("blur"),opacity:cs("opacity"),brightness:cs("brightness"),contrast:cs("contrast"),dropShadow:cs("drop-shadow"),grayscale:cs("grayscale"),hueRotate:cs("hue-rotate"),invert:cs("invert"),saturate:cs("saturate"),sepia:cs("sepia"),bgImage(e){return e==null||w5(e)||S5.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=N5e[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},Q={borderWidths:co("borderWidths"),borderStyles:co("borderStyles"),colors:co("colors"),borders:co("borders"),gradients:co("gradients",bt.gradient),radii:co("radii",bt.px),space:co("space",j0(bt.vh,bt.px)),spaceT:co("space",j0(bt.vh,bt.px)),degreeT(e){return{property:e,transform:bt.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:VE({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:co("sizes",j0(bt.vh,bt.px)),sizesT:co("sizes",j0(bt.vh,bt.fraction)),shadows:co("shadows"),logical:P5e,blur:co("blur",bt.blur)},Pv={background:Q.colors("background"),backgroundColor:Q.colors("backgroundColor"),backgroundImage:Q.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:bt.bgClip},bgSize:Q.prop("backgroundSize"),bgPosition:Q.prop("backgroundPosition"),bg:Q.colors("background"),bgColor:Q.colors("backgroundColor"),bgPos:Q.prop("backgroundPosition"),bgRepeat:Q.prop("backgroundRepeat"),bgAttachment:Q.prop("backgroundAttachment"),bgGradient:Q.gradients("backgroundImage"),bgClip:{transform:bt.bgClip}};Object.assign(Pv,{bgImage:Pv.backgroundImage,bgImg:Pv.backgroundImage});var Tt={border:Q.borders("border"),borderWidth:Q.borderWidths("borderWidth"),borderStyle:Q.borderStyles("borderStyle"),borderColor:Q.colors("borderColor"),borderRadius:Q.radii("borderRadius"),borderTop:Q.borders("borderTop"),borderBlockStart:Q.borders("borderBlockStart"),borderTopLeftRadius:Q.radii("borderTopLeftRadius"),borderStartStartRadius:Q.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:Q.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:Q.radii("borderTopRightRadius"),borderStartEndRadius:Q.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:Q.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:Q.borders("borderRight"),borderInlineEnd:Q.borders("borderInlineEnd"),borderBottom:Q.borders("borderBottom"),borderBlockEnd:Q.borders("borderBlockEnd"),borderBottomLeftRadius:Q.radii("borderBottomLeftRadius"),borderBottomRightRadius:Q.radii("borderBottomRightRadius"),borderLeft:Q.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:Q.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:Q.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:Q.borders(["borderLeft","borderRight"]),borderInline:Q.borders("borderInline"),borderY:Q.borders(["borderTop","borderBottom"]),borderBlock:Q.borders("borderBlock"),borderTopWidth:Q.borderWidths("borderTopWidth"),borderBlockStartWidth:Q.borderWidths("borderBlockStartWidth"),borderTopColor:Q.colors("borderTopColor"),borderBlockStartColor:Q.colors("borderBlockStartColor"),borderTopStyle:Q.borderStyles("borderTopStyle"),borderBlockStartStyle:Q.borderStyles("borderBlockStartStyle"),borderBottomWidth:Q.borderWidths("borderBottomWidth"),borderBlockEndWidth:Q.borderWidths("borderBlockEndWidth"),borderBottomColor:Q.colors("borderBottomColor"),borderBlockEndColor:Q.colors("borderBlockEndColor"),borderBottomStyle:Q.borderStyles("borderBottomStyle"),borderBlockEndStyle:Q.borderStyles("borderBlockEndStyle"),borderLeftWidth:Q.borderWidths("borderLeftWidth"),borderInlineStartWidth:Q.borderWidths("borderInlineStartWidth"),borderLeftColor:Q.colors("borderLeftColor"),borderInlineStartColor:Q.colors("borderInlineStartColor"),borderLeftStyle:Q.borderStyles("borderLeftStyle"),borderInlineStartStyle:Q.borderStyles("borderInlineStartStyle"),borderRightWidth:Q.borderWidths("borderRightWidth"),borderInlineEndWidth:Q.borderWidths("borderInlineEndWidth"),borderRightColor:Q.colors("borderRightColor"),borderInlineEndColor:Q.colors("borderInlineEndColor"),borderRightStyle:Q.borderStyles("borderRightStyle"),borderInlineEndStyle:Q.borderStyles("borderInlineEndStyle"),borderTopRadius:Q.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:Q.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:Q.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:Q.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Tt,{rounded:Tt.borderRadius,roundedTop:Tt.borderTopRadius,roundedTopLeft:Tt.borderTopLeftRadius,roundedTopRight:Tt.borderTopRightRadius,roundedTopStart:Tt.borderStartStartRadius,roundedTopEnd:Tt.borderStartEndRadius,roundedBottom:Tt.borderBottomRadius,roundedBottomLeft:Tt.borderBottomLeftRadius,roundedBottomRight:Tt.borderBottomRightRadius,roundedBottomStart:Tt.borderEndStartRadius,roundedBottomEnd:Tt.borderEndEndRadius,roundedLeft:Tt.borderLeftRadius,roundedRight:Tt.borderRightRadius,roundedStart:Tt.borderInlineStartRadius,roundedEnd:Tt.borderInlineEndRadius,borderStart:Tt.borderInlineStart,borderEnd:Tt.borderInlineEnd,borderTopStartRadius:Tt.borderStartStartRadius,borderTopEndRadius:Tt.borderStartEndRadius,borderBottomStartRadius:Tt.borderEndStartRadius,borderBottomEndRadius:Tt.borderEndEndRadius,borderStartRadius:Tt.borderInlineStartRadius,borderEndRadius:Tt.borderInlineEndRadius,borderStartWidth:Tt.borderInlineStartWidth,borderEndWidth:Tt.borderInlineEndWidth,borderStartColor:Tt.borderInlineStartColor,borderEndColor:Tt.borderInlineEndColor,borderStartStyle:Tt.borderInlineStartStyle,borderEndStyle:Tt.borderInlineEndStyle});var z5e={color:Q.colors("color"),textColor:Q.colors("color"),fill:Q.colors("fill"),stroke:Q.colors("stroke")},x5={boxShadow:Q.shadows("boxShadow"),mixBlendMode:!0,blendMode:Q.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:Q.prop("backgroundBlendMode"),opacity:!0};Object.assign(x5,{shadow:x5.boxShadow});var V5e={filter:{transform:bt.filter},blur:Q.blur("--chakra-blur"),brightness:Q.propT("--chakra-brightness",bt.brightness),contrast:Q.propT("--chakra-contrast",bt.contrast),hueRotate:Q.degreeT("--chakra-hue-rotate"),invert:Q.propT("--chakra-invert",bt.invert),saturate:Q.propT("--chakra-saturate",bt.saturate),dropShadow:Q.propT("--chakra-drop-shadow",bt.dropShadow),backdropFilter:{transform:bt.backdropFilter},backdropBlur:Q.blur("--chakra-backdrop-blur"),backdropBrightness:Q.propT("--chakra-backdrop-brightness",bt.brightness),backdropContrast:Q.propT("--chakra-backdrop-contrast",bt.contrast),backdropHueRotate:Q.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:Q.propT("--chakra-backdrop-invert",bt.invert),backdropSaturate:Q.propT("--chakra-backdrop-saturate",bt.saturate)},o_={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:bt.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:Q.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:Q.space("gap"),rowGap:Q.space("rowGap"),columnGap:Q.space("columnGap")};Object.assign(o_,{flexDir:o_.flexDirection});var sV={gridGap:Q.space("gridGap"),gridColumnGap:Q.space("gridColumnGap"),gridRowGap:Q.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},j5e={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:bt.outline},outlineOffset:!0,outlineColor:Q.colors("outlineColor")},ho={width:Q.sizesT("width"),inlineSize:Q.sizesT("inlineSize"),height:Q.sizes("height"),blockSize:Q.sizes("blockSize"),boxSize:Q.sizes(["width","height"]),minWidth:Q.sizes("minWidth"),minInlineSize:Q.sizes("minInlineSize"),minHeight:Q.sizes("minHeight"),minBlockSize:Q.sizes("minBlockSize"),maxWidth:Q.sizes("maxWidth"),maxInlineSize:Q.sizes("maxInlineSize"),maxHeight:Q.sizes("maxHeight"),maxBlockSize:Q.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:Q.propT("float",bt.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(ho,{w:ho.width,h:ho.height,minW:ho.minWidth,maxW:ho.maxWidth,minH:ho.minHeight,maxH:ho.maxHeight,overscroll:ho.overscrollBehavior,overscrollX:ho.overscrollBehaviorX,overscrollY:ho.overscrollBehaviorY});var G5e={listStyleType:!0,listStylePosition:!0,listStylePos:Q.prop("listStylePosition"),listStyleImage:!0,listStyleImg:Q.prop("listStyleImage")};function H5e(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 W5e=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(i))return a.get(i);const l=e(r,i,o,s);return a.set(i,l),l}},q5e=W5e(H5e),K5e={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},X5e={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Xx=(e,t,n)=>{const r={},i=q5e(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},Y5e={srOnly:{transform(e){return e===!0?K5e:e==="focusable"?X5e:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Xx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>Xx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>Xx(t,e,n)}},Rp={position:!0,pos:Q.prop("position"),zIndex:Q.prop("zIndex","zIndices"),inset:Q.spaceT("inset"),insetX:Q.spaceT(["left","right"]),insetInline:Q.spaceT("insetInline"),insetY:Q.spaceT(["top","bottom"]),insetBlock:Q.spaceT("insetBlock"),top:Q.spaceT("top"),insetBlockStart:Q.spaceT("insetBlockStart"),bottom:Q.spaceT("bottom"),insetBlockEnd:Q.spaceT("insetBlockEnd"),left:Q.spaceT("left"),insetInlineStart:Q.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:Q.spaceT("right"),insetInlineEnd:Q.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Rp,{insetStart:Rp.insetInlineStart,insetEnd:Rp.insetInlineEnd});var Q5e={ring:{transform:bt.ring},ringColor:Q.colors("--chakra-ring-color"),ringOffset:Q.prop("--chakra-ring-offset-width"),ringOffsetColor:Q.colors("--chakra-ring-offset-color"),ringInset:Q.prop("--chakra-ring-inset")},tn={margin:Q.spaceT("margin"),marginTop:Q.spaceT("marginTop"),marginBlockStart:Q.spaceT("marginBlockStart"),marginRight:Q.spaceT("marginRight"),marginInlineEnd:Q.spaceT("marginInlineEnd"),marginBottom:Q.spaceT("marginBottom"),marginBlockEnd:Q.spaceT("marginBlockEnd"),marginLeft:Q.spaceT("marginLeft"),marginInlineStart:Q.spaceT("marginInlineStart"),marginX:Q.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:Q.spaceT("marginInline"),marginY:Q.spaceT(["marginTop","marginBottom"]),marginBlock:Q.spaceT("marginBlock"),padding:Q.space("padding"),paddingTop:Q.space("paddingTop"),paddingBlockStart:Q.space("paddingBlockStart"),paddingRight:Q.space("paddingRight"),paddingBottom:Q.space("paddingBottom"),paddingBlockEnd:Q.space("paddingBlockEnd"),paddingLeft:Q.space("paddingLeft"),paddingInlineStart:Q.space("paddingInlineStart"),paddingInlineEnd:Q.space("paddingInlineEnd"),paddingX:Q.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:Q.space("paddingInline"),paddingY:Q.space(["paddingTop","paddingBottom"]),paddingBlock:Q.space("paddingBlock")};Object.assign(tn,{m:tn.margin,mt:tn.marginTop,mr:tn.marginRight,me:tn.marginInlineEnd,marginEnd:tn.marginInlineEnd,mb:tn.marginBottom,ml:tn.marginLeft,ms:tn.marginInlineStart,marginStart:tn.marginInlineStart,mx:tn.marginX,my:tn.marginY,p:tn.padding,pt:tn.paddingTop,py:tn.paddingY,px:tn.paddingX,pb:tn.paddingBottom,pl:tn.paddingLeft,ps:tn.paddingInlineStart,paddingStart:tn.paddingInlineStart,pr:tn.paddingRight,pe:tn.paddingInlineEnd,paddingEnd:tn.paddingInlineEnd});var Z5e={textDecorationColor:Q.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:Q.shadows("textShadow")},J5e={clipPath:!0,transform:Q.propT("transform",bt.transform),transformOrigin:!0,translateX:Q.spaceT("--chakra-translate-x"),translateY:Q.spaceT("--chakra-translate-y"),skewX:Q.degreeT("--chakra-skew-x"),skewY:Q.degreeT("--chakra-skew-y"),scaleX:Q.prop("--chakra-scale-x"),scaleY:Q.prop("--chakra-scale-y"),scale:Q.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:Q.degreeT("--chakra-rotate")},e4e={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:Q.prop("transitionDuration","transition.duration"),transitionProperty:Q.prop("transitionProperty","transition.property"),transitionTimingFunction:Q.prop("transitionTimingFunction","transition.easing")},t4e={fontFamily:Q.prop("fontFamily","fonts"),fontSize:Q.prop("fontSize","fontSizes",bt.px),fontWeight:Q.prop("fontWeight","fontWeights"),lineHeight:Q.prop("lineHeight","lineHeights"),letterSpacing:Q.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},n4e={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:Q.spaceT("scrollMargin"),scrollMarginTop:Q.spaceT("scrollMarginTop"),scrollMarginBottom:Q.spaceT("scrollMarginBottom"),scrollMarginLeft:Q.spaceT("scrollMarginLeft"),scrollMarginRight:Q.spaceT("scrollMarginRight"),scrollMarginX:Q.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:Q.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:Q.spaceT("scrollPadding"),scrollPaddingTop:Q.spaceT("scrollPaddingTop"),scrollPaddingBottom:Q.spaceT("scrollPaddingBottom"),scrollPaddingLeft:Q.spaceT("scrollPaddingLeft"),scrollPaddingRight:Q.spaceT("scrollPaddingRight"),scrollPaddingX:Q.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:Q.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function aV(e){return ba(e)&&e.reference?e.reference:String(e)}var t2=(e,...t)=>t.map(aV).join(` ${e} `).replace(/calc/g,""),zk=(...e)=>`calc(${t2("+",...e)})`,Vk=(...e)=>`calc(${t2("-",...e)})`,C5=(...e)=>`calc(${t2("*",...e)})`,jk=(...e)=>`calc(${t2("/",...e)})`,Gk=e=>{const t=aV(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:C5(t,-1)},ku=Object.assign(e=>({add:(...t)=>ku(zk(e,...t)),subtract:(...t)=>ku(Vk(e,...t)),multiply:(...t)=>ku(C5(e,...t)),divide:(...t)=>ku(jk(e,...t)),negate:()=>ku(Gk(e)),toString:()=>e.toString()}),{add:zk,subtract:Vk,multiply:C5,divide:jk,negate:Gk});function r4e(e,t="-"){return e.replace(/\s+/g,t)}function i4e(e){const t=r4e(e.toString());return s4e(o4e(t))}function o4e(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function s4e(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function a4e(e,t=""){return[t,e].filter(Boolean).join("-")}function l4e(e,t){return`var(${e}${t?`, ${t}`:""})`}function u4e(e,t=""){return i4e(`--${a4e(e,t)}`)}function T5(e,t,n){const r=u4e(e,n);return{variable:r,reference:l4e(r,t)}}function gMe(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=T5(`${e}-${i}`,o);continue}n[r]=T5(`${e}-${r}`)}return n}function c4e(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function d4e(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function E5(e){if(e==null)return e;const{unitless:t}=d4e(e);return t||typeof e=="number"?`${e}px`:e}var lV=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,jE=e=>Object.fromEntries(Object.entries(e).sort(lV));function Hk(e){const t=jE(e);return Object.assign(Object.values(t),t)}function f4e(e){const t=Object.keys(jE(e));return new Set(t)}function Wk(e){var t;if(!e)return e;e=(t=E5(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function pp(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${E5(e)})`),t&&n.push("and",`(max-width: ${E5(t)})`),n.join(" ")}function h4e(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=Hk(e),r=Object.entries(e).sort(lV).map(([s,a],l,u)=>{var d;let[,f]=(d=u[l+1])!=null?d:[];return f=parseFloat(f)>0?Wk(f):void 0,{_minW:Wk(a),breakpoint:s,minW:a,maxW:f,maxWQuery:pp(null,f),minWQuery:pp(a),minMaxQuery:pp(a,f)}}),i=f4e(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const a=Object.keys(s);return a.length>0&&a.every(l=>i.has(l))},asObject:jE(e),asArray:Hk(e),details:r,get(s){return r.find(a=>a.breakpoint===s)},media:[null,...n.map(s=>pp(s)).slice(1)],toArrayValue(s){if(!ba(s))throw new Error("toArrayValue: value must be an object");const a=o.map(l=>{var u;return(u=s[l])!=null?u:null});for(;c4e(a)===null;)a.pop();return a},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((a,l,u)=>{const d=o[u];return d!=null&&l!=null&&(a[d]=l),a},{})}}}var Tr={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}`},ol=e=>uV(t=>e(t,"&"),"[role=group]","[data-group]",".group"),ia=e=>uV(t=>e(t,"~ &"),"[data-peer]",".peer"),uV=(e,...t)=>t.map(e).join(", "),n2={_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",_firstLetter:"&::first-letter",_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:ol(Tr.hover),_peerHover:ia(Tr.hover),_groupFocus:ol(Tr.focus),_peerFocus:ia(Tr.focus),_groupFocusVisible:ol(Tr.focusVisible),_peerFocusVisible:ia(Tr.focusVisible),_groupActive:ol(Tr.active),_peerActive:ia(Tr.active),_groupDisabled:ol(Tr.disabled),_peerDisabled:ia(Tr.disabled),_groupInvalid:ol(Tr.invalid),_peerInvalid:ia(Tr.invalid),_groupChecked:ol(Tr.checked),_peerChecked:ia(Tr.checked),_groupFocusWithin:ol(Tr.focusWithin),_peerFocusWithin:ia(Tr.focusWithin),_peerPlaceholderShown:ia(Tr.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]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},cV=Object.keys(n2);function qk(e,t){return T5(String(e).replace(/\./g,"-"),void 0,t)}function p4e(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:s,value:a}=o,{variable:l,reference:u}=qk(i,t==null?void 0:t.cssVarPrefix);if(!s){if(i.startsWith("space")){const p=i.split("."),[g,...m]=p,v=`${g}.-${m.join(".")}`,x=ku.negate(a),_=ku.negate(u);r[v]={value:x,var:l,varRef:_}}n[l]=a,r[i]={value:a,var:l,varRef:u};continue}const d=p=>{const m=[String(i).split(".")[0],p].join(".");if(!e[m])return p;const{reference:x}=qk(m,t==null?void 0:t.cssVarPrefix);return x},f=ba(a)?a:{default:a};n=Ts(n,Object.entries(f).reduce((p,[g,m])=>{var v,x;if(!m)return p;const _=d(`${m}`);if(g==="default")return p[l]=_,p;const b=(x=(v=n2)==null?void 0:v[g])!=null?x:g;return p[b]={[l]:_},p},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function g4e(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function m4e(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function y4e(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function Kk(e,t,n={}){const{stop:r,getKey:i}=n;function o(s,a=[]){var l;if(y4e(s)||Array.isArray(s)){const u={};for(const[d,f]of Object.entries(s)){const p=(l=i==null?void 0:i(d))!=null?l:d,g=[...a,p];if(r!=null&&r(s,g))return t(s,a);u[p]=o(f,g)}return u}return t(s,a)}return o(e)}var v4e=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function _4e(e){return m4e(e,v4e)}function b4e(e){return e.semanticTokens}function S4e(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var w4e=e=>cV.includes(e)||e==="default";function x4e({tokens:e,semanticTokens:t}){const n={};return Kk(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),Kk(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(w4e)}),n}function mMe(e){var t;const n=S4e(e),r=_4e(n),i=b4e(n),o=x4e({tokens:r,semanticTokens:i}),s=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:a,cssVars:l}=p4e(o,{cssVarPrefix:s});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:a,__breakpoints:h4e(n.breakpoints)}),n}var GE=Ts({},Pv,Tt,z5e,o_,ho,V5e,Q5e,j5e,sV,Y5e,Rp,x5,tn,n4e,t4e,Z5e,J5e,G5e,e4e),C4e=Object.assign({},tn,ho,o_,sV,Rp),yMe=Object.keys(C4e),T4e=[...Object.keys(GE),...cV],E4e={...GE,...n2},A4e=e=>e in E4e,P4e=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const s in e){let a=Fu(e[s],t);if(a==null)continue;if(a=ba(a)&&n(a)?r(a):a,!Array.isArray(a)){o[s]=a;continue}const l=a.slice(0,i.length).length;for(let u=0;u<l;u+=1){const d=i==null?void 0:i[u];if(!d){o[s]=a[u];continue}o[d]=o[d]||{},a[u]!=null&&(o[d][s]=a[u])}}return o};function R4e(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 O4e(e){return/^var\(--.+\)$/.test(e)}var k4e=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!O4e(t),I4e=(e,t)=>{var n,r;if(t==null)return t;const i=l=>{var u,d;return(d=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:d.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[s,a]=R4e(t);return t=(r=(n=i(s))!=null?n:o(a))!=null?r:o(t),t};function M4e(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,s=!1)=>{var a,l,u;const d=Fu(o,r),f=P4e(d)(r);let p={};for(let g in f){const m=f[g];let v=Fu(m,r);g in n&&(g=n[g]),k4e(g,v)&&(v=I4e(r,v));let x=t[g];if(x===!0&&(x={property:g}),ba(v)){p[g]=(a=p[g])!=null?a:{},p[g]=Ts({},p[g],i(v,!0));continue}let _=(u=(l=x==null?void 0:x.transform)==null?void 0:l.call(x,v,r,d))!=null?u:v;_=x!=null&&x.processResult?i(_,!0):_;const b=Fu(x==null?void 0:x.property,r);if(!s&&(x!=null&&x.static)){const y=Fu(x.static,r);p=Ts({},p,y)}if(b&&Array.isArray(b)){for(const y of b)p[y]=_;continue}if(b){b==="&"&&ba(_)?p=Ts({},p,_):p[b]=_;continue}if(ba(_)){p=Ts({},p,_);continue}p[g]=_}return p};return i}var N4e=e=>t=>M4e({theme:t,pseudos:n2,configs:GE})(e);function vMe(e){return e}function _Me(e){return e}function bMe(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function L4e(e,t){if(Array.isArray(e))return e;if(ba(e))return t(e);if(e!=null)return[e]}function D4e(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function $4e(e){const t=e.__breakpoints;return function(r,i,o,s){var a,l;if(!t)return;const u={},d=L4e(o,t.toArrayValue);if(!d)return u;const f=d.length,p=f===1,g=!!r.parts;for(let m=0;m<f;m++){const v=t.details[m],x=t.details[D4e(d,m)],_=pp(v.minW,x==null?void 0:x._minW),b=Fu((a=r[i])==null?void 0:a[d[m]],s);if(b){if(g){(l=r.parts)==null||l.forEach(y=>{Ts(u,{[y]:p?b[y]:{[_]:b[y]}})});continue}if(!g){p?Ts(u,b):u[_]=b;continue}u[_]=b}}return u}}function F4e(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,s=$4e(o);return Ts({},Fu((n=e.baseStyle)!=null?n:{},t),s(e,"sizes",i,t),s(e,"variants",r,t))}}function SMe(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function dV(e){return g4e(e,["styleConfig","size","variant","colorScheme"])}function B4e(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function U4e(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 z4e=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(i))return a.get(i);const l=e(r,i,o,s);return a.set(i,l),l}},V4e=z4e(U4e);function fV(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var hV=e=>fV(e,t=>t!=null);function j4e(e){return typeof e=="function"}function G4e(e,...t){return j4e(e)?e(...t):e}function wMe(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var H4e=typeof Element<"u",W4e=typeof Map=="function",q4e=typeof Set=="function",K4e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Rv(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(!Rv(e[r],t[r]))return!1;return!0}var o;if(W4e&&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(!Rv(r.value[1],t.get(r.value[0])))return!1;return!0}if(q4e&&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(K4e&&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&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")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(H4e&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!Rv(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var X4e=function(t,n){try{return Rv(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const Y4e=dc(X4e);function pV(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:s}=v5e(),a=e?V4e(o,`components.${e}`):void 0,l=r||a,u=Ts({theme:o,colorMode:s},(n=l==null?void 0:l.defaultProps)!=null?n:{},hV(B4e(i,["children"]))),d=L.useRef({});if(l){const p=F4e(l)(u);Y4e(d.current,p)||(d.current=p)}return d.current}function gV(e,t={}){return pV(e,t)}function xMe(e,t={}){return pV(e,t)}var Q4e=new Set([...T4e,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Z4e=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function J4e(e){return Z4e.has(e)||!Q4e.has(e)}function eTe(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}var tTe=/^((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)-.*))$/,nTe=Kz(function(e){return tTe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),rTe=nTe,iTe=function(t){return t!=="theme"},Xk=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?rTe:iTe},Yk=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},oTe=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Yz(n,r,i),f5e(function(){return Qz(n,r,i)}),null},sTe=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=Yk(t,n,r),l=a||Xk(i),u=!l("as");return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{f.push(d[0][0]);for(var p=d.length,g=1;g<p;g++)f.push(d[g],d[0][g])}var m=tV(function(v,x,_){var b=u&&v.as||i,y="",S=[],C=v;if(v.theme==null){C={};for(var T in v)C[T]=v[T];C.theme=L.useContext(Ug)}typeof v.className=="string"?y=o5e(x.registered,S,v.className):v.className!=null&&(y=v.className+" ");var E=UE(f.concat(S),x.registered,C);y+=x.key+"-"+E.name,s!==void 0&&(y+=" "+s);var P=u&&a===void 0?Xk(b):l,k={};for(var O in v)u&&O==="as"||P(O)&&(k[O]=v[O]);return k.className=y,k.ref=_,L.createElement(L.Fragment,null,L.createElement(oTe,{cache:x,serialized:E,isStringTag:typeof b=="string"}),L.createElement(b,k))});return m.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=i,m.__emotion_styles=f,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return"."+s}}),m.withComponent=function(v,x){return e(v,A1({},n,x,{shouldForwardProp:Yk(m,x,!0)})).apply(void 0,f)},m}},aTe=["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"],s_=sTe.bind();aTe.forEach(function(e){s_[e]=s_(e)});var Qk,lTe=(Qk=s_.default)!=null?Qk:s_,uTe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...s}=t,a=fV(s,(f,p)=>A4e(p)),l=G4e(e,t),u=eTe({},i,l,hV(a),o),d=N4e(u)(t.theme);return r?[d,r]:d};function Yx(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=J4e);const i=uTe({baseStyle:n}),o=lTe(e,r)(i);return Lt.forwardRef(function(l,u){const{colorMode:d,forced:f}=zE();return Lt.createElement(o,{ref:u,"data-theme":f?d:void 0,...l})})}function cTe(){const e=new Map;return new Proxy(Yx,{apply(t,n,r){return Yx(...r)},get(t,n){return e.has(n)||e.set(n,Yx(n)),e.get(n)}})}var cc=cTe();function Pc(e){return L.forwardRef(e)}const mV=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),r2=L.createContext({}),Lm=L.createContext(null),i2=typeof document<"u",a_=i2?L.useLayoutEffect:L.useEffect,yV=L.createContext({strict:!1});function dTe(e,t,n,r){const{visualElement:i}=L.useContext(r2),o=L.useContext(yV),s=L.useContext(Lm),a=L.useContext(mV).reducedMotion,l=L.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;return L.useInsertionEffect(()=>{u&&u.update(n,s)}),a_(()=>{u&&u.render()}),L.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?a_:L.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function $d(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fTe(e,t,n){return L.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):$d(n)&&(n.current=r))},[t])}function zg(e){return typeof e=="string"||Array.isArray(e)}function o2(e){return typeof e=="object"&&typeof e.start=="function"}const HE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],WE=["initial",...HE];function s2(e){return o2(e.animate)||WE.some(t=>zg(e[t]))}function vV(e){return!!(s2(e)||e.variants)}function hTe(e,t){if(s2(e)){const{initial:n,animate:r}=e;return{initial:n===!1||zg(n)?n:void 0,animate:zg(r)?r:void 0}}return e.inherit!==!1?t:{}}function pTe(e){const{initial:t,animate:n}=hTe(e,L.useContext(r2));return L.useMemo(()=>({initial:t,animate:n}),[Zk(t),Zk(n)])}function Zk(e){return Array.isArray(e)?e.join(" "):e}const Jk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Vg={};for(const e in Jk)Vg[e]={isEnabled:t=>Jk[e].some(n=>!!t[n])};function gTe(e){for(const t in e)Vg[t]={...Vg[t],...e[t]}}const qE=L.createContext({}),_V=L.createContext({}),mTe=Symbol.for("motionComponentSymbol");function yTe({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&gTe(e);function o(a,l){let u;const d={...L.useContext(mV),...a,layoutId:vTe(a)},{isStatic:f}=d,p=pTe(a),g=r(a,f);if(!f&&i2){p.visualElement=dTe(i,g,d,t);const m=L.useContext(_V),v=L.useContext(yV).strict;p.visualElement&&(u=p.visualElement.loadFeatures(d,v,e,m))}return L.createElement(r2.Provider,{value:p},u&&p.visualElement?L.createElement(u,{visualElement:p.visualElement,...d}):null,n(i,a,fTe(g,p.visualElement,l),g,f,p.visualElement))}const s=L.forwardRef(o);return s[mTe]=i,s}function vTe({layoutId:e}){const t=L.useContext(qE).id;return t&&e!==void 0?t+"-"+e:e}function _Te(e){function t(r,i={}){return yTe(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 bTe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function KE(e){return typeof e!="string"||e.includes("-")?!1:!!(bTe.indexOf(e)>-1||/[A-Z]/.test(e))}const l_={};function STe(e){Object.assign(l_,e)}const Dm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rc=new Set(Dm);function bV(e,{layout:t,layoutId:n}){return Rc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!l_[e]||e==="opacity")}const ki=e=>!!(e&&e.getVelocity),wTe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xTe=Dm.length;function CTe(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<xTe;s++){const a=Dm[s];if(e[a]!==void 0){const l=wTe[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const SV=e=>t=>typeof t=="string"&&t.startsWith(e),wV=SV("--"),A5=SV("var(--"),TTe=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,ETe=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ql=(e,t,n)=>Math.min(Math.max(n,e),t),Oc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Op={...Oc,transform:e=>ql(0,1,e)},G0={...Oc,default:1},kp=e=>Math.round(e*1e5)/1e5,a2=/(-)?([\d]*\.?[\d])+/g,xV=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ATe=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function $m(e){return typeof e=="string"}const Fm=e=>({test:t=>$m(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),al=Fm("deg"),Is=Fm("%"),Be=Fm("px"),PTe=Fm("vh"),RTe=Fm("vw"),eI={...Is,parse:e=>Is.parse(e)/100,transform:e=>Is.transform(e*100)},tI={...Oc,transform:Math.round},CV={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,radius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,size:Be,top:Be,right:Be,bottom:Be,left:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,rotate:al,rotateX:al,rotateY:al,rotateZ:al,scale:G0,scaleX:G0,scaleY:G0,scaleZ:G0,skew:al,skewX:al,skewY:al,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:Op,originX:eI,originY:eI,originZ:Be,zIndex:tI,fillOpacity:Op,strokeOpacity:Op,numOctaves:tI};function XE(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,d=!0;for(const f in t){const p=t[f];if(wV(f)){o[f]=p;continue}const g=CV[f],m=ETe(p,g);if(Rc.has(f)){if(l=!0,s[f]=m,!d)continue;p!==(g.default||0)&&(d=!1)}else f.startsWith("origin")?(u=!0,a[f]=m):i[f]=m}if(t.transform||(l||r?i.transform=CTe(e.transform,n,d,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:p="50%",originZ:g=0}=a;i.transformOrigin=`${f} ${p} ${g}`}}const YE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function TV(e,t,n){for(const r in t)!ki(t[r])&&!bV(r,n)&&(e[r]=t[r])}function OTe({transformTemplate:e},t,n){return L.useMemo(()=>{const r=YE();return XE(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function kTe(e,t,n){const r=e.style||{},i={};return TV(i,r,e),Object.assign(i,OTe(e,t,n)),e.transformValues?e.transformValues(i):i}function ITe(e,t,n){const r={},i=kTe(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"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const MTe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function u_(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||MTe.has(e)}let EV=e=>!u_(e);function NTe(e){e&&(EV=t=>t.startsWith("on")?!u_(t):e(t))}try{NTe(require("@emotion/is-prop-valid").default)}catch{}function LTe(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(EV(i)||n===!0&&u_(i)||!t&&!u_(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function nI(e,t,n){return typeof e=="string"?e:Be.transform(t+n*e)}function DTe(e,t,n){const r=nI(t,e.x,e.width),i=nI(n,e.y,e.height);return`${r} ${i}`}const $Te={offset:"stroke-dashoffset",array:"stroke-dasharray"},FTe={offset:"strokeDashoffset",array:"strokeDasharray"};function BTe(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?$Te:FTe;e[o.offset]=Be.transform(-r);const s=Be.transform(t),a=Be.transform(n);e[o.array]=`${s} ${a}`}function QE(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},d,f,p){if(XE(e,u,d,p),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:m,dimensions:v}=e;g.transform&&(v&&(m.transform=g.transform),delete g.transform),v&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=DTe(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),s!==void 0&&BTe(g,s,a,l,!1)}const AV=()=>({...YE(),attrs:{}}),ZE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function UTe(e,t,n,r){const i=L.useMemo(()=>{const o=AV();return QE(o,t,{enableHardwareAcceleration:!1},ZE(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};TV(o,e.style,e),i.style={...o,...i.style}}return i}function zTe(e=!1){return(n,r,i,{latestValues:o},s)=>{const l=(KE(n)?UTe:ITe)(r,o,s,n),d={...LTe(r,typeof n=="string",e),...l,ref:i},{children:f}=r,p=L.useMemo(()=>ki(f)?f.get():f,[f]);return L.createElement(n,{...d,children:p})}}const JE=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function PV(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 RV=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function OV(e,t,n,r){PV(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(RV.has(i)?i:JE(i),t.attrs[i])}function e6(e,t){const{style:n}=e,r={};for(const i in n)(ki(n[i])||t.style&&ki(t.style[i])||bV(i,e))&&(r[i]=n[i]);return r}function kV(e,t){const n=e6(e,t);for(const r in e)if(ki(e[r])||ki(t[r])){const i=Dm.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function t6(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}function IV(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}const c_=e=>Array.isArray(e),VTe=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),jTe=e=>c_(e)?e[e.length-1]||0:e;function Ov(e){const t=ki(e)?e.get():e;return VTe(t)?t.toValue():t}function GTe({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:HTe(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const MV=e=>(t,n)=>{const r=L.useContext(r2),i=L.useContext(Lm),o=()=>GTe(e,t,r,i);return n?o():IV(o)};function HTe(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=Ov(o[p]);let{initial:s,animate:a}=e;const l=s2(e),u=vV(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const f=d?a:s;return f&&typeof f!="boolean"&&!o2(f)&&(Array.isArray(f)?f:[f]).forEach(g=>{const m=t6(e,g);if(!m)return;const{transitionEnd:v,transition:x,..._}=m;for(const b in _){let y=_[b];if(Array.isArray(y)){const S=d?y.length-1:0;y=y[S]}y!==null&&(i[b]=y)}for(const b in v)i[b]=v[b]}),i}const WTe={useVisualState:MV({scrapeMotionValuesFromProps:kV,createRenderState:AV,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}}QE(n,r,{enableHardwareAcceleration:!1},ZE(t.tagName),e.transformTemplate),OV(t,n)}})},qTe={useVisualState:MV({scrapeMotionValuesFromProps:e6,createRenderState:YE})};function KTe(e,{forwardMotionProps:t=!1},n,r){return{...KE(e)?WTe:qTe,preloadedFeatures:n,useRender:zTe(t),createVisualElement:r,Component:e}}function ma(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const NV=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function l2(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const XTe=e=>t=>NV(t)&&e(t,l2(t));function Sa(e,t,n,r){return ma(e,t,XTe(n),r)}const YTe=(e,t)=>n=>t(e(n)),Ml=(...e)=>e.reduce(YTe);function LV(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const rI=LV("dragHorizontal"),iI=LV("dragVertical");function DV(e){let t=!1;if(e==="y")t=iI();else if(e==="x")t=rI();else{const n=rI(),r=iI();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function $V(){const e=DV(!0);return e?(e(),!1):!0}class lu{constructor(t){this.isMounted=!1,this.node=t}update(){}}const jn=e=>e;function QTe(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,d=!1)=>{const f=d&&i,p=f?t:n;return u&&s.add(l),p.indexOf(l)===-1&&(p.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),s.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 d=t[u];d(l),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const H0=["prepare","read","update","preRender","render","postRender"],ZTe=40;function JTe(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=H0.reduce((f,p)=>(f[p]=QTe(()=>n=!0),f),{}),s=f=>o[f].process(i),a=f=>{n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,ZTe),1),i.timestamp=f,i.isProcessing=!0,H0.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:H0.reduce((f,p)=>{const g=o[p];return f[p]=(m,v=!1,x=!1)=>(n||l(),g.schedule(m,v,x)),f},{}),cancel:f=>H0.forEach(p=>o[p].cancel(f)),state:i,steps:o}}const{schedule:dn,cancel:ka,state:Vr,steps:Qx}=JTe(typeof requestAnimationFrame<"u"?requestAnimationFrame:jn,!0);function oI(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||$V())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&dn.update(()=>a[r](o,s))};return Sa(e.current,n,i,{passive:!e.getProps()[r]})}class eEe extends lu{mount(){this.unmount=Ml(oI(this.node,!0),oI(this.node,!1))}unmount(){}}class tEe extends lu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ml(ma(this.node.current,"focus",()=>this.onFocus()),ma(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const FV=(e,t)=>t?e===t?!0:FV(e,t.parentElement):!1;function Zx(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,l2(n))}class nEe extends lu{constructor(){super(...arguments),this.removeStartListeners=jn,this.removeEndListeners=jn,this.removeAccessibleListeners=jn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Sa(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();dn.update(()=>{FV(this.node.current,a.target)?u&&u(a,l):d&&d(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Sa(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ml(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Zx("up",(l,u)=>{const{onTap:d}=this.node.getProps();d&&dn.update(()=>d(l,u))})};this.removeEndListeners(),this.removeEndListeners=ma(this.node.current,"keyup",s),Zx("down",(a,l)=>{this.startPress(a,l)})},n=ma(this.node.current,"keydown",t),r=()=>{this.isPressing&&Zx("cancel",(o,s)=>this.cancelPress(o,s))},i=ma(this.node.current,"blur",r);this.removeAccessibleListeners=Ml(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&dn.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$V()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&dn.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Sa(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ma(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ml(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const P5=new WeakMap,Jx=new WeakMap,rEe=e=>{const t=P5.get(e.target);t&&t(e)},iEe=e=>{e.forEach(rEe)};function oEe({root:e,...t}){const n=e||document;Jx.has(n)||Jx.set(n,{});const r=Jx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(iEe,{root:e,...t})),r[i]}function sEe(e,t,n){const r=oEe(t);return P5.set(e,n),r.observe(e),()=>{P5.delete(e),r.unobserve(e)}}const aEe={some:0,all:1};class lEe extends lu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:aEe[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(l)};return sEe(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(uEe(t,n))&&this.startObserver()}unmount(){}}function uEe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const cEe={inView:{Feature:lEe},tap:{Feature:nEe},focus:{Feature:tEe},hover:{Feature:eEe}};function BV(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}function dEe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function fEe(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function u2(e,t,n){const r=e.getProps();return t6(r,t,n!==void 0?n:r.custom,dEe(e),fEe(e))}const hEe="framerAppearId",pEe="data-"+JE(hEe);let gEe=jn,n6=jn;const Nl=e=>e*1e3,wa=e=>e/1e3,mEe={current:!1},UV=e=>Array.isArray(e)&&typeof e[0]=="number";function zV(e){return!!(!e||typeof e=="string"&&VV[e]||UV(e)||Array.isArray(e)&&e.every(zV))}const gp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,VV={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gp([0,.65,.55,1]),circOut:gp([.55,0,1,.45]),backIn:gp([.31,.01,.66,-.59]),backOut:gp([.33,1.53,.69,.99])};function jV(e){if(e)return UV(e)?gp(e):Array.isArray(e)?e.map(jV):VV[e]}function yEe(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=jV(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const sI={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},eC={},GV={};for(const e in sI)GV[e]=()=>(eC[e]===void 0&&(eC[e]=sI[e]()),eC[e]);function vEe(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const HV=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,_Ee=1e-7,bEe=12;function SEe(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=HV(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>_Ee&&++a<bEe);return s}function Bm(e,t,n,r){if(e===t&&n===r)return jn;const i=o=>SEe(o,0,1,e,n);return o=>o===0||o===1?o:HV(i(o),t,r)}const wEe=Bm(.42,0,1,1),xEe=Bm(0,0,.58,1),WV=Bm(.42,0,.58,1),CEe=e=>Array.isArray(e)&&typeof e[0]!="number",qV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,KV=e=>t=>1-e(1-t),XV=e=>1-Math.sin(Math.acos(e)),r6=KV(XV),TEe=qV(r6),YV=Bm(.33,1.53,.69,.99),i6=KV(YV),EEe=qV(i6),AEe=e=>(e*=2)<1?.5*i6(e):.5*(2-Math.pow(2,-10*(e-1))),PEe={linear:jn,easeIn:wEe,easeInOut:WV,easeOut:xEe,circIn:XV,circInOut:TEe,circOut:r6,backIn:i6,backInOut:EEe,backOut:YV,anticipate:AEe},aI=e=>{if(Array.isArray(e)){n6(e.length===4);const[t,n,r,i]=e;return Bm(t,n,r,i)}else if(typeof e=="string")return PEe[e];return e},o6=(e,t)=>n=>!!($m(n)&&ATe.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),QV=(e,t,n)=>r=>{if(!$m(r))return r;const[i,o,s,a]=r.match(a2);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},REe=e=>ql(0,255,e),tC={...Oc,transform:e=>Math.round(REe(e))},Bu={test:o6("rgb","red"),parse:QV("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tC.transform(e)+", "+tC.transform(t)+", "+tC.transform(n)+", "+kp(Op.transform(r))+")"};function OEe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),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 R5={test:o6("#"),parse:OEe,transform:Bu.transform},Fd={test:o6("hsl","hue"),parse:QV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Is.transform(kp(t))+", "+Is.transform(kp(n))+", "+kp(Op.transform(r))+")"},ni={test:e=>Bu.test(e)||R5.test(e)||Fd.test(e),parse:e=>Bu.test(e)?Bu.parse(e):Fd.test(e)?Fd.parse(e):R5.parse(e),transform:e=>$m(e)?e:e.hasOwnProperty("red")?Bu.transform(e):Fd.transform(e)},vn=(e,t,n)=>-n*e+n*t+e;function nC(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 kEe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=nC(l,a,e+1/3),o=nC(l,a,e),s=nC(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const rC=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},IEe=[R5,Bu,Fd],MEe=e=>IEe.find(t=>t.test(e));function lI(e){const t=MEe(e);let n=t.parse(e);return t===Fd&&(n=kEe(n)),n}const ZV=(e,t)=>{const n=lI(e),r=lI(t),i={...n};return o=>(i.red=rC(n.red,r.red,o),i.green=rC(n.green,r.green,o),i.blue=rC(n.blue,r.blue,o),i.alpha=vn(n.alpha,r.alpha,o),Bu.transform(i))};function NEe(e){var t,n;return isNaN(e)&&$m(e)&&(((t=e.match(a2))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(xV))===null||n===void 0?void 0:n.length)||0)>0}const JV={regex:TTe,countKey:"Vars",token:"${v}",parse:jn},ej={regex:xV,countKey:"Colors",token:"${c}",parse:ni.parse},tj={regex:a2,countKey:"Numbers",token:"${n}",parse:Oc.parse};function iC(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function d_(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&iC(n,JV),iC(n,ej),iC(n,tj),n}function nj(e){return d_(e).values}function rj(e){const{values:t,numColors:n,numVars:r,tokenised:i}=d_(e),o=t.length;return s=>{let a=i;for(let l=0;l<o;l++)l<r?a=a.replace(JV.token,s[l]):l<r+n?a=a.replace(ej.token,ni.transform(s[l])):a=a.replace(tj.token,kp(s[l]));return a}}const LEe=e=>typeof e=="number"?0:e;function DEe(e){const t=nj(e);return rj(e)(t.map(LEe))}const Kl={test:NEe,parse:nj,createTransformer:rj,getAnimatableNone:DEe},ij=(e,t)=>n=>`${n>0?t:e}`;function oj(e,t){return typeof e=="number"?n=>vn(e,t,n):ni.test(e)?ZV(e,t):e.startsWith("var(")?ij(e,t):aj(e,t)}const sj=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>oj(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},$Ee=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=oj(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},aj=(e,t)=>{const n=Kl.createTransformer(t),r=d_(e),i=d_(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Ml(sj(r.values,i.values),n):ij(e,t)},jg=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},uI=(e,t)=>n=>vn(e,t,n);function FEe(e){return typeof e=="number"?uI:typeof e=="string"?ni.test(e)?ZV:aj:Array.isArray(e)?sj:typeof e=="object"?$Ee:uI}function BEe(e,t,n){const r=[],i=n||FEe(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||jn:t;a=Ml(l,a)}r.push(a)}return r}function lj(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(n6(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=BEe(t,r,i),a=s.length,l=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=jg(e[d],e[d+1],u);return s[d](f)};return n?u=>l(ql(e[0],e[o-1],u)):l}function UEe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=jg(0,t,r);e.push(vn(n,1,i))}}function zEe(e){const t=[0];return UEe(t,e.length-1),t}function VEe(e,t){return e.map(n=>n*t)}function jEe(e,t){return e.map(()=>t||WV).splice(0,e.length-1)}function f_({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=CEe(r)?r.map(aI):aI(r),o={done:!1,value:t[0]},s=VEe(n&&n.length===t.length?n:zEe(t),e),a=lj(s,t,{ease:Array.isArray(i)?i:jEe(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function uj(e,t){return t?e*(1e3/t):0}const GEe=5;function cj(e,t,n){const r=Math.max(t-GEe,0);return uj(n-e(r),t-r)}const oC=.001,HEe=.01,cI=10,WEe=.05,qEe=1;function KEe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;gEe(e<=Nl(cI));let s=1-t;s=ql(WEe,qEe,s),e=ql(HEe,cI,wa(e)),s<1?(i=u=>{const d=u*s,f=d*e,p=d-n,g=O5(u,s),m=Math.exp(-f);return oC-p/g*m},o=u=>{const f=u*s*e,p=f*n+n,g=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-f),v=O5(Math.pow(u,2),s);return(-i(u)+oC>0?-1:1)*((p-g)*m)/v}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-oC+d*f},o=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,l=YEe(i,o,a);if(e=Nl(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const XEe=12;function YEe(e,t,n){let r=n;for(let i=1;i<XEe;i++)r=r-e(r)/t(r);return r}function O5(e,t){return e*Math.sqrt(1-t*t)}const QEe=["duration","bounce"],ZEe=["stiffness","damping","mass"];function dI(e,t){return t.some(n=>e[n]!==void 0)}function JEe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!dI(e,ZEe)&&dI(e,QEe)){const n=KEe(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function dj({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:d,duration:f,isResolvedFromDuration:p}=JEe(r),g=d?-wa(d):0,m=l/(2*Math.sqrt(a*u)),v=o-i,x=wa(Math.sqrt(a/u)),_=Math.abs(v)<5;n||(n=_?.01:2),t||(t=_?.005:.5);let b;if(m<1){const y=O5(x,m);b=S=>{const C=Math.exp(-m*x*S);return o-C*((g+m*x*v)/y*Math.sin(y*S)+v*Math.cos(y*S))}}else if(m===1)b=y=>o-Math.exp(-x*y)*(v+(g+x*v)*y);else{const y=x*Math.sqrt(m*m-1);b=S=>{const C=Math.exp(-m*x*S),T=Math.min(y*S,300);return o-C*((g+m*x*v)*Math.sinh(T)+y*v*Math.cosh(T))/y}}return{calculatedDuration:p&&f||null,next:y=>{const S=b(y);if(p)s.done=y>=f;else{let C=g;y!==0&&(m<1?C=cj(b,y,S):C=0);const T=Math.abs(C)<=n,E=Math.abs(o-S)<=t;s.done=T&&E}return s.value=s.done?o:S,s}}}function fI({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let v=n*t;const x=f+v,_=s===void 0?x:s(x);_!==x&&(v=_-f);const b=P=>-v*Math.exp(-P/r),y=P=>_+b(P),S=P=>{const k=b(P),O=y(P);p.done=Math.abs(k)<=u,p.value=p.done?_:O};let C,T;const E=P=>{g(p.value)&&(C=P,T=dj({keyframes:[p.value,m(p.value)],velocity:cj(y,P,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:P=>{let k=!1;return!T&&C===void 0&&(k=!0,S(P),E(P)),C!==void 0&&P>C?T.next(P-C):(!k&&S(P),p)}}}const e6e=e=>{const t=({timestamp:n})=>e(n);return{start:()=>dn.update(t,!0),stop:()=>ka(t),now:()=>Vr.isProcessing?Vr.timestamp:performance.now()}},hI=2e4;function pI(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hI;)t+=n,r=e.next(t);return t>=hI?1/0:t}const t6e={decay:fI,inertia:fI,tween:f_,keyframes:f_,spring:dj};function h_({autoplay:e=!0,delay:t=0,driver:n=e6e,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:d,onUpdate:f,...p}){let g=1,m=!1,v,x;const _=()=>{x=new Promise(q=>{v=q})};_();let b;const y=t6e[i]||f_;let S;y!==f_&&typeof r[0]!="number"&&(S=lj([0,100],r,{clamp:!1}),r=[0,100]);const C=y({...p,keyframes:r});let T;a==="mirror"&&(T=y({...p,keyframes:[...r].reverse(),velocity:-(p.velocity||0)}));let E="idle",P=null,k=null,O=null;C.calculatedDuration===null&&o&&(C.calculatedDuration=pI(C));const{calculatedDuration:M}=C;let G=1/0,U=1/0;M!==null&&(G=M+s,U=G*(o+1)-s);let A=0;const N=q=>{if(k===null)return;g>0&&(k=Math.min(k,q)),g<0&&(k=Math.min(q-U/g,k)),P!==null?A=P:A=Math.round(q-k)*g;const Z=A-t*(g>=0?1:-1),ee=g>=0?Z<0:Z>U;A=Math.max(Z,0),E==="finished"&&P===null&&(A=U);let ie=A,se=C;if(o){const fe=A/G;let pe=Math.floor(fe),ve=fe%1;!ve&&fe>=1&&(ve=1),ve===1&&pe--,pe=Math.min(pe,o+1);const ye=!!(pe%2);ye&&(a==="reverse"?(ve=1-ve,s&&(ve-=s/G)):a==="mirror"&&(se=T));let We=ql(0,1,ve);A>U&&(We=a==="reverse"&&ye?1:0),ie=We*G}const le=ee?{done:!1,value:r[0]}:se.next(ie);S&&(le.value=S(le.value));let{done:W}=le;!ee&&M!==null&&(W=g>=0?A>=U:A<=0);const ne=P===null&&(E==="finished"||E==="running"&&W);return f&&f(le.value),ne&&D(),le},F=()=>{b&&b.stop(),b=void 0},B=()=>{E="idle",F(),v(),_(),k=O=null},D=()=>{E="finished",d&&d(),F(),v()},V=()=>{if(m)return;b||(b=n(N));const q=b.now();l&&l(),P!==null?k=q-P:(!k||E==="finished")&&(k=q),E==="finished"&&_(),O=k,P=null,E="running",b.start()};e&&V();const j={then(q,Z){return x.then(q,Z)},get time(){return wa(A)},set time(q){q=Nl(q),A=q,P!==null||!b||g===0?P=q:k=b.now()-q/g},get duration(){const q=C.calculatedDuration===null?pI(C):C.calculatedDuration;return wa(q)},get speed(){return g},set speed(q){q===g||!b||(g=q,j.time=wa(A))},get state(){return E},play:V,pause:()=>{E="paused",P=A},stop:()=>{m=!0,E!=="idle"&&(E="idle",u&&u(),B())},cancel:()=>{O!==null&&N(O),B()},complete:()=>{E="finished"},sample:q=>(k=0,N(q))};return j}const n6e=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),W0=10,r6e=2e4,i6e=(e,t)=>t.type==="spring"||e==="backgroundColor"||!zV(t.ease);function o6e(e,t,{onUpdate:n,onComplete:r,...i}){if(!(GV.waapi()&&n6e.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(_=>{a=_})};u();let{keyframes:d,duration:f=300,ease:p,times:g}=i;if(i6e(t,i)){const _=h_({...i,repeat:0,delay:0});let b={done:!1,value:d[0]};const y=[];let S=0;for(;!b.done&&S<r6e;)b=_.sample(S),y.push(b.value),S+=W0;g=void 0,d=y,f=S-W0,p="linear"}const m=yEe(e.owner.current,t,d,{...i,duration:f,ease:p,times:g}),v=()=>m.cancel(),x=()=>{dn.update(v),a(),u()};return m.onfinish=()=>{e.set(vEe(d,i)),r&&r(),x()},{then(_,b){return l.then(_,b)},get time(){return wa(m.currentTime||0)},set time(_){m.currentTime=Nl(_)},get speed(){return m.playbackRate},set speed(_){m.playbackRate=_},get duration(){return wa(f)},play:()=>{s||(m.play(),ka(v))},pause:()=>m.pause(),stop:()=>{if(s=!0,m.playState==="idle")return;const{currentTime:_}=m;if(_){const b=h_({...i,autoplay:!1});e.setWithVelocity(b.sample(_-W0).value,b.sample(_).value,W0)}x()},complete:()=>m.finish(),cancel:x}}function s6e({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:jn,pause:jn,stop:jn,then:o=>(o(),Promise.resolve()),cancel:jn,complete:jn});return t?h_({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const a6e={type:"spring",stiffness:500,damping:25,restSpeed:10},l6e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),u6e={type:"keyframes",duration:.8},c6e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},d6e=(e,{keyframes:t})=>t.length>2?u6e:Rc.has(e)?e.startsWith("scale")?l6e(t[1]):a6e:c6e,k5=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Kl.test(t)||t==="0")&&!t.startsWith("url(")),f6e=new Set(["brightness","contrast","saturate","opacity"]);function h6e(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(a2)||[];if(!r)return e;const i=n.replace(r,"");let o=f6e.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const p6e=/([a-z-]*)\(.*?\)/g,I5={...Kl,getAnimatableNone:e=>{const t=e.match(p6e);return t?t.map(h6e).join(" "):e}},g6e={...CV,color:ni,backgroundColor:ni,outlineColor:ni,fill:ni,stroke:ni,borderColor:ni,borderTopColor:ni,borderRightColor:ni,borderBottomColor:ni,borderLeftColor:ni,filter:I5,WebkitFilter:I5},s6=e=>g6e[e];function fj(e,t){let n=s6(e);return n!==I5&&(n=Kl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const hj=e=>/^0[^.\s]+$/.test(e);function m6e(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||hj(e)}function y6e(e,t,n,r){const i=k5(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),m6e(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const d=l[u];o[d]=fj(t,a)}return o}function v6e({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}function pj(e,t){return e[t]||e.default||e}const a6=(e,t,n,r={})=>i=>{const o=pj(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Nl(s);const l=y6e(t,e,n,o),u=l[0],d=l[l.length-1],f=k5(e,u),p=k5(e,d);let g={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:m=>{t.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(v6e(o)||(g={...g,...d6e(e,g)}),g.duration&&(g.duration=Nl(g.duration)),g.repeatDelay&&(g.repeatDelay=Nl(g.repeatDelay)),!f||!p||mEe.current||o.type===!1)return s6e(g);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=o6e(t,e,g);if(m)return m}return h_(g)};function p_(e){return!!(ki(e)&&e.add)}const _6e=e=>/^\-?\d*\.?\d+$/.test(e);function l6(e,t){e.indexOf(t)===-1&&e.push(t)}function u6(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class c6{constructor(){this.subscriptions=[]}add(t){return l6(this.subscriptions,t),()=>u6(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 s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const b6e=e=>!isNaN(parseFloat(e));class S6e{constructor(t,n={}){this.version="10.12.22",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=Vr;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,dn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>dn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=b6e(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new c6);const r=this.events[t].add(n);return t==="change"?()=>{r(),dn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?uj(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mf(e,t){return new S6e(e,t)}const gj=e=>t=>t.test(e),w6e={test:e=>e==="auto",parse:e=>e},mj=[Oc,Be,Is,al,RTe,PTe,w6e],ip=e=>mj.find(gj(e)),x6e=[...mj,ni,Kl],C6e=e=>x6e.find(gj(e));function T6e(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mf(n))}function E6e(e,t){const n=u2(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=jTe(o[s]);T6e(e,s,a)}}function A6e(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(_6e(d)||hj(d))?d=parseFloat(d):!C6e(d)&&Kl.test(u)&&(d=fj(l,u)),e.addValue(l,Mf(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function P6e(e,t){return t?(t[e]||t.default||t).from:void 0}function R6e(e,t,n){const r={};for(const i in e){const o=P6e(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function O6e({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function yj(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const p=e.getValue(f),g=a[f];if(!p||g===void 0||d&&O6e(d,f))continue;const m={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!p.hasAnimated){const x=e.getProps()[pEe];x&&(m.elapsed=window.HandoffAppearAnimations(x,f,p,dn))}p.start(a6(f,p,g,e.shouldReduceMotion&&Rc.has(f)?{type:!1}:m));const v=p.animation;p_(l)&&(l.add(f),v.then(()=>l.remove(f))),u.push(v)}return s&&Promise.all(u).then(()=>{s&&E6e(e,s)}),u}function M5(e,t,n={}){const r=u2(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(yj(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return k6e(e,t,u+l,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function k6e(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(I6e).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(M5(u,t,{...o,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function I6e(e,t){return e.sortNodePosition(t)}function M6e(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>M5(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=M5(e,t,n);else{const i=typeof t=="function"?u2(e,t,n.custom):t;r=Promise.all(yj(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const N6e=[...HE].reverse(),L6e=HE.length;function D6e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>M6e(e,n,r)))}function $6e(e){let t=D6e(e);const n=B6e();let r=!0;const i=(l,u)=>{const d=u2(e,u);if(d){const{transition:f,transitionEnd:p,...g}=d;l={...l,...g,...p}}return l};function o(l){t=l(e)}function s(l,u){const d=e.getProps(),f=e.getVariantContext(!0)||{},p=[],g=new Set;let m={},v=1/0;for(let _=0;_<L6e;_++){const b=N6e[_],y=n[b],S=d[b]!==void 0?d[b]:f[b],C=zg(S),T=b===u?y.isActive:null;T===!1&&(v=_);let E=S===f[b]&&S!==d[b]&&C;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...m},!y.isActive&&T===null||!S&&!y.prevProp||o2(S)||typeof S=="boolean")continue;const P=F6e(y.prevProp,S);let k=P||b===u&&y.isActive&&!E&&C||_>v&&C;const O=Array.isArray(S)?S:[S];let M=O.reduce(i,{});T===!1&&(M={});const{prevResolvedValues:G={}}=y,U={...G,...M},A=N=>{k=!0,g.delete(N),y.needsAnimating[N]=!0};for(const N in U){const F=M[N],B=G[N];m.hasOwnProperty(N)||(F!==B?c_(F)&&c_(B)?!BV(F,B)||P?A(N):y.protectedKeys[N]=!0:F!==void 0?A(N):g.add(N):F!==void 0&&g.has(N)?A(N):y.protectedKeys[N]=!0)}y.prevProp=S,y.prevResolvedValues=M,y.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&!E&&p.push(...O.map(N=>({animation:N,options:{type:b,...l}})))}if(g.size){const _={};g.forEach(b=>{const y=e.getBaseTarget(b);y!==void 0&&(_[b]=y)}),p.push({animation:_})}let x=!!p.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(p):Promise.resolve()}function a(l,u,d){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(g=>{var m;return(m=g.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),n[l].isActive=u;const p=s(d,l);for(const g in n)n[g].protectedKeys={};return p}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function F6e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!BV(t,e):!1}function xu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function B6e(){return{animate:xu(!0),whileInView:xu(),whileHover:xu(),whileTap:xu(),whileDrag:xu(),whileFocus:xu(),exit:xu()}}class U6e extends lu{constructor(t){super(t),t.animationState||(t.animationState=$6e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),o2(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let z6e=0;class V6e extends lu{constructor(){super(...arguments),this.id=z6e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const j6e={animation:{Feature:U6e},exit:{Feature:V6e}},gI=(e,t)=>Math.abs(e-t);function G6e(e,t){const n=gI(e.x,t.x),r=gI(e.y,t.y);return Math.sqrt(n**2+r**2)}class vj{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=aC(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=G6e(u.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=u,{timestamp:g}=Vr;this.history.push({...p,timestamp:g});const{onStart:m,onMove:v}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=sC(d,this.transformPagePoint),dn.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:p}=this.handlers,g=aC(u.type==="pointercancel"?this.lastMoveEventInfo:sC(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,g),p&&p(u,g)},!NV(t))return;this.handlers=n,this.transformPagePoint=r;const i=l2(t),o=sC(i,this.transformPagePoint),{point:s}=o,{timestamp:a}=Vr;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=n;l&&l(t,aC(o,this.history)),this.removeListeners=Ml(Sa(window,"pointermove",this.handlePointerMove),Sa(window,"pointerup",this.handlePointerUp),Sa(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ka(this.updatePoint)}}function sC(e,t){return t?{point:t(e.point)}:e}function mI(e,t){return{x:e.x-t.x,y:e.y-t.y}}function aC({point:e},t){return{point:e,delta:mI(e,_j(t)),offset:mI(e,H6e(t)),velocity:W6e(t,.1)}}function H6e(e){return e[0]}function _j(e){return e[e.length-1]}function W6e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=_j(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Nl(t)));)n--;if(!r)return{x:0,y:0};const o=wa(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Xi(e){return e.max-e.min}function N5(e,t=0,n=.01){return Math.abs(e-t)<=n}function yI(e,t,n,r=.5){e.origin=r,e.originPoint=vn(t.min,t.max,e.origin),e.scale=Xi(n)/Xi(t),(N5(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=vn(n.min,n.max,e.origin)-e.originPoint,(N5(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ip(e,t,n,r){yI(e.x,t.x,n.x,r?r.originX:void 0),yI(e.y,t.y,n.y,r?r.originY:void 0)}function vI(e,t,n){e.min=n.min+t.min,e.max=e.min+Xi(t)}function q6e(e,t,n){vI(e.x,t.x,n.x),vI(e.y,t.y,n.y)}function _I(e,t,n){e.min=t.min-n.min,e.max=e.min+Xi(t)}function Mp(e,t,n){_I(e.x,t.x,n.x),_I(e.y,t.y,n.y)}function K6e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?vn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?vn(n,e,r.max):Math.min(e,n)),e}function bI(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 X6e(e,{top:t,left:n,bottom:r,right:i}){return{x:bI(e.x,n,i),y:bI(e.y,t,r)}}function SI(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 Y6e(e,t){return{x:SI(e.x,t.x),y:SI(e.y,t.y)}}function Q6e(e,t){let n=.5;const r=Xi(e),i=Xi(t);return i>r?n=jg(t.min,t.max-r,e.min):r>i&&(n=jg(e.min,e.max-i,t.min)),ql(0,1,n)}function Z6e(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 L5=.35;function J6e(e=L5){return e===!1?e=0:e===!0&&(e=L5),{x:wI(e,"left","right"),y:wI(e,"top","bottom")}}function wI(e,t,n){return{min:xI(e,t),max:xI(e,n)}}function xI(e,t){return typeof e=="number"?e:e[t]||0}const CI=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bd=()=>({x:CI(),y:CI()}),TI=()=>({min:0,max:0}),Fn=()=>({x:TI(),y:TI()});function ps(e){return[e("x"),e("y")]}function bj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function eAe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tAe(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 lC(e){return e===void 0||e===1}function D5({scale:e,scaleX:t,scaleY:n}){return!lC(e)||!lC(t)||!lC(n)}function Pu(e){return D5(e)||Sj(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Sj(e){return EI(e.x)||EI(e.y)}function EI(e){return e&&e!=="0%"}function g_(e,t,n){const r=e-n,i=t*r;return n+i}function AI(e,t,n,r,i){return i!==void 0&&(e=g_(e,i,r)),g_(e,n,r)+t}function $5(e,t=0,n=1,r,i){e.min=AI(e.min,t,n,r,i),e.max=AI(e.max,t,n,r,i)}function wj(e,{x:t,y:n}){$5(e.x,t.translate,t.scale,t.originPoint),$5(e.y,n.translate,n.scale,n.originPoint)}function nAe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ud(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,wj(e,s)),r&&Pu(o.latestValues)&&Ud(e,o.latestValues))}t.x=PI(t.x),t.y=PI(t.y)}function PI(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function fl(e,t){e.min=e.min+t,e.max=e.max+t}function RI(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=vn(e.min,e.max,o);$5(e,t[n],t[r],s,t.scale)}const rAe=["x","scaleX","originX"],iAe=["y","scaleY","originY"];function Ud(e,t){RI(e.x,t,rAe),RI(e.y,t,iAe)}function xj(e,t){return bj(tAe(e.getBoundingClientRect(),t))}function oAe(e,t,n){const r=xj(e,n),{scroll:i}=t;return i&&(fl(r.x,i.offset.x),fl(r.y,i.offset.y)),r}const sAe=new WeakMap;class aAe{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=Fn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(l2(l,"page").point)},o=(l,u)=>{const{drag:d,dragPropagation:f,onDragStart:p}=this.getProps();if(d&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=DV(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ps(m=>{let v=this.getAxisMotionValue(m).get()||0;if(Is.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const _=x.layout.layoutBox[m];_&&(v=Xi(_)*(parseFloat(v)/100))}}this.originPoint[m]=v}),p&&dn.update(()=>p(l,u),!1,!0);const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:d,dragDirectionLock:f,onDirectionLock:p,onDrag:g}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:m}=u;if(f&&this.currentDirection===null){this.currentDirection=lAe(m),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),g&&g(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new vj(t,{onSessionStart:i,onStart:o,onMove:s,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&&dn.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!q0(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=K6e(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&$d(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=X6e(r.layoutBox,t):this.constraints=!1,this.elastic=J6e(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ps(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Z6e(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$d(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=oAe(r,i.root,this.visualElement.getTransformPagePoint());let s=Y6e(i.layout.layoutBox,o);if(n){const a=n(eAe(s));this.hasMutatedConstraints=!!a,a&&(s=bj(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ps(d=>{if(!q0(d,n,this.currentDirection))return;let f=l&&l[d]||{};s&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(a6(t,r,0,n))}stopAnimation(){ps(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ps(n=>{const{drag:r}=this.getProps();if(!q0(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-vn(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!$d(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ps(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=Q6e({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ps(s=>{if(!q0(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(vn(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;sAe.set(this.visualElement,this);const t=this.visualElement.current,n=Sa(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();$d(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=ma(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ps(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=L5,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function q0(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lAe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class uAe extends lu{constructor(t){super(t),this.removeGroupControls=jn,this.removeListeners=jn,this.controls=new aAe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||jn}unmount(){this.removeGroupControls(),this.removeListeners()}}const OI=e=>(t,n)=>{e&&dn.update(()=>e(t,n))};class cAe extends lu{constructor(){super(...arguments),this.removePointerDownListener=jn}onPointerDown(t){this.session=new vj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:OI(t),onStart:OI(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&dn.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Sa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function dAe(){const e=L.useContext(Lm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=L.useId();return L.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function CMe(){return fAe(L.useContext(Lm))}function fAe(e){return e===null?!0:e.isPresent}const kv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function kI(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const op={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const n=kI(e,t.target.x),r=kI(e,t.target.y);return`${n}% ${r}%`}},hAe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Kl.parse(e);if(i.length>5)return r;const o=Kl.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=vn(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class pAe extends Lt.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;STe(gAe),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()})),kv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||dn.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cj(e){const[t,n]=dAe(),r=L.useContext(qE);return Lt.createElement(pAe,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(_V),isPresent:t,safeToRemove:n})}const gAe={borderRadius:{...op,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:op,borderTopRightRadius:op,borderBottomLeftRadius:op,borderBottomRightRadius:op,boxShadow:hAe},Tj=["TopLeft","TopRight","BottomLeft","BottomRight"],mAe=Tj.length,II=e=>typeof e=="string"?parseFloat(e):e,MI=e=>typeof e=="number"||Be.test(e);function yAe(e,t,n,r,i,o){i?(e.opacity=vn(0,n.opacity!==void 0?n.opacity:1,vAe(r)),e.opacityExit=vn(t.opacity!==void 0?t.opacity:1,0,_Ae(r))):o&&(e.opacity=vn(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<mAe;s++){const a=`border${Tj[s]}Radius`;let l=NI(t,a),u=NI(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||MI(l)===MI(u)?(e[a]=Math.max(vn(II(l),II(u),r),0),(Is.test(u)||Is.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=vn(t.rotate||0,n.rotate||0,r))}function NI(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const vAe=Ej(0,.5,r6),_Ae=Ej(.5,.95,jn);function Ej(e,t,n){return r=>r<e?0:r>t?1:n(jg(e,t,r))}function LI(e,t){e.min=t.min,e.max=t.max}function fo(e,t){LI(e.x,t.x),LI(e.y,t.y)}function DI(e,t,n,r,i){return e-=t,e=g_(e,1/n,r),i!==void 0&&(e=g_(e,1/i,r)),e}function bAe(e,t=0,n=1,r=.5,i,o=e,s=e){if(Is.test(t)&&(t=parseFloat(t),t=vn(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=vn(o.min,o.max,r);e===o&&(a-=t),e.min=DI(e.min,t,n,a,i),e.max=DI(e.max,t,n,a,i)}function $I(e,t,[n,r,i],o,s){bAe(e,t[n],t[r],t[i],t.scale,o,s)}const SAe=["x","scaleX","originX"],wAe=["y","scaleY","originY"];function FI(e,t,n,r){$I(e.x,t,SAe,n?n.x:void 0,r?r.x:void 0),$I(e.y,t,wAe,n?n.y:void 0,r?r.y:void 0)}function BI(e){return e.translate===0&&e.scale===1}function Aj(e){return BI(e.x)&&BI(e.y)}function F5(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 UI(e){return Xi(e.x)/Xi(e.y)}class xAe{constructor(){this.members=[]}add(t){l6(this.members,t),t.scheduleRender()}remove(t){if(u6(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){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zI(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:d}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const CAe=(e,t)=>e.depth-t.depth;class TAe{constructor(){this.children=[],this.isDirty=!1}add(t){l6(this.children,t),this.isDirty=!0}remove(t){u6(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CAe),this.isDirty=!1,this.children.forEach(t)}}function EAe(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ka(r),e(o-t))};return dn.read(r,!0),()=>ka(r)}function AAe(e){window.MotionDebug&&window.MotionDebug.record(e)}function PAe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function RAe(e,t,n){const r=ki(e)?e:Mf(e);return r.start(a6("",r,t,n)),r.animation}const VI=["","X","Y","Z"],jI=1e3;let OAe=0;const Ru={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Pj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=OAe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Ru.totalNodes=Ru.resolvedTargetDeltas=Ru.recalculatedProjection=0,this.nodes.forEach(MAe),this.nodes.forEach(FAe),this.nodes.forEach(BAe),this.nodes.forEach(NAe),AAe(Ru)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new TAe)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new c6),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=PAe(s),this.instance=s;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=EAe(p,250),kv.hasAnimatedSinceResize&&(kv.hasAnimatedSinceResize=!1,this.nodes.forEach(HI))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||GAe,{onLayoutAnimationStart:x,onLayoutAnimationComplete:_}=d.getProps(),b=!this.targetLayout||!F5(this.targetLayout,m)||g,y=!p&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||p&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...pj(v,"layout"),onPlay:x,onComplete:_};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||HI(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ka(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(UAe),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(GI);return}this.isUpdating||this.nodes.forEach(DAe),this.isUpdating=!1,this.nodes.forEach($Ae),this.nodes.forEach(kAe),this.nodes.forEach(IAe),this.clearAllSnapshots();const a=performance.now();Vr.delta=ql(0,1e3/60,a-Vr.timestamp),Vr.timestamp=a,Vr.isProcessing=!0,Qx.update.process(Vr),Qx.preRender.process(Vr),Qx.render.process(Vr),Vr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(LAe),this.sharedNodes.forEach(zAe)}scheduleUpdateProjection(){dn.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Fn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Aj(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&(a||Pu(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),HAe(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Fn();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(fl(a.x,l.offset.x),fl(a.y,l.offset.y)),a}removeElementScroll(s){const a=Fn();fo(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:d,options:f}=u;if(u!==this.root&&d&&f.layoutScroll){if(d.isRoot){fo(a,s);const{scroll:p}=this.root;p&&(fl(a.x,-p.offset.x),fl(a.y,-p.offset.y))}fl(a.x,d.offset.x),fl(a.y,d.offset.y)}}return a}applyTransform(s,a=!1){const l=Fn();fo(l,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ud(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Pu(d.latestValues)&&Ud(l,d.latestValues)}return Pu(this.latestValues)&&Ud(l,this.latestValues),l}removeTransform(s){const a=Fn();fo(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Pu(u.latestValues))continue;D5(u.latestValues)&&u.updateSnapshot();const d=Fn(),f=u.measurePageBox();fo(d,f),FI(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Pu(this.latestValues)&&FI(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Vr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:p}=this.options;if(!(!this.layout||!(f||p))){if(this.resolvedRelativeTargetAt=Vr.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fn(),this.relativeTargetOrigin=Fn(),Mp(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),fo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Fn(),this.targetWithTransforms=Fn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),q6e(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fo(this.target,this.layout.layoutBox),wj(this.target,this.targetDelta)):fo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fn(),this.relativeTargetOrigin=Fn(),Mp(this.relativeTargetOrigin,this.target,g.target),fo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ru.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||D5(this.parent.latestValues)||Sj(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Vr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;fo(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;nAe(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=Bd(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Bd(),this.projectionDeltaWithTransform=Bd());const v=this.projectionTransform;Ip(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=zI(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==p||this.treeScale.y!==g)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Ru.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},f=Bd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Fn(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,v=g!==m,x=this.getStack(),_=!x||x.members.length<=1,b=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(jAe));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const C=S/1e3;WI(f.x,s.x,C),WI(f.y,s.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mp(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VAe(this.relativeTarget,this.relativeTargetOrigin,p,C),y&&F5(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Fn()),fo(y,this.relativeTarget)),v&&(this.animationValues=d,yAe(d,u,this.latestValues,C,b,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ka(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{kv.hasAnimatedSinceResize=!0,this.currentAnimation=RAe(0,jI,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Rj(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Fn();const f=Xi(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const p=Xi(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+p}fo(a,l),Ud(a,d),Ip(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new xAe),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let d=0;d<VI.length;d++){const f="rotate"+VI[d];l[f]&&(u[f]=l[f],s.setStaticValue(f,0))}s.render();for(const d in u)s.setStaticValue(d,u[d]);s.scheduleRender()}getProjectionStyles(s={}){var a,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Ov(s.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=Ov(s.pointerEvents)||""),this.hasProjected&&!Pu(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=zI(this.projectionDeltaWithTransform,this.treeScale,p),d&&(u.transform=d(p,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=p.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const v in l_){if(p[v]===void 0)continue;const{correct:x,applyTo:_}=l_[v],b=u.transform==="none"?p[v]:x(p[v],f);if(_){const y=_.length;for(let S=0;S<y;S++)u[_[S]]=b}else u[v]=b}return this.options.layoutId&&(u.pointerEvents=f===this?Ov(s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(GI),this.root.sharedNodes.clear()}}}function kAe(e){e.updateLayout()}function IAe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?ps(f=>{const p=s?n.measuredBox[f]:n.layoutBox[f],g=Xi(p);p.min=r[f].min,p.max=p.min+g}):Rj(o,n.layoutBox,r)&&ps(f=>{const p=s?n.measuredBox[f]:n.layoutBox[f],g=Xi(r[f]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Bd();Ip(a,r,n.layoutBox);const l=Bd();s?Ip(l,e.applyTransform(i,!0),n.measuredBox):Ip(l,r,n.layoutBox);const u=!Aj(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:g}=f;if(p&&g){const m=Fn();Mp(m,n.layoutBox,p.layoutBox);const v=Fn();Mp(v,r,g.layoutBox),F5(m,v)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function MAe(e){Ru.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function NAe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LAe(e){e.clearSnapshot()}function GI(e){e.clearMeasurements()}function DAe(e){e.isLayoutDirty=!1}function $Ae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function HI(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FAe(e){e.resolveTargetDelta()}function BAe(e){e.calcProjection()}function UAe(e){e.resetRotation()}function zAe(e){e.removeLeadSnapshot()}function WI(e,t,n){e.translate=vn(t.translate,0,n),e.scale=vn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qI(e,t,n,r){e.min=vn(t.min,n.min,r),e.max=vn(t.max,n.max,r)}function VAe(e,t,n,r){qI(e.x,t.x,n.x,r),qI(e.y,t.y,n.y,r)}function jAe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const GAe={duration:.45,ease:[.4,0,.1,1]};function KI(e){e.min=Math.round(e.min*2)/2,e.max=Math.round(e.max*2)/2}function HAe(e){KI(e.x),KI(e.y)}function Rj(e,t,n){return e==="position"||e==="preserve-aspect"&&!N5(UI(t),UI(n),.2)}const WAe=Pj({attachResizeListener:(e,t)=>ma(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),uC={current:void 0},Oj=Pj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!uC.current){const e=new WAe({});e.mount(window),e.setOptions({layoutScroll:!0}),uC.current=e}return uC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qAe={pan:{Feature:cAe},drag:{Feature:uAe,ProjectionNode:Oj,MeasureLayout:Cj}},KAe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function XAe(e){const t=KAe.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function B5(e,t,n=1){const[r,i]=XAe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():A5(i)?B5(i,t,n+1):i}function YAe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!A5(o))return;const s=B5(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!A5(o))continue;const s=B5(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const QAe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),kj=e=>QAe.has(e),ZAe=e=>Object.keys(e).some(kj),XI=e=>e===Oc||e===Be,YI=(e,t)=>parseFloat(e.split(", ")[t]),QI=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return YI(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?YI(o[1],e):0}},JAe=new Set(["x","y","z"]),ePe=Dm.filter(e=>!JAe.has(e));function tPe(e){const t=[];return ePe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Nf={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:QI(4,13),y:QI(5,14)};Nf.translateX=Nf.x;Nf.translateY=Nf.y;const nPe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Nf[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Nf[u](l,o)}),e},rPe=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(kj);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],f=ip(d);const p=t[l];let g;if(c_(p)){const m=p.length,v=p[0]===null?1:0;d=p[v],f=ip(d);for(let x=v;x<m&&p[x]!==null;x++)g?n6(ip(p[x])===g):g=ip(p[x])}else g=ip(p);if(f!==g)if(XI(f)&&XI(g)){const m=u.get();typeof m=="string"&&u.set(parseFloat(m)),typeof p=="string"?t[l]=parseFloat(p):Array.isArray(p)&&g===Be&&(t[l]=p.map(parseFloat))}else f!=null&&f.transform&&(g!=null&&g.transform)&&(d===0||p===0)?d===0?u.set(g.transform(d)):t[l]=f.transform(p):(s||(o=tPe(e),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],u.jump(p))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=nPe(t,e,a);return o.length&&o.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),i2&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function iPe(e,t,n,r){return ZAe(t)?rPe(e,t,n,r):{target:t,transitionEnd:r}}const oPe=(e,t,n,r)=>{const i=YAe(e,t,r);return t=i.target,r=i.transitionEnd,iPe(e,t,n,r)},U5={current:null},Ij={current:!1};function sPe(){if(Ij.current=!0,!!i2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>U5.current=e.matches;e.addListener(t),t()}else U5.current=!1}function aPe(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(ki(o))e.addValue(i,o),p_(r)&&r.add(i);else if(ki(s))e.addValue(i,Mf(o,{owner:e})),p_(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,Mf(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ZI=new WeakMap,Mj=Object.keys(Vg),lPe=Mj.length,JI=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],uPe=WE.length;class cPe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>dn.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=s2(n),this.isVariantNode=vV(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const f in d){const p=d[f];a[f]!==void 0&&ki(p)&&(p.set(a[f],!1),p_(u)&&u.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,ZI.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Ij.current||sPe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:U5.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ZI.delete(this.current),this.projection&&this.projection.unmount(),ka(this.notifyUpdate),ka(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Rc.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&dn.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;for(let l=0;l<lPe;l++){const u=Mj[l],{isEnabled:d,Feature:f,ProjectionNode:p,MeasureLayout:g}=Vg[u];p&&(s=p),d(n)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),g&&(a=g))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:f,layoutScroll:p,layoutRoot:g}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||f&&$d(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:g})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<JI.length;r++){const i=JI[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aPe(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<uPe;r++){const i=WE[r],o=this.props[i];(zg(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Mf(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=t6(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ki(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new c6),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Nj extends cPe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=R6e(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){A6e(this,r,s);const a=oPe(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function dPe(e){return window.getComputedStyle(e)}class fPe extends Nj{readValueFromInstance(t,n){if(Rc.has(n)){const r=s6(n);return r&&r.default||0}else{const r=dPe(t),i=(wV(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xj(t,n)}build(t,n,r,i){XE(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return e6(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ki(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){PV(t,n,r,i)}}class hPe extends Nj{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Rc.has(n)){const r=s6(n);return r&&r.default||0}return n=RV.has(n)?n:JE(n),t.getAttribute(n)}measureInstanceViewportBox(){return Fn()}scrapeMotionValuesFromProps(t,n){return kV(t,n)}build(t,n,r,i){QE(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){OV(t,n,r,i)}mount(t){this.isSVGTag=ZE(t.tagName),super.mount(t)}}const pPe=(e,t)=>KE(e)?new hPe(t,{enableHardwareAcceleration:!1}):new fPe(t,{enableHardwareAcceleration:!0}),gPe={layout:{ProjectionNode:Oj,MeasureLayout:Cj}},mPe={...j6e,...cEe,...qAe,...gPe},yPe=_Te((e,t)=>KTe(e,t,mPe,pPe));function Lj(){const e=L.useRef(!1);return a_(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function vPe(){const e=Lj(),[t,n]=L.useState(0),r=L.useCallback(()=>{e.current&&n(t+1)},[t]);return[L.useCallback(()=>dn.postRender(r),[r]),t]}class _Pe extends L.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 bPe({children:e,isPresent:t}){const n=L.useId(),r=L.useRef(null),i=L.useRef({width:0,height:0,top:0,left:0});return L.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!r.current||!o||!s)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: ${s}px !important;
|
||
top: ${a}px !important;
|
||
left: ${l}px !important;
|
||
}
|
||
`),()=>{document.head.removeChild(u)}},[t]),L.createElement(_Pe,{isPresent:t,childRef:r,sizeRef:i},L.cloneElement(e,{ref:r}))}const cC=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=IV(SPe),l=L.useId(),u=L.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const f of a.values())if(!f)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return L.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),L.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=L.createElement(bPe,{isPresent:n},e)),L.createElement(Lm.Provider,{value:u},e)};function SPe(){return new Map}function wPe(e){return L.useEffect(()=>()=>e(),[])}const wd=e=>e.key||"";function xPe(e,t){e.forEach(n=>{const r=wd(n);t.set(r,n)})}function CPe(e){const t=[];return L.Children.forEach(e,n=>{L.isValidElement(n)&&t.push(n)}),t}const TPe=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=L.useContext(qE).forceRender||vPe()[0],l=Lj(),u=CPe(e);let d=u;const f=L.useRef(new Map).current,p=L.useRef(d),g=L.useRef(new Map).current,m=L.useRef(!0);if(a_(()=>{m.current=!1,xPe(u,g),p.current=d}),wPe(()=>{m.current=!0,g.clear(),f.clear()}),m.current)return L.createElement(L.Fragment,null,d.map(b=>L.createElement(cC,{key:wd(b),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},b)));d=[...d];const v=p.current.map(wd),x=u.map(wd),_=v.length;for(let b=0;b<_;b++){const y=v[b];x.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return s==="wait"&&f.size&&(d=[]),f.forEach((b,y)=>{if(x.indexOf(y)!==-1)return;const S=g.get(y);if(!S)return;const C=v.indexOf(y);let T=b;if(!T){const E=()=>{g.delete(y),f.delete(y);const P=p.current.findIndex(k=>k.key===y);if(p.current.splice(P,1),!f.size){if(p.current=u,l.current===!1)return;a(),r&&r()}};T=L.createElement(cC,{key:wd(S),isPresent:!1,onExitComplete:E,custom:t,presenceAffectsLayout:o,mode:s},S),f.set(y,T)}d.splice(C,0,T)}),d=d.map(b=>{const y=b.key;return f.has(y)?b:L.createElement(cC,{key:wd(b),isPresent:!0,presenceAffectsLayout:o,mode:s},b)}),L.createElement(L.Fragment,null,f.size?d:d.map(b=>L.cloneElement(b)))};var EPe=m5e({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Dj=Pc((e,t)=>{const n=gV("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:s="transparent",className:a,...l}=dV(e),u=iV("chakra-spinner",a),d={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${EPe} ${o} linear infinite`,...n};return ue.jsx(cc.div,{ref:t,__css:d,className:u,...l,children:r&&ue.jsx(cc.span,{srOnly:!0,children:r})})});Dj.displayName="Spinner";var z5=Pc(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...s}=t;return ue.jsx("img",{width:r,height:i,ref:n,alt:o,...s})});z5.displayName="NativeImage";function APe(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:s,sizes:a,ignoreFallback:l}=e,[u,d]=L.useState("pending");L.useEffect(()=>{d(n?"loading":"pending")},[n]);const f=L.useRef(),p=L.useCallback(()=>{if(!n)return;g();const m=new Image;m.src=n,s&&(m.crossOrigin=s),r&&(m.srcset=r),a&&(m.sizes=a),t&&(m.loading=t),m.onload=v=>{g(),d("loaded"),i==null||i(v)},m.onerror=v=>{g(),d("failed"),o==null||o(v)},f.current=m},[n,s,r,a,i,o,t]),g=()=>{f.current&&(f.current.onload=null,f.current.onerror=null,f.current=null)};return y5e(()=>{if(!l)return u==="loading"&&p(),()=>{g()}},[u,p,l]),l?"loaded":u}var PPe=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function RPe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var d6=Pc(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:s,align:a,fit:l,loading:u,ignoreFallback:d,crossOrigin:f,fallbackStrategy:p="beforeLoadOrError",referrerPolicy:g,...m}=t,v=r!==void 0||i!==void 0,x=u!=null||d||!v,_=APe({...t,crossOrigin:f,ignoreFallback:x}),b=PPe(_,p),y={ref:n,objectFit:l,objectPosition:a,...x?m:RPe(m,["onError","onLoad"])};return b?i||ue.jsx(cc.img,{as:z5,className:"chakra-image__placeholder",src:r,...y}):ue.jsx(cc.img,{as:z5,src:o,srcSet:s,crossOrigin:f,loading:u,referrerPolicy:g,className:"chakra-image",...y})});d6.displayName="Image";var V5=Pc(function(t,n){const r=gV("Heading",t),{className:i,...o}=dV(t);return ue.jsx(cc.h2,{ref:n,className:iV("chakra-heading",t.className),...o,__css:r})});V5.displayName="Heading";var f6=cc("div");f6.displayName="Box";var $j=Pc(function(t,n){const{size:r,centerContent:i=!0,...o}=t,s=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return ue.jsx(f6,{ref:n,boxSize:r,__css:{...s,flexShrink:0,flexGrow:0},...o})});$j.displayName="Square";var OPe=Pc(function(t,n){const{size:r,...i}=t;return ue.jsx($j,{size:r,ref:n,borderRadius:"9999px",...i})});OPe.displayName="Circle";var h6=Pc(function(t,n){const{direction:r,align:i,justify:o,wrap:s,basis:a,grow:l,shrink:u,...d}=t,f={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:s,flexBasis:a,flexGrow:l,flexShrink:u};return ue.jsx(cc.div,{ref:n,__css:f,...d})});h6.displayName="Flex";const kPe=""+new URL("logo-13003d72.png",import.meta.url).href,IPe=()=>ue.jsxs(h6,{position:"relative",width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",bg:"#151519",children:[ue.jsx(d6,{src:kPe,w:"8rem",h:"8rem"}),ue.jsx(Dj,{label:"Loading",color:"grey",position:"absolute",size:"sm",width:"24px !important",height:"24px !important",right:"1.5rem",bottom:"1.5rem"})]}),MPe=L.memo(IPe);function j5(e){"@babel/helpers - typeof";return j5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j5(e)}var Fj=[],NPe=Fj.forEach,LPe=Fj.slice;function G5(e){return NPe.call(LPe.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Bj(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":j5(XMLHttpRequest))==="object"}function DPe(e){return!!e&&typeof e.then=="function"}function $Pe(e){return DPe(e)?e:Promise.resolve(e)}function FPe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var H5={exports:{}},K0={exports:{}},e7;function BPe(){return e7||(e7=1,function(e,t){var n=typeof self<"u"?self:He,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(s){var a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function l(A){return A&&DataView.prototype.isPrototypeOf(A)}if(a.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(A){return A&&u.indexOf(Object.prototype.toString.call(A))>-1};function f(A){if(typeof A!="string"&&(A=String(A)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(A))throw new TypeError("Invalid character in header field name");return A.toLowerCase()}function p(A){return typeof A!="string"&&(A=String(A)),A}function g(A){var N={next:function(){var F=A.shift();return{done:F===void 0,value:F}}};return a.iterable&&(N[Symbol.iterator]=function(){return N}),N}function m(A){this.map={},A instanceof m?A.forEach(function(N,F){this.append(F,N)},this):Array.isArray(A)?A.forEach(function(N){this.append(N[0],N[1])},this):A&&Object.getOwnPropertyNames(A).forEach(function(N){this.append(N,A[N])},this)}m.prototype.append=function(A,N){A=f(A),N=p(N);var F=this.map[A];this.map[A]=F?F+", "+N:N},m.prototype.delete=function(A){delete this.map[f(A)]},m.prototype.get=function(A){return A=f(A),this.has(A)?this.map[A]:null},m.prototype.has=function(A){return this.map.hasOwnProperty(f(A))},m.prototype.set=function(A,N){this.map[f(A)]=p(N)},m.prototype.forEach=function(A,N){for(var F in this.map)this.map.hasOwnProperty(F)&&A.call(N,this.map[F],F,this)},m.prototype.keys=function(){var A=[];return this.forEach(function(N,F){A.push(F)}),g(A)},m.prototype.values=function(){var A=[];return this.forEach(function(N){A.push(N)}),g(A)},m.prototype.entries=function(){var A=[];return this.forEach(function(N,F){A.push([F,N])}),g(A)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function v(A){if(A.bodyUsed)return Promise.reject(new TypeError("Already read"));A.bodyUsed=!0}function x(A){return new Promise(function(N,F){A.onload=function(){N(A.result)},A.onerror=function(){F(A.error)}})}function _(A){var N=new FileReader,F=x(N);return N.readAsArrayBuffer(A),F}function b(A){var N=new FileReader,F=x(N);return N.readAsText(A),F}function y(A){for(var N=new Uint8Array(A),F=new Array(N.length),B=0;B<N.length;B++)F[B]=String.fromCharCode(N[B]);return F.join("")}function S(A){if(A.slice)return A.slice(0);var N=new Uint8Array(A.byteLength);return N.set(new Uint8Array(A)),N.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(A){this._bodyInit=A,A?typeof A=="string"?this._bodyText=A:a.blob&&Blob.prototype.isPrototypeOf(A)?this._bodyBlob=A:a.formData&&FormData.prototype.isPrototypeOf(A)?this._bodyFormData=A:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(A)?this._bodyText=A.toString():a.arrayBuffer&&a.blob&&l(A)?(this._bodyArrayBuffer=S(A.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(A)||d(A))?this._bodyArrayBuffer=S(A):this._bodyText=A=Object.prototype.toString.call(A):this._bodyText="",this.headers.get("content-type")||(typeof A=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(A)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var A=v(this);if(A)return A;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var A=v(this);if(A)return A;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(A){var N=A.toUpperCase();return T.indexOf(N)>-1?N:A}function P(A,N){N=N||{};var F=N.body;if(A instanceof P){if(A.bodyUsed)throw new TypeError("Already read");this.url=A.url,this.credentials=A.credentials,N.headers||(this.headers=new m(A.headers)),this.method=A.method,this.mode=A.mode,this.signal=A.signal,!F&&A._bodyInit!=null&&(F=A._bodyInit,A.bodyUsed=!0)}else this.url=String(A);if(this.credentials=N.credentials||this.credentials||"same-origin",(N.headers||!this.headers)&&(this.headers=new m(N.headers)),this.method=E(N.method||this.method||"GET"),this.mode=N.mode||this.mode||null,this.signal=N.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(F)}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function k(A){var N=new FormData;return A.trim().split("&").forEach(function(F){if(F){var B=F.split("="),D=B.shift().replace(/\+/g," "),V=B.join("=").replace(/\+/g," ");N.append(decodeURIComponent(D),decodeURIComponent(V))}}),N}function O(A){var N=new m,F=A.replace(/\r?\n[\t ]+/g," ");return F.split(/\r?\n/).forEach(function(B){var D=B.split(":"),V=D.shift().trim();if(V){var j=D.join(":").trim();N.append(V,j)}}),N}C.call(P.prototype);function M(A,N){N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in N?N.statusText:"OK",this.headers=new m(N.headers),this.url=N.url||"",this._initBody(A)}C.call(M.prototype),M.prototype.clone=function(){return new M(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},M.error=function(){var A=new M(null,{status:0,statusText:""});return A.type="error",A};var G=[301,302,303,307,308];M.redirect=function(A,N){if(G.indexOf(N)===-1)throw new RangeError("Invalid status code");return new M(null,{status:N,headers:{location:A}})},s.DOMException=o.DOMException;try{new s.DOMException}catch{s.DOMException=function(N,F){this.message=N,this.name=F;var B=Error(N);this.stack=B.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function U(A,N){return new Promise(function(F,B){var D=new P(A,N);if(D.signal&&D.signal.aborted)return B(new s.DOMException("Aborted","AbortError"));var V=new XMLHttpRequest;function j(){V.abort()}V.onload=function(){var q={status:V.status,statusText:V.statusText,headers:O(V.getAllResponseHeaders()||"")};q.url="responseURL"in V?V.responseURL:q.headers.get("X-Request-URL");var Z="response"in V?V.response:V.responseText;F(new M(Z,q))},V.onerror=function(){B(new TypeError("Network request failed"))},V.ontimeout=function(){B(new TypeError("Network request failed"))},V.onabort=function(){B(new s.DOMException("Aborted","AbortError"))},V.open(D.method,D.url,!0),D.credentials==="include"?V.withCredentials=!0:D.credentials==="omit"&&(V.withCredentials=!1),"responseType"in V&&a.blob&&(V.responseType="blob"),D.headers.forEach(function(q,Z){V.setRequestHeader(Z,q)}),D.signal&&(D.signal.addEventListener("abort",j),V.onreadystatechange=function(){V.readyState===4&&D.signal.removeEventListener("abort",j)}),V.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return U.polyfill=!0,o.fetch||(o.fetch=U,o.Headers=m,o.Request=P,o.Response=M),s.Headers=m,s.Request=P,s.Response=M,s.fetch=U,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(K0,K0.exports)),K0.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof He<"u"&&He.fetch?n=He.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof FPe<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||BPe();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(H5,H5.exports);var Uj=H5.exports;const zj=dc(Uj),t7=v7({__proto__:null,default:zj},[Uj]);function m_(e){"@babel/helpers - typeof";return m_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m_(e)}var xa;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?xa=global.fetch:typeof window<"u"&&window.fetch?xa=window.fetch:xa=fetch);var Gg;Bj()&&(typeof global<"u"&&global.XMLHttpRequest?Gg=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Gg=window.XMLHttpRequest));var y_;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?y_=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(y_=window.ActiveXObject));!xa&&t7&&!Gg&&!y_&&(xa=zj||t7);typeof xa!="function"&&(xa=void 0);var W5=function(t,n){if(n&&m_(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},n7=function(t,n,r){xa(t,n).then(function(i){if(!i.ok)return r(i.statusText||"Error",{status:i.status});i.text().then(function(o){r(null,{status:i.status,data:o})}).catch(r)}).catch(r)},r7=!1,UPe=function(t,n,r,i){t.queryStringParams&&(n=W5(n,t.queryStringParams));var o=G5({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);r&&(o["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,a=G5({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:o},r7?{}:s);try{n7(n,a,i)}catch(l){if(!s||Object.keys(s).length===0||!l.message||l.message.indexOf("not implemented")<0)return i(l);try{Object.keys(s).forEach(function(u){delete a[u]}),n7(n,a,i),r7=!0}catch(u){i(u)}}},zPe=function(t,n,r,i){r&&m_(r)==="object"&&(r=W5("",r).slice(1)),t.queryStringParams&&(n=W5(n,t.queryStringParams));try{var o;Gg?o=new Gg:o=new y_("MSXML2.XMLHTTP.3.0"),o.open(r?"POST":"GET",n,1),t.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!t.withCredentials,r&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var a in s)o.setRequestHeader(a,s[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(r)}catch(l){console&&console.log(l)}},VPe=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},xa&&n.indexOf("file:")!==0)return UPe(t,n,r,i);if(Bj()||typeof ActiveXObject=="function")return zPe(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Hg(e){"@babel/helpers - typeof";return Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hg(e)}function jPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i7(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,Vj(r.key),r)}}function GPe(e,t,n){return t&&i7(e.prototype,t),n&&i7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HPe(e,t,n){return t=Vj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vj(e){var t=WPe(e,"string");return Hg(t)==="symbol"?t:String(t)}function WPe(e,t){if(Hg(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Hg(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qPe=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return HPe({},r,i||"")},parseLoadPayload:function(n,r){},request:VPe,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},jj=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};jPe(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return GPe(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=G5(i,this.options||{},qPe()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,o,s){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,i)),l=$Pe(l),l.then(function(u){if(!u)return s(null,{});var d=a.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});a.loadUrl(d,s,r,o)})}},{key:"loadUrl",value:function(n,r,i,o){var s=this,a=typeof i=="string"?[i]:i,l=typeof o=="string"?[o]:o,u=this.options.parseLoadPayload(a,l);this.options.request(this.options,n,u,function(d,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&d&&d.message&&d.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+d.message,!0);if(d)return r(d,!1);var p,g;try{typeof f.data=="string"?p=s.options.parse(f.data,i,o):p=f.data}catch{g="failed parsing "+n+" to json"}if(g)return r(g,!1);r(null,p)})}},{key:"create",value:function(n,r,i,o,s){var a=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,i,o),u=0,d=[],f=[];n.forEach(function(p){var g=a.options.addPath;typeof a.options.addPath=="function"&&(g=a.options.addPath(p,r));var m=a.services.interpolator.interpolate(g,{lng:p,ns:r});a.options.request(a.options,m,l,function(v,x){u+=1,d.push(v),f.push(x),u===n.length&&typeof s=="function"&&s(d,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,o=r.languageUtils,s=r.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],u=function(f){var p=o.toResolveHierarchy(f);p.forEach(function(g){l.indexOf(g)<0&&l.push(g)})};u(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return u(d)}),l.forEach(function(d){n.allOptions.ns.forEach(function(f){i.read(d,f,"read",null,null,function(p,g){p&&s.warn("loading namespace ".concat(f," for language ").concat(d," failed"),p),!p&&g&&s.log("loaded namespace ".concat(f," for language ").concat(d),g),i.loaded("".concat(d,"|").concat(f),p,g)})})})}}}]),e}();jj.type="backend";const KPe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,XPe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},YPe=e=>XPe[e],QPe=e=>e.replace(KPe,YPe);let q5={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:QPe};function ZPe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};q5={...q5,...e}}function EMe(){return q5}let Gj;function JPe(e){Gj=e}function AMe(){return Gj}const e8e={type:"3rdParty",init(e){ZPe(e.options.react),JPe(e)}};Kr.use(jj).use(e8e).init({fallbackLng:"en",debug:!1,backend:{loadPath:"/locales/{{lng}}.json"},interpolation:{escapeValue:!1},returnNull:!1});const c2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function p6(e){return"nodeType"in e}function fi(e){var t,n;return e?Yf(e)?e:p6(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function g6(e){const{Document:t}=fi(e);return e instanceof t}function Um(e){return Yf(e)?!1:e instanceof fi(e).HTMLElement}function t8e(e){return e instanceof fi(e).SVGElement}function Qf(e){return e?Yf(e)?e.document:p6(e)?g6(e)?e:Um(e)?e.ownerDocument:document:document:document}const $s=c2?L.useLayoutEffect:L.useEffect;function d2(e){const t=L.useRef(e);return $s(()=>{t.current=e}),L.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function n8e(){const e=L.useRef(null),t=L.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=L.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Wg(e,t){t===void 0&&(t=[e]);const n=L.useRef(e);return $s(()=>{n.current!==e&&(n.current=e)},t),n}function zm(e,t){const n=L.useRef();return L.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function v_(e){const t=d2(e),n=L.useRef(null),r=L.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function __(e){const t=L.useRef();return L.useEffect(()=>{t.current=e},[e]),t.current}let dC={};function f2(e,t){return L.useMemo(()=>{if(t)return t;const n=dC[e]==null?0:dC[e]+1;return dC[e]=n,e+"-"+n},[e,t])}function Hj(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,s)=>{const a=Object.entries(s);for(const[l,u]of a){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const uf=Hj(1),b_=Hj(-1);function r8e(e){return"clientX"in e&&"clientY"in e}function m6(e){if(!e)return!1;const{KeyboardEvent:t}=fi(e.target);return t&&e instanceof t}function i8e(e){if(!e)return!1;const{TouchEvent:t}=fi(e.target);return t&&e instanceof t}function qg(e){if(i8e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return r8e(e)?{x:e.clientX,y:e.clientY}:null}const Kg=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Kg.Translate.toString(e),Kg.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),o7="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function o8e(e){return e.matches(o7)?e:e.querySelector(o7)}const s8e={display:"none"};function a8e(e){let{id:t,value:n}=e;return Lt.createElement("div",{id:t,style:s8e},n)}const l8e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function u8e(e){let{id:t,announcement:n}=e;return Lt.createElement("div",{id:t,style:l8e,role:"status","aria-live":"assertive","aria-atomic":!0},n)}function c8e(){const[e,t]=L.useState("");return{announce:L.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Wj=L.createContext(null);function d8e(e){const t=L.useContext(Wj);L.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function f8e(){const[e]=L.useState(()=>new Set),t=L.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[L.useCallback(r=>{let{type:i,event:o}=r;e.forEach(s=>{var a;return(a=s[i])==null?void 0:a.call(s,o)})},[e]),t]}const h8e={draggable:`
|
||
To pick up a draggable item, press the space bar.
|
||
While dragging, use the arrow keys to move the item.
|
||
Press space again to drop the item in its new position, or press escape to cancel.
|
||
`},p8e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function g8e(e){let{announcements:t=p8e,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=h8e}=e;const{announce:o,announcement:s}=c8e(),a=f2("DndLiveRegion"),[l,u]=L.useState(!1);if(L.useEffect(()=>{u(!0)},[]),d8e(L.useMemo(()=>({onDragStart(f){let{active:p}=f;o(t.onDragStart({active:p}))},onDragMove(f){let{active:p,over:g}=f;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(f){let{active:p,over:g}=f;o(t.onDragOver({active:p,over:g}))},onDragEnd(f){let{active:p,over:g}=f;o(t.onDragEnd({active:p,over:g}))},onDragCancel(f){let{active:p,over:g}=f;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!l)return null;const d=Lt.createElement(Lt.Fragment,null,Lt.createElement(a8e,{id:r,value:i.draggable}),Lt.createElement(u8e,{id:a,announcement:s}));return n?bs.createPortal(d,n):d}var er;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(er||(er={}));function S_(){}function s7(e,t){return L.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function m8e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return L.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const ts=Object.freeze({x:0,y:0});function y8e(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function v8e(e,t){const n=qg(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function _8e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function b8e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function S8e(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function w8e(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function x8e(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,u=e.width*e.height,d=s*a,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const C8e=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=x8e(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(b8e)};function T8e(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const E8e=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const o of t){const{id:s}=o,a=n.get(s);if(a&&T8e(r,a)){const u=S8e(a).reduce((f,p)=>f+y8e(r,p),0),d=Number((u/4).toFixed(4));i.push({id:s,data:{droppableContainer:o,value:d}})}}return i.sort(_8e)};function A8e(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function qj(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ts}function P8e(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const R8e=P8e(1);function Kj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function O8e(e,t,n){const r=Kj(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),u=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const k8e={ignoreTransform:!1};function Vm(e,t){t===void 0&&(t=k8e);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=fi(e).getComputedStyle(e);u&&(n=O8e(n,u,d))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function a7(e){return Vm(e,{ignoreTransform:!0})}function I8e(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function M8e(e,t){return t===void 0&&(t=fi(e).getComputedStyle(e)),t.position==="fixed"}function N8e(e,t){t===void 0&&(t=fi(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function y6(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(g6(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Um(i)||t8e(i)||n.includes(i))return n;const o=fi(e).getComputedStyle(i);return i!==e&&N8e(i,o)&&n.push(i),M8e(i,o)?n:r(i.parentNode)}return e?r(e):n}function Xj(e){const[t]=y6(e,1);return t??null}function fC(e){return!c2||!e?null:Yf(e)?e:p6(e)?g6(e)||e===Qf(e).scrollingElement?window:Um(e)?e:null:null}function Yj(e){return Yf(e)?e.scrollX:e.scrollLeft}function Qj(e){return Yf(e)?e.scrollY:e.scrollTop}function K5(e){return{x:Yj(e),y:Qj(e)}}var fr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(fr||(fr={}));function Zj(e){return!c2||!e?!1:e===document.scrollingElement}function Jj(e){const t={x:0,y:0},n=Zj(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const L8e={x:.2,y:.2};function D8e(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=L8e);const{isTop:u,isBottom:d,isLeft:f,isRight:p}=Jj(e),g={x:0,y:0},m={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+v.height?(g.y=fr.Backward,m.y=r*Math.abs((t.top+v.height-o)/v.height)):!d&&l>=t.bottom-v.height&&(g.y=fr.Forward,m.y=r*Math.abs((t.bottom-v.height-l)/v.height)),!p&&a>=t.right-v.width?(g.x=fr.Forward,m.x=r*Math.abs((t.right-v.width-a)/v.width)):!f&&s<=t.left+v.width&&(g.x=fr.Backward,m.x=r*Math.abs((t.left+v.width-s)/v.width)),{direction:g,speed:m}}function $8e(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function eG(e){return e.reduce((t,n)=>uf(t,K5(n)),ts)}function F8e(e){return e.reduce((t,n)=>t+Yj(n),0)}function B8e(e){return e.reduce((t,n)=>t+Qj(n),0)}function tG(e,t){if(t===void 0&&(t=Vm),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Xj(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const U8e=[["x",["left","right"],F8e],["y",["top","bottom"],B8e]];class v6{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=y6(n),i=eG(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of U8e)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(r),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Np{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function z8e(e){const{EventTarget:t}=fi(e);return e instanceof t?e:Qf(e)}function hC(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var po;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(po||(po={}));function l7(e){e.preventDefault()}function V8e(e){e.stopPropagation()}var Qt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Qt||(Qt={}));const nG={start:[Qt.Space,Qt.Enter],cancel:[Qt.Esc],end:[Qt.Space,Qt.Enter]},j8e=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qt.Right:return{...n,x:n.x+25};case Qt.Left:return{...n,x:n.x-25};case Qt.Down:return{...n,y:n.y+25};case Qt.Up:return{...n,y:n.y-25}}};class rG{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Np(Qf(n)),this.windowListeners=new Np(fi(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(po.Resize,this.handleCancel),this.windowListeners.add(po.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(po.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&tG(r),n(ts)}handleKeyDown(t){if(m6(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=nG,coordinateGetter:s=j8e,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:ts;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:n,context:r.current,currentCoordinates:d});if(f){const p=b_(f,d),g={x:0,y:0},{scrollableAncestors:m}=r.current;for(const v of m){const x=t.code,{isTop:_,isRight:b,isLeft:y,isBottom:S,maxScroll:C,minScroll:T}=Jj(v),E=$8e(v),P={x:Math.min(x===Qt.Right?E.right-E.width/2:E.right,Math.max(x===Qt.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(x===Qt.Down?E.bottom-E.height/2:E.bottom,Math.max(x===Qt.Down?E.top:E.top+E.height/2,f.y))},k=x===Qt.Right&&!b||x===Qt.Left&&!y,O=x===Qt.Down&&!S||x===Qt.Up&&!_;if(k&&P.x!==f.x){const M=v.scrollLeft+p.x,G=x===Qt.Right&&M<=C.x||x===Qt.Left&&M>=T.x;if(G&&!p.y){v.scrollTo({left:M,behavior:a});return}G?g.x=v.scrollLeft-M:g.x=x===Qt.Right?v.scrollLeft-C.x:v.scrollLeft-T.x,g.x&&v.scrollBy({left:-g.x,behavior:a});break}else if(O&&P.y!==f.y){const M=v.scrollTop+p.y,G=x===Qt.Down&&M<=C.y||x===Qt.Up&&M>=T.y;if(G&&!p.x){v.scrollTo({top:M,behavior:a});return}G?g.y=v.scrollTop-M:g.y=x===Qt.Down?v.scrollTop-C.y:v.scrollTop-T.y,g.y&&v.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,uf(b_(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}rG.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=nG,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function u7(e){return!!(e&&"distance"in e)}function c7(e){return!!(e&&"delay"in e)}class _6{constructor(t,n,r){var i;r===void 0&&(r=z8e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=Qf(s),this.documentListeners=new Np(this.document),this.listeners=new Np(r),this.windowListeners=new Np(fi(s)),this.initialCoordinates=(i=qg(o))!=null?i:ts,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(po.Resize,this.handleCancel),this.windowListeners.add(po.DragStart,l7),this.windowListeners.add(po.VisibilityChange,this.handleCancel),this.windowListeners.add(po.ContextMenu,l7),this.documentListeners.add(po.Keydown,this.handleKeydown),n){if(u7(n))return;if(c7(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(po.Click,V8e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(po.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=qg(t))!=null?n:ts,u=b_(i,l);if(!r&&a){if(c7(a))return hC(u,a.tolerance)?this.handleCancel():void 0;if(u7(a))return a.tolerance!=null&&hC(u,a.tolerance)?this.handleCancel():hC(u,a.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Qt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const G8e={move:{name:"pointermove"},end:{name:"pointerup"}};class iG extends _6{constructor(t){const{event:n}=t,r=Qf(n.target);super(t,G8e,r)}}iG.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const H8e={move:{name:"mousemove"},end:{name:"mouseup"}};var X5;(function(e){e[e.RightClick=2]="RightClick"})(X5||(X5={}));class oG extends _6{constructor(t){super(t,H8e,Qf(t.event.target))}}oG.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===X5.RightClick?!1:(r==null||r({event:n}),!0)}}];const pC={move:{name:"touchmove"},end:{name:"touchend"}};class sG extends _6{constructor(t){super(t,pC)}static setup(){return window.addEventListener(pC.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(pC.move.name,t)};function t(){}}}sG.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var Lp;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Lp||(Lp={}));var w_;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(w_||(w_={}));function W8e(e){let{acceleration:t,activator:n=Lp.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=w_.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e;const g=K8e({delta:f,disabled:!o}),[m,v]=n8e(),x=L.useRef({x:0,y:0}),_=L.useRef({x:0,y:0}),b=L.useMemo(()=>{switch(n){case Lp.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Lp.DraggableRect:return i}},[n,i,l]),y=L.useRef(null),S=L.useCallback(()=>{const T=y.current;if(!T)return;const E=x.current.x*_.current.x,P=x.current.y*_.current.y;T.scrollBy(E,P)},[]),C=L.useMemo(()=>a===w_.TreeOrder?[...u].reverse():u,[a,u]);L.useEffect(()=>{if(!o||!u.length||!b){v();return}for(const T of C){if((r==null?void 0:r(T))===!1)continue;const E=u.indexOf(T),P=d[E];if(!P)continue;const{direction:k,speed:O}=D8e(T,P,b,t,p);for(const M of["x","y"])g[M][k[M]]||(O[M]=0,k[M]=0);if(O.x>0||O.y>0){v(),y.current=T,m(S,s),x.current=O,_.current=k;return}}x.current={x:0,y:0},_.current={x:0,y:0},v()},[t,S,r,v,o,s,JSON.stringify(b),JSON.stringify(g),m,u,C,d,JSON.stringify(p)])}const q8e={x:{[fr.Backward]:!1,[fr.Forward]:!1},y:{[fr.Backward]:!1,[fr.Forward]:!1}};function K8e(e){let{delta:t,disabled:n}=e;const r=__(t);return zm(i=>{if(n||!r||!i)return q8e;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[fr.Backward]:i.x[fr.Backward]||o.x===-1,[fr.Forward]:i.x[fr.Forward]||o.x===1},y:{[fr.Backward]:i.y[fr.Backward]||o.y===-1,[fr.Forward]:i.y[fr.Forward]||o.y===1}}},[n,t,r])}function X8e(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return zm(i=>{var o;return t===null?null:(o=r??i)!=null?o:null},[r,t])}function Y8e(e,t){return L.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var Xg;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Xg||(Xg={}));var Y5;(function(e){e.Optimized="optimized"})(Y5||(Y5={}));const d7=new Map;function Q8e(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=L.useState(null),{frequency:a,measure:l,strategy:u}=i,d=L.useRef(e),f=x(),p=Wg(f),g=L.useCallback(function(_){_===void 0&&(_=[]),!p.current&&s(b=>b===null?_:b.concat(_.filter(y=>!b.includes(y))))},[p]),m=L.useRef(null),v=zm(_=>{if(f&&!n)return d7;if(!_||_===d7||d.current!==e||o!=null){const b=new Map;for(let y of e){if(!y)continue;if(o&&o.length>0&&!o.includes(y.id)&&y.rect.current){b.set(y.id,y.rect.current);continue}const S=y.node.current,C=S?new v6(l(S),S):null;y.rect.current=C,C&&b.set(y.id,C)}return b}return _},[e,o,n,f,l]);return L.useEffect(()=>{d.current=e},[e]),L.useEffect(()=>{f||g()},[n,f]),L.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),L.useEffect(()=>{f||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{g(),m.current=null},a))},[a,f,g,...r]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:o!=null};function x(){switch(u){case Xg.Always:return!1;case Xg.BeforeDragging:return n;default:return!n}}}function b6(e,t){return zm(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Z8e(e,t){return b6(e,t)}function J8e(e){let{callback:t,disabled:n}=e;const r=d2(t),i=L.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return L.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function h2(e){let{callback:t,disabled:n}=e;const r=d2(t),i=L.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return L.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function e9e(e){return new v6(Vm(e),e)}function f7(e,t,n){t===void 0&&(t=e9e);const[r,i]=L.useReducer(a,null),o=J8e({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),s=h2({callback:i});return $s(()=>{i(),e?(s==null||s.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),o==null||o.disconnect())},[e]),r;function a(l){if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d}}function t9e(e){const t=b6(e);return qj(e,t)}const h7=[];function n9e(e){const t=L.useRef(e),n=zm(r=>e?r&&r!==h7&&e&&t.current&&e.parentNode===t.current.parentNode?r:y6(e):h7,[e]);return L.useEffect(()=>{t.current=e},[e]),n}function r9e(e){const[t,n]=L.useState(null),r=L.useRef(e),i=L.useCallback(o=>{const s=fC(o.target);s&&n(a=>a?(a.set(s,K5(s)),new Map(a)):null)},[]);return L.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const u=fC(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,K5(u)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const u=fC(l);u==null||u.removeEventListener("scroll",i)})}},[i,e]),L.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>uf(o,s),ts):eG(e):ts,[e,t])}function p7(e,t){t===void 0&&(t=[]);const n=L.useRef(null);return L.useEffect(()=>{n.current=null},t),L.useEffect(()=>{const r=e!==ts;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?b_(e,n.current):ts}function i9e(e){L.useEffect(()=>{if(!c2)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function o9e(e,t){return L.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function aG(e){return L.useMemo(()=>e?I8e(e):null,[e])}const gC=[];function s9e(e,t){t===void 0&&(t=Vm);const[n]=e,r=aG(n?fi(n):null),[i,o]=L.useReducer(a,gC),s=h2({callback:o});return e.length>0&&i===gC&&o(),$s(()=>{e.length?e.forEach(l=>s==null?void 0:s.observe(l)):(s==null||s.disconnect(),o())},[e]),i;function a(){return e.length?e.map(l=>Zj(l)?r:new v6(t(l),l)):gC}}function lG(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Um(t)?t:e}function a9e(e){let{measure:t}=e;const[n,r]=L.useState(null),i=L.useCallback(u=>{for(const{target:d}of u)if(Um(d)){r(f=>{const p=t(d);return f?{...f,width:p.width,height:p.height}:p});break}},[t]),o=h2({callback:i}),s=L.useCallback(u=>{const d=lG(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[a,l]=v_(s);return L.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const l9e=[{sensor:iG,options:{}},{sensor:rG,options:{}}],u9e={current:{}},Iv={draggable:{measure:a7},droppable:{measure:a7,strategy:Xg.WhileDragging,frequency:Y5.Optimized},dragOverlay:{measure:Vm}};class Dp extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const c9e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Dp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:S_},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Iv,measureDroppableContainers:S_,windowRect:null,measuringScheduled:!1},uG={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:S_,draggableNodes:new Map,over:null,measureDroppableContainers:S_},jm=L.createContext(uG),cG=L.createContext(c9e);function d9e(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Dp}}}function f9e(e,t){switch(t.type){case er.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case er.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case er.DragEnd:case er.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case er.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Dp(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case er.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Dp(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case er.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Dp(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function h9e(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=L.useContext(jm),o=__(r),s=__(n==null?void 0:n.id);return L.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!m6(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=o8e(d);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function dG(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function p9e(e){return L.useMemo(()=>({draggable:{...Iv.draggable,...e==null?void 0:e.draggable},droppable:{...Iv.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Iv.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function g9e(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=L.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;$s(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=qj(d,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const p=Xj(u);p&&p.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const p2=L.createContext({...ts,scaleX:1,scaleY:1});var hl;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(hl||(hl={}));const m9e=L.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:d=l9e,collisionDetection:f=C8e,measuring:p,modifiers:g,...m}=t;const v=L.useReducer(f9e,void 0,d9e),[x,_]=v,[b,y]=f8e(),[S,C]=L.useState(hl.Uninitialized),T=S===hl.Initialized,{draggable:{active:E,nodes:P,translate:k},droppable:{containers:O}}=x,M=E?P.get(E):null,G=L.useRef({initial:null,translated:null}),U=L.useMemo(()=>{var Xt;return E!=null?{id:E,data:(Xt=M==null?void 0:M.data)!=null?Xt:u9e,rect:G}:null},[E,M]),A=L.useRef(null),[N,F]=L.useState(null),[B,D]=L.useState(null),V=Wg(m,Object.values(m)),j=f2("DndDescribedBy",s),q=L.useMemo(()=>O.getEnabled(),[O]),Z=p9e(p),{droppableRects:ee,measureDroppableContainers:ie,measuringScheduled:se}=Q8e(q,{dragging:T,dependencies:[k.x,k.y],config:Z.droppable}),le=X8e(P,E),W=L.useMemo(()=>B?qg(B):null,[B]),ne=js(),fe=Z8e(le,Z.draggable.measure);g9e({activeNode:E?P.get(E):null,config:ne.layoutShiftCompensation,initialRect:fe,measure:Z.draggable.measure});const pe=f7(le,Z.draggable.measure,fe),ve=f7(le?le.parentElement:null),ye=L.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),We=O.getNodeFor((n=ye.current.over)==null?void 0:n.id),Me=a9e({measure:Z.dragOverlay.measure}),Ee=(r=Me.nodeRef.current)!=null?r:le,lt=T?(i=Me.rect)!=null?i:pe:null,_e=!!(Me.nodeRef.current&&Me.rect),jt=t9e(_e?null:pe),Hn=aG(Ee?fi(Ee):null),Bt=n9e(T?We??le:null),it=s9e(Bt),gt=dG(g,{transform:{x:k.x-jt.x,y:k.y-jt.y,scaleX:1,scaleY:1},activatorEvent:B,active:U,activeNodeRect:pe,containerNodeRect:ve,draggingNodeRect:lt,over:ye.current.over,overlayNodeRect:Me.rect,scrollableAncestors:Bt,scrollableAncestorRects:it,windowRect:Hn}),Jt=W?uf(W,k):null,Nr=r9e(Bt),yr=p7(Nr),hi=p7(Nr,[pe]),wn=uf(gt,yr),on=lt?R8e(lt,gt):null,Wn=U&&on?f({active:U,collisionRect:on,droppableRects:ee,droppableContainers:q,pointerCoordinates:Jt}):null,sn=w8e(Wn,"id"),[Gt,vr]=L.useState(null),Lr=_e?gt:uf(gt,hi),Xr=A8e(Lr,(o=Gt==null?void 0:Gt.rect)!=null?o:null,pe),Ii=L.useCallback((Xt,Ot)=>{let{sensor:qn,options:Dn}=Ot;if(A.current==null)return;const or=P.get(A.current);if(!or)return;const _r=Xt.nativeEvent,br=new qn({active:A.current,activeNode:or,event:_r,options:Dn,context:ye,onStart(Sr){const Kn=A.current;if(Kn==null)return;const Mi=P.get(Kn);if(!Mi)return;const{onDragStart:is}=V.current,to={active:{id:Kn,data:Mi.data,rect:G}};bs.unstable_batchedUpdates(()=>{is==null||is(to),C(hl.Initializing),_({type:er.DragStart,initialCoordinates:Sr,active:Kn}),b({type:"onDragStart",event:to})})},onMove(Sr){_({type:er.DragMove,coordinates:Sr})},onEnd:eo(er.DragEnd),onCancel:eo(er.DragCancel)});bs.unstable_batchedUpdates(()=>{F(br),D(Xt.nativeEvent)});function eo(Sr){return async function(){const{active:Mi,collisions:is,over:to,scrollAdjustedTranslate:za}=ye.current;let Ao=null;if(Mi&&za){const{cancelDrop:wr}=V.current;Ao={activatorEvent:_r,active:Mi,collisions:is,delta:za,over:to},Sr===er.DragEnd&&typeof wr=="function"&&await Promise.resolve(wr(Ao))&&(Sr=er.DragCancel)}A.current=null,bs.unstable_batchedUpdates(()=>{_({type:Sr}),C(hl.Uninitialized),vr(null),F(null),D(null);const wr=Sr===er.DragEnd?"onDragEnd":"onDragCancel";if(Ao){const Gs=V.current[wr];Gs==null||Gs(Ao),b({type:wr,event:Ao})}})}}},[P]),En=L.useCallback((Xt,Ot)=>(qn,Dn)=>{const or=qn.nativeEvent,_r=P.get(Dn);if(A.current!==null||!_r||or.dndKit||or.defaultPrevented)return;const br={active:_r};Xt(qn,Ot.options,br)===!0&&(or.dndKit={capturedBy:Ot.sensor},A.current=Dn,Ii(qn,Ot))},[P,Ii]),Yr=Y8e(d,En);i9e(d),$s(()=>{pe&&S===hl.Initializing&&C(hl.Initialized)},[pe,S]),L.useEffect(()=>{const{onDragMove:Xt}=V.current,{active:Ot,activatorEvent:qn,collisions:Dn,over:or}=ye.current;if(!Ot||!qn)return;const _r={active:Ot,activatorEvent:qn,collisions:Dn,delta:{x:wn.x,y:wn.y},over:or};bs.unstable_batchedUpdates(()=>{Xt==null||Xt(_r),b({type:"onDragMove",event:_r})})},[wn.x,wn.y]),L.useEffect(()=>{const{active:Xt,activatorEvent:Ot,collisions:qn,droppableContainers:Dn,scrollAdjustedTranslate:or}=ye.current;if(!Xt||A.current==null||!Ot||!or)return;const{onDragOver:_r}=V.current,br=Dn.get(sn),eo=br&&br.rect.current?{id:br.id,rect:br.rect.current,data:br.data,disabled:br.disabled}:null,Sr={active:Xt,activatorEvent:Ot,collisions:qn,delta:{x:or.x,y:or.y},over:eo};bs.unstable_batchedUpdates(()=>{vr(eo),_r==null||_r(Sr),b({type:"onDragOver",event:Sr})})},[sn]),$s(()=>{ye.current={activatorEvent:B,active:U,activeNode:le,collisionRect:on,collisions:Wn,droppableRects:ee,draggableNodes:P,draggingNode:Ee,draggingNodeRect:lt,droppableContainers:O,over:Gt,scrollableAncestors:Bt,scrollAdjustedTranslate:wn},G.current={initial:lt,translated:on}},[U,le,Wn,on,P,Ee,lt,ee,O,Gt,Bt,wn]),W8e({...ne,delta:k,draggingRect:on,pointerCoordinates:Jt,scrollableAncestors:Bt,scrollableAncestorRects:it});const Vs=L.useMemo(()=>({active:U,activeNode:le,activeNodeRect:pe,activatorEvent:B,collisions:Wn,containerNodeRect:ve,dragOverlay:Me,draggableNodes:P,droppableContainers:O,droppableRects:ee,over:Gt,measureDroppableContainers:ie,scrollableAncestors:Bt,scrollableAncestorRects:it,measuringConfiguration:Z,measuringScheduled:se,windowRect:Hn}),[U,le,pe,B,Wn,ve,Me,P,O,ee,Gt,ie,Bt,it,Z,se,Hn]),Ji=L.useMemo(()=>({activatorEvent:B,activators:Yr,active:U,activeNodeRect:pe,ariaDescribedById:{draggable:j},dispatch:_,draggableNodes:P,over:Gt,measureDroppableContainers:ie}),[B,Yr,U,pe,_,j,P,Gt,ie]);return Lt.createElement(Wj.Provider,{value:y},Lt.createElement(jm.Provider,{value:Ji},Lt.createElement(cG.Provider,{value:Vs},Lt.createElement(p2.Provider,{value:Xr},u)),Lt.createElement(h9e,{disabled:(a==null?void 0:a.restoreFocus)===!1})),Lt.createElement(g8e,{...a,hiddenTextDescribedById:j}));function js(){const Xt=(N==null?void 0:N.autoScrollEnabled)===!1,Ot=typeof l=="object"?l.enabled===!1:l===!1,qn=T&&!Xt&&!Ot;return typeof l=="object"?{...l,enabled:qn}:{enabled:qn}}}),y9e=L.createContext(null),g7="button",v9e="Droppable";function _9e(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=f2(v9e),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=L.useContext(jm),{role:g=g7,roleDescription:m="draggable",tabIndex:v=0}=i??{},x=(l==null?void 0:l.id)===t,_=L.useContext(x?p2:y9e),[b,y]=v_(),[S,C]=v_(),T=o9e(s,t),E=Wg(n);$s(()=>(f.set(t,{id:t,key:o,node:b,activatorNode:S,data:E}),()=>{const k=f.get(t);k&&k.key===o&&f.delete(t)}),[f,t]);const P=L.useMemo(()=>({role:g,tabIndex:v,"aria-disabled":r,"aria-pressed":x&&g===g7?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,g,v,x,m,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:P,isDragging:x,listeners:r?void 0:T,node:b,over:p,setNodeRef:y,setActivatorNodeRef:C,transform:_}}function b9e(){return L.useContext(cG)}const S9e="Droppable",w9e={timeout:25};function x9e(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=f2(S9e),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=L.useContext(jm),d=L.useRef({disabled:n}),f=L.useRef(!1),p=L.useRef(null),g=L.useRef(null),{disabled:m,updateMeasurementsFor:v,timeout:x}={...w9e,...i},_=Wg(v??r),b=L.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(_.current)?_.current:[_.current]),g.current=null},x)},[x]),y=h2({callback:b,disabled:m||!s}),S=L.useCallback((P,k)=>{y&&(k&&(y.unobserve(k),f.current=!1),P&&y.observe(P))},[y]),[C,T]=v_(S),E=Wg(t);return L.useEffect(()=>{!y||!C.current||(y.disconnect(),f.current=!1,y.observe(C.current))},[C,y]),$s(()=>(a({type:er.RegisterDroppable,element:{id:r,key:o,disabled:n,node:C,rect:p,data:E}}),()=>a({type:er.UnregisterDroppable,key:o,id:r})),[r]),L.useEffect(()=>{n!==d.current.disabled&&(a({type:er.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,a]),{active:s,rect:p,isOver:(l==null?void 0:l.id)===r,node:C,over:l,setNodeRef:T}}function C9e(e){let{animation:t,children:n}=e;const[r,i]=L.useState(null),[o,s]=L.useState(null),a=__(n);return!n&&!r&&a&&i(a),$s(()=>{if(!o)return;const l=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(l==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),Lt.createElement(Lt.Fragment,null,n,r?L.cloneElement(r,{ref:s}):null)}const T9e={x:0,y:0,scaleX:1,scaleY:1};function E9e(e){let{children:t}=e;return Lt.createElement(jm.Provider,{value:uG},Lt.createElement(p2.Provider,{value:T9e},t))}const A9e={position:"fixed",touchAction:"none"},P9e=e=>m6(e)?"transform 250ms ease":void 0,R9e=L.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:s,rect:a,style:l,transform:u,transition:d=P9e}=e;if(!a)return null;const f=i?u:{...u,scaleX:1,scaleY:1},p={...A9e,width:a.width,height:a.height,top:a.top,left:a.left,transform:Kg.Transform.toString(f),transformOrigin:i&&r?v8e(r,a):void 0,transition:typeof d=="function"?d(r):d,...l};return Lt.createElement(n,{className:s,style:p,ref:t},o)}),O9e=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:s}=e;if(o!=null&&o.active)for(const[a,l]of Object.entries(o.active))l!==void 0&&(i[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,l));if(o!=null&&o.dragOverlay)for(const[a,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(a,l);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[l,u]of Object.entries(i))n.node.style.setProperty(l,u);s!=null&&s.active&&n.node.classList.remove(s.active)}},k9e=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Kg.Transform.toString(t)},{transform:Kg.Transform.toString(n)}]},I9e={duration:250,easing:"ease",keyframes:k9e,sideEffects:O9e({styles:{active:{opacity:"0"}}})};function M9e(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return d2((o,s)=>{if(t===null)return;const a=n.get(o);if(!a)return;const l=a.node.current;if(!l)return;const u=lG(s);if(!u)return;const{transform:d}=fi(s).getComputedStyle(s),f=Kj(d);if(!f)return;const p=typeof t=="function"?t:N9e(t);return tG(l,i.draggable.measure),p({active:{id:o,data:a.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:s,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function N9e(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...I9e,...e};return o=>{let{active:s,dragOverlay:a,transform:l,...u}=o;if(!t)return;const d={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},p={x:l.x-d.x,y:l.y-d.y,...f},g=i({...u,active:s,dragOverlay:a,transform:{initial:l,final:p}}),[m]=g,v=g[g.length-1];if(JSON.stringify(m)===JSON.stringify(v))return;const x=r==null?void 0:r({active:s,dragOverlay:a,...u}),_=a.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(b=>{_.onfinish=()=>{x==null||x(),b()}})}}let m7=0;function L9e(e){return L.useMemo(()=>{if(e!=null)return m7++,m7},[e])}const D9e=Lt.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:s,wrapperElement:a="div",className:l,zIndex:u=999}=e;const{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:g,draggableNodes:m,droppableContainers:v,dragOverlay:x,over:_,measuringConfiguration:b,scrollableAncestors:y,scrollableAncestorRects:S,windowRect:C}=b9e(),T=L.useContext(p2),E=L9e(f==null?void 0:f.id),P=dG(s,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:x.rect,over:_,overlayNodeRect:x.rect,scrollableAncestors:y,scrollableAncestorRects:S,transform:T,windowRect:C}),k=b6(p),O=M9e({config:r,draggableNodes:m,droppableContainers:v,measuringConfiguration:b}),M=k?x.setRef:void 0;return Lt.createElement(E9e,null,Lt.createElement(C9e,{animation:O},f&&E?Lt.createElement(R9e,{key:E,id:f.id,ref:M,as:a,activatorEvent:d,adjustScale:t,className:l,transition:o,rect:k,style:{zIndex:u,...i},transform:P},n):null))}),$9e=e=>{let{activatorEvent:t,draggingNodeRect:n,transform:r}=e;if(n&&t){const i=qg(t);if(!i)return r;const o=i.x-n.left,s=i.y-n.top;return{...r,x:r.x+o-n.width/2,y:r.y+s-n.height/2}}return r},F9e=()=>M$(),PMe=T$,X0=28,y7={w:X0,h:X0,maxW:X0,maxH:X0,shadow:"dark-lg",borderRadius:"lg",opacity:.3,bg:"base.800",color:"base.50",_dark:{borderColor:"base.200",bg:"base.900",color:"base.100"}},B9e=e=>{if(!e.dragData)return null;if(e.dragData.payloadType==="IMAGE_DTO"){const{thumbnail_url:t,width:n,height:r}=e.dragData.payload.imageDTO;return ue.jsx(f6,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",cursor:"none"},children:ue.jsx(d6,{sx:{...y7},objectFit:"contain",src:t,width:n,height:r})})}return e.dragData.payloadType==="IMAGE_DTOS"?ue.jsxs(h6,{sx:{cursor:"none",userSelect:"none",position:"relative",alignItems:"center",justifyContent:"center",flexDir:"column",...y7},children:[ue.jsx(V5,{children:e.dragData.payload.imageDTOs.length}),ue.jsx(V5,{size:"sm",children:"Images"})]}):null},U9e=L.memo(B9e);function RMe(e){return x9e(e)}function OMe(e){return _9e(e)}const kMe=(e,t)=>{if(!e||!(t!=null&&t.data.current))return!1;const{actionType:n}=e,{payloadType:r}=t.data.current;if(e.id===t.data.current.id)return!1;switch(n){case"SET_CURRENT_IMAGE":return r==="IMAGE_DTO";case"SET_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_CONTROLNET_IMAGE":return r==="IMAGE_DTO";case"SET_CANVAS_INITIAL_IMAGE":return r==="IMAGE_DTO";case"SET_NODES_IMAGE":return r==="IMAGE_DTO";case"SET_MULTI_NODES_IMAGE":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BATCH":return r==="IMAGE_DTO"||"IMAGE_DTOS";case"ADD_TO_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:o}=t.data.current.payload,s=o.board_id??"none",a=e.context.boardId;return s!==a}return r==="IMAGE_DTOS"}case"REMOVE_FROM_BOARD":{if(!(r==="IMAGE_DTO"||"IMAGE_DTOS"))return!1;if(r==="IMAGE_DTO"){const{imageDTO:o}=t.data.current.payload;return o.board_id!=="none"}return r==="IMAGE_DTOS"}default:return!1}};function z9e(e){return ue.jsx(m9e,{...e})}const V9e=e=>{const[t,n]=L.useState(null),r=Ie("images"),i=F9e(),o=L.useCallback(d=>{r.trace({dragData:d.active.data.current},"Drag started");const f=d.active.data.current;f&&n(f)},[r]),s=L.useCallback(d=>{var p;r.trace({dragData:d.active.data.current},"Drag ended");const f=(p=d.over)==null?void 0:p.data.current;!t||!f||(i(UU({overData:f,activeData:t})),n(null))},[t,i,r]),a=s7(oG,{activationConstraint:{distance:10}}),l=s7(sG,{activationConstraint:{distance:10}}),u=m8e(a,l);return ue.jsxs(z9e,{onDragStart:o,onDragEnd:s,sensors:u,collisionDetection:E8e,children:[e.children,ue.jsx(D9e,{dropAnimation:null,modifiers:[$9e],children:ue.jsx(TPe,{children:t&&ue.jsx(yPe.div,{layout:!0,initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1,transition:{duration:.1}},children:ue.jsx(U9e,{dragData:t})},"overlay-drag-image")})})]})},j9e=L.memo(V9e),G9e=L.lazy(()=>IN(()=>import("./App-3594329a.js"),["./App-3594329a.js","./menu-11348abc.js","./App-6125620a.css"],import.meta.url)),H9e=L.lazy(()=>IN(()=>import("./ThemeLocaleProvider-31ab5c15.js"),["./ThemeLocaleProvider-31ab5c15.js","./menu-11348abc.js","./ThemeLocaleProvider-5b992bc7.css"],import.meta.url)),W9e=({apiUrl:e,token:t,config:n,headerComponent:r,middleware:i,projectId:o})=>(L.useEffect(()=>(t&&Sg.set(t),e&&wg.set(e),o&&S1.set(o),AU(),i&&i.length>0?J3(kk(),...i):J3(kk()),()=>{wg.set(void 0),Sg.set(void 0),S1.set(void 0)}),[e,t,i,o]),ue.jsx(Lt.StrictMode,{children:ue.jsx(pde,{store:$Ce,children:ue.jsx(Lt.Suspense,{fallback:ue.jsx(MPe,{}),children:ue.jsx(H9e,{children:ue.jsx(j9e,{children:ue.jsx(G9e,{config:n,headerComponent:r})})})})})})),q9e=L.memo(W9e);mC.createRoot(document.getElementById("root")).render(ue.jsx(q9e,{}));export{xMe as $,L as A,ue as B,Eo as C,Mn as D,rf as E,qr as F,Vo as G,Vge as H,Ri as I,kl as J,gs as K,NIe as L,sB as M,rme as N,Mme as O,Hge as P,Zhe as Q,Af as R,ug as S,v5e as T,Pc as U,cc as V,iV as W,hMe as X,cMe as Y,TPe as Z,yPe as _,xL as a,jY as a$,dV as a0,Dj as a1,gV as a2,dMe as a3,fMe as a4,y5e as a5,m5e as a6,pMe as a7,Fu as a8,dc as a9,h6 as aA,V5 as aB,oMe as aC,Tz as aD,Xke as aE,r5e as aF,UE as aG,Qz as aH,o5e as aI,bs as aJ,EP as aK,zE as aL,T7e as aM,Dke as aN,Qke as aO,Zke as aP,RIe as aQ,AIe as aR,Ou as aS,f_e as aT,LU as aU,l7e as aV,EIe as aW,BT as aX,hE as aY,L9 as aZ,JOe as a_,A1 as aa,OJ as ab,Lt as ac,G4e as ad,wMe as ae,ba as af,nV as ag,dAe as ah,yMe as ai,T5 as aj,uMe as ak,SMe as al,si as am,dE as an,nb as ao,PMe as ap,DIe as aq,Cm as ar,zB as as,hU as at,Jb as au,F9e as av,f7e as aw,Un as ax,Ku as ay,f6 as az,lT as b,Wke as b$,Q9e as b0,X9e as b1,Y9e as b2,He as b3,zke as b4,iIe as b5,rIe as b6,Bke as b7,TIe as b8,ECe as b9,cRe as bA,$Re as bB,aRe as bC,xRe as bD,hRe as bE,W_e as bF,lRe as bG,IRe as bH,sRe as bI,VRe as bJ,dRe as bK,CRe as bL,fRe as bM,TRe as bN,yRe as bO,ARe as bP,H_e as bQ,pRe as bR,dO as bS,n7e as bT,r7e as bU,i7e as bV,vRe as bW,o7e as bX,_Re as bY,s7e as bZ,Re as b_,RMe as ba,kMe as bb,wIe as bc,$ke as bd,Fke as be,Hke as bf,N3 as bg,Uke as bh,d6 as bi,kPe as bj,uOe as bk,bl,f0 as bm,SIe as bn,_Ie as bo,CIe as bp,bIe as bq,K9e as br,nRe as bs,rRe as bt,iRe as bu,oRe as bv,ORe as bw,kRe as bx,ZIe as by,JIe as bz,Ete as c,Ie as c$,nfe as c0,a$ as c1,zOe as c2,n$ as c3,PIe as c4,OMe as c5,lMe as c6,BU as c7,jke as c8,O1 as c9,hOe as cA,b7e as cB,Cue as cC,LIe as cD,d7e as cE,ST as cF,vIe as cG,gIe as cH,mIe as cI,yIe as cJ,JRe as cK,jRe as cL,XRe as cM,RRe as cN,h7e as cO,mc as cP,g7e as cQ,da as cR,eSe as cS,tc as cT,bRe as cU,Em as cV,$7e as cW,Z9e as cX,e7e as cY,M7e as cZ,eMe as c_,xIe as ca,Gke as cb,Nke as cc,k1 as cd,iMe as ce,k7e as cf,aOe as cg,A7e as ch,Vke as ci,Yke as cj,FT as ck,wT as cl,uRe as cm,pOe as cn,Kr as co,v7e as cp,P7e as cq,E7e as cr,G1e as cs,y7e as ct,S7e as cu,w7e as cv,Sue as cw,d1e as cx,f1e as cy,oOe as cz,pae as d,C7e as d$,XD as d0,q7e as d1,Vve as d2,PRe as d3,YD as d4,N7e as d5,gue as d6,F7e as d7,ZD as d8,eOe as d9,mRe as dA,L7e as dB,lR as dC,cIe as dD,$T as dE,Kde as dF,_d as dG,uR as dH,dIe as dI,fIe as dJ,hIe as dK,Xde as dL,pIe as dM,dF as dN,aIe as dO,uIe as dP,oIe as dQ,hCe as dR,IO as dS,sIe as dT,YRe as dU,QRe as dV,qRe as dW,KRe as dX,WRe as dY,X7e as dZ,V7e as d_,wue as da,Ss as db,ERe as dc,BRe as dd,tRe as de,ole as df,zRe as dg,t7e as dh,tOe as di,QIe as dj,sSe as dk,rOe as dl,Se as dm,Ui as dn,pn as dp,Rs as dq,I7e as dr,kIe as ds,IIe as dt,_F as du,D7e as dv,OIe as dw,FD as dx,ZRe as dy,ile as dz,xD as e,vOe as e$,z7e as e0,J7e as e1,K7e as e2,x7e as e3,G7e as e4,j7e as e5,B7e as e6,W7e as e7,eRe as e8,U7e as e9,zIe as eA,UIe as eB,VIe as eC,qIe as eD,Oye as eE,BB as eF,GU as eG,dQ as eH,rt as eI,ske as eJ,Tke as eK,Cke as eL,BOe as eM,gke as eN,Ake as eO,b_e as eP,kOe as eQ,tke as eR,tp as eS,QOe as eT,IOe as eU,nS as eV,eke as eW,POe as eX,ZOe as eY,ROe as eZ,LOe as e_,H7e as ea,J9e as eb,RB as ec,_T as ed,Y7e as ee,z1 as ef,Ne as eg,Q7e as eh,mU as ei,gRe as ej,Z7e as ek,T$ as el,M$ as em,YIe as en,jIe as eo,GIe as ep,HIe as eq,sE as er,KIe as es,XIe as et,Ig as eu,rb as ev,BIe as ew,PCe as ex,$Ie as ey,FIe as ez,kL as f,rMe as f$,yOe as f0,mOe as f1,Eke as f2,i$ as f3,Sg as f4,xOe as f5,COe as f6,TOe as f7,xke as f8,$Oe as f9,cke as fA,dke as fB,Ike as fC,vke as fD,Mke as fE,XOe as fF,KOe as fG,AOe as fH,EOe as fI,Oke as fJ,UOe as fK,v_e as fL,g_e as fM,m_e as fN,y_e as fO,SOe as fP,nOe as fQ,bue as fR,GRe as fS,wOe as fT,WOe as fU,kke as fV,MRe as fW,NRe as fX,LRe as fY,DRe as fZ,qOe as f_,DOe as fa,zue as fb,wke as fc,__e as fd,MOe as fe,uCe as ff,fCe as fg,jOe as fh,GOe as fi,ake as fj,oke as fk,nke as fl,_Oe as fm,bOe as fn,R7e as fo,O7e as fp,YOe as fq,VOe as fr,lke as fs,pke as ft,uke as fu,FOe as fv,OOe as fw,Ske as fx,bke as fy,fke as fz,aae as g,lOe as g0,JD as g1,dOe as g2,cOe as g3,fOe as g4,nle as g5,c_e as g6,aMe as g7,rV as g8,bMe as g9,vMe as ga,gMe as gb,_Me as gc,Ts as gd,mMe as ge,sMe as gf,V4e as gg,N4e as gh,CMe as gi,EMe as gj,AMe as gk,UL as h,Pi as i,Uf as j,eb as k,gr as l,J_ as m,cm as n,Jo as o,tu as p,Q_ as q,Fs as r,fm as s,sx as t,iT as u,RL as v,fT as w,mD as x,IL as y,Jae as z};
|