@signalwire/cfb 0.0.1-dev.202304181726.b816767.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +20 -780
- package/dist/style.css +1 -1
- package/package.json +7 -9
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* Visual Builder v0.0.0 [
|
|
1
|
+
(function(Pr,Uo){typeof exports=="object"&&typeof module<"u"?Uo(exports):typeof define=="function"&&define.amd?define(["exports"],Uo):(Pr=typeof globalThis<"u"?globalThis:Pr||self,Uo(Pr.CFB={}))})(this,function(Pr){"use strict";/**
|
|
2
|
+
* Visual Builder v0.0.0 [43cc172] (https://signalwire.com)
|
|
3
3
|
* Copyright 2018-2023 SignalWire.
|
|
4
4
|
*/
|
|
5
|
-
function
|
|
5
|
+
function Uo(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function gf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fo={},Z0={get exports(){return Fo},set exports(e){Fo=e}},ds={},N={},J0={get exports(){return N},set exports(e){N=e}},ee={};/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react.production.min.js
|
|
8
8
|
*
|
|
@@ -10,7 +10,7 @@ function ai(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
|
|
|
10
10
|
*
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/var
|
|
13
|
+
*/var Vo=Symbol.for("react.element"),eE=Symbol.for("react.portal"),tE=Symbol.for("react.fragment"),nE=Symbol.for("react.strict_mode"),rE=Symbol.for("react.profiler"),oE=Symbol.for("react.provider"),iE=Symbol.for("react.context"),sE=Symbol.for("react.forward_ref"),aE=Symbol.for("react.suspense"),lE=Symbol.for("react.memo"),uE=Symbol.for("react.lazy"),mf=Symbol.iterator;function cE(e){return e===null||typeof e!="object"?null:(e=mf&&e[mf]||e["@@iterator"],typeof e=="function"?e:null)}var vf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yf=Object.assign,Ef={};function Mr(e,t,n){this.props=e,this.context=t,this.refs=Ef,this.updater=n||vf}Mr.prototype.isReactComponent={},Mr.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")},Mr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sf(){}Sf.prototype=Mr.prototype;function El(e,t,n){this.props=e,this.context=t,this.refs=Ef,this.updater=n||vf}var Sl=El.prototype=new Sf;Sl.constructor=El,yf(Sl,Mr.prototype),Sl.isPureReactComponent=!0;var _f=Array.isArray,wf=Object.prototype.hasOwnProperty,_l={current:null},Rf={key:!0,ref:!0,__self:!0,__source:!0};function Nf(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)wf.call(t,r)&&!Rf.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Vo,type:e,key:i,ref:s,props:o,_owner:_l.current}}function dE(e,t){return{$$typeof:Vo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vo}function fE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Of=/\/+/g;function Rl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?fE(""+e.key):t.toString(36)}function fs(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Vo:case eE:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Rl(s,0):r,_f(o)?(n="",e!=null&&(n=e.replace(Of,"$&/")+"/"),fs(o,t,n,"",function(u){return u})):o!=null&&(wl(o)&&(o=dE(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Of,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",_f(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Rl(i,a);s+=fs(i,t,n,l,o)}else if(l=cE(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Rl(i,a++),s+=fs(i,t,n,l,o);else if(i==="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 ps(e,t,n){if(e==null)return e;var r=[],o=0;return fs(e,r,"","",function(i){return t.call(n,i,o++)}),r}function pE(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 Ve={current:null},hs={transition:null},hE={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:hs,ReactCurrentOwner:_l};ee.Children={map:ps,forEach:function(e,t,n){ps(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ps(e,function(){t++}),t},toArray:function(e){return ps(e,function(t){return t})||[]},only:function(e){if(!wl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},ee.Component=Mr,ee.Fragment=tE,ee.Profiler=rE,ee.PureComponent=El,ee.StrictMode=nE,ee.Suspense=aE,ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hE,ee.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=yf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=_l.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)wf.call(t,l)&&!Rf.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:Vo,type:e.type,key:o,ref:i,props:r,_owner:s}},ee.createContext=function(e){return e={$$typeof:iE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:oE,_context:e},e.Consumer=e},ee.createElement=Nf,ee.createFactory=function(e){var t=Nf.bind(null,e);return t.type=e,t},ee.createRef=function(){return{current:null}},ee.forwardRef=function(e){return{$$typeof:sE,render:e}},ee.isValidElement=wl,ee.lazy=function(e){return{$$typeof:uE,_payload:{_status:-1,_result:e},_init:pE}},ee.memo=function(e,t){return{$$typeof:lE,type:e,compare:t===void 0?null:t}},ee.startTransition=function(e){var t=hs.transition;hs.transition={};try{e()}finally{hs.transition=t}},ee.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},ee.useCallback=function(e,t){return Ve.current.useCallback(e,t)},ee.useContext=function(e){return Ve.current.useContext(e)},ee.useDebugValue=function(){},ee.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)},ee.useEffect=function(e,t){return Ve.current.useEffect(e,t)},ee.useId=function(){return Ve.current.useId()},ee.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)},ee.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)},ee.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)},ee.useMemo=function(e,t){return Ve.current.useMemo(e,t)},ee.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)},ee.useRef=function(e){return Ve.current.useRef(e)},ee.useState=function(e){return Ve.current.useState(e)},ee.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)},ee.useTransition=function(){return Ve.current.useTransition()},ee.version="18.2.0",function(e){e.exports=ee}(J0);const pt=gf(N),xf=Uo({__proto__:null,default:pt},[N]);/**
|
|
14
14
|
* @license React
|
|
15
15
|
* react-jsx-runtime.production.min.js
|
|
16
16
|
*
|
|
@@ -18,7 +18,7 @@ function ai(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/var
|
|
21
|
+
*/var gE=N,mE=Symbol.for("react.element"),vE=Symbol.for("react.fragment"),yE=Object.prototype.hasOwnProperty,EE=gE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,SE={key:!0,ref:!0,__self:!0,__source:!0};function Tf(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)yE.call(t,r)&&!SE.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:mE,type:e,key:i,ref:s,props:o,_owner:EE.current}}ds.Fragment=vE,ds.jsx=Tf,ds.jsxs=Tf,function(e){e.exports=ds}(Z0);const Ee=Fo.Fragment,y=Fo.jsx,M=Fo.jsxs;var Nl={},Ur={},_E={get exports(){return Ur},set exports(e){Ur=e}},rt={},Ol={},wE={get exports(){return Ol},set exports(e){Ol=e}},Cf={};/**
|
|
22
22
|
* @license React
|
|
23
23
|
* scheduler.production.min.js
|
|
24
24
|
*
|
|
@@ -26,7 +26,7 @@ function ai(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
|
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/(function(e){function t(
|
|
29
|
+
*/(function(e){function t(T,k){var U=T.length;T.push(k);e:for(;0<U;){var z=U-1>>>1,j=T[z];if(0<o(j,k))T[z]=k,T[U]=j,U=z;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var k=T[0],U=T.pop();if(U!==k){T[0]=U;e:for(var z=0,j=T.length,K=j>>>1;z<K;){var W=2*(z+1)-1,J=T[W],X=W+1,te=T[X];if(0>o(J,U))X<j&&0>o(te,J)?(T[z]=te,T[X]=U,z=X):(T[z]=J,T[W]=U,z=W);else if(X<j&&0>o(te,U))T[z]=te,T[X]=U,z=X;else break e}}return k}function o(T,k){var U=T.sortIndex-k.sortIndex;return U!==0?U:T.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,m=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(T){for(var k=n(u);k!==null;){if(k.callback===null)r(u);else if(k.startTime<=T)r(u),k.sortIndex=k.expirationTime,t(l,k);else break;k=n(u)}}function _(T){if(v=!1,S(T),!m)if(n(l)!==null)m=!0,D(w);else{var k=n(u);k!==null&&I(_,k.startTime-T)}}function w(T,k){m=!1,v&&(v=!1,p(A),A=-1),h=!0;var U=f;try{for(S(k),d=n(l);d!==null&&(!(d.expirationTime>k)||T&&!V());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var j=z(d.expirationTime<=k);k=e.unstable_now(),typeof j=="function"?d.callback=j:d===n(l)&&r(l),S(k)}else r(l);d=n(l)}if(d!==null)var K=!0;else{var W=n(u);W!==null&&I(_,W.startTime-k),K=!1}return K}finally{d=null,f=U,h=!1}}var R=!1,C=null,A=-1,B=5,b=-1;function V(){return!(e.unstable_now()-b<B)}function $(){if(C!==null){var T=e.unstable_now();b=T;var k=!0;try{k=C(!0,T)}finally{k?F():(R=!1,C=null)}}else R=!1}var F;if(typeof g=="function")F=function(){g($)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,P=O.port2;O.port1.onmessage=$,F=function(){P.postMessage(null)}}else F=function(){E($,0)};function D(T){C=T,R||(R=!0,F())}function I(T,k){A=E(function(){T(e.unstable_now())},k)}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(T){T.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,D(w))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var k=3;break;default:k=f}var U=f;f=k;try{return T()}finally{f=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,k){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var U=f;f=T;try{return k()}finally{f=U}},e.unstable_scheduleCallback=function(T,k,U){var z=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?z+U:z):U=z,T){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=U+j,T={id:c++,callback:k,priorityLevel:T,startTime:U,expirationTime:j,sortIndex:-1},U>z?(T.sortIndex=U,t(u,T),n(l)===null&&T===n(u)&&(v?(p(A),A=-1):v=!0,I(_,U-z))):(T.sortIndex=j,t(l,T),m||h||(m=!0,D(w))),T},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(T){var k=f;return function(){var U=f;f=k;try{return T.apply(this,arguments)}finally{f=U}}}})(Cf),function(e){e.exports=Cf}(wE);/**
|
|
30
30
|
* @license React
|
|
31
31
|
* react-dom.production.min.js
|
|
32
32
|
*
|
|
@@ -34,14 +34,14 @@ function ai(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
|
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
38
|
-
`+
|
|
37
|
+
*/var bf=N,ot=Ol;function H(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 If=new Set,Bo={};function nr(e,t){Fr(e,t),Fr(e+"Capture",t)}function Fr(e,t){for(Bo[e]=t,e=0;e<t.length;e++)If.add(t[e])}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xl=Object.prototype.hasOwnProperty,RE=/^[: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]*$/,Af={},Lf={};function NE(e){return xl.call(Lf,e)?!0:xl.call(Af,e)?!1:RE.test(e)?Lf[e]=!0:(Af[e]=!0,!1)}function OE(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 xE(e,t,n,r){if(t===null||typeof t>"u"||OE(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 Be(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new Be(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new Be(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new Be(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){Ae[e]=new Be(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new Be(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Ae[e]=new Be(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Ae[e]=new Be(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Ae[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tl=/[\-:]([a-z])/g;function Cl(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(Tl,Cl);Ae[t]=new Be(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(Tl,Cl);Ae[t]=new Be(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(Tl,Cl);Ae[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)}),Ae.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Ae[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function bl(e,t,n,r){var o=Ae.hasOwnProperty(t)?Ae[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(xE(t,n,o,r)&&(n=null),r||o===null?NE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var en=bf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gs=Symbol.for("react.element"),Vr=Symbol.for("react.portal"),Br=Symbol.for("react.fragment"),Il=Symbol.for("react.strict_mode"),Al=Symbol.for("react.profiler"),Df=Symbol.for("react.provider"),kf=Symbol.for("react.context"),Ll=Symbol.for("react.forward_ref"),Dl=Symbol.for("react.suspense"),kl=Symbol.for("react.suspense_list"),Pl=Symbol.for("react.memo"),vn=Symbol.for("react.lazy"),Pf=Symbol.for("react.offscreen"),Mf=Symbol.iterator;function $o(e){return e===null||typeof e!="object"?null:(e=Mf&&e[Mf]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Object.assign,Ml;function zo(e){if(Ml===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ml=t&&t[1]||""}return`
|
|
38
|
+
`+Ml+e}var Ul=!1;function Fl(e,t){if(!e||Ul)return"";Ul=!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 o=u.stack.split(`
|
|
39
39
|
`),i=r.stack.split(`
|
|
40
|
-
`),
|
|
41
|
-
`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{$u=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fi(e):""}function ew(e){switch(e.tag){case 5:return fi(e.type);case 16:return fi("Lazy");case 13:return fi("Suspense");case 19:return fi("SuspenseList");case 0:case 2:case 15:return e=Bu(e.type,!1),e;case 11:return e=Bu(e.type.render,!1),e;case 1:return e=Bu(e.type,!0),e;default:return""}}function zu(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 eo:return"Fragment";case Jr:return"Portal";case Pu:return"Profiler";case Lu:return"StrictMode";case Mu:return"Suspense";case Fu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uh:return(e.displayName||"Context")+".Consumer";case lh:return(e._context.displayName||"Context")+".Provider";case Du:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uu:return t=e.displayName||null,t!==null?t:zu(e.type)||"Memo";case In:t=e._payload,e=e._init;try{return zu(e(t))}catch{}}return null}function tw(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 zu(t);case 8:return t===Lu?"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 Ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nw(e){var t=dh(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ts(e){e._valueTracker||(e._valueTracker=nw(e))}function ph(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=dh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ns(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 Hu(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ln(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 mh(e,t){t=t.checked,t!=null&&Iu(e,"checked",t,!1)}function ju(e,t){mh(e,t);var n=Ln(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")?Wu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wu(e,t.type,Ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gh(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 Wu(e,t,n){(t!=="number"||ns(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var di=Array.isArray;function to(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ln(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Yu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return he({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function vh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(di(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ln(n)}}function yh(e,t){var n=Ln(t.value),r=Ln(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 Eh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Sh(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 Gu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Sh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rs,wh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(rs=rs||document.createElement("div"),rs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=rs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hi={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},rw=["Webkit","ms","Moz","O"];Object.keys(hi).forEach(function(e){rw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hi[t]=hi[e]})});function _h(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hi.hasOwnProperty(e)&&hi[e]?(""+t).trim():t+"px"}function xh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=_h(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ow=he({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 Ku(e,t){if(t){if(ow[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Xu(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 Qu=null;function qu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zu=null,no=null,ro=null;function Rh(e){if(e=Mi(e)){if(typeof Zu!="function")throw Error(H(280));var t=e.stateNode;t&&(t=Ns(t),Zu(e.stateNode,e.type,t))}}function bh(e){no?ro?ro.push(e):ro=[e]:no=e}function Nh(){if(no){var e=no,t=ro;if(ro=no=null,Rh(e),t)for(e=0;e<t.length;e++)Rh(t[e])}}function Oh(e,t){return e(t)}function Th(){}var Ju=!1;function Ah(e,t,n){if(Ju)return e(t,n);Ju=!0;try{return Oh(e,t,n)}finally{Ju=!1,(no!==null||ro!==null)&&(Th(),Nh())}}function mi(e,t){var n=e.stateNode;if(n===null)return null;var r=Ns(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(H(231,t,typeof n));return n}var ec=!1;if(sn)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){ec=!0}}),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{ec=!1}function iw(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var vi=!1,os=null,is=!1,tc=null,aw={onError:function(e){vi=!0,os=e}};function sw(e,t,n,r,o,i,a,s,l){vi=!1,os=null,iw.apply(aw,arguments)}function lw(e,t,n,r,o,i,a,s,l){if(sw.apply(this,arguments),vi){if(vi){var u=os;vi=!1,os=null}else throw Error(H(198));is||(is=!0,tc=u)}}function yr(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 kh(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 Ch(e){if(yr(e)!==e)throw Error(H(188))}function uw(e){var t=e.alternate;if(!t){if(t=yr(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ch(o),e;if(i===r)return Ch(o),t;i=i.sibling}throw Error(H(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function Ih(e){return e=uw(e),e!==null?Lh(e):null}function Lh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Lh(e);if(t!==null)return t;e=e.sibling}return null}var Ph=st.unstable_scheduleCallback,Dh=st.unstable_cancelCallback,cw=st.unstable_shouldYield,fw=st.unstable_requestPaint,_e=st.unstable_now,dw=st.unstable_getCurrentPriorityLevel,nc=st.unstable_ImmediatePriority,Mh=st.unstable_UserBlockingPriority,as=st.unstable_NormalPriority,pw=st.unstable_LowPriority,Fh=st.unstable_IdlePriority,ss=null,Ht=null;function hw(e){if(Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(ss,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:vw,mw=Math.log,gw=Math.LN2;function vw(e){return e>>>=0,e===0?32:31-(mw(e)/gw|0)|0}var ls=64,us=4194304;function yi(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 cs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=yi(s):(i&=a,i!==0&&(r=yi(i)))}else a=n&~o,a!==0?r=yi(a):i!==0&&(r=yi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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-Ot(t),o=1<<n,r|=e[n],t&=~o;return r}function yw(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 Ew(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Ot(i),s=1<<a,l=o[a];l===-1?(!(s&n)||s&r)&&(o[a]=yw(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function rc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Uh(){var e=ls;return ls<<=1,!(ls&4194240)&&(ls=64),e}function oc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ei(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function Sw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ot(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function ic(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ot(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ae=0;function Vh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $h,ac,Bh,zh,Hh,sc=!1,fs=[],Pn=null,Dn=null,Mn=null,Si=new Map,wi=new Map,Fn=[],ww="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 jh(e,t){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":Dn=null;break;case"mouseover":case"mouseout":Mn=null;break;case"pointerover":case"pointerout":Si.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wi.delete(t.pointerId)}}function _i(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Mi(t),t!==null&&ac(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function _w(e,t,n,r,o){switch(t){case"focusin":return Pn=_i(Pn,e,t,n,r,o),!0;case"dragenter":return Dn=_i(Dn,e,t,n,r,o),!0;case"mouseover":return Mn=_i(Mn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Si.set(i,_i(Si.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,wi.set(i,_i(wi.get(i)||null,e,t,n,r,o)),!0}return!1}function Wh(e){var t=Er(e.target);if(t!==null){var n=yr(t);if(n!==null){if(t=n.tag,t===13){if(t=kh(n),t!==null){e.blockedOn=t,Hh(e.priority,function(){Bh(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 ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=uc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qu=r,n.target.dispatchEvent(r),Qu=null}else return t=Mi(n),t!==null&&ac(t),e.blockedOn=n,!1;t.shift()}return!0}function Yh(e,t,n){ds(e)&&n.delete(t)}function xw(){sc=!1,Pn!==null&&ds(Pn)&&(Pn=null),Dn!==null&&ds(Dn)&&(Dn=null),Mn!==null&&ds(Mn)&&(Mn=null),Si.forEach(Yh),wi.forEach(Yh)}function xi(e,t){e.blockedOn===t&&(e.blockedOn=null,sc||(sc=!0,st.unstable_scheduleCallback(st.unstable_NormalPriority,xw)))}function Ri(e){function t(o){return xi(o,e)}if(0<fs.length){xi(fs[0],e);for(var n=1;n<fs.length;n++){var r=fs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pn!==null&&xi(Pn,e),Dn!==null&&xi(Dn,e),Mn!==null&&xi(Mn,e),Si.forEach(t),wi.forEach(t),n=0;n<Fn.length;n++)r=Fn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Fn.length&&(n=Fn[0],n.blockedOn===null);)Wh(n),n.blockedOn===null&&Fn.shift()}var oo=ln.ReactCurrentBatchConfig,ps=!0;function Rw(e,t,n,r){var o=ae,i=oo.transition;oo.transition=null;try{ae=1,lc(e,t,n,r)}finally{ae=o,oo.transition=i}}function bw(e,t,n,r){var o=ae,i=oo.transition;oo.transition=null;try{ae=4,lc(e,t,n,r)}finally{ae=o,oo.transition=i}}function lc(e,t,n,r){if(ps){var o=uc(e,t,n,r);if(o===null)Nc(e,t,r,hs,n),jh(e,r);else if(_w(o,e,t,n,r))r.stopPropagation();else if(jh(e,r),t&4&&-1<ww.indexOf(e)){for(;o!==null;){var i=Mi(o);if(i!==null&&$h(i),i=uc(e,t,n,r),i===null&&Nc(e,t,r,hs,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Nc(e,t,r,null,n)}}var hs=null;function uc(e,t,n,r){if(hs=null,e=qu(r),e=Er(e),e!==null)if(t=yr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=kh(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 hs=e,null}function Gh(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(dw()){case nc:return 1;case Mh:return 4;case as:case pw:return 16;case Fh:return 536870912;default:return 16}default:return 16}}var Un=null,cc=null,ms=null;function Kh(){if(ms)return ms;var e,t=cc,n=t.length,r,o="value"in Un?Un.value:Un.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return ms=o.slice(e,1<r?1-r:void 0)}function gs(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 vs(){return!0}function Xh(){return!1}function lt(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?vs:Xh,this.isPropagationStopped=Xh,this}return he(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=vs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vs)},persist:function(){},isPersistent:vs}),t}var io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fc=lt(io),bi=he({},io,{view:0,detail:0}),Nw=lt(bi),dc,pc,Ni,ys=he({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mc,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!==Ni&&(Ni&&e.type==="mousemove"?(dc=e.screenX-Ni.screenX,pc=e.screenY-Ni.screenY):pc=dc=0,Ni=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:pc}}),Qh=lt(ys),Ow=he({},ys,{dataTransfer:0}),Tw=lt(Ow),Aw=he({},bi,{relatedTarget:0}),hc=lt(Aw),kw=he({},io,{animationName:0,elapsedTime:0,pseudoElement:0}),Cw=lt(kw),Iw=he({},io,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lw=lt(Iw),Pw=he({},io,{data:0}),qh=lt(Pw),Dw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mw={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"},Fw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fw[e])?!!t[e]:!1}function mc(){return Uw}var Vw=he({},bi,{key:function(e){if(e.key){var t=Dw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mc,charCode:function(e){return e.type==="keypress"?gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$w=lt(Vw),Bw=he({},ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zh=lt(Bw),zw=he({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),Hw=lt(zw),jw=he({},io,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ww=lt(jw),Yw=he({},ys,{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}),Gw=lt(Yw),Kw=[9,13,27,32],gc=sn&&"CompositionEvent"in window,Oi=null;sn&&"documentMode"in document&&(Oi=document.documentMode);var Xw=sn&&"TextEvent"in window&&!Oi,Jh=sn&&(!gc||Oi&&8<Oi&&11>=Oi),em=String.fromCharCode(32),tm=!1;function nm(e,t){switch(e){case"keyup":return Kw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ao=!1;function Qw(e,t){switch(e){case"compositionend":return rm(t);case"keypress":return t.which!==32?null:(tm=!0,em);case"textInput":return e=t.data,e===em&&tm?null:e;default:return null}}function qw(e,t){if(ao)return e==="compositionend"||!gc&&nm(e,t)?(e=Kh(),ms=cc=Un=null,ao=!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 Jh&&t.locale!=="ko"?null:t.data;default:return null}}var Zw={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 om(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zw[e.type]:t==="textarea"}function im(e,t,n,r){bh(r),t=xs(t,"onChange"),0<t.length&&(n=new fc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ti=null,Ai=null;function Jw(e){xm(e,0)}function Es(e){var t=fo(e);if(ph(t))return e}function e_(e,t){if(e==="change")return t}var am=!1;if(sn){var vc;if(sn){var yc="oninput"in document;if(!yc){var sm=document.createElement("div");sm.setAttribute("oninput","return;"),yc=typeof sm.oninput=="function"}vc=yc}else vc=!1;am=vc&&(!document.documentMode||9<document.documentMode)}function lm(){Ti&&(Ti.detachEvent("onpropertychange",um),Ai=Ti=null)}function um(e){if(e.propertyName==="value"&&Es(Ai)){var t=[];im(t,Ai,e,qu(e)),Ah(Jw,t)}}function t_(e,t,n){e==="focusin"?(lm(),Ti=t,Ai=n,Ti.attachEvent("onpropertychange",um)):e==="focusout"&&lm()}function n_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Es(Ai)}function r_(e,t){if(e==="click")return Es(t)}function o_(e,t){if(e==="input"||e==="change")return Es(t)}function i_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:i_;function ki(e,t){if(Tt(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 o=n[r];if(!Au.call(t,o)||!Tt(e[o],t[o]))return!1}return!0}function cm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fm(e,t){var n=cm(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=cm(n)}}function dm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pm(){for(var e=window,t=ns();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ns(e.document)}return t}function Ec(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 a_(e){var t=pm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dm(n.ownerDocument.documentElement,n)){if(r!==null&&Ec(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=fm(n,i);var a=fm(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)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 s_=sn&&"documentMode"in document&&11>=document.documentMode,so=null,Sc=null,Ci=null,wc=!1;function hm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wc||so==null||so!==ns(r)||(r=so,"selectionStart"in r&&Ec(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}),Ci&&ki(Ci,r)||(Ci=r,r=xs(Sc,"onSelect"),0<r.length&&(t=new fc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=so)))}function Ss(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var lo={animationend:Ss("Animation","AnimationEnd"),animationiteration:Ss("Animation","AnimationIteration"),animationstart:Ss("Animation","AnimationStart"),transitionend:Ss("Transition","TransitionEnd")},_c={},mm={};sn&&(mm=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);function ws(e){if(_c[e])return _c[e];if(!lo[e])return e;var t=lo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in mm)return _c[e]=t[n];return e}var gm=ws("animationend"),vm=ws("animationiteration"),ym=ws("animationstart"),Em=ws("transitionend"),Sm=new Map,wm="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 Vn(e,t){Sm.set(e,t),vr(t,[e])}for(var xc=0;xc<wm.length;xc++){var Rc=wm[xc],l_=Rc.toLowerCase(),u_=Rc[0].toUpperCase()+Rc.slice(1);Vn(l_,"on"+u_)}Vn(gm,"onAnimationEnd"),Vn(vm,"onAnimationIteration"),Vn(ym,"onAnimationStart"),Vn("dblclick","onDoubleClick"),Vn("focusin","onFocus"),Vn("focusout","onBlur"),Vn(Em,"onTransitionEnd"),Zr("onMouseEnter",["mouseout","mouseover"]),Zr("onMouseLeave",["mouseout","mouseover"]),Zr("onPointerEnter",["pointerout","pointerover"]),Zr("onPointerLeave",["pointerout","pointerover"]),vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vr("onBeforeInput",["compositionend","keypress","textInput","paste"]),vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),c_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function _m(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,lw(r,t,void 0,e),e.currentTarget=null}function xm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;_m(o,s,u),i=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;_m(o,s,u),i=l}}}if(is)throw e=tc,is=!1,tc=null,e}function ue(e,t){var n=t[Ic];n===void 0&&(n=t[Ic]=new Set);var r=e+"__bubble";n.has(r)||(Rm(t,e,2,!1),n.add(r))}function bc(e,t,n){var r=0;t&&(r|=4),Rm(n,e,r,t)}var _s="_reactListening"+Math.random().toString(36).slice(2);function Li(e){if(!e[_s]){e[_s]=!0,ih.forEach(function(n){n!=="selectionchange"&&(c_.has(n)||bc(n,!1,e),bc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_s]||(t[_s]=!0,bc("selectionchange",!1,t))}}function Rm(e,t,n,r){switch(Gh(t)){case 1:var o=Rw;break;case 4:o=bw;break;default:o=lc}n=o.bind(null,t,n,e),o=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Nc(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;a=a.return}for(;s!==null;){if(a=Er(s),a===null)return;if(l=a.tag,l===5||l===6){r=i=a;continue e}s=s.parentNode}}r=r.return}Ah(function(){var u=i,c=qu(n),f=[];e:{var d=Sm.get(e);if(d!==void 0){var h=fc,v=e;switch(e){case"keypress":if(gs(n)===0)break e;case"keydown":case"keyup":h=$w;break;case"focusin":v="focus",h=hc;break;case"focusout":v="blur",h=hc;break;case"beforeblur":case"afterblur":h=hc;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":h=Qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Tw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Hw;break;case gm:case vm:case ym:h=Cw;break;case Em:h=Ww;break;case"scroll":h=Nw;break;case"wheel":h=Gw;break;case"copy":case"cut":case"paste":h=Lw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Zh}var y=(t&4)!==0,E=!y&&e==="scroll",p=y?d!==null?d+"Capture":null:d;y=[];for(var m=u,g;m!==null;){g=m;var S=g.stateNode;if(g.tag===5&&S!==null&&(g=S,p!==null&&(S=mi(m,p),S!=null&&y.push(Pi(m,S,g)))),E)break;m=m.return}0<y.length&&(d=new h(d,v,null,n,c),f.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Qu&&(v=n.relatedTarget||n.fromElement)&&(Er(v)||v[un]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Er(v):null,v!==null&&(E=yr(v),v!==E||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Qh,S="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=Zh,S="onPointerLeave",p="onPointerEnter",m="pointer"),E=h==null?d:fo(h),g=v==null?d:fo(v),d=new y(S,m+"leave",h,n,c),d.target=E,d.relatedTarget=g,S=null,Er(c)===u&&(y=new y(p,m+"enter",v,n,c),y.target=g,y.relatedTarget=E,S=y),E=S,h&&v)t:{for(y=h,p=v,m=0,g=y;g;g=uo(g))m++;for(g=0,S=p;S;S=uo(S))g++;for(;0<m-g;)y=uo(y),m--;for(;0<g-m;)p=uo(p),g--;for(;m--;){if(y===p||p!==null&&y===p.alternate)break t;y=uo(y),p=uo(p)}y=null}else y=null;h!==null&&bm(f,d,h,y,!1),v!==null&&E!==null&&bm(f,E,v,y,!0)}}e:{if(d=u?fo(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var _=e_;else if(om(d))if(am)_=o_;else{_=n_;var x=t_}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=r_);if(_&&(_=_(e,u))){im(f,_,n,c);break e}x&&x(e,d,u),e==="focusout"&&(x=d._wrapperState)&&x.controlled&&d.type==="number"&&Wu(d,"number",d.value)}switch(x=u?fo(u):window,e){case"focusin":(om(x)||x.contentEditable==="true")&&(so=x,Sc=u,Ci=null);break;case"focusout":Ci=Sc=so=null;break;case"mousedown":wc=!0;break;case"contextmenu":case"mouseup":case"dragend":wc=!1,hm(f,n,c);break;case"selectionchange":if(s_)break;case"keydown":case"keyup":hm(f,n,c)}var N;if(gc)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else ao?nm(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(Jh&&n.locale!=="ko"&&(ao||I!=="onCompositionStart"?I==="onCompositionEnd"&&ao&&(N=Kh()):(Un=c,cc="value"in Un?Un.value:Un.textContent,ao=!0)),x=xs(u,I),0<x.length&&(I=new qh(I,e,null,n,c),f.push({event:I,listeners:x}),N?I.data=N:(N=rm(n),N!==null&&(I.data=N)))),(N=Xw?Qw(e,n):qw(e,n))&&(u=xs(u,"onBeforeInput"),0<u.length&&(c=new qh("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=N))}xm(f,t)})}function Pi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=mi(e,n),i!=null&&r.unshift(Pi(e,i,o)),i=mi(e,t),i!=null&&r.push(Pi(e,i,o))),e=e.return}return r}function uo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bm(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,o?(l=mi(n,i),l!=null&&a.unshift(Pi(n,l,s))):o||(l=mi(n,i),l!=null&&a.push(Pi(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var f_=/\r\n?/g,d_=/\u0000|\uFFFD/g;function Nm(e){return(typeof e=="string"?e:""+e).replace(f_,`
|
|
42
|
-
`).replace(d_,"")}function Rs(e,t,n){if(t=Nm(t),Nm(e)!==t&&n)throw Error(H(425))}function bs(){}var Oc=null,Tc=null;function Ac(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 kc=typeof setTimeout=="function"?setTimeout:void 0,p_=typeof clearTimeout=="function"?clearTimeout:void 0,Om=typeof Promise=="function"?Promise:void 0,h_=typeof queueMicrotask=="function"?queueMicrotask:typeof Om<"u"?function(e){return Om.resolve(null).then(e).catch(m_)}:kc;function m_(e){setTimeout(function(){throw e})}function Cc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Ri(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Ri(t)}function $n(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 Tm(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 co=Math.random().toString(36).slice(2),jt="__reactFiber$"+co,Di="__reactProps$"+co,un="__reactContainer$"+co,Ic="__reactEvents$"+co,g_="__reactListeners$"+co,v_="__reactHandles$"+co;function Er(e){var t=e[jt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[un]||n[jt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tm(e);e!==null;){if(n=e[jt])return n;e=Tm(e)}return t}e=n,n=e.parentNode}return null}function Mi(e){return e=e[jt]||e[un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function Ns(e){return e[Di]||null}var Lc=[],po=-1;function Bn(e){return{current:e}}function ce(e){0>po||(e.current=Lc[po],Lc[po]=null,po--)}function se(e,t){po++,Lc[po]=e.current,e.current=t}var zn={},Fe=Bn(zn),Qe=Bn(!1),Sr=zn;function ho(e,t){var n=e.type.contextTypes;if(!n)return zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function Os(){ce(Qe),ce(Fe)}function Am(e,t,n){if(Fe.current!==zn)throw Error(H(168));se(Fe,t),se(Qe,n)}function km(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(H(108,tw(e)||"Unknown",o));return he({},n,r)}function Ts(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zn,Sr=Fe.current,se(Fe,e),se(Qe,Qe.current),!0}function Cm(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=km(e,t,Sr),r.__reactInternalMemoizedMergedChildContext=e,ce(Qe),ce(Fe),se(Fe,e)):ce(Qe),se(Qe,n)}var cn=null,As=!1,Pc=!1;function Im(e){cn===null?cn=[e]:cn.push(e)}function y_(e){As=!0,Im(e)}function Hn(){if(!Pc&&cn!==null){Pc=!0;var e=0,t=ae;try{var n=cn;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}cn=null,As=!1}catch(o){throw cn!==null&&(cn=cn.slice(e+1)),Ph(nc,Hn),o}finally{ae=t,Pc=!1}}return null}var mo=[],go=0,ks=null,Cs=0,yt=[],Et=0,wr=null,fn=1,dn="";function _r(e,t){mo[go++]=Cs,mo[go++]=ks,ks=e,Cs=t}function Lm(e,t,n){yt[Et++]=fn,yt[Et++]=dn,yt[Et++]=wr,wr=e;var r=fn;e=dn;var o=32-Ot(r)-1;r&=~(1<<o),n+=1;var i=32-Ot(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,fn=1<<32-Ot(t)+o|n<<o|r,dn=i+e}else fn=1<<i|n<<o|r,dn=e}function Dc(e){e.return!==null&&(_r(e,1),Lm(e,1,0))}function Mc(e){for(;e===ks;)ks=mo[--go],mo[go]=null,Cs=mo[--go],mo[go]=null;for(;e===wr;)wr=yt[--Et],yt[Et]=null,dn=yt[--Et],yt[Et]=null,fn=yt[--Et],yt[Et]=null}var ut=null,ct=null,pe=!1,At=null;function Pm(e,t){var n=xt(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 Dm(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,ut=e,ct=$n(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=wr!==null?{id:fn,overflow:dn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ut=e,ct=null,!0):!1;default:return!1}}function Fc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Uc(e){if(pe){var t=ct;if(t){var n=t;if(!Dm(e,t)){if(Fc(e))throw Error(H(418));t=$n(n.nextSibling);var r=ut;t&&Dm(e,t)?Pm(r,n):(e.flags=e.flags&-4097|2,pe=!1,ut=e)}}else{if(Fc(e))throw Error(H(418));e.flags=e.flags&-4097|2,pe=!1,ut=e}}}function Mm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function Is(e){if(e!==ut)return!1;if(!pe)return Mm(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ac(e.type,e.memoizedProps)),t&&(t=ct)){if(Fc(e))throw Fm(),Error(H(418));for(;t;)Pm(e,t),t=$n(t.nextSibling)}if(Mm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ct=$n(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=ut?$n(e.stateNode.nextSibling):null;return!0}function Fm(){for(var e=ct;e;)e=$n(e.nextSibling)}function vo(){ct=ut=null,pe=!1}function Vc(e){At===null?At=[e]:At.push(e)}var E_=ln.ReactCurrentBatchConfig;function kt(e,t){if(e&&e.defaultProps){t=he({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ls=Bn(null),Ps=null,yo=null,$c=null;function Bc(){$c=yo=Ps=null}function zc(e){var t=Ls.current;ce(Ls),e._currentValue=t}function Hc(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 Eo(e,t){Ps=e,$c=yo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if($c!==e)if(e={context:e,memoizedValue:t,next:null},yo===null){if(Ps===null)throw Error(H(308));yo=e,Ps.dependencies={lanes:0,firstContext:e}}else yo=yo.next=e;return t}var xr=null;function jc(e){xr===null?xr=[e]:xr.push(e)}function Um(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,jc(t)):(n.next=o.next,o.next=n),t.interleaved=n,pn(e,r)}function pn(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 jn=!1;function Wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vm(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 hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,pn(e,n)}return o=r.interleaved,o===null?(t.next=t,jc(r)):(t.next=o.next,o.next=t),r.interleaved=t,pn(e,n)}function Ds(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,ic(e,n)}}function $m(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,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 Ms(e,t,n,r){var o=e.updateQueue;jn=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?i=u:a.next=u,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;a=0,c=u=l=null,s=i;do{var d=s.lane,h=s.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,y=s;switch(d=t,h=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(h,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,d=typeof v=="function"?v.call(h,f,d):v,d==null)break e;f=he({},f,d);break e;case 2:jn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,l=f):c=c.next=h,a|=d;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;d=s,s=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(1);if(c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Nr|=a,e.lanes=a,e.memoizedState=f}}function Bm(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(H(191,o));o.call(r)}}}var zm=new oh.Component().refs;function Yc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:he({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={isMounted:function(e){return(e=e._reactInternals)?yr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=We(),o=Xn(e),i=hn(r,o);i.payload=t,n!=null&&(i.callback=n),t=Wn(e,i,o),t!==null&&(Lt(t,e,o,r),Ds(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=We(),o=Xn(e),i=hn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wn(e,i,o),t!==null&&(Lt(t,e,o,r),Ds(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=We(),r=Xn(e),o=hn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Wn(e,o,r),t!==null&&(Lt(t,e,r,n),Ds(t,e,r))}};function Hm(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!ki(n,r)||!ki(o,i):!0}function jm(e,t,n){var r=!1,o=zn,i=t.contextType;return typeof i=="object"&&i!==null?i=St(i):(o=qe(t)?Sr:Fe.current,r=t.contextTypes,i=(r=r!=null)?ho(e,o):zn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Wm(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&&Fs.enqueueReplaceState(t,t.state,null)}function Gc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zm,Wc(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=St(i):(i=qe(t)?Sr:Fe.current,o.context=ho(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Yc(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Fs.enqueueReplaceState(o,o.state,null),Ms(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Fi(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(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;s===zm&&(s=o.refs={}),a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Us(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ym(e){var t=e._init;return t(e._payload)}function Gm(e){function t(p,m){if(e){var g=p.deletions;g===null?(p.deletions=[m],p.flags|=16):g.push(m)}}function n(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function r(p,m){for(p=new Map;m!==null;)m.key!==null?p.set(m.key,m):p.set(m.index,m),m=m.sibling;return p}function o(p,m){return p=qn(p,m),p.index=0,p.sibling=null,p}function i(p,m,g){return p.index=g,e?(g=p.alternate,g!==null?(g=g.index,g<m?(p.flags|=2,m):g):(p.flags|=2,m)):(p.flags|=1048576,m)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function s(p,m,g,S){return m===null||m.tag!==6?(m=Cf(g,p.mode,S),m.return=p,m):(m=o(m,g),m.return=p,m)}function l(p,m,g,S){var _=g.type;return _===eo?c(p,m,g.props.children,S,g.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===In&&Ym(_)===m.type)?(S=o(m,g.props),S.ref=Fi(p,m,g),S.return=p,S):(S=rl(g.type,g.key,g.props,null,p.mode,S),S.ref=Fi(p,m,g),S.return=p,S)}function u(p,m,g,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=If(g,p.mode,S),m.return=p,m):(m=o(m,g.children||[]),m.return=p,m)}function c(p,m,g,S,_){return m===null||m.tag!==7?(m=kr(g,p.mode,S,_),m.return=p,m):(m=o(m,g),m.return=p,m)}function f(p,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Cf(""+m,p.mode,g),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case es:return g=rl(m.type,m.key,m.props,null,p.mode,g),g.ref=Fi(p,null,m),g.return=p,g;case Jr:return m=If(m,p.mode,g),m.return=p,m;case In:var S=m._init;return f(p,S(m._payload),g)}if(di(m)||ci(m))return m=kr(m,p.mode,g,null),m.return=p,m;Us(p,m)}return null}function d(p,m,g,S){var _=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:s(p,m,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case es:return g.key===_?l(p,m,g,S):null;case Jr:return g.key===_?u(p,m,g,S):null;case In:return _=g._init,d(p,m,_(g._payload),S)}if(di(g)||ci(g))return _!==null?null:c(p,m,g,S,null);Us(p,g)}return null}function h(p,m,g,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return p=p.get(g)||null,s(m,p,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case es:return p=p.get(S.key===null?g:S.key)||null,l(m,p,S,_);case Jr:return p=p.get(S.key===null?g:S.key)||null,u(m,p,S,_);case In:var x=S._init;return h(p,m,g,x(S._payload),_)}if(di(S)||ci(S))return p=p.get(g)||null,c(m,p,S,_,null);Us(m,S)}return null}function v(p,m,g,S){for(var _=null,x=null,N=m,I=m=0,D=null;N!==null&&I<g.length;I++){N.index>I?(D=N,N=null):D=N.sibling;var T=d(p,N,g[I],S);if(T===null){N===null&&(N=D);break}e&&N&&T.alternate===null&&t(p,N),m=i(T,m,I),x===null?_=T:x.sibling=T,x=T,N=D}if(I===g.length)return n(p,N),pe&&_r(p,I),_;if(N===null){for(;I<g.length;I++)N=f(p,g[I],S),N!==null&&(m=i(N,m,I),x===null?_=N:x.sibling=N,x=N);return pe&&_r(p,I),_}for(N=r(p,N);I<g.length;I++)D=h(N,p,I,g[I],S),D!==null&&(e&&D.alternate!==null&&N.delete(D.key===null?I:D.key),m=i(D,m,I),x===null?_=D:x.sibling=D,x=D);return e&&N.forEach(function($){return t(p,$)}),pe&&_r(p,I),_}function y(p,m,g,S){var _=ci(g);if(typeof _!="function")throw Error(H(150));if(g=_.call(g),g==null)throw Error(H(151));for(var x=_=null,N=m,I=m=0,D=null,T=g.next();N!==null&&!T.done;I++,T=g.next()){N.index>I?(D=N,N=null):D=N.sibling;var $=d(p,N,T.value,S);if($===null){N===null&&(N=D);break}e&&N&&$.alternate===null&&t(p,N),m=i($,m,I),x===null?_=$:x.sibling=$,x=$,N=D}if(T.done)return n(p,N),pe&&_r(p,I),_;if(N===null){for(;!T.done;I++,T=g.next())T=f(p,T.value,S),T!==null&&(m=i(T,m,I),x===null?_=T:x.sibling=T,x=T);return pe&&_r(p,I),_}for(N=r(p,N);!T.done;I++,T=g.next())T=h(N,p,I,T.value,S),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?I:T.key),m=i(T,m,I),x===null?_=T:x.sibling=T,x=T);return e&&N.forEach(function(F){return t(p,F)}),pe&&_r(p,I),_}function E(p,m,g,S){if(typeof g=="object"&&g!==null&&g.type===eo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case es:e:{for(var _=g.key,x=m;x!==null;){if(x.key===_){if(_=g.type,_===eo){if(x.tag===7){n(p,x.sibling),m=o(x,g.props.children),m.return=p,p=m;break e}}else if(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===In&&Ym(_)===x.type){n(p,x.sibling),m=o(x,g.props),m.ref=Fi(p,x,g),m.return=p,p=m;break e}n(p,x);break}else t(p,x);x=x.sibling}g.type===eo?(m=kr(g.props.children,p.mode,S,g.key),m.return=p,p=m):(S=rl(g.type,g.key,g.props,null,p.mode,S),S.ref=Fi(p,m,g),S.return=p,p=S)}return a(p);case Jr:e:{for(x=g.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(p,m.sibling),m=o(m,g.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=If(g,p.mode,S),m.return=p,p=m}return a(p);case In:return x=g._init,E(p,m,x(g._payload),S)}if(di(g))return v(p,m,g,S);if(ci(g))return y(p,m,g,S);Us(p,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(p,m.sibling),m=o(m,g),m.return=p,p=m):(n(p,m),m=Cf(g,p.mode,S),m.return=p,p=m),a(p)):n(p,m)}return E}var So=Gm(!0),Km=Gm(!1),Ui={},Wt=Bn(Ui),Vi=Bn(Ui),$i=Bn(Ui);function Rr(e){if(e===Ui)throw Error(H(174));return e}function Kc(e,t){switch(se($i,t),se(Vi,e),se(Wt,Ui),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gu(t,e)}ce(Wt),se(Wt,t)}function wo(){ce(Wt),ce(Vi),ce($i)}function Xm(e){Rr($i.current);var t=Rr(Wt.current),n=Gu(t,e.type);t!==n&&(se(Vi,e),se(Wt,n))}function Xc(e){Vi.current===e&&(ce(Wt),ce(Vi))}var me=Bn(0);function Vs(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 Qc=[];function qc(){for(var e=0;e<Qc.length;e++)Qc[e]._workInProgressVersionPrimary=null;Qc.length=0}var $s=ln.ReactCurrentDispatcher,Zc=ln.ReactCurrentBatchConfig,br=0,ge=null,be=null,Ae=null,Bs=!1,Bi=!1,zi=0,S_=0;function Ue(){throw Error(H(321))}function Jc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tt(e[n],t[n]))return!1;return!0}function ef(e,t,n,r,o,i){if(br=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$s.current=e===null||e.memoizedState===null?R_:b_,e=n(r,o),Bi){i=0;do{if(Bi=!1,zi=0,25<=i)throw Error(H(301));i+=1,Ae=be=null,t.updateQueue=null,$s.current=N_,e=n(r,o)}while(Bi)}if($s.current=js,t=be!==null&&be.next!==null,br=0,Ae=be=ge=null,Bs=!1,t)throw Error(H(300));return e}function tf(){var e=zi!==0;return zi=0,e}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ae===null?ge.memoizedState=Ae=e:Ae=Ae.next=e,Ae}function wt(){if(be===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Ae===null?ge.memoizedState:Ae.next;if(t!==null)Ae=t,be=e;else{if(e===null)throw Error(H(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Ae===null?ge.memoizedState=Ae=e:Ae=Ae.next=e}return Ae}function Hi(e,t){return typeof t=="function"?t(e):t}function nf(e){var t=wt(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=be,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var s=a=null,l=null,u=i;do{var c=u.lane;if((br&c)===c)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:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=f,a=r):l=l.next=f,ge.lanes|=c,Nr|=c}u=u.next}while(u!==null&&u!==i);l===null?a=r:l.next=s,Tt(r,t.memoizedState)||(Ze=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ge.lanes|=i,Nr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function rf(e){var t=wt(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);Tt(i,t.memoizedState)||(Ze=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Qm(){}function qm(e,t){var n=ge,r=wt(),o=t(),i=!Tt(r.memoizedState,o);if(i&&(r.memoizedState=o,Ze=!0),r=r.queue,of(eg.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ae!==null&&Ae.memoizedState.tag&1){if(n.flags|=2048,ji(9,Jm.bind(null,n,r,o,t),void 0,null),ke===null)throw Error(H(349));br&30||Zm(n,t,o)}return o}function Zm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Jm(e,t,n,r){t.value=n,t.getSnapshot=r,tg(t)&&ng(e)}function eg(e,t,n){return n(function(){tg(t)&&ng(e)})}function tg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tt(e,n)}catch{return!0}}function ng(e){var t=pn(e,1);t!==null&&Lt(t,e,1,-1)}function rg(e){var t=Yt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=x_.bind(null,ge,e),[t.memoizedState,e]}function ji(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.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 og(){return wt().memoizedState}function zs(e,t,n,r){var o=Yt();ge.flags|=e,o.memoizedState=ji(1|t,n,void 0,r===void 0?null:r)}function Hs(e,t,n,r){var o=wt();r=r===void 0?null:r;var i=void 0;if(be!==null){var a=be.memoizedState;if(i=a.destroy,r!==null&&Jc(r,a.deps)){o.memoizedState=ji(t,n,i,r);return}}ge.flags|=e,o.memoizedState=ji(1|t,n,i,r)}function ig(e,t){return zs(8390656,8,e,t)}function of(e,t){return Hs(2048,8,e,t)}function ag(e,t){return Hs(4,2,e,t)}function sg(e,t){return Hs(4,4,e,t)}function lg(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 ug(e,t,n){return n=n!=null?n.concat([e]):null,Hs(4,4,lg.bind(null,t,e),n)}function af(){}function cg(e,t){var n=wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Jc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fg(e,t){var n=wt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Jc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function dg(e,t,n){return br&21?(Tt(n,t)||(n=Uh(),ge.lanes|=n,Nr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=n)}function w_(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=Zc.transition;Zc.transition={};try{e(!1),t()}finally{ae=n,Zc.transition=r}}function pg(){return wt().memoizedState}function __(e,t,n){var r=Xn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hg(e))mg(t,n);else if(n=Um(e,t,n,r),n!==null){var o=We();Lt(n,e,r,o),gg(n,t,r)}}function x_(e,t,n){var r=Xn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hg(e))mg(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Tt(s,a)){var l=t.interleaved;l===null?(o.next=o,jc(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Um(e,t,o,r),n!==null&&(o=We(),Lt(n,e,r,o),gg(n,t,r))}}function hg(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function mg(e,t){Bi=Bs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ic(e,n)}}var js={readContext:St,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},R_={readContext:St,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:ig,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zs(4194308,4,lg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){return zs(4,2,e,t)},useMemo:function(e,t){var n=Yt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yt();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=__.bind(null,ge,e),[r.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:rg,useDebugValue:af,useDeferredValue:function(e){return Yt().memoizedState=e},useTransition:function(){var e=rg(!1),t=e[0];return e=w_.bind(null,e[1]),Yt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ge,o=Yt();if(pe){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),ke===null)throw Error(H(349));br&30||Zm(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,ig(eg.bind(null,r,i,e),[e]),r.flags|=2048,ji(9,Jm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Yt(),t=ke.identifierPrefix;if(pe){var n=dn,r=fn;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=S_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},b_={readContext:St,useCallback:cg,useContext:St,useEffect:of,useImperativeHandle:ug,useInsertionEffect:ag,useLayoutEffect:sg,useMemo:fg,useReducer:nf,useRef:og,useState:function(){return nf(Hi)},useDebugValue:af,useDeferredValue:function(e){var t=wt();return dg(t,be.memoizedState,e)},useTransition:function(){var e=nf(Hi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Qm,useSyncExternalStore:qm,useId:pg,unstable_isNewReconciler:!1},N_={readContext:St,useCallback:cg,useContext:St,useEffect:of,useImperativeHandle:ug,useInsertionEffect:ag,useLayoutEffect:sg,useMemo:fg,useReducer:rf,useRef:og,useState:function(){return rf(Hi)},useDebugValue:af,useDeferredValue:function(e){var t=wt();return be===null?t.memoizedState=e:dg(t,be.memoizedState,e)},useTransition:function(){var e=rf(Hi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Qm,useSyncExternalStore:qm,useId:pg,unstable_isNewReconciler:!1};function _o(e,t){try{var n="",r=t;do n+=ew(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
40
|
+
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
|
|
41
|
+
`+o[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{Ul=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zo(e):""}function TE(e){switch(e.tag){case 5:return zo(e.type);case 16:return zo("Lazy");case 13:return zo("Suspense");case 19:return zo("SuspenseList");case 0:case 2:case 15:return e=Fl(e.type,!1),e;case 11:return e=Fl(e.type.render,!1),e;case 1:return e=Fl(e.type,!0),e;default:return""}}function Vl(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 Br:return"Fragment";case Vr:return"Portal";case Al:return"Profiler";case Il:return"StrictMode";case Dl:return"Suspense";case kl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kf:return(e.displayName||"Context")+".Consumer";case Df:return(e._context.displayName||"Context")+".Provider";case Ll:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pl:return t=e.displayName||null,t!==null?t:Vl(e.type)||"Memo";case vn:t=e._payload,e=e._init;try{return Vl(e(t))}catch{}}return null}function CE(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 Vl(t);case 8:return t===Il?"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 yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bE(e){var t=Uf(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.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 ms(e){e._valueTracker||(e._valueTracker=bE(e))}function Ff(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vs(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 Bl(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yn(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 Bf(e,t){t=t.checked,t!=null&&bl(e,"checked",t,!1)}function $l(e,t){Bf(e,t);var n=yn(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")?zl(e,t.type,n):t.hasOwnProperty("defaultValue")&&zl(e,t.type,yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $f(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 zl(e,t,n){(t!=="number"||vs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ho=Array.isArray;function $r(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+yn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Hl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function zf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Ho(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:yn(n)}}function Hf(e,t){var n=yn(t.value),r=yn(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 jf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Yf(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 jl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ys,Gf=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ys=ys||document.createElement("div"),ys.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ys.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yo={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},IE=["Webkit","ms","Moz","O"];Object.keys(Yo).forEach(function(e){IE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yo[t]=Yo[e]})});function Wf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yo.hasOwnProperty(e)&&Yo[e]?(""+t).trim():t+"px"}function Kf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Wf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var AE=fe({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 Yl(e,t){if(t){if(AE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Gl(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 Wl=null;function Kl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ql=null,zr=null,Hr=null;function Qf(e){if(e=pi(e)){if(typeof Ql!="function")throw Error(H(280));var t=e.stateNode;t&&(t=$s(t),Ql(e.stateNode,e.type,t))}}function Xf(e){zr?Hr?Hr.push(e):Hr=[e]:zr=e}function qf(){if(zr){var e=zr,t=Hr;if(Hr=zr=null,Qf(e),t)for(e=0;e<t.length;e++)Qf(t[e])}}function Zf(e,t){return e(t)}function Jf(){}var Xl=!1;function ep(e,t,n){if(Xl)return e(t,n);Xl=!0;try{return Zf(e,t,n)}finally{Xl=!1,(zr!==null||Hr!==null)&&(Jf(),qf())}}function Go(e,t){var n=e.stateNode;if(n===null)return null;var r=$s(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(H(231,t,typeof n));return n}var ql=!1;if(Jt)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){ql=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{ql=!1}function LE(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ko=!1,Es=null,Ss=!1,Zl=null,DE={onError:function(e){Ko=!0,Es=e}};function kE(e,t,n,r,o,i,s,a,l){Ko=!1,Es=null,LE.apply(DE,arguments)}function PE(e,t,n,r,o,i,s,a,l){if(kE.apply(this,arguments),Ko){if(Ko){var u=Es;Ko=!1,Es=null}else throw Error(H(198));Ss||(Ss=!0,Zl=u)}}function rr(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 tp(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 np(e){if(rr(e)!==e)throw Error(H(188))}function ME(e){var t=e.alternate;if(!t){if(t=rr(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return np(o),e;if(i===r)return np(o),t;i=i.sibling}throw Error(H(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,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){for(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)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function rp(e){return e=ME(e),e!==null?op(e):null}function op(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=op(e);if(t!==null)return t;e=e.sibling}return null}var ip=ot.unstable_scheduleCallback,sp=ot.unstable_cancelCallback,UE=ot.unstable_shouldYield,FE=ot.unstable_requestPaint,ye=ot.unstable_now,VE=ot.unstable_getCurrentPriorityLevel,Jl=ot.unstable_ImmediatePriority,ap=ot.unstable_UserBlockingPriority,_s=ot.unstable_NormalPriority,BE=ot.unstable_LowPriority,lp=ot.unstable_IdlePriority,ws=null,Ft=null;function $E(e){if(Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(ws,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:jE,zE=Math.log,HE=Math.LN2;function jE(e){return e>>>=0,e===0?32:31-(zE(e)/HE|0)|0}var Rs=64,Ns=4194304;function Qo(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 Os(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Qo(a):(i&=s,i!==0&&(r=Qo(i)))}else s=n&~o,s!==0?r=Qo(s):i!==0&&(r=Qo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function YE(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 GE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Nt(i),a=1<<s,l=o[s];l===-1?(!(a&n)||a&r)&&(o[s]=YE(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function eu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function up(){var e=Rs;return Rs<<=1,!(Rs&4194240)&&(Rs=64),e}function tu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function WE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Nt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function nu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var re=0;function cp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var dp,ru,fp,pp,hp,ou=!1,xs=[],En=null,Sn=null,_n=null,qo=new Map,Zo=new Map,wn=[],KE="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 gp(e,t){switch(e){case"focusin":case"focusout":En=null;break;case"dragenter":case"dragleave":Sn=null;break;case"mouseover":case"mouseout":_n=null;break;case"pointerover":case"pointerout":qo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zo.delete(t.pointerId)}}function Jo(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=pi(t),t!==null&&ru(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function QE(e,t,n,r,o){switch(t){case"focusin":return En=Jo(En,e,t,n,r,o),!0;case"dragenter":return Sn=Jo(Sn,e,t,n,r,o),!0;case"mouseover":return _n=Jo(_n,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return qo.set(i,Jo(qo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Zo.set(i,Jo(Zo.get(i)||null,e,t,n,r,o)),!0}return!1}function mp(e){var t=or(e.target);if(t!==null){var n=rr(t);if(n!==null){if(t=n.tag,t===13){if(t=tp(n),t!==null){e.blockedOn=t,hp(e.priority,function(){fp(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 Ts(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=su(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wl=r,n.target.dispatchEvent(r),Wl=null}else return t=pi(n),t!==null&&ru(t),e.blockedOn=n,!1;t.shift()}return!0}function vp(e,t,n){Ts(e)&&n.delete(t)}function XE(){ou=!1,En!==null&&Ts(En)&&(En=null),Sn!==null&&Ts(Sn)&&(Sn=null),_n!==null&&Ts(_n)&&(_n=null),qo.forEach(vp),Zo.forEach(vp)}function ei(e,t){e.blockedOn===t&&(e.blockedOn=null,ou||(ou=!0,ot.unstable_scheduleCallback(ot.unstable_NormalPriority,XE)))}function ti(e){function t(o){return ei(o,e)}if(0<xs.length){ei(xs[0],e);for(var n=1;n<xs.length;n++){var r=xs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(En!==null&&ei(En,e),Sn!==null&&ei(Sn,e),_n!==null&&ei(_n,e),qo.forEach(t),Zo.forEach(t),n=0;n<wn.length;n++)r=wn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wn.length&&(n=wn[0],n.blockedOn===null);)mp(n),n.blockedOn===null&&wn.shift()}var jr=en.ReactCurrentBatchConfig,Cs=!0;function qE(e,t,n,r){var o=re,i=jr.transition;jr.transition=null;try{re=1,iu(e,t,n,r)}finally{re=o,jr.transition=i}}function ZE(e,t,n,r){var o=re,i=jr.transition;jr.transition=null;try{re=4,iu(e,t,n,r)}finally{re=o,jr.transition=i}}function iu(e,t,n,r){if(Cs){var o=su(e,t,n,r);if(o===null)Ru(e,t,r,bs,n),gp(e,r);else if(QE(o,e,t,n,r))r.stopPropagation();else if(gp(e,r),t&4&&-1<KE.indexOf(e)){for(;o!==null;){var i=pi(o);if(i!==null&&dp(i),i=su(e,t,n,r),i===null&&Ru(e,t,r,bs,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Ru(e,t,r,null,n)}}var bs=null;function su(e,t,n,r){if(bs=null,e=Kl(r),e=or(e),e!==null)if(t=rr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=tp(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 bs=e,null}function yp(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(VE()){case Jl:return 1;case ap:return 4;case _s:case BE:return 16;case lp:return 536870912;default:return 16}default:return 16}}var Rn=null,au=null,Is=null;function Ep(){if(Is)return Is;var e,t=au,n=t.length,r,o="value"in Rn?Rn.value:Rn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Is=o.slice(e,1<r?1-r:void 0)}function As(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 Ls(){return!0}function Sp(){return!1}function it(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ls:Sp,this.isPropagationStopped=Sp,this}return fe(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=Ls)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ls)},persist:function(){},isPersistent:Ls}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lu=it(Yr),ni=fe({},Yr,{view:0,detail:0}),JE=it(ni),uu,cu,ri,Ds=fe({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==ri&&(ri&&e.type==="mousemove"?(uu=e.screenX-ri.screenX,cu=e.screenY-ri.screenY):cu=uu=0,ri=e),uu)},movementY:function(e){return"movementY"in e?e.movementY:cu}}),_p=it(Ds),eS=fe({},Ds,{dataTransfer:0}),tS=it(eS),nS=fe({},ni,{relatedTarget:0}),du=it(nS),rS=fe({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),oS=it(rS),iS=fe({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sS=it(iS),aS=fe({},Yr,{data:0}),wp=it(aS),lS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uS={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"},cS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cS[e])?!!t[e]:!1}function fu(){return dS}var fS=fe({},ni,{key:function(e){if(e.key){var t=lS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=As(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(e){return e.type==="keypress"?As(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?As(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pS=it(fS),hS=fe({},Ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rp=it(hS),gS=fe({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),mS=it(gS),vS=fe({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),yS=it(vS),ES=fe({},Ds,{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}),SS=it(ES),_S=[9,13,27,32],pu=Jt&&"CompositionEvent"in window,oi=null;Jt&&"documentMode"in document&&(oi=document.documentMode);var wS=Jt&&"TextEvent"in window&&!oi,Np=Jt&&(!pu||oi&&8<oi&&11>=oi),Op=String.fromCharCode(32),xp=!1;function Tp(e,t){switch(e){case"keyup":return _S.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gr=!1;function RS(e,t){switch(e){case"compositionend":return Cp(t);case"keypress":return t.which!==32?null:(xp=!0,Op);case"textInput":return e=t.data,e===Op&&xp?null:e;default:return null}}function NS(e,t){if(Gr)return e==="compositionend"||!pu&&Tp(e,t)?(e=Ep(),Is=au=Rn=null,Gr=!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 Np&&t.locale!=="ko"?null:t.data;default:return null}}var OS={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 bp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OS[e.type]:t==="textarea"}function Ip(e,t,n,r){Xf(r),t=Fs(t,"onChange"),0<t.length&&(n=new lu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ii=null,si=null;function xS(e){Kp(e,0)}function ks(e){var t=qr(e);if(Ff(t))return e}function TS(e,t){if(e==="change")return t}var Ap=!1;if(Jt){var hu;if(Jt){var gu="oninput"in document;if(!gu){var Lp=document.createElement("div");Lp.setAttribute("oninput","return;"),gu=typeof Lp.oninput=="function"}hu=gu}else hu=!1;Ap=hu&&(!document.documentMode||9<document.documentMode)}function Dp(){ii&&(ii.detachEvent("onpropertychange",kp),si=ii=null)}function kp(e){if(e.propertyName==="value"&&ks(si)){var t=[];Ip(t,si,e,Kl(e)),ep(xS,t)}}function CS(e,t,n){e==="focusin"?(Dp(),ii=t,si=n,ii.attachEvent("onpropertychange",kp)):e==="focusout"&&Dp()}function bS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ks(si)}function IS(e,t){if(e==="click")return ks(t)}function AS(e,t){if(e==="input"||e==="change")return ks(t)}function LS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:LS;function ai(e,t){if(Ot(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 o=n[r];if(!xl.call(t,o)||!Ot(e[o],t[o]))return!1}return!0}function Pp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mp(e,t){var n=Pp(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=Pp(n)}}function Up(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Up(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fp(){for(var e=window,t=vs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vs(e.document)}return t}function mu(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 DS(e){var t=Fp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Up(n.ownerDocument.documentElement,n)){if(r!==null&&mu(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Mp(n,i);var s=Mp(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>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 kS=Jt&&"documentMode"in document&&11>=document.documentMode,Wr=null,vu=null,li=null,yu=!1;function Vp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yu||Wr==null||Wr!==vs(r)||(r=Wr,"selectionStart"in r&&mu(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}),li&&ai(li,r)||(li=r,r=Fs(vu,"onSelect"),0<r.length&&(t=new lu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Ps(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Kr={animationend:Ps("Animation","AnimationEnd"),animationiteration:Ps("Animation","AnimationIteration"),animationstart:Ps("Animation","AnimationStart"),transitionend:Ps("Transition","TransitionEnd")},Eu={},Bp={};Jt&&(Bp=document.createElement("div").style,"AnimationEvent"in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),"TransitionEvent"in window||delete Kr.transitionend.transition);function Ms(e){if(Eu[e])return Eu[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bp)return Eu[e]=t[n];return e}var $p=Ms("animationend"),zp=Ms("animationiteration"),Hp=Ms("animationstart"),jp=Ms("transitionend"),Yp=new Map,Gp="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 Nn(e,t){Yp.set(e,t),nr(t,[e])}for(var Su=0;Su<Gp.length;Su++){var _u=Gp[Su],PS=_u.toLowerCase(),MS=_u[0].toUpperCase()+_u.slice(1);Nn(PS,"on"+MS)}Nn($p,"onAnimationEnd"),Nn(zp,"onAnimationIteration"),Nn(Hp,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(jp,"onTransitionEnd"),Fr("onMouseEnter",["mouseout","mouseover"]),Fr("onMouseLeave",["mouseout","mouseover"]),Fr("onPointerEnter",["pointerout","pointerover"]),Fr("onPointerLeave",["pointerout","pointerover"]),nr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),nr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),nr("onBeforeInput",["compositionend","keypress","textInput","paste"]),nr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),nr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),nr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ui="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(" "),US=new Set("cancel close invalid load scroll toggle".split(" ").concat(ui));function Wp(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,PE(r,t,void 0,e),e.currentTarget=null}function Kp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Wp(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Wp(o,a,u),i=l}}}if(Ss)throw e=Zl,Ss=!1,Zl=null,e}function se(e,t){var n=t[bu];n===void 0&&(n=t[bu]=new Set);var r=e+"__bubble";n.has(r)||(Qp(t,e,2,!1),n.add(r))}function wu(e,t,n){var r=0;t&&(r|=4),Qp(n,e,r,t)}var Us="_reactListening"+Math.random().toString(36).slice(2);function ci(e){if(!e[Us]){e[Us]=!0,If.forEach(function(n){n!=="selectionchange"&&(US.has(n)||wu(n,!1,e),wu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Us]||(t[Us]=!0,wu("selectionchange",!1,t))}}function Qp(e,t,n,r){switch(yp(t)){case 1:var o=qE;break;case 4:o=ZE;break;default:o=iu}n=o.bind(null,t,n,e),o=void 0,!ql||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ru(e,t,n,r,o){var i=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===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=or(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}ep(function(){var u=i,c=Kl(n),d=[];e:{var f=Yp.get(e);if(f!==void 0){var h=lu,m=e;switch(e){case"keypress":if(As(n)===0)break e;case"keydown":case"keyup":h=pS;break;case"focusin":m="focus",h=du;break;case"focusout":m="blur",h=du;break;case"beforeblur":case"afterblur":h=du;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":h=_p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=tS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=mS;break;case $p:case zp:case Hp:h=oS;break;case jp:h=yS;break;case"scroll":h=JE;break;case"wheel":h=SS;break;case"copy":case"cut":case"paste":h=sS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Rp}var v=(t&4)!==0,E=!v&&e==="scroll",p=v?f!==null?f+"Capture":null:f;v=[];for(var g=u,S;g!==null;){S=g;var _=S.stateNode;if(S.tag===5&&_!==null&&(S=_,p!==null&&(_=Go(g,p),_!=null&&v.push(di(g,_,S)))),E)break;g=g.return}0<v.length&&(f=new h(f,m,null,n,c),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Wl&&(m=n.relatedTarget||n.fromElement)&&(or(m)||m[tn]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?or(m):null,m!==null&&(E=rr(m),m!==E||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=_p,_="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=Rp,_="onPointerLeave",p="onPointerEnter",g="pointer"),E=h==null?f:qr(h),S=m==null?f:qr(m),f=new v(_,g+"leave",h,n,c),f.target=E,f.relatedTarget=S,_=null,or(c)===u&&(v=new v(p,g+"enter",m,n,c),v.target=S,v.relatedTarget=E,_=v),E=_,h&&m)t:{for(v=h,p=m,g=0,S=v;S;S=Qr(S))g++;for(S=0,_=p;_;_=Qr(_))S++;for(;0<g-S;)v=Qr(v),g--;for(;0<S-g;)p=Qr(p),S--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break t;v=Qr(v),p=Qr(p)}v=null}else v=null;h!==null&&Xp(d,f,h,v,!1),m!==null&&E!==null&&Xp(d,E,m,v,!0)}}e:{if(f=u?qr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var w=TS;else if(bp(f))if(Ap)w=AS;else{w=bS;var R=CS}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(w=IS);if(w&&(w=w(e,u))){Ip(d,w,n,c);break e}R&&R(e,f,u),e==="focusout"&&(R=f._wrapperState)&&R.controlled&&f.type==="number"&&zl(f,"number",f.value)}switch(R=u?qr(u):window,e){case"focusin":(bp(R)||R.contentEditable==="true")&&(Wr=R,vu=u,li=null);break;case"focusout":li=vu=Wr=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,Vp(d,n,c);break;case"selectionchange":if(kS)break;case"keydown":case"keyup":Vp(d,n,c)}var C;if(pu)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Gr?Tp(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Np&&n.locale!=="ko"&&(Gr||A!=="onCompositionStart"?A==="onCompositionEnd"&&Gr&&(C=Ep()):(Rn=c,au="value"in Rn?Rn.value:Rn.textContent,Gr=!0)),R=Fs(u,A),0<R.length&&(A=new wp(A,e,null,n,c),d.push({event:A,listeners:R}),C?A.data=C:(C=Cp(n),C!==null&&(A.data=C)))),(C=wS?RS(e,n):NS(e,n))&&(u=Fs(u,"onBeforeInput"),0<u.length&&(c=new wp("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}Kp(d,t)})}function di(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Go(e,n),i!=null&&r.unshift(di(e,i,o)),i=Go(e,t),i!=null&&r.push(di(e,i,o))),e=e.return}return r}function Qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Xp(e,t,n,r,o){for(var i=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,o?(l=Go(n,i),l!=null&&s.unshift(di(n,l,a))):o||(l=Go(n,i),l!=null&&s.push(di(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var FS=/\r\n?/g,VS=/\u0000|\uFFFD/g;function qp(e){return(typeof e=="string"?e:""+e).replace(FS,`
|
|
42
|
+
`).replace(VS,"")}function Vs(e,t,n){if(t=qp(t),qp(e)!==t&&n)throw Error(H(425))}function Bs(){}var Nu=null,Ou=null;function xu(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 Tu=typeof setTimeout=="function"?setTimeout:void 0,BS=typeof clearTimeout=="function"?clearTimeout:void 0,Zp=typeof Promise=="function"?Promise:void 0,$S=typeof queueMicrotask=="function"?queueMicrotask:typeof Zp<"u"?function(e){return Zp.resolve(null).then(e).catch(zS)}:Tu;function zS(e){setTimeout(function(){throw e})}function Cu(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ti(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ti(t)}function On(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 Jp(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 Xr=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Xr,fi="__reactProps$"+Xr,tn="__reactContainer$"+Xr,bu="__reactEvents$"+Xr,HS="__reactListeners$"+Xr,jS="__reactHandles$"+Xr;function or(e){var t=e[Vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tn]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Jp(e);e!==null;){if(n=e[Vt])return n;e=Jp(e)}return t}e=n,n=e.parentNode}return null}function pi(e){return e=e[Vt]||e[tn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function $s(e){return e[fi]||null}var Iu=[],Zr=-1;function xn(e){return{current:e}}function ae(e){0>Zr||(e.current=Iu[Zr],Iu[Zr]=null,Zr--)}function ie(e,t){Zr++,Iu[Zr]=e.current,e.current=t}var Tn={},ke=xn(Tn),Ge=xn(!1),ir=Tn;function Jr(e,t){var n=e.type.contextTypes;if(!n)return Tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function We(e){return e=e.childContextTypes,e!=null}function zs(){ae(Ge),ae(ke)}function eh(e,t,n){if(ke.current!==Tn)throw Error(H(168));ie(ke,t),ie(Ge,n)}function th(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(H(108,CE(e)||"Unknown",o));return fe({},n,r)}function Hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tn,ir=ke.current,ie(ke,e),ie(Ge,Ge.current),!0}function nh(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=th(e,t,ir),r.__reactInternalMemoizedMergedChildContext=e,ae(Ge),ae(ke),ie(ke,e)):ae(Ge),ie(Ge,n)}var nn=null,js=!1,Au=!1;function rh(e){nn===null?nn=[e]:nn.push(e)}function YS(e){js=!0,rh(e)}function Cn(){if(!Au&&nn!==null){Au=!0;var e=0,t=re;try{var n=nn;for(re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}nn=null,js=!1}catch(o){throw nn!==null&&(nn=nn.slice(e+1)),ip(Jl,Cn),o}finally{re=t,Au=!1}}return null}var eo=[],to=0,Ys=null,Gs=0,ht=[],gt=0,sr=null,rn=1,on="";function ar(e,t){eo[to++]=Gs,eo[to++]=Ys,Ys=e,Gs=t}function oh(e,t,n){ht[gt++]=rn,ht[gt++]=on,ht[gt++]=sr,sr=e;var r=rn;e=on;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var i=32-Nt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,rn=1<<32-Nt(t)+o|n<<o|r,on=i+e}else rn=1<<i|n<<o|r,on=e}function Lu(e){e.return!==null&&(ar(e,1),oh(e,1,0))}function Du(e){for(;e===Ys;)Ys=eo[--to],eo[to]=null,Gs=eo[--to],eo[to]=null;for(;e===sr;)sr=ht[--gt],ht[gt]=null,on=ht[--gt],ht[gt]=null,rn=ht[--gt],ht[gt]=null}var st=null,at=null,ce=!1,xt=null;function ih(e,t){var n=Et(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 sh(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,st=e,at=On(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=sr!==null?{id:rn,overflow:on}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Et(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,at=null,!0):!1;default:return!1}}function ku(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pu(e){if(ce){var t=at;if(t){var n=t;if(!sh(e,t)){if(ku(e))throw Error(H(418));t=On(n.nextSibling);var r=st;t&&sh(e,t)?ih(r,n):(e.flags=e.flags&-4097|2,ce=!1,st=e)}}else{if(ku(e))throw Error(H(418));e.flags=e.flags&-4097|2,ce=!1,st=e}}}function ah(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Ws(e){if(e!==st)return!1;if(!ce)return ah(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xu(e.type,e.memoizedProps)),t&&(t=at)){if(ku(e))throw lh(),Error(H(418));for(;t;)ih(e,t),t=On(t.nextSibling)}if(ah(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){at=On(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}at=null}}else at=st?On(e.stateNode.nextSibling):null;return!0}function lh(){for(var e=at;e;)e=On(e.nextSibling)}function no(){at=st=null,ce=!1}function Mu(e){xt===null?xt=[e]:xt.push(e)}var GS=en.ReactCurrentBatchConfig;function Tt(e,t){if(e&&e.defaultProps){t=fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ks=xn(null),Qs=null,ro=null,Uu=null;function Fu(){Uu=ro=Qs=null}function Vu(e){var t=Ks.current;ae(Ks),e._currentValue=t}function Bu(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 oo(e,t){Qs=e,Uu=ro=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ke=!0),e.firstContext=null)}function mt(e){var t=e._currentValue;if(Uu!==e)if(e={context:e,memoizedValue:t,next:null},ro===null){if(Qs===null)throw Error(H(308));ro=e,Qs.dependencies={lanes:0,firstContext:e}}else ro=ro.next=e;return t}var lr=null;function $u(e){lr===null?lr=[e]:lr.push(e)}function uh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,$u(t)):(n.next=o.next,o.next=n),t.interleaved=n,sn(e,r)}function sn(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 bn=!1;function zu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ch(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 an(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function In(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,sn(e,n)}return o=r.interleaved,o===null?(t.next=t,$u(r)):(t.next=o.next,o.next=t),r.interleaved=t,sn(e,n)}function Xs(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,nu(e,n)}}function dh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=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};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,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 qs(e,t,n,r){var o=e.updateQueue;bn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,v=a;switch(f=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=fe({},d,f);break e;case 2:bn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(1);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);dr|=s,e.lanes=s,e.memoizedState=d}}function fh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(H(191,o));o.call(r)}}}var ph=new bf.Component().refs;function Hu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={isMounted:function(e){return(e=e._reactInternals)?rr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ze(),o=kn(e),i=an(r,o);i.payload=t,n!=null&&(i.callback=n),t=In(e,i,o),t!==null&&(It(t,e,o,r),Xs(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ze(),o=kn(e),i=an(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=In(e,i,o),t!==null&&(It(t,e,o,r),Xs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ze(),r=kn(e),o=an(n,r);o.tag=2,t!=null&&(o.callback=t),t=In(e,o,r),t!==null&&(It(t,e,r,n),Xs(t,e,r))}};function hh(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!ai(n,r)||!ai(o,i):!0}function gh(e,t,n){var r=!1,o=Tn,i=t.contextType;return typeof i=="object"&&i!==null?i=mt(i):(o=We(t)?ir:ke.current,r=t.contextTypes,i=(r=r!=null)?Jr(e,o):Tn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function mh(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&&Zs.enqueueReplaceState(t,t.state,null)}function ju(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=ph,zu(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=mt(i):(i=We(t)?ir:ke.current,o.context=Jr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Hu(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Zs.enqueueReplaceState(o,o.state,null),qs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function hi(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(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;a===ph&&(a=o.refs={}),s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Js(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vh(e){var t=e._init;return t(e._payload)}function yh(e){function t(p,g){if(e){var S=p.deletions;S===null?(p.deletions=[g],p.flags|=16):S.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function o(p,g){return p=Mn(p,g),p.index=0,p.sibling=null,p}function i(p,g,S){return p.index=S,e?(S=p.alternate,S!==null?(S=S.index,S<g?(p.flags|=2,g):S):(p.flags|=2,g)):(p.flags|=1048576,g)}function s(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,S,_){return g===null||g.tag!==6?(g=Tc(S,p.mode,_),g.return=p,g):(g=o(g,S),g.return=p,g)}function l(p,g,S,_){var w=S.type;return w===Br?c(p,g,S.props.children,_,S.key):g!==null&&(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===vn&&vh(w)===g.type)?(_=o(g,S.props),_.ref=hi(p,g,S),_.return=p,_):(_=ya(S.type,S.key,S.props,null,p.mode,_),_.ref=hi(p,g,S),_.return=p,_)}function u(p,g,S,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==S.containerInfo||g.stateNode.implementation!==S.implementation?(g=Cc(S,p.mode,_),g.return=p,g):(g=o(g,S.children||[]),g.return=p,g)}function c(p,g,S,_,w){return g===null||g.tag!==7?(g=gr(S,p.mode,_,w),g.return=p,g):(g=o(g,S),g.return=p,g)}function d(p,g,S){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Tc(""+g,p.mode,S),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case gs:return S=ya(g.type,g.key,g.props,null,p.mode,S),S.ref=hi(p,null,g),S.return=p,S;case Vr:return g=Cc(g,p.mode,S),g.return=p,g;case vn:var _=g._init;return d(p,_(g._payload),S)}if(Ho(g)||$o(g))return g=gr(g,p.mode,S,null),g.return=p,g;Js(p,g)}return null}function f(p,g,S,_){var w=g!==null?g.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return w!==null?null:a(p,g,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case gs:return S.key===w?l(p,g,S,_):null;case Vr:return S.key===w?u(p,g,S,_):null;case vn:return w=S._init,f(p,g,w(S._payload),_)}if(Ho(S)||$o(S))return w!==null?null:c(p,g,S,_,null);Js(p,S)}return null}function h(p,g,S,_,w){if(typeof _=="string"&&_!==""||typeof _=="number")return p=p.get(S)||null,a(g,p,""+_,w);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case gs:return p=p.get(_.key===null?S:_.key)||null,l(g,p,_,w);case Vr:return p=p.get(_.key===null?S:_.key)||null,u(g,p,_,w);case vn:var R=_._init;return h(p,g,S,R(_._payload),w)}if(Ho(_)||$o(_))return p=p.get(S)||null,c(g,p,_,w,null);Js(g,_)}return null}function m(p,g,S,_){for(var w=null,R=null,C=g,A=g=0,B=null;C!==null&&A<S.length;A++){C.index>A?(B=C,C=null):B=C.sibling;var b=f(p,C,S[A],_);if(b===null){C===null&&(C=B);break}e&&C&&b.alternate===null&&t(p,C),g=i(b,g,A),R===null?w=b:R.sibling=b,R=b,C=B}if(A===S.length)return n(p,C),ce&&ar(p,A),w;if(C===null){for(;A<S.length;A++)C=d(p,S[A],_),C!==null&&(g=i(C,g,A),R===null?w=C:R.sibling=C,R=C);return ce&&ar(p,A),w}for(C=r(p,C);A<S.length;A++)B=h(C,p,A,S[A],_),B!==null&&(e&&B.alternate!==null&&C.delete(B.key===null?A:B.key),g=i(B,g,A),R===null?w=B:R.sibling=B,R=B);return e&&C.forEach(function(V){return t(p,V)}),ce&&ar(p,A),w}function v(p,g,S,_){var w=$o(S);if(typeof w!="function")throw Error(H(150));if(S=w.call(S),S==null)throw Error(H(151));for(var R=w=null,C=g,A=g=0,B=null,b=S.next();C!==null&&!b.done;A++,b=S.next()){C.index>A?(B=C,C=null):B=C.sibling;var V=f(p,C,b.value,_);if(V===null){C===null&&(C=B);break}e&&C&&V.alternate===null&&t(p,C),g=i(V,g,A),R===null?w=V:R.sibling=V,R=V,C=B}if(b.done)return n(p,C),ce&&ar(p,A),w;if(C===null){for(;!b.done;A++,b=S.next())b=d(p,b.value,_),b!==null&&(g=i(b,g,A),R===null?w=b:R.sibling=b,R=b);return ce&&ar(p,A),w}for(C=r(p,C);!b.done;A++,b=S.next())b=h(C,p,A,b.value,_),b!==null&&(e&&b.alternate!==null&&C.delete(b.key===null?A:b.key),g=i(b,g,A),R===null?w=b:R.sibling=b,R=b);return e&&C.forEach(function($){return t(p,$)}),ce&&ar(p,A),w}function E(p,g,S,_){if(typeof S=="object"&&S!==null&&S.type===Br&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case gs:e:{for(var w=S.key,R=g;R!==null;){if(R.key===w){if(w=S.type,w===Br){if(R.tag===7){n(p,R.sibling),g=o(R,S.props.children),g.return=p,p=g;break e}}else if(R.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===vn&&vh(w)===R.type){n(p,R.sibling),g=o(R,S.props),g.ref=hi(p,R,S),g.return=p,p=g;break e}n(p,R);break}else t(p,R);R=R.sibling}S.type===Br?(g=gr(S.props.children,p.mode,_,S.key),g.return=p,p=g):(_=ya(S.type,S.key,S.props,null,p.mode,_),_.ref=hi(p,g,S),_.return=p,p=_)}return s(p);case Vr:e:{for(R=S.key;g!==null;){if(g.key===R)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){n(p,g.sibling),g=o(g,S.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Cc(S,p.mode,_),g.return=p,p=g}return s(p);case vn:return R=S._init,E(p,g,R(S._payload),_)}if(Ho(S))return m(p,g,S,_);if($o(S))return v(p,g,S,_);Js(p,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,g!==null&&g.tag===6?(n(p,g.sibling),g=o(g,S),g.return=p,p=g):(n(p,g),g=Tc(S,p.mode,_),g.return=p,p=g),s(p)):n(p,g)}return E}var io=yh(!0),Eh=yh(!1),gi={},Bt=xn(gi),mi=xn(gi),vi=xn(gi);function ur(e){if(e===gi)throw Error(H(174));return e}function Yu(e,t){switch(ie(vi,t),ie(mi,e),ie(Bt,gi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jl(t,e)}ae(Bt),ie(Bt,t)}function so(){ae(Bt),ae(mi),ae(vi)}function Sh(e){ur(vi.current);var t=ur(Bt.current),n=jl(t,e.type);t!==n&&(ie(mi,e),ie(Bt,n))}function Gu(e){mi.current===e&&(ae(Bt),ae(mi))}var pe=xn(0);function ea(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 Wu=[];function Ku(){for(var e=0;e<Wu.length;e++)Wu[e]._workInProgressVersionPrimary=null;Wu.length=0}var ta=en.ReactCurrentDispatcher,Qu=en.ReactCurrentBatchConfig,cr=0,he=null,Re=null,Te=null,na=!1,yi=!1,Ei=0,WS=0;function Pe(){throw Error(H(321))}function Xu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ot(e[n],t[n]))return!1;return!0}function qu(e,t,n,r,o,i){if(cr=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ta.current=e===null||e.memoizedState===null?qS:ZS,e=n(r,o),yi){i=0;do{if(yi=!1,Ei=0,25<=i)throw Error(H(301));i+=1,Te=Re=null,t.updateQueue=null,ta.current=JS,e=n(r,o)}while(yi)}if(ta.current=ia,t=Re!==null&&Re.next!==null,cr=0,Te=Re=he=null,na=!1,t)throw Error(H(300));return e}function Zu(){var e=Ei!==0;return Ei=0,e}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Te===null?he.memoizedState=Te=e:Te=Te.next=e,Te}function vt(){if(Re===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Re.next;var t=Te===null?he.memoizedState:Te.next;if(t!==null)Te=t,Re=e;else{if(e===null)throw Error(H(310));Re=e,e={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},Te===null?he.memoizedState=Te=e:Te=Te.next=e}return Te}function Si(e,t){return typeof t=="function"?t(e):t}function Ju(e){var t=vt(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=Re,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,u=i;do{var c=u.lane;if((cr&c)===c)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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,he.lanes|=c,dr|=c}u=u.next}while(u!==null&&u!==i);l===null?s=r:l.next=a,Ot(r,t.memoizedState)||(Ke=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,he.lanes|=i,dr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ec(e){var t=vt(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Ot(i,t.memoizedState)||(Ke=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function _h(){}function wh(e,t){var n=he,r=vt(),o=t(),i=!Ot(r.memoizedState,o);if(i&&(r.memoizedState=o,Ke=!0),r=r.queue,tc(Oh.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Te!==null&&Te.memoizedState.tag&1){if(n.flags|=2048,_i(9,Nh.bind(null,n,r,o,t),void 0,null),Ce===null)throw Error(H(349));cr&30||Rh(n,t,o)}return o}function Rh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Nh(e,t,n,r){t.value=n,t.getSnapshot=r,xh(t)&&Th(e)}function Oh(e,t,n){return n(function(){xh(t)&&Th(e)})}function xh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ot(e,n)}catch{return!0}}function Th(e){var t=sn(e,1);t!==null&&It(t,e,1,-1)}function Ch(e){var t=$t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t.queue=e,e=e.dispatch=XS.bind(null,he,e),[t.memoizedState,e]}function _i(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.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 bh(){return vt().memoizedState}function ra(e,t,n,r){var o=$t();he.flags|=e,o.memoizedState=_i(1|t,n,void 0,r===void 0?null:r)}function oa(e,t,n,r){var o=vt();r=r===void 0?null:r;var i=void 0;if(Re!==null){var s=Re.memoizedState;if(i=s.destroy,r!==null&&Xu(r,s.deps)){o.memoizedState=_i(t,n,i,r);return}}he.flags|=e,o.memoizedState=_i(1|t,n,i,r)}function Ih(e,t){return ra(8390656,8,e,t)}function tc(e,t){return oa(2048,8,e,t)}function Ah(e,t){return oa(4,2,e,t)}function Lh(e,t){return oa(4,4,e,t)}function Dh(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 kh(e,t,n){return n=n!=null?n.concat([e]):null,oa(4,4,Dh.bind(null,t,e),n)}function nc(){}function Ph(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mh(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Uh(e,t,n){return cr&21?(Ot(n,t)||(n=up(),he.lanes|=n,dr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ke=!0),e.memoizedState=n)}function KS(e,t){var n=re;re=n!==0&&4>n?n:4,e(!0);var r=Qu.transition;Qu.transition={};try{e(!1),t()}finally{re=n,Qu.transition=r}}function Fh(){return vt().memoizedState}function QS(e,t,n){var r=kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vh(e))Bh(t,n);else if(n=uh(e,t,n,r),n!==null){var o=ze();It(n,e,r,o),$h(n,t,r)}}function XS(e,t,n){var r=kn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vh(e))Bh(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Ot(a,s)){var l=t.interleaved;l===null?(o.next=o,$u(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=uh(e,t,o,r),n!==null&&(o=ze(),It(n,e,r,o),$h(n,t,r))}}function Vh(e){var t=e.alternate;return e===he||t!==null&&t===he}function Bh(e,t){yi=na=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $h(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nu(e,n)}}var ia={readContext:mt,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useInsertionEffect:Pe,useLayoutEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useMutableSource:Pe,useSyncExternalStore:Pe,useId:Pe,unstable_isNewReconciler:!1},qS={readContext:mt,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Ih,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ra(4194308,4,Dh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4194308,4,e,t)},useInsertionEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=$t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$t();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=QS.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:Ch,useDebugValue:nc,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=Ch(!1),t=e[0];return e=KS.bind(null,e[1]),$t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,o=$t();if(ce){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Ce===null)throw Error(H(349));cr&30||Rh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ih(Oh.bind(null,r,i,e),[e]),r.flags|=2048,_i(9,Nh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=$t(),t=Ce.identifierPrefix;if(ce){var n=on,r=rn;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ei++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=WS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ZS={readContext:mt,useCallback:Ph,useContext:mt,useEffect:tc,useImperativeHandle:kh,useInsertionEffect:Ah,useLayoutEffect:Lh,useMemo:Mh,useReducer:Ju,useRef:bh,useState:function(){return Ju(Si)},useDebugValue:nc,useDeferredValue:function(e){var t=vt();return Uh(t,Re.memoizedState,e)},useTransition:function(){var e=Ju(Si)[0],t=vt().memoizedState;return[e,t]},useMutableSource:_h,useSyncExternalStore:wh,useId:Fh,unstable_isNewReconciler:!1},JS={readContext:mt,useCallback:Ph,useContext:mt,useEffect:tc,useImperativeHandle:kh,useInsertionEffect:Ah,useLayoutEffect:Lh,useMemo:Mh,useReducer:ec,useRef:bh,useState:function(){return ec(Si)},useDebugValue:nc,useDeferredValue:function(e){var t=vt();return Re===null?t.memoizedState=e:Uh(t,Re.memoizedState,e)},useTransition:function(){var e=ec(Si)[0],t=vt().memoizedState;return[e,t]},useMutableSource:_h,useSyncExternalStore:wh,useId:Fh,unstable_isNewReconciler:!1};function ao(e,t){try{var n="",r=t;do n+=TE(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
43
43
|
Error generating stack: `+i.message+`
|
|
44
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function sf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function lf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var O_=typeof WeakMap=="function"?WeakMap:Map;function vg(e,t,n){n=hn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qs||(qs=!0,xf=r),lf(e,t)},n}function yg(e,t,n){n=hn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){lf(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){lf(e,t),typeof r!="function"&&(Gn===null?Gn=new Set([this]):Gn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Eg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new O_;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=B_.bind(null,e,t,n),t.then(e,e))}function Sg(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 wg(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,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=hn(-1,1),t.tag=2,Wn(n,t,1))),n.lanes|=1),e)}var T_=ln.ReactCurrentOwner,Ze=!1;function je(e,t,n,r){t.child=e===null?Km(t,null,n,r):So(t,e.child,n,r)}function _g(e,t,n,r,o){n=n.render;var i=t.ref;return Eo(t,o),r=ef(e,t,n,r,i,o),n=tf(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,mn(e,t,o)):(pe&&n&&Dc(t),t.flags|=1,je(e,t,r,o),t.child)}function xg(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!kf(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Rg(e,t,i,r,o)):(e=rl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:ki,n(a,r)&&e.ref===t.ref)return mn(e,t,o)}return t.flags|=1,e=qn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Rg(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ki(i,r)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,mn(e,t,o)}return uf(e,t,n,r,o)}function bg(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(Ro,ft),ft|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(Ro,ft),ft|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,se(Ro,ft),ft|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,se(Ro,ft),ft|=r;return je(e,t,o,n),t.child}function Ng(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function uf(e,t,n,r,o){var i=qe(n)?Sr:Fe.current;return i=ho(t,i),Eo(t,o),n=ef(e,t,n,r,i,o),r=tf(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,mn(e,t,o)):(pe&&r&&Dc(t),t.flags|=1,je(e,t,n,o),t.child)}function Og(e,t,n,r,o){if(qe(n)){var i=!0;Ts(t)}else i=!1;if(Eo(t,o),t.stateNode===null)Ys(e,t),jm(t,n,r),Gc(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=St(u):(u=qe(n)?Sr:Fe.current,u=ho(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&Wm(t,a,r,u),jn=!1;var d=t.memoizedState;a.state=d,Ms(t,r,a,o),l=t.memoizedState,s!==r||d!==l||Qe.current||jn?(typeof c=="function"&&(Yc(t,n,c,r),l=t.memoizedState),(s=jn||Hm(t,n,s,r,d,l,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Vm(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:kt(t.type,s),a.props=u,f=t.pendingProps,d=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=St(l):(l=qe(n)?Sr:Fe.current,l=ho(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||d!==l)&&Wm(t,a,r,l),jn=!1,d=t.memoizedState,a.state=d,Ms(t,r,a,o);var v=t.memoizedState;s!==f||d!==v||Qe.current||jn?(typeof h=="function"&&(Yc(t,n,h,r),v=t.memoizedState),(u=jn||Hm(t,n,u,r,d,v,l)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return cf(e,t,n,r,i,o)}function cf(e,t,n,r,o,i){Ng(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Cm(t,n,!1),mn(e,t,i);r=t.stateNode,T_.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=So(t,e.child,null,i),t.child=So(t,null,s,i)):je(e,t,s,i),t.memoizedState=r.state,o&&Cm(t,n,!0),t.child}function Tg(e){var t=e.stateNode;t.pendingContext?Am(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Am(e,t.context,!1),Kc(e,t.containerInfo)}function Ag(e,t,n,r,o){return vo(),Vc(o),t.flags|=256,je(e,t,n,r),t.child}var ff={dehydrated:null,treeContext:null,retryLane:0};function df(e){return{baseLanes:e,cachePool:null,transitions:null}}function kg(e,t,n){var r=t.pendingProps,o=me.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),se(me,o&1),e===null)return Uc(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):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=ol(a,r,0,null),e=kr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=df(n),t.memoizedState=ff,e):pf(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return A_(e,t,a,r,s,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=qn(o,l),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=qn(s,i):(i=kr(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?df(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=ff,r}return i=e.child,e=i.sibling,r=qn(i,{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 pf(e,t){return t=ol({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ws(e,t,n,r){return r!==null&&Vc(r),So(t,e.child,null,n),e=pf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function A_(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=sf(Error(H(422))),Ws(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=ol({mode:"visible",children:r.children},o,0,null),i=kr(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&So(t,e.child,null,a),t.child.memoizedState=df(a),t.memoizedState=ff,i);if(!(t.mode&1))return Ws(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(H(419)),r=sf(i,r,void 0),Ws(e,t,a,r)}if(s=(a&e.childLanes)!==0,Ze||s){if(r=ke,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,pn(e,o),Lt(r,e,o,-1))}return Af(),r=sf(Error(H(421))),Ws(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=z_.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ct=$n(o.nextSibling),ut=t,pe=!0,At=null,e!==null&&(yt[Et++]=fn,yt[Et++]=dn,yt[Et++]=wr,fn=e.id,dn=e.overflow,wr=t),t=pf(t,r.children),t.flags|=4096,t)}function Cg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hc(e.return,t,n)}function hf(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Ig(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(je(e,t,r.children,n),r=me.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&&Cg(e,n,t);else if(e.tag===19)Cg(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(se(me,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Vs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hf(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Vs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hf(t,!0,n,null,i);break;case"together":hf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ys(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function k_(e,t,n){switch(t.tag){case 3:Tg(t),vo();break;case 5:Xm(t);break;case 1:qe(t.type)&&Ts(t);break;case 4:Kc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;se(Ls,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(me,me.current&1),t.flags|=128,null):n&t.child.childLanes?kg(e,t,n):(se(me,me.current&1),e=mn(e,t,n),e!==null?e.sibling:null);se(me,me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ig(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),se(me,me.current),r)break;return null;case 22:case 23:return t.lanes=0,bg(e,t,n)}return mn(e,t,n)}var Lg,mf,Pg,Dg;Lg=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}},mf=function(){},Pg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Rr(Wt.current);var i=null;switch(n){case"input":o=Hu(e,o),r=Hu(e,r),i=[];break;case"select":o=he({},o,{value:void 0}),r=he({},r,{value:void 0}),i=[];break;case"textarea":o=Yu(e,o),r=Yu(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bs)}Ku(n,r);var a;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ui.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(s=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ui.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),i||s===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},Dg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Wi(e,t){if(!pe)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 Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function C_(e,t,n){var r=t.pendingProps;switch(Mc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return qe(t.type)&&Os(),Ve(t),null;case 3:return r=t.stateNode,wo(),ce(Qe),ce(Fe),qc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Is(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,At!==null&&(Nf(At),At=null))),mf(e,t),Ve(t),null;case 5:Xc(t);var o=Rr($i.current);if(n=t.type,e!==null&&t.stateNode!=null)Pg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ve(t),null}if(e=Rr(Wt.current),Is(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[jt]=t,r[Di]=i,e=(t.mode&1)!==0,n){case"dialog":ue("cancel",r),ue("close",r);break;case"iframe":case"object":case"embed":ue("load",r);break;case"video":case"audio":for(o=0;o<Ii.length;o++)ue(Ii[o],r);break;case"source":ue("error",r);break;case"img":case"image":case"link":ue("error",r),ue("load",r);break;case"details":ue("toggle",r);break;case"input":hh(r,i),ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ue("invalid",r);break;case"textarea":vh(r,i),ue("invalid",r)}Ku(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&Rs(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&Rs(r.textContent,s,e),o=["children",""+s]):ui.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&ue("scroll",r)}switch(n){case"input":ts(r),gh(r,i,!0);break;case"textarea":ts(r),Eh(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=bs)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Sh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[jt]=t,e[Di]=r,Lg(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xu(n,r),n){case"dialog":ue("cancel",e),ue("close",e),o=r;break;case"iframe":case"object":case"embed":ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ii.length;o++)ue(Ii[o],e);o=r;break;case"source":ue("error",e),o=r;break;case"img":case"image":case"link":ue("error",e),ue("load",e),o=r;break;case"details":ue("toggle",e),o=r;break;case"input":hh(e,r),o=Hu(e,r),ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=he({},r,{value:void 0}),ue("invalid",e);break;case"textarea":vh(e,r),o=Yu(e,r),ue("invalid",e);break;default:o=r}Ku(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?xh(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&wh(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&pi(e,l):typeof l=="number"&&pi(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ui.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ue("scroll",e):l!=null&&Iu(e,i,l,a))}switch(n){case"input":ts(e),gh(e,r,!1);break;case"textarea":ts(e),Eh(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ln(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?to(e,!!r.multiple,i,!1):r.defaultValue!=null&&to(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=bs)}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 Ve(t),null;case 6:if(e&&t.stateNode!=null)Dg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=Rr($i.current),Rr(Wt.current),Is(t)){if(r=t.stateNode,n=t.memoizedProps,r[jt]=t,(i=r.nodeValue!==n)&&(e=ut,e!==null))switch(e.tag){case 3:Rs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Rs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jt]=t,t.stateNode=r}return Ve(t),null;case 13:if(ce(me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&ct!==null&&t.mode&1&&!(t.flags&128))Fm(),vo(),t.flags|=98560,i=!1;else if(i=Is(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[jt]=t}else vo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ve(t),i=!1}else At!==null&&(Nf(At),At=null),i=!0;if(!i)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||me.current&1?Ne===0&&(Ne=3):Af())),t.updateQueue!==null&&(t.flags|=4),Ve(t),null);case 4:return wo(),mf(e,t),e===null&&Li(t.stateNode.containerInfo),Ve(t),null;case 10:return zc(t.type._context),Ve(t),null;case 17:return qe(t.type)&&Os(),Ve(t),null;case 19:if(ce(me),i=t.memoizedState,i===null)return Ve(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Wi(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Vs(e),a!==null){for(t.flags|=128,Wi(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return se(me,me.current&1|2),t.child}e=e.sibling}i.tail!==null&&_e()>bo&&(t.flags|=128,r=!0,Wi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Vs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!pe)return Ve(t),null}else 2*_e()-i.renderingStartTime>bo&&n!==1073741824&&(t.flags|=128,r=!0,Wi(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_e(),t.sibling=null,n=me.current,se(me,r?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return Tf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ft&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function I_(e,t){switch(Mc(t),t.tag){case 1:return qe(t.type)&&Os(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wo(),ce(Qe),ce(Fe),qc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xc(t),null;case 13:if(ce(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(me),null;case 4:return wo(),null;case 10:return zc(t.type._context),null;case 22:case 23:return Tf(),null;case 24:return null;default:return null}}var Gs=!1,$e=!1,L_=typeof WeakSet=="function"?WeakSet:Set,Y=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function gf(e,t,n){try{n()}catch(r){ye(e,t,r)}}var Mg=!1;function P_(e,t){if(Oc=ps,e=pm(),Ec(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(s=a+o),f!==i||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(s=a),d===i&&++c===r&&(l=a),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tc={focusedElem:e,selectionRange:n},ps=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,E=v.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:kt(t.type,y),E);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(S){ye(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return v=Mg,Mg=!1,v}function Yi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&gf(t,n,i)}o=o.next}while(o!==r)}}function Ks(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 vf(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 Fg(e){var t=e.alternate;t!==null&&(e.alternate=null,Fg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jt],delete t[Di],delete t[Ic],delete t[g_],delete t[v_])),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 Ug(e){return e.tag===5||e.tag===3||e.tag===4}function Vg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ug(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 yf(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=bs));else if(r!==4&&(e=e.child,e!==null))for(yf(e,t,n),e=e.sibling;e!==null;)yf(e,t,n),e=e.sibling}function Ef(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(Ef(e,t,n),e=e.sibling;e!==null;)Ef(e,t,n),e=e.sibling}var De=null,Ct=!1;function Yn(e,t,n){for(n=n.child;n!==null;)$g(e,t,n),n=n.sibling}function $g(e,t,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(ss,n)}catch{}switch(n.tag){case 5:$e||xo(n,t);case 6:var r=De,o=Ct;De=null,Yn(e,t,n),De=r,Ct=o,De!==null&&(Ct?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(Ct?(e=De,n=n.stateNode,e.nodeType===8?Cc(e.parentNode,n):e.nodeType===1&&Cc(e,n),Ri(e)):Cc(De,n.stateNode));break;case 4:r=De,o=Ct,De=n.stateNode.containerInfo,Ct=!0,Yn(e,t,n),De=r,Ct=o;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&gf(n,t,a),o=o.next}while(o!==r)}Yn(e,t,n);break;case 1:if(!$e&&(xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ye(n,t,s)}Yn(e,t,n);break;case 21:Yn(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,Yn(e,t,n),$e=r):Yn(e,t,n);break;default:Yn(e,t,n)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new L_),t.forEach(function(r){var o=H_.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function It(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:De=s.stateNode,Ct=!1;break e;case 3:De=s.stateNode.containerInfo,Ct=!0;break e;case 4:De=s.stateNode.containerInfo,Ct=!0;break e}s=s.return}if(De===null)throw Error(H(160));$g(i,a,o),De=null,Ct=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){ye(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zg(t,e),t=t.sibling}function zg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(It(t,e),Gt(e),r&4){try{Yi(3,e,e.return),Ks(3,e)}catch(y){ye(e,e.return,y)}try{Yi(5,e,e.return)}catch(y){ye(e,e.return,y)}}break;case 1:It(t,e),Gt(e),r&512&&n!==null&&xo(n,n.return);break;case 5:if(It(t,e),Gt(e),r&512&&n!==null&&xo(n,n.return),e.flags&32){var o=e.stateNode;try{pi(o,"")}catch(y){ye(e,e.return,y)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&mh(o,i),Xu(s,a);var u=Xu(s,i);for(a=0;a<l.length;a+=2){var c=l[a],f=l[a+1];c==="style"?xh(o,f):c==="dangerouslySetInnerHTML"?wh(o,f):c==="children"?pi(o,f):Iu(o,c,f,u)}switch(s){case"input":ju(o,i);break;case"textarea":yh(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?to(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?to(o,!!i.multiple,i.defaultValue,!0):to(o,!!i.multiple,i.multiple?[]:"",!1))}o[Di]=i}catch(y){ye(e,e.return,y)}}break;case 6:if(It(t,e),Gt(e),r&4){if(e.stateNode===null)throw Error(H(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(y){ye(e,e.return,y)}}break;case 3:if(It(t,e),Gt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ri(t.containerInfo)}catch(y){ye(e,e.return,y)}break;case 4:It(t,e),Gt(e);break;case 13:It(t,e),Gt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(_f=_e())),r&4&&Bg(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?($e=(u=$e)||c,It(t,e),$e=u):It(t,e),Gt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Y=e,c=e.child;c!==null;){for(f=Y=c;Y!==null;){switch(d=Y,h=d.child,d.tag){case 0:case 11:case 14:case 15:Yi(4,d,d.return);break;case 1:xo(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){ye(r,n,y)}}break;case 5:xo(d,d.return);break;case 22:if(d.memoizedState!==null){Wg(f);continue}}h!==null?(h.return=d,Y=h):Wg(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=f.stateNode,l=f.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=_h("display",a))}catch(y){ye(e,e.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){ye(e,e.return,y)}}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;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:It(t,e),Gt(e),r&4&&Bg(e);break;case 21:break;default:It(t,e),Gt(e)}}function Gt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ug(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(pi(o,""),r.flags&=-33);var i=Vg(e);Ef(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,s=Vg(e);yf(e,s,a);break;default:throw Error(H(161))}}catch(l){ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function D_(e,t,n){Y=e,Hg(e)}function Hg(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var o=Y,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Gs;if(!a){var s=o.alternate,l=s!==null&&s.memoizedState!==null||$e;s=Gs;var u=$e;if(Gs=a,($e=l)&&!u)for(Y=o;Y!==null;)a=Y,l=a.child,a.tag===22&&a.memoizedState!==null?Yg(o):l!==null?(l.return=a,Y=l):Yg(o);for(;i!==null;)Y=i,Hg(i),i=i.sibling;Y=o,Gs=s,$e=u}jg(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,Y=i):jg(e)}}function jg(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:$e||Ks(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!$e)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:kt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Bm(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Bm(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Ri(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}$e||t.flags&512&&vf(t)}catch(d){ye(t,t.return,d)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Wg(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Yg(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ks(4,t)}catch(l){ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){ye(t,o,l)}}var i=t.return;try{vf(t)}catch(l){ye(t,i,l)}break;case 5:var a=t.return;try{vf(t)}catch(l){ye(t,a,l)}}}catch(l){ye(t,t.return,l)}if(t===e){Y=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Y=s;break}Y=t.return}}var M_=Math.ceil,Xs=ln.ReactCurrentDispatcher,Sf=ln.ReactCurrentOwner,_t=ln.ReactCurrentBatchConfig,oe=0,ke=null,xe=null,Me=0,ft=0,Ro=Bn(0),Ne=0,Gi=null,Nr=0,Qs=0,wf=0,Ki=null,Je=null,_f=0,bo=1/0,gn=null,qs=!1,xf=null,Gn=null,Zs=!1,Kn=null,Js=0,Xi=0,Rf=null,el=-1,tl=0;function We(){return oe&6?_e():el!==-1?el:el=_e()}function Xn(e){return e.mode&1?oe&2&&Me!==0?Me&-Me:E_.transition!==null?(tl===0&&(tl=Uh()),tl):(e=ae,e!==0||(e=window.event,e=e===void 0?16:Gh(e.type)),e):1}function Lt(e,t,n,r){if(50<Xi)throw Xi=0,Rf=null,Error(H(185));Ei(e,n,r),(!(oe&2)||e!==ke)&&(e===ke&&(!(oe&2)&&(Qs|=n),Ne===4&&Qn(e,Me)),et(e,r),n===1&&oe===0&&!(t.mode&1)&&(bo=_e()+500,As&&Hn()))}function et(e,t){var n=e.callbackNode;Ew(e,t);var r=cs(e,e===ke?Me:0);if(r===0)n!==null&&Dh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Dh(n),t===1)e.tag===0?y_(Kg.bind(null,e)):Im(Kg.bind(null,e)),h_(function(){!(oe&6)&&Hn()}),n=null;else{switch(Vh(r)){case 1:n=nc;break;case 4:n=Mh;break;case 16:n=as;break;case 536870912:n=Fh;break;default:n=as}n=nv(n,Gg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Gg(e,t){if(el=-1,tl=0,oe&6)throw Error(H(327));var n=e.callbackNode;if(No()&&e.callbackNode!==n)return null;var r=cs(e,e===ke?Me:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=nl(e,r);else{t=r;var o=oe;oe|=2;var i=Qg();(ke!==e||Me!==t)&&(gn=null,bo=_e()+500,Tr(e,t));do try{V_();break}catch(s){Xg(e,s)}while(1);Bc(),Xs.current=i,oe=o,xe!==null?t=0:(ke=null,Me=0,t=Ne)}if(t!==0){if(t===2&&(o=rc(e),o!==0&&(r=o,t=bf(e,o))),t===1)throw n=Gi,Tr(e,0),Qn(e,r),et(e,_e()),n;if(t===6)Qn(e,r);else{if(o=e.current.alternate,!(r&30)&&!F_(o)&&(t=nl(e,r),t===2&&(i=rc(e),i!==0&&(r=i,t=bf(e,i))),t===1))throw n=Gi,Tr(e,0),Qn(e,r),et(e,_e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:Ar(e,Je,gn);break;case 3:if(Qn(e,r),(r&130023424)===r&&(t=_f+500-_e(),10<t)){if(cs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){We(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=kc(Ar.bind(null,e,Je,gn),t);break}Ar(e,Je,gn);break;case 4:if(Qn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Ot(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*M_(r/1960))-r,10<r){e.timeoutHandle=kc(Ar.bind(null,e,Je,gn),r);break}Ar(e,Je,gn);break;case 5:Ar(e,Je,gn);break;default:throw Error(H(329))}}}return et(e,_e()),e.callbackNode===n?Gg.bind(null,e):null}function bf(e,t){var n=Ki;return e.current.memoizedState.isDehydrated&&(Tr(e,t).flags|=256),e=nl(e,t),e!==2&&(t=Je,Je=n,t!==null&&Nf(t)),e}function Nf(e){Je===null?Je=e:Je.push.apply(Je,e)}function F_(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 o=n[r],i=o.getSnapshot;o=o.value;try{if(!Tt(i(),o))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 Qn(e,t){for(t&=~wf,t&=~Qs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ot(t),r=1<<n;e[n]=-1,t&=~r}}function Kg(e){if(oe&6)throw Error(H(327));No();var t=cs(e,0);if(!(t&1))return et(e,_e()),null;var n=nl(e,t);if(e.tag!==0&&n===2){var r=rc(e);r!==0&&(t=r,n=bf(e,r))}if(n===1)throw n=Gi,Tr(e,0),Qn(e,t),et(e,_e()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ar(e,Je,gn),et(e,_e()),null}function Of(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(bo=_e()+500,As&&Hn())}}function Or(e){Kn!==null&&Kn.tag===0&&!(oe&6)&&No();var t=oe;oe|=1;var n=_t.transition,r=ae;try{if(_t.transition=null,ae=1,e)return e()}finally{ae=r,_t.transition=n,oe=t,!(oe&6)&&Hn()}}function Tf(){ft=Ro.current,ce(Ro)}function Tr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,p_(n)),xe!==null)for(n=xe.return;n!==null;){var r=n;switch(Mc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Os();break;case 3:wo(),ce(Qe),ce(Fe),qc();break;case 5:Xc(r);break;case 4:wo();break;case 13:ce(me);break;case 19:ce(me);break;case 10:zc(r.type._context);break;case 22:case 23:Tf()}n=n.return}if(ke=e,xe=e=qn(e.current,null),Me=ft=t,Ne=0,Gi=null,wf=Qs=Nr=0,Je=Ki=null,xr!==null){for(t=0;t<xr.length;t++)if(n=xr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}xr=null}return e}function Xg(e,t){do{var n=xe;try{if(Bc(),$s.current=js,Bs){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Bs=!1}if(br=0,Ae=be=ge=null,Bi=!1,zi=0,Sf.current=null,n===null||n.return===null){Ne=1,Gi=t,xe=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=Me,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Sg(a);if(h!==null){h.flags&=-257,wg(h,a,s,i,t),h.mode&1&&Eg(i,u,t),t=h,l=u;var v=t.updateQueue;if(v===null){var y=new Set;y.add(l),t.updateQueue=y}else v.add(l);break e}else{if(!(t&1)){Eg(i,u,t),Af();break e}l=Error(H(426))}}else if(pe&&s.mode&1){var E=Sg(a);if(E!==null){!(E.flags&65536)&&(E.flags|=256),wg(E,a,s,i,t),Vc(_o(l,s));break e}}i=l=_o(l,s),Ne!==4&&(Ne=2),Ki===null?Ki=[i]:Ki.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=vg(i,l,t);$m(i,p);break e;case 1:s=l;var m=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Gn===null||!Gn.has(g)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=yg(i,s,t);$m(i,S);break e}}i=i.return}while(i!==null)}Zg(n)}catch(_){t=_,xe===n&&n!==null&&(xe=n=n.return);continue}break}while(1)}function Qg(){var e=Xs.current;return Xs.current=js,e===null?js:e}function Af(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),ke===null||!(Nr&268435455)&&!(Qs&268435455)||Qn(ke,Me)}function nl(e,t){var n=oe;oe|=2;var r=Qg();(ke!==e||Me!==t)&&(gn=null,Tr(e,t));do try{U_();break}catch(o){Xg(e,o)}while(1);if(Bc(),oe=n,Xs.current=r,xe!==null)throw Error(H(261));return ke=null,Me=0,Ne}function U_(){for(;xe!==null;)qg(xe)}function V_(){for(;xe!==null&&!cw();)qg(xe)}function qg(e){var t=tv(e.alternate,e,ft);e.memoizedProps=e.pendingProps,t===null?Zg(e):xe=t,Sf.current=null}function Zg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=I_(n,t),n!==null){n.flags&=32767,xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,xe=null;return}}else if(n=C_(n,t,ft),n!==null){xe=n;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Ne===0&&(Ne=5)}function Ar(e,t,n){var r=ae,o=_t.transition;try{_t.transition=null,ae=1,$_(e,t,n,r)}finally{_t.transition=o,ae=r}return null}function $_(e,t,n,r){do No();while(Kn!==null);if(oe&6)throw Error(H(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Sw(e,i),e===ke&&(xe=ke=null,Me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Zs||(Zs=!0,nv(as,function(){return No(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=_t.transition,_t.transition=null;var a=ae;ae=1;var s=oe;oe|=4,Sf.current=null,P_(e,n),zg(n,e),a_(Tc),ps=!!Oc,Tc=Oc=null,e.current=n,D_(n),fw(),oe=s,ae=a,_t.transition=i}else e.current=n;if(Zs&&(Zs=!1,Kn=e,Js=o),i=e.pendingLanes,i===0&&(Gn=null),hw(n.stateNode),et(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(qs)throw qs=!1,e=xf,xf=null,e;return Js&1&&e.tag!==0&&No(),i=e.pendingLanes,i&1?e===Rf?Xi++:(Xi=0,Rf=e):Xi=0,Hn(),null}function No(){if(Kn!==null){var e=Vh(Js),t=_t.transition,n=ae;try{if(_t.transition=null,ae=16>e?16:e,Kn===null)var r=!1;else{if(e=Kn,Kn=null,Js=0,oe&6)throw Error(H(331));var o=oe;for(oe|=4,Y=e.current;Y!==null;){var i=Y,a=i.child;if(Y.flags&16){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Y=u;Y!==null;){var c=Y;switch(c.tag){case 0:case 11:case 15:Yi(8,c,i)}var f=c.child;if(f!==null)f.return=c,Y=f;else for(;Y!==null;){c=Y;var d=c.sibling,h=c.return;if(Fg(c),c===u){Y=null;break}if(d!==null){d.return=h,Y=d;break}Y=h}}}var v=i.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var E=y.sibling;y.sibling=null,y=E}while(y!==null)}}Y=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,Y=a;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Yi(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,Y=p;break e}Y=i.return}}var m=e.current;for(Y=m;Y!==null;){a=Y;var g=a.child;if(a.subtreeFlags&2064&&g!==null)g.return=a,Y=g;else e:for(a=m;Y!==null;){if(s=Y,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ks(9,s)}}catch(_){ye(s,s.return,_)}if(s===a){Y=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,Y=S;break e}Y=s.return}}if(oe=o,Hn(),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(ss,e)}catch{}r=!0}return r}finally{ae=n,_t.transition=t}}return!1}function Jg(e,t,n){t=_o(n,t),t=vg(e,t,1),e=Wn(e,t,1),t=We(),e!==null&&(Ei(e,1,t),et(e,t))}function ye(e,t,n){if(e.tag===3)Jg(e,e,n);else for(;t!==null;){if(t.tag===3){Jg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gn===null||!Gn.has(r))){e=_o(n,e),e=yg(t,e,1),t=Wn(t,e,1),e=We(),t!==null&&(Ei(t,1,e),et(t,e));break}}t=t.return}}function B_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=We(),e.pingedLanes|=e.suspendedLanes&n,ke===e&&(Me&n)===n&&(Ne===4||Ne===3&&(Me&130023424)===Me&&500>_e()-_f?Tr(e,0):wf|=n),et(e,t)}function ev(e,t){t===0&&(e.mode&1?(t=us,us<<=1,!(us&130023424)&&(us=4194304)):t=1);var n=We();e=pn(e,t),e!==null&&(Ei(e,t,n),et(e,n))}function z_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ev(e,n)}function H_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),ev(e,n)}var tv;tv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ze=!1,k_(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,pe&&t.flags&1048576&&Lm(t,Cs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ys(e,t),e=t.pendingProps;var o=ho(t,Fe.current);Eo(t,n),o=ef(null,t,r,e,o,n);var i=tf();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)?(i=!0,Ts(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Wc(t),o.updater=Fs,t.stateNode=o,o._reactInternals=t,Gc(t,r,e,n),t=cf(null,t,r,!0,i,n)):(t.tag=0,pe&&i&&Dc(t),je(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ys(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=W_(r),e=kt(r,e),o){case 0:t=uf(null,t,r,e,n);break e;case 1:t=Og(null,t,r,e,n);break e;case 11:t=_g(null,t,r,e,n);break e;case 14:t=xg(null,t,r,kt(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),uf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),Og(e,t,r,o,n);case 3:e:{if(Tg(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Vm(e,t),Ms(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=_o(Error(H(423)),t),t=Ag(e,t,r,n,o);break e}else if(r!==o){o=_o(Error(H(424)),t),t=Ag(e,t,r,n,o);break e}else for(ct=$n(t.stateNode.containerInfo.firstChild),ut=t,pe=!0,At=null,n=Km(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vo(),r===o){t=mn(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return Xm(t),e===null&&Uc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Ac(r,o)?a=null:i!==null&&Ac(r,i)&&(t.flags|=32),Ng(e,t),je(e,t,a,n),t.child;case 6:return e===null&&Uc(t),null;case 13:return kg(e,t,n);case 4:return Kc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=So(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),_g(e,t,r,o,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,se(Ls,r._currentValue),r._currentValue=a,i!==null)if(Tt(i.value,a)){if(i.children===o.children&&!Qe.current){t=mn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=hn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Hc(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(H(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Hc(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Eo(t,n),o=St(o),r=r(o),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,o=kt(r,t.pendingProps),o=kt(r.type,o),xg(e,t,r,o,n);case 15:return Rg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kt(r,o),Ys(e,t),t.tag=1,qe(r)?(e=!0,Ts(t)):e=!1,Eo(t,n),jm(t,r,o),Gc(t,r,o,n),cf(null,t,r,!0,e,n);case 19:return Ig(e,t,n);case 22:return bg(e,t,n)}throw Error(H(156,t.tag))};function nv(e,t){return Ph(e,t)}function j_(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 xt(e,t,n,r){return new j_(e,t,n,r)}function kf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W_(e){if(typeof e=="function")return kf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Du)return 11;if(e===Uu)return 14}return 2}function qn(e,t){var n=e.alternate;return n===null?(n=xt(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 rl(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")kf(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case eo:return kr(n.children,o,i,t);case Lu:a=8,o|=8;break;case Pu:return e=xt(12,n,t,o|2),e.elementType=Pu,e.lanes=i,e;case Mu:return e=xt(13,n,t,o),e.elementType=Mu,e.lanes=i,e;case Fu:return e=xt(19,n,t,o),e.elementType=Fu,e.lanes=i,e;case ch:return ol(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lh:a=10;break e;case uh:a=9;break e;case Du:a=11;break e;case Uu:a=14;break e;case In:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=xt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function kr(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function ol(e,t,n,r){return e=xt(22,e,r,t),e.elementType=ch,e.lanes=n,e.stateNode={isHidden:!1},e}function Cf(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function If(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Y_(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=oc(0),this.expirationTimes=oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Lf(e,t,n,r,o,i,a,s,l){return e=new Y_(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=xt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wc(i),e}function G_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rv(e){if(!e)return zn;e=e._reactInternals;e:{if(yr(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(qe(n))return km(e,n,t)}return t}function ov(e,t,n,r,o,i,a,s,l){return e=Lf(n,r,!0,e,o,i,a,s,l),e.context=rv(null),n=e.current,r=We(),o=Xn(n),i=hn(r,o),i.callback=t??null,Wn(n,i,o),e.current.lanes=o,Ei(e,o,r),et(e,r),e}function il(e,t,n,r){var o=t.current,i=We(),a=Xn(o);return n=rv(n),t.context===null?t.context=n:t.pendingContext=n,t=hn(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wn(o,t,a),e!==null&&(Lt(e,o,a,i),Ds(e,o,a)),a}function al(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 iv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pf(e,t){iv(e,t),(e=e.alternate)&&iv(e,t)}function K_(){return null}var av=typeof reportError=="function"?reportError:function(e){console.error(e)};function Df(e){this._internalRoot=e}sl.prototype.render=Df.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));il(e,t,null,null)},sl.prototype.unmount=Df.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Or(function(){il(null,e,null,null)}),t[un]=null}};function sl(e){this._internalRoot=e}sl.prototype.unstable_scheduleHydration=function(e){if(e){var t=zh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fn.length&&t!==0&&t<Fn[n].priority;n++);Fn.splice(n,0,e),n===0&&Wh(e)}};function Mf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ll(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sv(){}function X_(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=al(a);i.call(u)}}var a=ov(t,r,e,0,null,!1,!1,"",sv);return e._reactRootContainer=a,e[un]=a.current,Li(e.nodeType===8?e.parentNode:e),Or(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=al(l);s.call(u)}}var l=Lf(e,0,!1,null,null,!1,!1,"",sv);return e._reactRootContainer=l,e[un]=l.current,Li(e.nodeType===8?e.parentNode:e),Or(function(){il(t,l,n,r)}),l}function ul(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var l=al(a);s.call(l)}}il(t,a,e,o)}else a=X_(n,t,e,o,r);return al(a)}$h=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yi(t.pendingLanes);n!==0&&(ic(t,n|1),et(t,_e()),!(oe&6)&&(bo=_e()+500,Hn()))}break;case 13:Or(function(){var r=pn(e,1);if(r!==null){var o=We();Lt(r,e,1,o)}}),Pf(e,1)}},ac=function(e){if(e.tag===13){var t=pn(e,134217728);if(t!==null){var n=We();Lt(t,e,134217728,n)}Pf(e,134217728)}},Bh=function(e){if(e.tag===13){var t=Xn(e),n=pn(e,t);if(n!==null){var r=We();Lt(n,e,t,r)}Pf(e,t)}},zh=function(){return ae},Hh=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}},Zu=function(e,t,n){switch(t){case"input":if(ju(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 o=Ns(r);if(!o)throw Error(H(90));ph(r),ju(r,o)}}}break;case"textarea":yh(e,n);break;case"select":t=n.value,t!=null&&to(e,!!n.multiple,t,!1)}},Oh=Of,Th=Or;var Q_={usingClientEntryPoint:!1,Events:[Mi,fo,Ns,bh,Nh,Of]},Qi={findFiberByHostInstance:Er,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},q_={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ln.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ih(e),e===null?null:e.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||K_,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 cl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cl.isDisabled&&cl.supportsFiber)try{ss=cl.inject(q_),Ht=cl}catch{}}at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q_,at.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Mf(t))throw Error(H(200));return G_(e,t,null,n)},at.createRoot=function(e,t){if(!Mf(e))throw Error(H(299));var n=!1,r="",o=av;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Lf(e,1,!1,null,null,n,!1,r,o),e[un]=t.current,Li(e.nodeType===8?e.parentNode:e),new Df(t)},at.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(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=Ih(t),e=e===null?null:e.stateNode,e},at.flushSync=function(e){return Or(e)},at.hydrate=function(e,t,n){if(!ll(t))throw Error(H(200));return ul(null,e,t,!0,n)},at.hydrateRoot=function(e,t,n){if(!Mf(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=av;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=ov(t,null,e,1,n??null,o,!1,i,a),e[un]=t.current,Li(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new sl(t)},at.render=function(e,t,n){if(!ll(t))throw Error(H(200));return ul(null,e,t,!1,n)},at.unmountComponentAtNode=function(e){if(!ll(e))throw Error(H(40));return e._reactRootContainer?(Or(function(){ul(null,null,e,!1,function(){e._reactRootContainer=null,e[un]=null})}),!0):!1},at.unstable_batchedUpdates=Of,at.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ll(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return ul(e,t,n,!1,r)},at.version="18.2.0-next-9e3b772b8-20220608",function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=at}(KS);var lv=qr;Ou.createRoot=lv.createRoot,Ou.hydrateRoot=lv.hydrateRoot;var Z_=Object.create,Ff=Object.defineProperty,J_=Object.getOwnPropertyDescriptor,ex=Object.getOwnPropertyNames,tx=Object.getPrototypeOf,nx=Object.prototype.hasOwnProperty,rx=(e,t,n)=>t in e?Ff(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ox=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ix=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ex(t))!nx.call(e,o)&&o!==n&&Ff(e,o,{get:()=>t[o],enumerable:!(r=J_(t,o))||r.enumerable});return e},ax=(e,t,n)=>(n=e!=null?Z_(tx(e)):{},ix(t||!e||!e.__esModule?Ff(n,"default",{value:e,enumerable:!0}):n,e)),uv=(e,t,n)=>(rx(e,typeof t!="symbol"?t+"":t,n),n),sx=ox((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define(r):typeof t=="object"&&t.exports?t.exports=r():n.log=r()})(e,function(){var n=function(){},r="undefined",o=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function a(E,p){var m=E[p];if(typeof m.bind=="function")return m.bind(E);try{return Function.prototype.bind.call(m,E)}catch{return function(){return Function.prototype.apply.apply(m,[E,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(E){return E==="debug"&&(E="log"),typeof console===r?!1:E==="trace"&&o?s:console[E]!==void 0?a(console,E):console.log!==void 0?a(console,"log"):n}function u(E,p){for(var m=0;m<i.length;m++){var g=i[m];this[g]=m<E?n:this.methodFactory(g,E,p)}this.log=this.debug}function c(E,p,m){return function(){typeof console!==r&&(u.call(this,p,m),this[E].apply(this,arguments))}}function f(E,p,m){return l(E)||c.apply(this,arguments)}function d(E,p,m){var g=this,S;p=p??"WARN";var _="loglevel";typeof E=="string"?_+=":"+E:typeof E=="symbol"&&(_=void 0);function x(T){var $=(i[T]||"silent").toUpperCase();if(!(typeof window===r||!_)){try{window.localStorage[_]=$;return}catch{}try{window.document.cookie=encodeURIComponent(_)+"="+$+";"}catch{}}}function N(){var T;if(!(typeof window===r||!_)){try{T=window.localStorage[_]}catch{}if(typeof T===r)try{var $=window.document.cookie,F=$.indexOf(encodeURIComponent(_)+"=");F!==-1&&(T=/^([^;]+)/.exec($.slice(F))[1])}catch{}return g.levels[T]===void 0&&(T=void 0),T}}function I(){if(!(typeof window===r||!_)){try{window.localStorage.removeItem(_);return}catch{}try{window.document.cookie=encodeURIComponent(_)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}g.name=E,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=m||f,g.getLevel=function(){return S},g.setLevel=function(T,$){if(typeof T=="string"&&g.levels[T.toUpperCase()]!==void 0&&(T=g.levels[T.toUpperCase()]),typeof T=="number"&&T>=0&&T<=g.levels.SILENT){if(S=T,$!==!1&&x(T),u.call(g,T,E),typeof console===r&&T<g.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+T},g.setDefaultLevel=function(T){p=T,N()||g.setLevel(T,!1)},g.resetLevel=function(){g.setLevel(p,!1),I()},g.enableAll=function(T){g.setLevel(g.levels.TRACE,T)},g.disableAll=function(T){g.setLevel(g.levels.SILENT,T)};var D=N();D==null&&(D=p),g.setLevel(D,!1)}var h=new d,v={};h.getLogger=function(E){if(typeof E!="symbol"&&typeof E!="string"||E==="")throw new TypeError("You must supply a name when creating a logger.");var p=v[E];return p||(p=v[E]=new d(E,h.getLevel(),h.methodFactory)),p};var y=typeof window!==r?window.log:void 0;return h.noConflict=function(){return typeof window!==r&&window.log===h&&(window.log=y),h},h.getLoggers=function(){return v},h.default=h,h})}),lx=ax(sx(),1),ux=()=>new Date().toISOString(),qi=lx.default.getLogger("signalwire"),cx=qi.methodFactory;qi.methodFactory=(e,t,n)=>{let r=cx(e,t,n);return function(...o){o.unshift(ux(),"-"),r.apply(void 0,o)}};var fx=qi.getLevel();qi.setLevel(fx);var Oo=()=>qi,dx=e=>({id:e.id,type:e.type,data:e.data,position:e.position}),px=e=>({id:e.id,source:e.source,sourceHandle:e.sourceHandle,target:e.target,targetHandle:e.targetHandle}),hx=e=>{var t;return(t=e==null?void 0:e.trim())==null?void 0:t.toLowerCase()},mx={answer:({data:{maxDuration:e}})=>e?{answer:{max_duration:e}}:"answer",hangup:({data:{reason:e}})=>e?{hangup:{reason:e}}:"hangup",play:({data:{text:e,url:t,volume:n}})=>{let r=t||`say:${e||"Unknown TTS"}`;return n?{play:{volume:n,url:r}}:{play:{url:r}}},forwardAddress:({data:e})=>Uf(e),forwardPhone:({data:e})=>Uf(e),forwardResource:({data:e})=>Uf(e),promptPlay:({data:e})=>{let t={play:"say:Unknown value"};return e.text&&(t.play=`say:${e.text}`),e.url&&(t.play=e.url),[{prompt:t},{switch:{variable:"prompt_result",case:{failed:[{play:"say:Error while gathering input."},"hangup"],no_input:[],no_match:[]},default:[{switch:{variable:"prompt_value",case:{},default:[]}}]}}]},handleCall:()=>"start",record:({data:e})=>[{record:{beep:e.beep,direction:e.direction,end_silence_timeout:e.endSilenceTimeout,format:e.format,initial_timeout:e.initialTimeout,input_sensitivity:e.inputSensitivity,stereo:e.stereo,terminators:e.terminators}},{if:{condition:'"${record_result}" == "success"',then:[],else:[]}}],recordCallStart:({data:e})=>[{record_call:{beep:e.beep,control_id:e.controlId,direction:e.direction,end_silence_timeout:e.endSilenceTimeout,format:e.format,initial_timeout:e.initialTimeout,input_sensitivity:e.inputSensitivity,stereo:e.stereo,terminators:e.terminators}},{if:{condition:'"${record_result}" == "success"',then:[],else:[]}}],recordCallStop:({data:e})=>({stop_record_call:e.controlId}),sendSms:({data:e})=>{let{fromNumber:t,toNumber:n,body:r}=e;return{send_sms:{from_number:t,to_number:n,body:r}}},set:({data:{variables:e}})=>{let t={};return e.forEach(({key:n,value:r})=>{t[n]=r}),{set:t}},unset:({data:{variables:e}})=>({unset:e.map(({key:t})=>t)}),request:({data:e})=>[{request:{url:e.url,method:e.method,timeout:e.timeout,connect_timeout:e.connectTimeout,save_variables:e.saveVariables,headers:e.headers&&Object.keys(e.headers).length?e.headers:void 0,body:Boolean(e.body)?e.body:void 0}},{if:{condition:'"${request_result}" === "success"',then:[],else:[]}}]},Zi=e=>{try{return mx[e.type](e)}catch(t){throw Oo().error("Unknown Verb",e),t}},Uf=({destinations:e,sessionTimeout:t,type:n})=>{let r=t&&t>0?t:void 0,o=e.map(a=>({from:"${call.from}",to:a,session_timeout:r}));if(!o.length)throw Oo().error("Invalid destinations",e),new Error("Invalid Destinations");let i={if:{condition:'"${connect_result}" == "connected"',then:[{play:"say:Thank you. Goodbye!"}],else:[{switch:{variable:"connect_failed_reason",case:{busy:[],noAnswer:[],decline:[],error:[]},default:["hangup"]}}]}};switch(n){case"single":return[{connect:o[0]},i];case"serial":return[{connect:{serial:o}},i];case"parallel":return[{connect:{parallel:o}},i];default:return Oo().warn(`The type "${n}" is not supported yet.`),[{connect:o[0]},i]}},gx=e=>{let t=new Set,n=new Map,r=new Set,o=new Map([["main",[]]]),i=new Map,a="",s=g=>o.has(g),l=g=>r.has(g),u=g=>r.add(g);e.nodes.forEach(g=>{n.set(g.id,{node:g,list:[]}),g.type==="handleCall"&&(a=g.id)}),e.edges.forEach(g=>{let S=n.get(g.source),_=n.get(g.target);if(!S||!_)return console.warn("Invalid edge:",g);S.list.push(g.target),g.sourceHandle&&i.set(g.sourceHandle,_),t.has(g.target)&&o.set(g.target,[]),t.add(g.target)});let c=[...o.keys()],f=(g,S)=>{let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),S.digit&&(g[S.digit]=x);let N=hx(S.command);N&&(g[N]=x);let I=s(_.node.id);if(I){let D={transfer:_.node.id};S.digit&&g[S.digit].push(D),N&&!g[N].includes(D)&&g[N].push(D)}E({sectionName:I?_.node.id:S.id,current:_})}return g},d=(g,S)=>{let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g[S.result]=x;let N=s(_.node.id);N&&g[S.result].push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g},h={success:(g,S)=>{if(S.connectResult!=="answered")return g;let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g[S.connectResult]=x;let N=s(_.node.id);N&&g[S.connectResult].push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g},failure:(g,S)=>{if(S.connectResult==="answered")return g;let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g[S.connectResult]=x;let N=s(_.node.id);N&&g[S.connectResult].push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g}},v={success:(g,S)=>{if(S.recordResult!=="success")return g;let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g=x;let N=s(_.node.id);N&&g.push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g},error:(g,S)=>{if(S.recordResult==="success")return g;let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g=x;let N=s(_.node.id);N&&g.push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g}},y={success:(g,S)=>{if(S.requestResult!=="success")return g;let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g=x;let N=s(_.node.id);N&&g.push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g},error:(g,S)=>{if(S.requestResult==="success")return g;let _=i.get(S.id);if(_){let x=[];o.set(S.id,x),g=x;let N=s(_.node.id);N&&g.push({transfer:_.node.id}),E({sectionName:N?_.node.id:S.id,current:_})}return g}},E=({sectionName:g,current:S})=>{var x,N,I,D;if(l(S.node.id))return;u(S.node.id);let _=o.get(g);if(!_){console.warn("Unknown section name:",g);return}if(S.node.type==="promptPlay"){let T=Zi(S.node);if(!Array.isArray(T)){console.warn("Invalid gather node",T);return}(N=(x=S.node.data)==null?void 0:x.results)!=null&&N.length&&(T[1].switch.case={...T[1].switch.case,...S.node.data.results.reduce(d,{})}),T[1].switch.default[0].switch.case=S.node.data.options.reduce(f,{}),(I=T[1].switch.case)!=null&&I.no_match&&(T[1].switch.default[0].switch.default=(D=T[1].switch.case)==null?void 0:D.no_match),_.push(...T);return}if(S.node.type==="forwardPhone"){let T=Zi(S.node);if(!Array.isArray(T)){console.warn("Invalid connect node",T);return}T[1].if.else[0].switch.case=S.node.data.options.reduce(h.failure,{}),_.push(...T);return}if(S.node.type==="record"||S.node.type==="recordCallStart"){let T=Zi(S.node);if(!Array.isArray(T)){console.warn("Invalid record node",T);return}T[1].if.then=S.node.data.options.reduce(v.success,[]),T[1].if.else=S.node.data.options.reduce(v.error,[]),_.push(...T);return}if(S.node.type==="request"){let T=Zi(S.node);if(!Array.isArray(T)){console.warn("Invalid request node",T);return}T[1].if.then=S.node.data.options.reduce(y.success,[]),T[1].if.else=S.node.data.options.reduce(y.error,[]),_.push(...T);return}S.node.type!=="handleCall"&&_.push(Zi(S.node)),S.list.forEach(T=>{let $=n.get(T);if(!$)return console.warn("Invalid Child Node",T);let F=s(T);F&&_.push({transfer:T}),E({sectionName:F?T:g,current:$})})},p=n.get(a);p&&E({sectionName:"main",current:p});let m={};return c.forEach(g=>{let S=o.get(g);S&&(m[g]=S)}),console.log("sections",JSON.stringify(m)),{sections:m}},cv=class extends Error{constructor(t,n){super(n),this.code=t,this.message=n,uv(this,"name","AuthError"),Object.setPrototypeOf(this,cv.prototype)}},fv=class extends Error{constructor(t,n,r){super(n),this.code=t,this.message=n,this.response=r,uv(this,"name","HttpError"),Object.setPrototypeOf(this,fv.prototype)}};async function vx(e,t){let n=await fetch(e,t);if(!n.ok){if(n.status===401)throw new cv(n.status,"Unauthorized");let r;try{r=await n.json()}catch{}let o=r!=null&&r.errors?JSON.stringify(r.errors):"Not Found";throw new fv(n.status,o,r)}try{n.parsedBody=await n.json()}catch{}return n}var yx=({baseUrl:e,timeout:t=3e4,...n},r=vx)=>async(o,i)=>{let a={...i!=null&&i.body?{"Content-Type":"application/json"}:{},...n.headers,...i==null?void 0:i.headers},s=Sx({...n,...i,headers:a}),l;if(t){let u=new AbortController,c=u.signal;s.signal=c,l=setTimeout(()=>{u.abort()},t)}try{return{body:(await r(wx({path:o,baseUrl:e,searchParams:i==null?void 0:i.searchParams}),s)).parsedBody}}catch(u){throw u}finally{l&&clearTimeout(l)}},Ex=e=>typeof e=="string"?e:JSON.stringify(e),Sx=e=>Object.entries(e).reduce((t,[n,r])=>n==="body"?{...t,body:Ex(r)}:r!=null?{...t,[n]:r}:t,{}),wx=({path:e,baseUrl:t,searchParams:n})=>{let r=new URL(e,t);return n&&Object.entries(n).forEach(([o,i])=>{i!=null&&r.searchParams.append(o,i)}),r.toString()},_x=e=>{let t=Oo(),n=yx(e);return{getFlow:async({flowId:r})=>{try{let{body:o}=await n(`/flow/${r}`);if(t.info("getFlow",o),!o.meta)return{};switch(o.meta.builderVersion){default:return{apiVersion:o.meta.apiVersion,builderVersion:o.meta.builderVersion,data:o.meta.flowData,relayMLVersion:o.meta.relayMLVersion}}}catch{return t.error("Could not load flow",r),{}}},putFlow:async r=>{let o={meta:{builderVersion:r.builderVersion,flowData:{nodes:r.nodes.map(dx),edges:r.edges.map(px)}},relayML:gx({nodes:r.nodes,edges:r.edges})},i=await n(`/flow/${r.flowId}`,{method:"PUT",body:o});return t.info("putFlow",i),i}}};function tt(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=tt(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const dv=e=>{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const f=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(d=>d(t,f))}},o=()=>t,s={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{var l;((l={VITE_BASE_URL:"",VITE_BASIC_AUTH:"signalwire:1aG93uXk",VITE_DEFAULT_STYLE_HREF:"https://cdn.jsdelivr.net/npm/@signalwire/cfb@dev/dist/style.css",BASE_URL:"/cfb/",MODE:"staging",DEV:!1,PROD:!0,SSR:!1})==null?void 0:l.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,s),s},pv=e=>e?dv(e):dv;var Vf={},xx={get exports(){return Vf},set exports(e){Vf=e}},hv={},$f={},Rx={get exports(){return $f},set exports(e){$f=e}},mv={};/**
|
|
44
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function rc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function oc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var e_=typeof WeakMap=="function"?WeakMap:Map;function zh(e,t,n){n=an(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fa||(fa=!0,Ec=r),oc(e,t)},n}function Hh(e,t,n){n=an(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){oc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){oc(e,t),typeof r!="function"&&(Ln===null?Ln=new Set([this]):Ln.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function jh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new e_;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=h_.bind(null,e,t,n),t.then(e,e))}function Yh(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 Gh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,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=an(-1,1),t.tag=2,In(n,t,1))),n.lanes|=1),e)}var t_=en.ReactCurrentOwner,Ke=!1;function $e(e,t,n,r){t.child=e===null?Eh(t,null,n,r):io(t,e.child,n,r)}function Wh(e,t,n,r,o){n=n.render;var i=t.ref;return oo(t,o),r=qu(e,t,n,r,i,o),n=Zu(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o)):(ce&&n&&Lu(t),t.flags|=1,$e(e,t,r,o),t.child)}function Kh(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!xc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Qh(e,t,i,r,o)):(e=ya(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:ai,n(s,r)&&e.ref===t.ref)return ln(e,t,o)}return t.flags|=1,e=Mn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Qh(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ai(i,r)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ke=!0);else return t.lanes=e.lanes,ln(e,t,o)}return ic(e,t,n,r,o)}function Xh(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(uo,lt),lt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ie(uo,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ie(uo,lt),lt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ie(uo,lt),lt|=r;return $e(e,t,o,n),t.child}function qh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ic(e,t,n,r,o){var i=We(n)?ir:ke.current;return i=Jr(t,i),oo(t,o),n=qu(e,t,n,r,i,o),r=Zu(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o)):(ce&&r&&Lu(t),t.flags|=1,$e(e,t,n,o),t.child)}function Zh(e,t,n,r,o){if(We(n)){var i=!0;Hs(t)}else i=!1;if(oo(t,o),t.stateNode===null)aa(e,t),gh(t,n,r),ju(t,n,r,o),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=mt(u):(u=We(n)?ir:ke.current,u=Jr(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&mh(t,s,r,u),bn=!1;var f=t.memoizedState;s.state=f,qs(t,r,s,o),l=t.memoizedState,a!==r||f!==l||Ge.current||bn?(typeof c=="function"&&(Hu(t,n,c,r),l=t.memoizedState),(a=bn||hh(t,n,a,r,f,l,u))?(d||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,ch(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Tt(t.type,a),s.props=u,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=mt(l):(l=We(n)?ir:ke.current,l=Jr(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&mh(t,s,r,l),bn=!1,f=t.memoizedState,s.state=f,qs(t,r,s,o);var m=t.memoizedState;a!==d||f!==m||Ge.current||bn?(typeof h=="function"&&(Hu(t,n,h,r),m=t.memoizedState),(u=bn||hh(t,n,u,r,f,m,l)||!1)?(c||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&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===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&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return sc(e,t,n,r,i,o)}function sc(e,t,n,r,o,i){qh(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&nh(t,n,!1),ln(e,t,i);r=t.stateNode,t_.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=io(t,e.child,null,i),t.child=io(t,null,a,i)):$e(e,t,a,i),t.memoizedState=r.state,o&&nh(t,n,!0),t.child}function Jh(e){var t=e.stateNode;t.pendingContext?eh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&eh(e,t.context,!1),Yu(e,t.containerInfo)}function eg(e,t,n,r,o){return no(),Mu(o),t.flags|=256,$e(e,t,n,r),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0};function lc(e){return{baseLanes:e,cachePool:null,transitions:null}}function tg(e,t,n){var r=t.pendingProps,o=pe.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ie(pe,o&1),e===null)return Pu(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,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Ea(s,r,0,null),e=gr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=lc(n),t.memoizedState=ac,e):uc(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return n_(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Mn(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Mn(a,i):(i=gr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?lc(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=ac,r}return i=e.child,e=i.sibling,r=Mn(i,{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 uc(e,t){return t=Ea({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function sa(e,t,n,r){return r!==null&&Mu(r),io(t,e.child,null,n),e=uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function n_(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=rc(Error(H(422))),sa(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ea({mode:"visible",children:r.children},o,0,null),i=gr(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&io(t,e.child,null,s),t.child.memoizedState=lc(s),t.memoizedState=ac,i);if(!(t.mode&1))return sa(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(H(419)),r=rc(i,r,void 0),sa(e,t,s,r)}if(a=(s&e.childLanes)!==0,Ke||a){if(r=Ce,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,sn(e,o),It(r,e,o,-1))}return Oc(),r=rc(Error(H(421))),sa(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=g_.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,at=On(o.nextSibling),st=t,ce=!0,xt=null,e!==null&&(ht[gt++]=rn,ht[gt++]=on,ht[gt++]=sr,rn=e.id,on=e.overflow,sr=t),t=uc(t,r.children),t.flags|=4096,t)}function ng(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bu(e.return,t,n)}function cc(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function rg(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=pe.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&&ng(e,n,t);else if(e.tag===19)ng(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(ie(pe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ea(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),cc(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ea(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}cc(t,!0,n,null,i);break;case"together":cc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function aa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Mn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function r_(e,t,n){switch(t.tag){case 3:Jh(t),no();break;case 5:Sh(t);break;case 1:We(t.type)&&Hs(t);break;case 4:Yu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ie(Ks,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ie(pe,pe.current&1),t.flags|=128,null):n&t.child.childLanes?tg(e,t,n):(ie(pe,pe.current&1),e=ln(e,t,n),e!==null?e.sibling:null);ie(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return rg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ie(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Xh(e,t,n)}return ln(e,t,n)}var og,dc,ig,sg;og=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}},dc=function(){},ig=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ur(Bt.current);var i=null;switch(n){case"input":o=Bl(e,o),r=Bl(e,r),i=[];break;case"select":o=fe({},o,{value:void 0}),r=fe({},r,{value:void 0}),i=[];break;case"textarea":o=Hl(e,o),r=Hl(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bs)}Yl(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Bo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[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||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Bo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&se("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},sg=function(e,t,n,r){n!==r&&(t.flags|=4)};function wi(e,t){if(!ce)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 Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function o_(e,t,n){var r=t.pendingProps;switch(Du(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return We(t.type)&&zs(),Me(t),null;case 3:return r=t.stateNode,so(),ae(Ge),ae(ke),Ku(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ws(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xt!==null&&(wc(xt),xt=null))),dc(e,t),Me(t),null;case 5:Gu(t);var o=ur(vi.current);if(n=t.type,e!==null&&t.stateNode!=null)ig(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Me(t),null}if(e=ur(Bt.current),Ws(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Vt]=t,r[fi]=i,e=(t.mode&1)!==0,n){case"dialog":se("cancel",r),se("close",r);break;case"iframe":case"object":case"embed":se("load",r);break;case"video":case"audio":for(o=0;o<ui.length;o++)se(ui[o],r);break;case"source":se("error",r);break;case"img":case"image":case"link":se("error",r),se("load",r);break;case"details":se("toggle",r);break;case"input":Vf(r,i),se("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},se("invalid",r);break;case"textarea":zf(r,i),se("invalid",r)}Yl(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Vs(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Vs(r.textContent,a,e),o=["children",""+a]):Bo.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&se("scroll",r)}switch(n){case"input":ms(r),$f(r,i,!0);break;case"textarea":ms(r),jf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Bs)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Yf(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[Vt]=t,e[fi]=r,og(e,t,!1,!1),t.stateNode=e;e:{switch(s=Gl(n,r),n){case"dialog":se("cancel",e),se("close",e),o=r;break;case"iframe":case"object":case"embed":se("load",e),o=r;break;case"video":case"audio":for(o=0;o<ui.length;o++)se(ui[o],e);o=r;break;case"source":se("error",e),o=r;break;case"img":case"image":case"link":se("error",e),se("load",e),o=r;break;case"details":se("toggle",e),o=r;break;case"input":Vf(e,r),o=Bl(e,r),se("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=fe({},r,{value:void 0}),se("invalid",e);break;case"textarea":zf(e,r),o=Hl(e,r),se("invalid",e);break;default:o=r}Yl(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Kf(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Gf(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&jo(e,l):typeof l=="number"&&jo(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Bo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&se("scroll",e):l!=null&&bl(e,i,l,s))}switch(n){case"input":ms(e),$f(e,r,!1);break;case"textarea":ms(e),jf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+yn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?$r(e,!!r.multiple,i,!1):r.defaultValue!=null&&$r(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bs)}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 Me(t),null;case 6:if(e&&t.stateNode!=null)sg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=ur(vi.current),ur(Bt.current),Ws(t)){if(r=t.stateNode,n=t.memoizedProps,r[Vt]=t,(i=r.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:Vs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vt]=t,t.stateNode=r}return Me(t),null;case 13:if(ae(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&at!==null&&t.mode&1&&!(t.flags&128))lh(),no(),t.flags|=98560,i=!1;else if(i=Ws(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[Vt]=t}else no(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),i=!1}else xt!==null&&(wc(xt),xt=null),i=!0;if(!i)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||pe.current&1?Ne===0&&(Ne=3):Oc())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return so(),dc(e,t),e===null&&ci(t.stateNode.containerInfo),Me(t),null;case 10:return Vu(t.type._context),Me(t),null;case 17:return We(t.type)&&zs(),Me(t),null;case 19:if(ae(pe),i=t.memoizedState,i===null)return Me(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)wi(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ea(e),s!==null){for(t.flags|=128,wi(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ie(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>co&&(t.flags|=128,r=!0,wi(i,!1),t.lanes=4194304)}else{if(!r)if(e=ea(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ce)return Me(t),null}else 2*ye()-i.renderingStartTime>co&&n!==1073741824&&(t.flags|=128,r=!0,wi(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,n=pe.current,ie(pe,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return Nc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?lt&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function i_(e,t){switch(Du(t),t.tag){case 1:return We(t.type)&&zs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return so(),ae(Ge),ae(ke),Ku(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Gu(t),null;case 13:if(ae(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));no()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(pe),null;case 4:return so(),null;case 10:return Vu(t.type._context),null;case 22:case 23:return Nc(),null;case 24:return null;default:return null}}var la=!1,Ue=!1,s_=typeof WeakSet=="function"?WeakSet:Set,Y=null;function lo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function fc(e,t,n){try{n()}catch(r){ve(e,t,r)}}var ag=!1;function a_(e,t){if(Nu=Cs,e=Fp(),mu(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ou={focusedElem:e,selectionRange:n},Cs=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;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,E=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Tt(t.type,v),E);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(_){ve(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=ag,ag=!1,m}function Ri(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&fc(t,n,i)}o=o.next}while(o!==r)}}function ua(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 pc(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 lg(e){var t=e.alternate;t!==null&&(e.alternate=null,lg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[fi],delete t[bu],delete t[HS],delete t[jS])),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 ug(e){return e.tag===5||e.tag===3||e.tag===4}function cg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ug(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 hc(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=Bs));else if(r!==4&&(e=e.child,e!==null))for(hc(e,t,n),e=e.sibling;e!==null;)hc(e,t,n),e=e.sibling}function gc(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(gc(e,t,n),e=e.sibling;e!==null;)gc(e,t,n),e=e.sibling}var Le=null,Ct=!1;function An(e,t,n){for(n=n.child;n!==null;)dg(e,t,n),n=n.sibling}function dg(e,t,n){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(ws,n)}catch{}switch(n.tag){case 5:Ue||lo(n,t);case 6:var r=Le,o=Ct;Le=null,An(e,t,n),Le=r,Ct=o,Le!==null&&(Ct?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(Ct?(e=Le,n=n.stateNode,e.nodeType===8?Cu(e.parentNode,n):e.nodeType===1&&Cu(e,n),ti(e)):Cu(Le,n.stateNode));break;case 4:r=Le,o=Ct,Le=n.stateNode.containerInfo,Ct=!0,An(e,t,n),Le=r,Ct=o;break;case 0:case 11:case 14:case 15:if(!Ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&fc(n,t,s),o=o.next}while(o!==r)}An(e,t,n);break;case 1:if(!Ue&&(lo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,t,a)}An(e,t,n);break;case 21:An(e,t,n);break;case 22:n.mode&1?(Ue=(r=Ue)||n.memoizedState!==null,An(e,t,n),Ue=r):An(e,t,n);break;default:An(e,t,n)}}function fg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new s_),t.forEach(function(r){var o=m_.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Le=a.stateNode,Ct=!1;break e;case 3:Le=a.stateNode.containerInfo,Ct=!0;break e;case 4:Le=a.stateNode.containerInfo,Ct=!0;break e}a=a.return}if(Le===null)throw Error(H(160));dg(i,s,o),Le=null,Ct=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){ve(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)pg(t,e),t=t.sibling}function pg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bt(t,e),zt(e),r&4){try{Ri(3,e,e.return),ua(3,e)}catch(v){ve(e,e.return,v)}try{Ri(5,e,e.return)}catch(v){ve(e,e.return,v)}}break;case 1:bt(t,e),zt(e),r&512&&n!==null&&lo(n,n.return);break;case 5:if(bt(t,e),zt(e),r&512&&n!==null&&lo(n,n.return),e.flags&32){var o=e.stateNode;try{jo(o,"")}catch(v){ve(e,e.return,v)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Bf(o,i),Gl(a,s);var u=Gl(a,i);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];c==="style"?Kf(o,d):c==="dangerouslySetInnerHTML"?Gf(o,d):c==="children"?jo(o,d):bl(o,c,d,u)}switch(a){case"input":$l(o,i);break;case"textarea":Hf(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?$r(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?$r(o,!!i.multiple,i.defaultValue,!0):$r(o,!!i.multiple,i.multiple?[]:"",!1))}o[fi]=i}catch(v){ve(e,e.return,v)}}break;case 6:if(bt(t,e),zt(e),r&4){if(e.stateNode===null)throw Error(H(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(v){ve(e,e.return,v)}}break;case 3:if(bt(t,e),zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ti(t.containerInfo)}catch(v){ve(e,e.return,v)}break;case 4:bt(t,e),zt(e);break;case 13:bt(t,e),zt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(yc=ye())),r&4&&fg(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ue=(u=Ue)||c,bt(t,e),Ue=u):bt(t,e),zt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Y=e,c=e.child;c!==null;){for(d=Y=c;Y!==null;){switch(f=Y,h=f.child,f.tag){case 0:case 11:case 14:case 15:Ri(4,f,f.return);break;case 1:lo(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){ve(r,n,v)}}break;case 5:lo(f,f.return);break;case 22:if(f.memoizedState!==null){mg(d);continue}}h!==null?(h.return=f,Y=h):mg(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Wf("display",s))}catch(v){ve(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){ve(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bt(t,e),zt(e),r&4&&fg(e);break;case 21:break;default:bt(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ug(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(jo(o,""),r.flags&=-33);var i=cg(e);gc(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=cg(e);hc(e,a,s);break;default:throw Error(H(161))}}catch(l){ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function l_(e,t,n){Y=e,hg(e)}function hg(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var o=Y,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||la;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Ue;a=la;var u=Ue;if(la=s,(Ue=l)&&!u)for(Y=o;Y!==null;)s=Y,l=s.child,s.tag===22&&s.memoizedState!==null?vg(o):l!==null?(l.return=s,Y=l):vg(o);for(;i!==null;)Y=i,hg(i),i=i.sibling;Y=o,la=a,Ue=u}gg(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,Y=i):gg(e)}}function gg(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ue||ua(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ue)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Tt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&fh(t,i,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}fh(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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ti(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}Ue||t.flags&512&&pc(t)}catch(f){ve(t,t.return,f)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function mg(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function vg(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ua(4,t)}catch(l){ve(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){ve(t,o,l)}}var i=t.return;try{pc(t)}catch(l){ve(t,i,l)}break;case 5:var s=t.return;try{pc(t)}catch(l){ve(t,s,l)}}}catch(l){ve(t,t.return,l)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var u_=Math.ceil,ca=en.ReactCurrentDispatcher,mc=en.ReactCurrentOwner,yt=en.ReactCurrentBatchConfig,ne=0,Ce=null,Se=null,De=0,lt=0,uo=xn(0),Ne=0,Ni=null,dr=0,da=0,vc=0,Oi=null,Qe=null,yc=0,co=1/0,un=null,fa=!1,Ec=null,Ln=null,pa=!1,Dn=null,ha=0,xi=0,Sc=null,ga=-1,ma=0;function ze(){return ne&6?ye():ga!==-1?ga:ga=ye()}function kn(e){return e.mode&1?ne&2&&De!==0?De&-De:GS.transition!==null?(ma===0&&(ma=up()),ma):(e=re,e!==0||(e=window.event,e=e===void 0?16:yp(e.type)),e):1}function It(e,t,n,r){if(50<xi)throw xi=0,Sc=null,Error(H(185));Xo(e,n,r),(!(ne&2)||e!==Ce)&&(e===Ce&&(!(ne&2)&&(da|=n),Ne===4&&Pn(e,De)),Xe(e,r),n===1&&ne===0&&!(t.mode&1)&&(co=ye()+500,js&&Cn()))}function Xe(e,t){var n=e.callbackNode;GE(e,t);var r=Os(e,e===Ce?De:0);if(r===0)n!==null&&sp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&sp(n),t===1)e.tag===0?YS(Eg.bind(null,e)):rh(Eg.bind(null,e)),$S(function(){!(ne&6)&&Cn()}),n=null;else{switch(cp(r)){case 1:n=Jl;break;case 4:n=ap;break;case 16:n=_s;break;case 536870912:n=lp;break;default:n=_s}n=Tg(n,yg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yg(e,t){if(ga=-1,ma=0,ne&6)throw Error(H(327));var n=e.callbackNode;if(fo()&&e.callbackNode!==n)return null;var r=Os(e,e===Ce?De:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=va(e,r);else{t=r;var o=ne;ne|=2;var i=_g();(Ce!==e||De!==t)&&(un=null,co=ye()+500,pr(e,t));do try{f_();break}catch(a){Sg(e,a)}while(1);Fu(),ca.current=i,ne=o,Se!==null?t=0:(Ce=null,De=0,t=Ne)}if(t!==0){if(t===2&&(o=eu(e),o!==0&&(r=o,t=_c(e,o))),t===1)throw n=Ni,pr(e,0),Pn(e,r),Xe(e,ye()),n;if(t===6)Pn(e,r);else{if(o=e.current.alternate,!(r&30)&&!c_(o)&&(t=va(e,r),t===2&&(i=eu(e),i!==0&&(r=i,t=_c(e,i))),t===1))throw n=Ni,pr(e,0),Pn(e,r),Xe(e,ye()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:hr(e,Qe,un);break;case 3:if(Pn(e,r),(r&130023424)===r&&(t=yc+500-ye(),10<t)){if(Os(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Tu(hr.bind(null,e,Qe,un),t);break}hr(e,Qe,un);break;case 4:if(Pn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u_(r/1960))-r,10<r){e.timeoutHandle=Tu(hr.bind(null,e,Qe,un),r);break}hr(e,Qe,un);break;case 5:hr(e,Qe,un);break;default:throw Error(H(329))}}}return Xe(e,ye()),e.callbackNode===n?yg.bind(null,e):null}function _c(e,t){var n=Oi;return e.current.memoizedState.isDehydrated&&(pr(e,t).flags|=256),e=va(e,t),e!==2&&(t=Qe,Qe=n,t!==null&&wc(t)),e}function wc(e){Qe===null?Qe=e:Qe.push.apply(Qe,e)}function c_(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 o=n[r],i=o.getSnapshot;o=o.value;try{if(!Ot(i(),o))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 Pn(e,t){for(t&=~vc,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Eg(e){if(ne&6)throw Error(H(327));fo();var t=Os(e,0);if(!(t&1))return Xe(e,ye()),null;var n=va(e,t);if(e.tag!==0&&n===2){var r=eu(e);r!==0&&(t=r,n=_c(e,r))}if(n===1)throw n=Ni,pr(e,0),Pn(e,t),Xe(e,ye()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,hr(e,Qe,un),Xe(e,ye()),null}function Rc(e,t){var n=ne;ne|=1;try{return e(t)}finally{ne=n,ne===0&&(co=ye()+500,js&&Cn())}}function fr(e){Dn!==null&&Dn.tag===0&&!(ne&6)&&fo();var t=ne;ne|=1;var n=yt.transition,r=re;try{if(yt.transition=null,re=1,e)return e()}finally{re=r,yt.transition=n,ne=t,!(ne&6)&&Cn()}}function Nc(){lt=uo.current,ae(uo)}function pr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,BS(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(Du(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zs();break;case 3:so(),ae(Ge),ae(ke),Ku();break;case 5:Gu(r);break;case 4:so();break;case 13:ae(pe);break;case 19:ae(pe);break;case 10:Vu(r.type._context);break;case 22:case 23:Nc()}n=n.return}if(Ce=e,Se=e=Mn(e.current,null),De=lt=t,Ne=0,Ni=null,vc=da=dr=0,Qe=Oi=null,lr!==null){for(t=0;t<lr.length;t++)if(n=lr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}lr=null}return e}function Sg(e,t){do{var n=Se;try{if(Fu(),ta.current=ia,na){for(var r=he.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}na=!1}if(cr=0,Te=Re=he=null,yi=!1,Ei=0,mc.current=null,n===null||n.return===null){Ne=1,Ni=t,Se=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=De,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Yh(s);if(h!==null){h.flags&=-257,Gh(h,s,a,i,t),h.mode&1&&jh(i,u,t),t=h,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)){jh(i,u,t),Oc();break e}l=Error(H(426))}}else if(ce&&a.mode&1){var E=Yh(s);if(E!==null){!(E.flags&65536)&&(E.flags|=256),Gh(E,s,a,i,t),Mu(ao(l,a));break e}}i=l=ao(l,a),Ne!==4&&(Ne=2),Oi===null?Oi=[i]:Oi.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=zh(i,l,t);dh(i,p);break e;case 1:a=l;var g=i.type,S=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Ln===null||!Ln.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=Hh(i,a,t);dh(i,_);break e}}i=i.return}while(i!==null)}Rg(n)}catch(w){t=w,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function _g(){var e=ca.current;return ca.current=ia,e===null?ia:e}function Oc(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ce===null||!(dr&268435455)&&!(da&268435455)||Pn(Ce,De)}function va(e,t){var n=ne;ne|=2;var r=_g();(Ce!==e||De!==t)&&(un=null,pr(e,t));do try{d_();break}catch(o){Sg(e,o)}while(1);if(Fu(),ne=n,ca.current=r,Se!==null)throw Error(H(261));return Ce=null,De=0,Ne}function d_(){for(;Se!==null;)wg(Se)}function f_(){for(;Se!==null&&!UE();)wg(Se)}function wg(e){var t=xg(e.alternate,e,lt);e.memoizedProps=e.pendingProps,t===null?Rg(e):Se=t,mc.current=null}function Rg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=i_(n,t),n!==null){n.flags&=32767,Se=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,Se=null;return}}else if(n=o_(n,t,lt),n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ne===0&&(Ne=5)}function hr(e,t,n){var r=re,o=yt.transition;try{yt.transition=null,re=1,p_(e,t,n,r)}finally{yt.transition=o,re=r}return null}function p_(e,t,n,r){do fo();while(Dn!==null);if(ne&6)throw Error(H(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(WE(e,i),e===Ce&&(Se=Ce=null,De=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||pa||(pa=!0,Tg(_s,function(){return fo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=yt.transition,yt.transition=null;var s=re;re=1;var a=ne;ne|=4,mc.current=null,a_(e,n),pg(n,e),DS(Ou),Cs=!!Nu,Ou=Nu=null,e.current=n,l_(n),FE(),ne=a,re=s,yt.transition=i}else e.current=n;if(pa&&(pa=!1,Dn=e,ha=o),i=e.pendingLanes,i===0&&(Ln=null),$E(n.stateNode),Xe(e,ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(fa)throw fa=!1,e=Ec,Ec=null,e;return ha&1&&e.tag!==0&&fo(),i=e.pendingLanes,i&1?e===Sc?xi++:(xi=0,Sc=e):xi=0,Cn(),null}function fo(){if(Dn!==null){var e=cp(ha),t=yt.transition,n=re;try{if(yt.transition=null,re=16>e?16:e,Dn===null)var r=!1;else{if(e=Dn,Dn=null,ha=0,ne&6)throw Error(H(331));var o=ne;for(ne|=4,Y=e.current;Y!==null;){var i=Y,s=i.child;if(Y.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(Y=u;Y!==null;){var c=Y;switch(c.tag){case 0:case 11:case 15:Ri(8,c,i)}var d=c.child;if(d!==null)d.return=c,Y=d;else for(;Y!==null;){c=Y;var f=c.sibling,h=c.return;if(lg(c),c===u){Y=null;break}if(f!==null){f.return=h,Y=f;break}Y=h}}}var m=i.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var E=v.sibling;v.sibling=null,v=E}while(v!==null)}}Y=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,Y=s;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ri(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,Y=p;break e}Y=i.return}}var g=e.current;for(Y=g;Y!==null;){s=Y;var S=s.child;if(s.subtreeFlags&2064&&S!==null)S.return=s,Y=S;else e:for(s=g;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ua(9,a)}}catch(w){ve(a,a.return,w)}if(a===s){Y=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Y=_;break e}Y=a.return}}if(ne=o,Cn(),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(ws,e)}catch{}r=!0}return r}finally{re=n,yt.transition=t}}return!1}function Ng(e,t,n){t=ao(n,t),t=zh(e,t,1),e=In(e,t,1),t=ze(),e!==null&&(Xo(e,1,t),Xe(e,t))}function ve(e,t,n){if(e.tag===3)Ng(e,e,n);else for(;t!==null;){if(t.tag===3){Ng(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ln===null||!Ln.has(r))){e=ao(n,e),e=Hh(t,e,1),t=In(t,e,1),e=ze(),t!==null&&(Xo(t,1,e),Xe(t,e));break}}t=t.return}}function h_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ze(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(De&n)===n&&(Ne===4||Ne===3&&(De&130023424)===De&&500>ye()-yc?pr(e,0):vc|=n),Xe(e,t)}function Og(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=ze();e=sn(e,t),e!==null&&(Xo(e,t,n),Xe(e,n))}function g_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Og(e,n)}function m_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),Og(e,n)}var xg;xg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ke=!1,r_(e,t,n);Ke=!!(e.flags&131072)}else Ke=!1,ce&&t.flags&1048576&&oh(t,Gs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;aa(e,t),e=t.pendingProps;var o=Jr(t,ke.current);oo(t,n),o=qu(null,t,r,e,o,n);var i=Zu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)?(i=!0,Hs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zu(t),o.updater=Zs,t.stateNode=o,o._reactInternals=t,ju(t,r,e,n),t=sc(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&Lu(t),$e(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(aa(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=y_(r),e=Tt(r,e),o){case 0:t=ic(null,t,r,e,n);break e;case 1:t=Zh(null,t,r,e,n);break e;case 11:t=Wh(null,t,r,e,n);break e;case 14:t=Kh(null,t,r,Tt(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Tt(r,o),ic(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Tt(r,o),Zh(e,t,r,o,n);case 3:e:{if(Jh(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ch(e,t),qs(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ao(Error(H(423)),t),t=eg(e,t,r,n,o);break e}else if(r!==o){o=ao(Error(H(424)),t),t=eg(e,t,r,n,o);break e}else for(at=On(t.stateNode.containerInfo.firstChild),st=t,ce=!0,xt=null,n=Eh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(no(),r===o){t=ln(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return Sh(t),e===null&&Pu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,xu(r,o)?s=null:i!==null&&xu(r,i)&&(t.flags|=32),qh(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Pu(t),null;case 13:return tg(e,t,n);case 4:return Yu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=io(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Tt(r,o),Wh(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ie(Ks,r._currentValue),r._currentValue=s,i!==null)if(Ot(i.value,s)){if(i.children===o.children&&!Ge.current){t=ln(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=an(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Bu(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(H(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Bu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,oo(t,n),o=mt(o),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,o=Tt(r,t.pendingProps),o=Tt(r.type,o),Kh(e,t,r,o,n);case 15:return Qh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Tt(r,o),aa(e,t),t.tag=1,We(r)?(e=!0,Hs(t)):e=!1,oo(t,n),gh(t,r,o),ju(t,r,o,n),sc(null,t,r,!0,e,n);case 19:return rg(e,t,n);case 22:return Xh(e,t,n)}throw Error(H(156,t.tag))};function Tg(e,t){return ip(e,t)}function v_(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 Et(e,t,n,r){return new v_(e,t,n,r)}function xc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function y_(e){if(typeof e=="function")return xc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ll)return 11;if(e===Pl)return 14}return 2}function Mn(e,t){var n=e.alternate;return n===null?(n=Et(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 ya(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")xc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return gr(n.children,o,i,t);case Il:s=8,o|=8;break;case Al:return e=Et(12,n,t,o|2),e.elementType=Al,e.lanes=i,e;case Dl:return e=Et(13,n,t,o),e.elementType=Dl,e.lanes=i,e;case kl:return e=Et(19,n,t,o),e.elementType=kl,e.lanes=i,e;case Pf:return Ea(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Df:s=10;break e;case kf:s=9;break e;case Ll:s=11;break e;case Pl:s=14;break e;case vn:s=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=Et(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function gr(e,t,n,r){return e=Et(7,e,r,t),e.lanes=n,e}function Ea(e,t,n,r){return e=Et(22,e,r,t),e.elementType=Pf,e.lanes=n,e.stateNode={isHidden:!1},e}function Tc(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function Cc(e,t,n){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E_(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function bc(e,t,n,r,o,i,s,a,l){return e=new E_(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Et(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zu(i),e}function S_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cg(e){if(!e)return Tn;e=e._reactInternals;e:{if(rr(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(We(n))return th(e,n,t)}return t}function bg(e,t,n,r,o,i,s,a,l){return e=bc(n,r,!0,e,o,i,s,a,l),e.context=Cg(null),n=e.current,r=ze(),o=kn(n),i=an(r,o),i.callback=t??null,In(n,i,o),e.current.lanes=o,Xo(e,o,r),Xe(e,r),e}function Sa(e,t,n,r){var o=t.current,i=ze(),s=kn(o);return n=Cg(n),t.context===null?t.context=n:t.pendingContext=n,t=an(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=In(o,t,s),e!==null&&(It(e,o,s,i),Xs(e,o,s)),s}function _a(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 Ig(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ic(e,t){Ig(e,t),(e=e.alternate)&&Ig(e,t)}function __(){return null}var Ag=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ac(e){this._internalRoot=e}wa.prototype.render=Ac.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));Sa(e,t,null,null)},wa.prototype.unmount=Ac.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fr(function(){Sa(null,e,null,null)}),t[tn]=null}};function wa(e){this._internalRoot=e}wa.prototype.unstable_scheduleHydration=function(e){if(e){var t=pp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wn.length&&t!==0&&t<wn[n].priority;n++);wn.splice(n,0,e),n===0&&mp(e)}};function Lc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ra(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Lg(){}function w_(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=_a(s);i.call(u)}}var s=bg(t,r,e,0,null,!1,!1,"",Lg);return e._reactRootContainer=s,e[tn]=s.current,ci(e.nodeType===8?e.parentNode:e),fr(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var u=_a(l);a.call(u)}}var l=bc(e,0,!1,null,null,!1,!1,"",Lg);return e._reactRootContainer=l,e[tn]=l.current,ci(e.nodeType===8?e.parentNode:e),fr(function(){Sa(t,l,n,r)}),l}function Na(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=_a(s);a.call(l)}}Sa(t,s,e,o)}else s=w_(n,t,e,o,r);return _a(s)}dp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qo(t.pendingLanes);n!==0&&(nu(t,n|1),Xe(t,ye()),!(ne&6)&&(co=ye()+500,Cn()))}break;case 13:fr(function(){var r=sn(e,1);if(r!==null){var o=ze();It(r,e,1,o)}}),Ic(e,1)}},ru=function(e){if(e.tag===13){var t=sn(e,134217728);if(t!==null){var n=ze();It(t,e,134217728,n)}Ic(e,134217728)}},fp=function(e){if(e.tag===13){var t=kn(e),n=sn(e,t);if(n!==null){var r=ze();It(n,e,t,r)}Ic(e,t)}},pp=function(){return re},hp=function(e,t){var n=re;try{return re=e,t()}finally{re=n}},Ql=function(e,t,n){switch(t){case"input":if($l(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 o=$s(r);if(!o)throw Error(H(90));Ff(r),$l(r,o)}}}break;case"textarea":Hf(e,n);break;case"select":t=n.value,t!=null&&$r(e,!!n.multiple,t,!1)}},Zf=Rc,Jf=fr;var R_={usingClientEntryPoint:!1,Events:[pi,qr,$s,Xf,qf,Rc]},Ti={findFiberByHostInstance:or,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},N_={bundleType:Ti.bundleType,version:Ti.version,rendererPackageName:Ti.rendererPackageName,rendererConfig:Ti.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:en.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rp(e),e===null?null:e.stateNode},findFiberByHostInstance:Ti.findFiberByHostInstance||__,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 Oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oa.isDisabled&&Oa.supportsFiber)try{ws=Oa.inject(N_),Ft=Oa}catch{}}rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R_,rt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lc(t))throw Error(H(200));return S_(e,t,null,n)},rt.createRoot=function(e,t){if(!Lc(e))throw Error(H(299));var n=!1,r="",o=Ag;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=bc(e,1,!1,null,null,n,!1,r,o),e[tn]=t.current,ci(e.nodeType===8?e.parentNode:e),new Ac(t)},rt.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(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=rp(t),e=e===null?null:e.stateNode,e},rt.flushSync=function(e){return fr(e)},rt.hydrate=function(e,t,n){if(!Ra(t))throw Error(H(200));return Na(null,e,t,!0,n)},rt.hydrateRoot=function(e,t,n){if(!Lc(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=Ag;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=bg(t,null,e,1,n??null,o,!1,i,s),e[tn]=t.current,ci(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new wa(t)},rt.render=function(e,t,n){if(!Ra(t))throw Error(H(200));return Na(null,e,t,!1,n)},rt.unmountComponentAtNode=function(e){if(!Ra(e))throw Error(H(40));return e._reactRootContainer?(fr(function(){Na(null,null,e,!1,function(){e._reactRootContainer=null,e[tn]=null})}),!0):!1},rt.unstable_batchedUpdates=Rc,rt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ra(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return Na(e,t,n,!1,r)},rt.version="18.2.0-next-9e3b772b8-20220608",function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=rt}(_E);var Dg=Ur;Nl.createRoot=Dg.createRoot,Nl.hydrateRoot=Dg.hydrateRoot;var O_=Object.create,Dc=Object.defineProperty,x_=Object.getOwnPropertyDescriptor,T_=Object.getOwnPropertyNames,C_=Object.getPrototypeOf,b_=Object.prototype.hasOwnProperty,I_=(e,t,n)=>t in e?Dc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),L_=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of T_(t))!b_.call(e,o)&&o!==n&&Dc(e,o,{get:()=>t[o],enumerable:!(r=x_(t,o))||r.enumerable});return e},D_=(e,t,n)=>(n=e!=null?O_(C_(e)):{},L_(t||!e||!e.__esModule?Dc(n,"default",{value:e,enumerable:!0}):n,e)),kg=(e,t,n)=>(I_(e,typeof t!="symbol"?t+"":t,n),n),k_=A_((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define(r):typeof t=="object"&&t.exports?t.exports=r():n.log=r()})(e,function(){var n=function(){},r="undefined",o=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function s(E,p){var g=E[p];if(typeof g.bind=="function")return g.bind(E);try{return Function.prototype.bind.call(g,E)}catch{return function(){return Function.prototype.apply.apply(g,[E,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(E){return E==="debug"&&(E="log"),typeof console===r?!1:E==="trace"&&o?a:console[E]!==void 0?s(console,E):console.log!==void 0?s(console,"log"):n}function u(E,p){for(var g=0;g<i.length;g++){var S=i[g];this[S]=g<E?n:this.methodFactory(S,E,p)}this.log=this.debug}function c(E,p,g){return function(){typeof console!==r&&(u.call(this,p,g),this[E].apply(this,arguments))}}function d(E,p,g){return l(E)||c.apply(this,arguments)}function f(E,p,g){var S=this,_;p=p??"WARN";var w="loglevel";typeof E=="string"?w+=":"+E:typeof E=="symbol"&&(w=void 0);function R(b){var V=(i[b]||"silent").toUpperCase();if(!(typeof window===r||!w)){try{window.localStorage[w]=V;return}catch{}try{window.document.cookie=encodeURIComponent(w)+"="+V+";"}catch{}}}function C(){var b;if(!(typeof window===r||!w)){try{b=window.localStorage[w]}catch{}if(typeof b===r)try{var V=window.document.cookie,$=V.indexOf(encodeURIComponent(w)+"=");$!==-1&&(b=/^([^;]+)/.exec(V.slice($))[1])}catch{}return S.levels[b]===void 0&&(b=void 0),b}}function A(){if(!(typeof window===r||!w)){try{window.localStorage.removeItem(w);return}catch{}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}S.name=E,S.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},S.methodFactory=g||d,S.getLevel=function(){return _},S.setLevel=function(b,V){if(typeof b=="string"&&S.levels[b.toUpperCase()]!==void 0&&(b=S.levels[b.toUpperCase()]),typeof b=="number"&&b>=0&&b<=S.levels.SILENT){if(_=b,V!==!1&&R(b),u.call(S,b,E),typeof console===r&&b<S.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+b},S.setDefaultLevel=function(b){p=b,C()||S.setLevel(b,!1)},S.resetLevel=function(){S.setLevel(p,!1),A()},S.enableAll=function(b){S.setLevel(S.levels.TRACE,b)},S.disableAll=function(b){S.setLevel(S.levels.SILENT,b)};var B=C();B==null&&(B=p),S.setLevel(B,!1)}var h=new f,m={};h.getLogger=function(E){if(typeof E!="symbol"&&typeof E!="string"||E==="")throw new TypeError("You must supply a name when creating a logger.");var p=m[E];return p||(p=m[E]=new f(E,h.getLevel(),h.methodFactory)),p};var v=typeof window!==r?window.log:void 0;return h.noConflict=function(){return typeof window!==r&&window.log===h&&(window.log=v),h},h.getLoggers=function(){return m},h.default=h,h})}),P_=D_(k_(),1),M_=()=>new Date().toISOString(),Ci=P_.default.getLogger("signalwire"),U_=Ci.methodFactory;Ci.methodFactory=(e,t,n)=>{let r=U_(e,t,n);return function(...o){o.unshift(M_(),"-"),r(...o)}};var F_=Ci.getLevel();Ci.setLevel(F_);var qe=()=>Ci,V_=e=>({id:e.id,type:e.type,data:e.data,position:e.position}),B_=e=>({id:e.id,source:e.source,sourceHandle:e.sourceHandle,target:e.target,targetHandle:e.targetHandle}),Pg=e=>{var t;return(t=e==null?void 0:e.trim())==null?void 0:t.toLowerCase()},xa=e=>e.replace(/\s/g,""),$_={answer:({data:{maxDuration:e}})=>e?{answer:{max_duration:e}}:"answer",hangup:({data:{reason:e}})=>e?{hangup:{reason:e}}:"hangup",play:({data:{text:e,url:t,volume:n}})=>{let r=t||`say:${e||"Unknown TTS"}`;return n?{play:{volume:n,url:r}}:{play:{url:r}}},forwardAddress:({data:e})=>kc(e),forwardPhone:({data:e})=>kc(e),forwardResource:({data:e})=>kc(e),promptPlay:({data:e})=>{let t={play:"say:Unknown value"};e.text&&(t.play=`say:${e.text}`),e.url&&(t.play=e.url);let n=e.options.reduce((r,o)=>{let i=Pg(o.command);i&&r.speechHints.push(i);let s=xa(o.digit);return s&&(r.maxDigits=Math.max(r.maxDigits,s.length)),r},{speechHints:[],maxDigits:0});return n.speechHints.length&&(t.speech_hints=n.speechHints,t.speech_language="en-US"),n.maxDigits>1&&(t.max_digits=n.maxDigits),[{prompt:t},{switch:{variable:"prompt_result",case:{failed:[{play:"say:Error while gathering input."},"hangup"],no_input:[],no_match:[]},default:[{switch:{variable:"prompt_value",case:{},default:[]}}]}}]},handleCall:()=>"start",record:({data:e})=>[{record:{beep:e.beep,direction:e.direction,end_silence_timeout:e.endSilenceTimeout,format:e.format,initial_timeout:e.initialTimeout,input_sensitivity:e.inputSensitivity,stereo:e.stereo,terminators:e.terminators}},{if:{condition:"'%{record_result}' == 'success'",then:[],else:[]}}],recordCallStart:({data:e})=>[{record_call:{beep:e.beep,control_id:e.controlId,direction:e.direction,end_silence_timeout:e.endSilenceTimeout,format:e.format,initial_timeout:e.initialTimeout,input_sensitivity:e.inputSensitivity,stereo:e.stereo,terminators:e.terminators}},{if:{condition:"'%{record_result}' == 'success'",then:[],else:[]}}],recordCallStop:({data:e})=>({stop_record_call:e.controlId}),sendSms:({data:e})=>{let{fromNumber:t,toNumber:n,body:r}=e;return{send_sms:{from_number:xa(t),to_number:xa(n),body:r}}},set:({data:{variables:e}})=>{let t={};return e.forEach(({key:n,value:r})=>{t[n]=r}),{set:t}},unset:({data:{variables:e}})=>({unset:e.map(({key:t})=>t)}),request:({data:e})=>[{request:{url:e.url,method:e.method,timeout:e.timeout,connect_timeout:e.connectTimeout,save_variables:e.saveVariables,headers:e.headers&&Object.keys(e.headers).length?e.headers:void 0,body:e.body?e.body:void 0}},{if:{condition:"'%{request_result}' === 'success'",then:[],else:[]}}],cond:()=>({cond:[]}),condRequest:({data:e})=>[{request:{url:e.url,method:e.method,timeout:e.timeout,connect_timeout:e.connectTimeout,save_variables:e.saveVariables,headers:e.headers&&Object.keys(e.headers).length?e.headers:void 0,body:e.body?e.body:void 0}},{switch:{variable:"request_result",case:{success:[]},default:[]}}]},po=e=>{try{return $_[e.__type](e.node)}catch(t){throw qe().error("Unknown Verb",e),t}},kc=({destinations:e,sessionTimeout:t,type:n})=>{let r=t&&t>0?t:void 0,o=e.map(s=>({from:"%{call.from}",to:xa(s),session_timeout:r}));o.length||o.push({from:"%{call.from}",to:"",session_timeout:r});let i={if:{condition:"'%{connect_result}' == 'connected'",then:[],else:[{switch:{variable:"connect_failed_reason",case:{busy:[],noAnswer:[],decline:[],error:[]},default:["hangup"]}}]}};switch(n){case"single":return[{connect:o[0]},i];case"serial":return[{connect:{serial:o}},i];case"parallel":return[{connect:{parallel:o}},i];default:return qe().warn(`The type '${n}' is not supported yet.`),[{connect:o[0]},i]}},z_="1.0.0",H_=e=>{let t=qe(),n=new Set,r=new Map,o=new Set,i=new Map([["main",[]]]),s=new Map,a="",l=_=>i.has(_),u=_=>o.has(_),c=_=>o.add(_);e.nodes.forEach(_=>{r.set(_.id,{node:_,children:[]}),_.type==="handleCall"&&(a=_.id)}),e.edges.forEach(_=>{let w=r.get(_.source),R=r.get(_.target);if(!w||!R)return t.warn("Invalid edge:",_);w.children.push(_.target),_.sourceHandle&&s.set(_.sourceHandle,R),n.has(_.target)&&i.set(_.target,[]),n.add(_.target)});let d=[...i.keys()],f=(_,w)=>{let R=s.get(w.id);if(R){let C=[];i.set(w.id,C),w.digit&&(_[w.digit]=C);let A=Pg(w.command);A&&(_[A]=C);let B=l(R.node.id);if(B){let b={transfer:R.node.id};w.digit&&_[w.digit].push(b),A&&!_[A].includes(b)&&_[A].push(b)}p({sectionName:B?R.node.id:w.id,current:R})}return _},h=(_,w)=>{let R=s.get(w.id);if(R){let C=[];i.set(w.id,C),_[w.result]=C;let A=l(R.node.id);A&&_[w.result].push({transfer:R.node.id}),p({sectionName:A?R.node.id:w.id,current:R})}return _},m={then:(_,w)=>{if(w.result!=="success")return _;let R=s.get(w.id);if(R){let C=[];i.set(w.id,C),_=C;let A=l(R.node.id);A&&_.push({transfer:R.node.id}),p({sectionName:A?R.node.id:w.id,current:R})}return _},else:(_,w)=>{if(w.result==="success")return _;let R=s.get(w.id);if(R){let C=[];i.set(w.id,C),_=C;let A=l(R.node.id);A&&_.push({transfer:R.node.id}),p({sectionName:A?R.node.id:w.id,current:R})}return _}},v={options:(_,w)=>{let R=s.get(w.id),C={when:w.value,then:[]};if(R){let A=[];i.set(w.id,A),C.then=A;let B=l(R.node.id);B&&C.then.push({transfer:R.node.id}),_.push(C),p({sectionName:B?R.node.id:w.id,current:R})}return _},fallback:_=>{let w=s.get(_),R={else:[]};if(w){let C=[];i.set(_,C),R.else=C;let A=l(w.node.id);A&&R.else.push({transfer:w.node.id}),p({sectionName:A?w.node.id:_,current:w})}return R}},E=_=>{let w=s.get(_),R=[];if(w){let C=[];i.set(_,C),R=C;let A=l(w.node.id);A&&R.push({transfer:w.node.id}),p({sectionName:A?w.node.id:_,current:w})}return R},p=({sectionName:_,current:w})=>{var C,A,B;if(u(w.node.id))return;c(w.node.id);let R=i.get(_);if(!R){t.warn("Unknown section name:",_);return}switch(w.node.type){case"promptPlay":{let b=po({__type:w.node.type,node:w.node});if(!Array.isArray(b)){t.warn("Invalid gather node",b);return}(A=(C=w.node.data)==null?void 0:C.results)!=null&&A.length&&(b[1].switch.case={...b[1].switch.case,...w.node.data.results.reduce(h,{})}),b[1].switch.default[0].switch.case=w.node.data.options.reduce(f,{}),(B=b[1].switch.case)!=null&&B.no_match&&(b[1].switch.default[0].switch.default=b[1].switch.case.no_match),R.push(...b);return}case"cond":{let b=po({__type:w.node.type,node:w.node});b.cond=w.node.data.options.reduce(v.options,[]),b.cond.push(v.fallback(w.node.data.fallback)),R.push(b);return}case"condRequest":{let b=po({__type:w.node.type,node:w.node}),V=w.node.data.options.reduce(v.options,[]),$=v.fallback(w.node.data.fallback),F={cond:[...V,$]};b[1].switch.case.success=[F],b[1].switch.default=E(w.node.data.error),R.push(b);return}case"forwardPhone":case"forwardAddress":case"forwardResource":{let b=po({__type:w.node.type,node:w.node});if(!Array.isArray(b)){t.warn("Invalid connect node",b);return}w.node.data.options.length&&(b[1].if.then=w.node.data.options.reduce(m.then,[]),b[1].if.else[0].switch.case=w.node.data.options.reduce(h,{})),R.push(...b);return}case"request":{let b=po({__type:w.node.type,node:w.node});if(!Array.isArray(b)){t.warn("Invalid record node",b);return}b[1].if.then=w.node.data.options.reduce(m.then,[]),b[1].if.else=w.node.data.options.reduce(m.else,[]),R.push(...b);return}default:{let b=po({__type:w.node.type,node:w.node});w.node.type!=="handleCall"&&R.push(b),w.children.forEach(V=>{let $=r.get(V);if(!$)return t.warn("Invalid Child Node",V);let F=l(V);F&&R.push({transfer:V}),p({sectionName:F?V:_,current:$})});break}}},g=r.get(a);g&&p({sectionName:"main",current:g});let S={};return d.forEach(_=>{let w=i.get(_);w&&(S[_]=w)}),t.debug("sections",JSON.stringify(S)),{version:z_,sections:S}},Mg=class extends Error{constructor(t,n){super(n),this.code=t,this.message=n,kg(this,"name","AuthError"),Object.setPrototypeOf(this,Mg.prototype)}},Ug=class extends Error{constructor(e,t,n){super(t),this.code=e,this.message=t,this.response=n,kg(this,"name","HttpError"),Object.setPrototypeOf(this,Ug.prototype)}};async function j_(e,t){let n=await fetch(e,t);if(!n.ok){if(n.status===401)throw new Mg(n.status,"Unauthorized");let r;try{r=await n.json()}catch{}let o=r!=null&&r.errors?JSON.stringify(r.errors):`Error Code: ${n.status}`;throw new Ug(n.status,o,r)}try{n.parsedBody=await n.json()}catch{}return n}var Y_=({timeout:e=3e4,...t},n=j_)=>async(r,o)=>{let i={...o!=null&&o.body?{"Content-Type":"application/json"}:{},...t.headers,...o==null?void 0:o.headers},s=W_({...t,...o,headers:i});s.credentials="same-origin";let a;if(e){let l=new AbortController,u=l.signal;s.signal=u,a=setTimeout(()=>{l.abort()},e)}try{return{body:(await n(K_({url:r,searchParams:o==null?void 0:o.searchParams}),s)).parsedBody}}finally{a&&clearTimeout(a)}},G_=e=>typeof e=="string"?e:JSON.stringify(e),W_=e=>Object.entries(e).reduce((t,[n,r])=>n==="body"?{...t,body:G_(r)}:r!=null?{...t,[n]:r}:t,{}),K_=({url:e,searchParams:t})=>{let n=new URL(e);return t&&Object.entries(t).forEach(([r,o])=>{o!=null&&n.searchParams.append(r,o)}),n.toString()},Q_=e=>{let t=qe(),n=Y_(e);return{getFlow:async()=>{var r;try{let{body:o}=await n(e.getFlowURL);switch(t.info("getFlow",o),(r=o==null?void 0:o.flow_data)==null?void 0:r.builderVersion){default:return o}}catch(o){if(t.error("Could not load flow. URL:",e.getFlowURL),o instanceof Error)throw o;return{}}},putFlow:async r=>{let o={type:"call_flow",document_version:r.documentVersion+1,flow_data:{builderVersion:r.builderVersion,nodes:r.nodes.map(V_),edges:r.edges.map(B_)},relayml:H_({nodes:r.nodes,edges:r.edges})},i=await n(e.updateFlowURL,{method:"PUT",body:o});return t.info("putFlow",i.body),i.body},deployFlow:async r=>{let o={document_version:r.documentVersion},i=await n(e.deployFlowURL,{method:"POST",body:o});return t.info("deployFlow",i),i.body}}};function Ze(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=Ze(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const Fg=e=>{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},o=()=>t,a={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{var l;((l={VITE_BASIC_AUTH:"78429ef1-283b-4fa9-8ebc-16b59f95bb1f:PT2d31b8e287dde883891cb987786603e6675141a30b7db9ad",VITE_DEFAULT_STYLE_HREF:"https://cdn.signalwire.com/npm/@signalwire/cfb@latest/dist/style.css",BASE_URL:"/cfb/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:l.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},Vg=e=>e?Fg(e):Fg;var Pc={},X_={get exports(){return Pc},set exports(e){Pc=e}},Bg={},Mc={},q_={get exports(){return Mc},set exports(e){Mc=e}},$g={};/**
|
|
45
45
|
* @license React
|
|
46
46
|
* use-sync-external-store-shim.production.min.js
|
|
47
47
|
*
|
|
@@ -49,7 +49,7 @@ Error generating stack: `+i.message+`
|
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/var
|
|
52
|
+
*/var ho=N;function Z_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var J_=typeof Object.is=="function"?Object.is:Z_,ew=ho.useState,tw=ho.useEffect,nw=ho.useLayoutEffect,rw=ho.useDebugValue;function ow(e,t){var n=t(),r=ew({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return nw(function(){o.value=n,o.getSnapshot=t,Uc(o)&&i({inst:o})},[e,n,t]),tw(function(){return Uc(o)&&i({inst:o}),e(function(){Uc(o)&&i({inst:o})})},[e]),rw(n),n}function Uc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!J_(e,n)}catch{return!0}}function iw(e,t){return t()}var sw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?iw:ow;$g.useSyncExternalStore=ho.useSyncExternalStore!==void 0?ho.useSyncExternalStore:sw,function(e){e.exports=$g}(q_);/**
|
|
53
53
|
* @license React
|
|
54
54
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
55
55
|
*
|
|
@@ -57,773 +57,13 @@ Error generating stack: `+i.message+`
|
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the MIT license found in the
|
|
59
59
|
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/var fl=b,Px=$f;function Dx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mx=typeof Object.is=="function"?Object.is:Dx,Fx=Px.useSyncExternalStore,Ux=fl.useRef,Vx=fl.useEffect,$x=fl.useMemo,Bx=fl.useDebugValue;hv.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Ux(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=$x(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&a.hasValue){var v=a.value;if(o(v,h))return f=v}return f=h}if(v=f,Mx(c,h))return v;var y=r(h);return o!==void 0&&o(v,y)?v:(c=h,f=y)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var s=Fx(e,i[0],i[1]);return Vx(function(){a.hasValue=!0,a.value=s},[s]),Bx(s),s},function(e){e.exports=hv}(xx);const zx=jp(Vf),{useSyncExternalStoreWithSelector:Hx}=zx;function gv(e,t=e.getState,n){const r=Hx(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return b.useDebugValue(r),r}const vv=e=>{var t;((t={VITE_BASE_URL:"",VITE_BASIC_AUTH:"signalwire:1aG93uXk",VITE_DEFAULT_STYLE_HREF:"https://cdn.jsdelivr.net/npm/@signalwire/cfb@dev/dist/style.css",BASE_URL:"/cfb/",MODE:"staging",DEV:!1,PROD:!0,SSR:!1})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?pv(e):e,r=(o,i)=>gv(n,o,i);return Object.assign(r,n),r},dl=e=>e?vv(e):vv;function nt(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,o]of e)if(!Object.is(o,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 jx={value:()=>{}};function pl(){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 hl(n)}function hl(e){this._=e}function Wx(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}hl.prototype=pl.prototype={constructor:hl,on:function(e,t){var n=this._,r=Wx(e+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i<a;)if((o=(e=r[i]).type)&&(o=Yx(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(o=(e=r[i]).type)n[o]=yv(n[o],e.name,t);else if(t==null)for(o in n)n[o]=yv(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new hl(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[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],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function Yx(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function yv(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=jx,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var zf="http://www.w3.org/1999/xhtml";const Ev={svg:"http://www.w3.org/2000/svg",xhtml:zf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ml(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ev.hasOwnProperty(t)?{space:Ev[t],local:e}:e}function Gx(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===zf&&t.documentElement.namespaceURI===zf?t.createElement(e):t.createElementNS(n,e)}}function Kx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sv(e){var t=ml(e);return(t.local?Kx:Gx)(t)}function Xx(){}function Hf(e){return e==null?Xx:function(){return this.querySelector(e)}}function Qx(e){typeof e!="function"&&(e=Hf(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],a=i.length,s=r[o]=new Array(a),l,u,c=0;c<a;++c)(l=i[c])&&(u=e.call(l,l.__data__,c,i))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new dt(r,this._parents)}function qx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Zx(){return[]}function wv(e){return e==null?Zx:function(){return this.querySelectorAll(e)}}function Jx(e){return function(){return qx(e.apply(this,arguments))}}function eR(e){typeof e=="function"?e=Jx(e):e=wv(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a=t[i],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),o.push(l));return new dt(r,o)}function _v(e){return function(){return this.matches(e)}}function xv(e){return function(t){return t.matches(e)}}var tR=Array.prototype.find;function nR(e){return function(){return tR.call(this.children,e)}}function rR(){return this.firstElementChild}function oR(e){return this.select(e==null?rR:nR(typeof e=="function"?e:xv(e)))}var iR=Array.prototype.filter;function aR(){return Array.from(this.children)}function sR(e){return function(){return iR.call(this.children,e)}}function lR(e){return this.selectAll(e==null?aR:sR(typeof e=="function"?e:xv(e)))}function uR(e){typeof e!="function"&&(e=_v(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],a=i.length,s=r[o]=[],l,u=0;u<a;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&s.push(l);return new dt(r,this._parents)}function Rv(e){return new Array(e.length)}function cR(){return new dt(this._enter||this._groups.map(Rv),this._parents)}function gl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}gl.prototype={constructor:gl,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 fR(e){return function(){return e}}function dR(e,t,n,r,o,i){for(var a=0,s,l=t.length,u=i.length;a<u;++a)(s=t[a])?(s.__data__=i[a],r[a]=s):n[a]=new gl(e,i[a]);for(;a<l;++a)(s=t[a])&&(o[a]=s)}function pR(e,t,n,r,o,i,a){var s,l,u=new Map,c=t.length,f=i.length,d=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(d[s]=h=a.call(l,l.__data__,s,t)+"",u.has(h)?o[s]=l:u.set(h,l));for(s=0;s<f;++s)h=a.call(e,i[s],s,i)+"",(l=u.get(h))?(r[s]=l,l.__data__=i[s],u.delete(h)):n[s]=new gl(e,i[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(d[s])===l&&(o[s]=l)}function hR(e){return e.__data__}function mR(e,t){if(!arguments.length)return Array.from(this,hR);var n=t?pR:dR,r=this._parents,o=this._groups;typeof e!="function"&&(e=fR(e));for(var i=o.length,a=new Array(i),s=new Array(i),l=new Array(i),u=0;u<i;++u){var c=r[u],f=o[u],d=f.length,h=gR(e.call(c,c&&c.__data__,u,r)),v=h.length,y=s[u]=new Array(v),E=a[u]=new Array(v),p=l[u]=new Array(d);n(c,f,y,E,p,h,t);for(var m=0,g=0,S,_;m<v;++m)if(S=y[m]){for(m>=g&&(g=m+1);!(_=E[g])&&++g<v;);S._next=_||null}}return a=new dt(a,r),a._enter=s,a._exit=l,a}function gR(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vR(){return new dt(this._exit||this._groups.map(Rv),this._parents)}function yR(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function ER(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),s=new Array(o),l=0;l<a;++l)for(var u=n[l],c=r[l],f=u.length,d=s[l]=new Array(f),h,v=0;v<f;++v)(h=u[v]||c[v])&&(d[v]=h);for(;l<o;++l)s[l]=n[l];return new dt(s,this._parents)}function SR(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],a;--o>=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function wR(e){e||(e=_R);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a=n[i],s=a.length,l=o[i]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new dt(o,this._parents).order()}function _R(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function xR(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function RR(){return Array.from(this)}function bR(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null}function NR(){let e=0;for(const t of this)++e;return e}function OR(){return!this.node()}function TR(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,a=o.length,s;i<a;++i)(s=o[i])&&e.call(s,s.__data__,i,o);return this}function AR(e){return function(){this.removeAttribute(e)}}function kR(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CR(e,t){return function(){this.setAttribute(e,t)}}function IR(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function LR(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function PR(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 DR(e,t){var n=ml(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?kR:AR:typeof t=="function"?n.local?PR:LR:n.local?IR:CR)(n,t))}function bv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function MR(e){return function(){this.style.removeProperty(e)}}function FR(e,t,n){return function(){this.style.setProperty(e,t,n)}}function UR(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function VR(e,t,n){return arguments.length>1?this.each((t==null?MR:typeof t=="function"?UR:FR)(e,t,n??"")):Ao(this.node(),e)}function Ao(e,t){return e.style.getPropertyValue(t)||bv(e).getComputedStyle(e,null).getPropertyValue(t)}function $R(e){return function(){delete this[e]}}function BR(e,t){return function(){this[e]=t}}function zR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function HR(e,t){return arguments.length>1?this.each((t==null?$R:typeof t=="function"?zR:BR)(e,t)):this.node()[e]}function Nv(e){return e.trim().split(/^|\s+/)}function jf(e){return e.classList||new Ov(e)}function Ov(e){this._node=e,this._names=Nv(e.getAttribute("class")||"")}Ov.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 Tv(e,t){for(var n=jf(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Av(e,t){for(var n=jf(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function jR(e){return function(){Tv(this,e)}}function WR(e){return function(){Av(this,e)}}function YR(e,t){return function(){(t.apply(this,arguments)?Tv:Av)(this,e)}}function GR(e,t){var n=Nv(e+"");if(arguments.length<2){for(var r=jf(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?YR:t?jR:WR)(n,t))}function KR(){this.textContent=""}function XR(e){return function(){this.textContent=e}}function QR(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function qR(e){return arguments.length?this.each(e==null?KR:(typeof e=="function"?QR:XR)(e)):this.node().textContent}function ZR(){this.innerHTML=""}function JR(e){return function(){this.innerHTML=e}}function eb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function tb(e){return arguments.length?this.each(e==null?ZR:(typeof e=="function"?eb:JR)(e)):this.node().innerHTML}function nb(){this.nextSibling&&this.parentNode.appendChild(this)}function rb(){return this.each(nb)}function ob(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ib(){return this.each(ob)}function ab(e){var t=typeof e=="function"?e:Sv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function sb(){return null}function lb(e,t){var n=typeof e=="function"?e:Sv(e),r=t==null?sb:typeof t=="function"?t:Hf(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ub(){var e=this.parentNode;e&&e.removeChild(this)}function cb(){return this.each(ub)}function fb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function db(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function pb(e){return this.select(e?db:fb)}function hb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mb(e){return function(t){e.call(this,t,this.__data__)}}function gb(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 vb(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function yb(e,t,n){return function(){var r=this.__on,o,i=mb(t);if(r){for(var a=0,s=r.length;a<s;++a)if((o=r[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Eb(e,t,n){var r=gb(e+""),o,i=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(o=0,c=s[l];o<i;++o)if((a=r[o]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?yb:vb,o=0;o<i;++o)this.each(s(r[o],t,n));return this}function kv(e,t,n){var r=bv(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Sb(e,t){return function(){return kv(this,e,t)}}function wb(e,t){return function(){return kv(this,e,t.apply(this,arguments))}}function _b(e,t){return this.each((typeof t=="function"?wb:Sb)(e,t))}function*xb(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,a;o<i;++o)(a=r[o])&&(yield a)}var Cv=[null];function dt(e,t){this._groups=e,this._parents=t}function Ji(){return new dt([[document.documentElement]],Cv)}function Rb(){return this}dt.prototype=Ji.prototype={constructor:dt,select:Qx,selectAll:eR,selectChild:oR,selectChildren:lR,filter:uR,data:mR,enter:cR,exit:vR,join:yR,merge:ER,selection:Rb,order:SR,sort:wR,call:xR,nodes:RR,node:bR,size:NR,empty:OR,each:TR,attr:DR,style:VR,property:HR,classed:GR,text:qR,html:tb,raise:rb,lower:ib,append:ab,insert:lb,remove:cb,clone:pb,datum:hb,on:Eb,dispatch:_b,[Symbol.iterator]:xb};function Pt(e){return typeof e=="string"?new dt([[document.querySelector(e)]],[document.documentElement]):new dt([[e]],Cv)}function bb(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Kt(e,t){if(e=bb(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 o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Nb={passive:!1},ea={capture:!0,passive:!1};function Wf(e){e.stopImmediatePropagation()}function ko(e){e.preventDefault(),e.stopImmediatePropagation()}function Iv(e){var t=e.document.documentElement,n=Pt(e).on("dragstart.drag",ko,ea);"onselectstart"in t?n.on("selectstart.drag",ko,ea):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Lv(e,t){var n=e.document.documentElement,r=Pt(e).on("dragstart.drag",null);t&&(r.on("click.drag",ko,ea),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 vl=e=>()=>e;function Yf(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:s,dx:l,dy:u,dispatch:c}){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:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Yf.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ob(e){return!e.ctrlKey&&!e.button}function Tb(){return this.parentNode}function Ab(e,t){return t??{x:e.x,y:e.y}}function kb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cb(){var e=Ob,t=Tb,n=Ab,r=kb,o={},i=pl("start","drag","end"),a=0,s,l,u,c,f=0;function d(S){S.on("mousedown.drag",h).filter(r).on("touchstart.drag",E).on("touchmove.drag",p,Nb).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(S,_){if(!(c||!e.call(this,S,_))){var x=g(this,t.call(this,S,_),S,_,"mouse");x&&(Pt(S.view).on("mousemove.drag",v,ea).on("mouseup.drag",y,ea),Iv(S.view),Wf(S),u=!1,s=S.clientX,l=S.clientY,x("start",S))}}function v(S){if(ko(S),!u){var _=S.clientX-s,x=S.clientY-l;u=_*_+x*x>f}o.mouse("drag",S)}function y(S){Pt(S.view).on("mousemove.drag mouseup.drag",null),Lv(S.view,u),ko(S),o.mouse("end",S)}function E(S,_){if(e.call(this,S,_)){var x=S.changedTouches,N=t.call(this,S,_),I=x.length,D,T;for(D=0;D<I;++D)(T=g(this,N,S,_,x[D].identifier,x[D]))&&(Wf(S),T("start",S,x[D]))}}function p(S){var _=S.changedTouches,x=_.length,N,I;for(N=0;N<x;++N)(I=o[_[N].identifier])&&(ko(S),I("drag",S,_[N]))}function m(S){var _=S.changedTouches,x=_.length,N,I;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),N=0;N<x;++N)(I=o[_[N].identifier])&&(Wf(S),I("end",S,_[N]))}function g(S,_,x,N,I,D){var T=i.copy(),$=Kt(D||x,_),F,z,R;if((R=n.call(S,new Yf("beforestart",{sourceEvent:x,target:d,identifier:I,active:a,x:$[0],y:$[1],dx:0,dy:0,dispatch:T}),N))!=null)return F=R.x-$[0]||0,z=R.y-$[1]||0,function P(k,A,O){var L=$,M;switch(k){case"start":o[I]=P,M=a++;break;case"end":delete o[I],--a;case"drag":$=Kt(O||A,_),M=a;break}T.call(k,S,new Yf(k,{sourceEvent:A,subject:R,target:d,identifier:I,active:M,x:$[0]+F,y:$[1]+z,dx:$[0]-L[0],dy:$[1]-L[1],dispatch:T}),N)}}return d.filter=function(S){return arguments.length?(e=typeof S=="function"?S:vl(!!S),d):e},d.container=function(S){return arguments.length?(t=typeof S=="function"?S:vl(S),d):t},d.subject=function(S){return arguments.length?(n=typeof S=="function"?S:vl(S),d):n},d.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:vl(!!S),d):r},d.on=function(){var S=i.on.apply(i,arguments);return S===i?d:S},d.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,d):Math.sqrt(f)},d}function Gf(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ta(){}var na=.7,yl=1/na,Co="\\s*([+-]?\\d+)\\s*",ra="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ib=/^#([0-9a-f]{3,8})$/,Lb=new RegExp(`^rgb\\(${Co},${Co},${Co}\\)$`),Pb=new RegExp(`^rgb\\(${Xt},${Xt},${Xt}\\)$`),Db=new RegExp(`^rgba\\(${Co},${Co},${Co},${ra}\\)$`),Mb=new RegExp(`^rgba\\(${Xt},${Xt},${Xt},${ra}\\)$`),Fb=new RegExp(`^hsl\\(${ra},${Xt},${Xt}\\)$`),Ub=new RegExp(`^hsla\\(${ra},${Xt},${Xt},${ra}\\)$`),Dv={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};Gf(ta,oa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Mv,formatHex:Mv,formatHex8:Vb,formatHsl:$b,formatRgb:Fv,toString:Fv});function Mv(){return this.rgb().formatHex()}function Vb(){return this.rgb().formatHex8()}function $b(){return zv(this).formatHsl()}function Fv(){return this.rgb().formatRgb()}function oa(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ib.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Uv(t):n===3?new rt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?El(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?El(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=Lb.exec(e))?new rt(t[1],t[2],t[3],1):(t=Pb.exec(e))?new rt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Db.exec(e))?El(t[1],t[2],t[3],t[4]):(t=Mb.exec(e))?El(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Fb.exec(e))?Bv(t[1],t[2]/100,t[3]/100,1):(t=Ub.exec(e))?Bv(t[1],t[2]/100,t[3]/100,t[4]):Dv.hasOwnProperty(e)?Uv(Dv[e]):e==="transparent"?new rt(NaN,NaN,NaN,0):null}function Uv(e){return new rt(e>>16&255,e>>8&255,e&255,1)}function El(e,t,n,r){return r<=0&&(e=t=n=NaN),new rt(e,t,n,r)}function Bb(e){return e instanceof ta||(e=oa(e)),e?(e=e.rgb(),new rt(e.r,e.g,e.b,e.opacity)):new rt}function Kf(e,t,n,r){return arguments.length===1?Bb(e):new rt(e,t,n,r??1)}function rt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Gf(rt,Kf,Pv(ta,{brighter(e){return e=e==null?yl:Math.pow(yl,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rt(Cr(this.r),Cr(this.g),Cr(this.b),Sl(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:Vv,formatHex:Vv,formatHex8:zb,formatRgb:$v,toString:$v}));function Vv(){return`#${Ir(this.r)}${Ir(this.g)}${Ir(this.b)}`}function zb(){return`#${Ir(this.r)}${Ir(this.g)}${Ir(this.b)}${Ir((isNaN(this.opacity)?1:this.opacity)*255)}`}function $v(){const e=Sl(this.opacity);return`${e===1?"rgb(":"rgba("}${Cr(this.r)}, ${Cr(this.g)}, ${Cr(this.b)}${e===1?")":`, ${e})`}`}function Sl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Cr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ir(e){return e=Cr(e),(e<16?"0":"")+e.toString(16)}function Bv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dt(e,t,n,r)}function zv(e){if(e instanceof Dt)return new Dt(e.h,e.s,e.l,e.opacity);if(e instanceof ta||(e=oa(e)),!e)return new Dt;if(e instanceof Dt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n<r)*6:n===i?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Dt(a,s,l,e.opacity)}function Hb(e,t,n,r){return arguments.length===1?zv(e):new Dt(e,t,n,r??1)}function Dt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Gf(Dt,Hb,Pv(ta,{brighter(e){return e=e==null?yl:Math.pow(yl,e),new Dt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new Dt(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,o=2*n-r;return new rt(Xf(e>=240?e-240:e+120,o,r),Xf(e,o,r),Xf(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Dt(Hv(this.h),wl(this.s),wl(this.l),Sl(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=Sl(this.opacity);return`${e===1?"hsl(":"hsla("}${Hv(this.h)}, ${wl(this.s)*100}%, ${wl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Hv(e){return e=(e||0)%360,e<0?e+360:e}function wl(e){return Math.max(0,Math.min(1,e||0))}function Xf(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 jv=e=>()=>e;function jb(e,t){return function(n){return e+n*t}}function Wb(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 Yb(e){return(e=+e)==1?Wv:function(t,n){return n-t?Wb(t,n,e):jv(isNaN(t)?n:t)}}function Wv(e,t){var n=t-e;return n?jb(e,n):jv(isNaN(e)?t:e)}const Yv=function e(t){var n=Yb(t);function r(o,i){var a=n((o=Kf(o)).r,(i=Kf(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),u=Wv(o.opacity,i.opacity);return function(c){return o.r=a(c),o.g=s(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r}(1);function Zn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Qf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qf=new RegExp(Qf.source,"g");function Gb(e){return function(){return e}}function Kb(e){return function(t){return e(t)+""}}function Xb(e,t){var n=Qf.lastIndex=qf.lastIndex=0,r,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Qf.exec(e))&&(o=qf.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Zn(r,o)})),n=qf.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?Kb(l[0].x):Gb(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}var Gv=180/Math.PI,Zf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kv(e,t,n,r,o,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Gv,skewX:Math.atan(l)*Gv,scaleX:a,scaleY:s}}var _l;function Qb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Zf:Kv(t.a,t.b,t.c,t.d,t.e,t.f)}function qb(e){return e==null||(_l||(_l=document.createElementNS("http://www.w3.org/2000/svg","g")),_l.setAttribute("transform",e),!(e=_l.transform.baseVal.consolidate()))?Zf:(e=e.matrix,Kv(e.a,e.b,e.c,e.d,e.e,e.f))}function Xv(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,f,d,h,v){if(u!==f||c!==d){var y=h.push("translate(",null,t,null,n);v.push({i:y-4,x:Zn(u,f)},{i:y-2,x:Zn(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function a(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:Zn(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function s(u,c,f,d){u!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:Zn(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function l(u,c,f,d,h,v){if(u!==f||c!==d){var y=h.push(o(h)+"scale(",null,",",null,")");v.push({i:y-4,x:Zn(u,f)},{i:y-2,x:Zn(c,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,d),a(u.rotate,c.rotate,f,d),s(u.skewX,c.skewX,f,d),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var v=-1,y=d.length,E;++v<y;)f[(E=d[v]).i]=E.x(h);return f.join("")}}}var Zb=Xv(Qb,"px, ","px)","deg)"),Jb=Xv(qb,", ",")",")"),eN=1e-12;function Qv(e){return((e=Math.exp(e))+1/e)/2}function tN(e){return((e=Math.exp(e))-1/e)/2}function nN(e){return((e=Math.exp(2*e))-1)/(e+1)}const rN=function e(t,n,r){function o(i,a){var s=i[0],l=i[1],u=i[2],c=a[0],f=a[1],d=a[2],h=c-s,v=f-l,y=h*h+v*v,E,p;if(y<eN)p=Math.log(d/u)/t,E=function(N){return[s+N*h,l+N*v,u*Math.exp(t*N*p)]};else{var m=Math.sqrt(y),g=(d*d-u*u+r*y)/(2*u*n*m),S=(d*d-u*u-r*y)/(2*d*n*m),_=Math.log(Math.sqrt(g*g+1)-g),x=Math.log(Math.sqrt(S*S+1)-S);p=(x-_)/t,E=function(N){var I=N*p,D=Qv(_),T=u/(n*m)*(D*nN(t*I+_)-tN(_));return[s+T*h,l+T*v,u*D/Qv(t*I+_)]}}return E.duration=p*1e3*t/Math.SQRT2,E}return o.rho=function(i){var a=Math.max(.001,+i),s=a*a,l=s*s;return e(a,s,l)},o}(Math.SQRT2,2,4);var Io=0,ia=0,aa=0,qv=1e3,xl,sa,Rl=0,Lr=0,bl=0,la=typeof performance=="object"&&performance.now?performance:Date,Zv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Jf(){return Lr||(Zv(oN),Lr=la.now()+bl)}function oN(){Lr=0}function Nl(){this._call=this._time=this._next=null}Nl.prototype=Jv.prototype={constructor:Nl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Jf():+n)+(t==null?0:+t),!this._next&&sa!==this&&(sa?sa._next=this:xl=this,sa=this),this._call=e,this._time=n,ed()},stop:function(){this._call&&(this._call=null,this._time=1/0,ed())}};function Jv(e,t,n){var r=new Nl;return r.restart(e,t,n),r}function iN(){Jf(),++Io;for(var e=xl,t;e;)(t=Lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Io}function ey(){Lr=(Rl=la.now())+bl,Io=ia=0;try{iN()}finally{Io=0,sN(),Lr=0}}function aN(){var e=la.now(),t=e-Rl;t>qv&&(bl-=t,Rl=e)}function sN(){for(var e,t=xl,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:xl=n);sa=e,ed(r)}function ed(e){if(!Io){ia&&(ia=clearTimeout(ia));var t=e-Lr;t>24?(e<1/0&&(ia=setTimeout(ey,e-la.now()-bl)),aa&&(aa=clearInterval(aa))):(aa||(Rl=la.now(),aa=setInterval(aN,qv)),Io=1,Zv(ey))}}function ty(e,t,n){var r=new Nl;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var lN=pl("start","end","cancel","interrupt"),uN=[],ny=0,ry=1,td=2,Ol=3,oy=4,nd=5,Tl=6;function Al(e,t,n,r,o,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;cN(e,n,{name:t,index:r,group:o,on:lN,tween:uN,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ny})}function rd(e,t){var n=Mt(e,t);if(n.state>ny)throw new Error("too late; already scheduled");return n}function Qt(e,t){var n=Mt(e,t);if(n.state>Ol)throw new Error("too late; already running");return n}function Mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cN(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Jv(i,0,n.time);function i(u){n.state=ry,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,d,h;if(n.state!==ry)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Ol)return ty(a);h.state===oy?(h.state=Tl,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=Tl,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(ty(function(){n.state===Ol&&(n.state=oy,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=td,n.on.call("start",e,e.__data__,n.index,n.group),n.state===td){for(n.state=Ol,o=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=h);o.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=nd,1),f=-1,d=o.length;++f<d;)o[f].call(e,c);n.state===nd&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Tl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function kl(e,t){var n=e.__transition,r,o,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){i=!1;continue}o=r.state>td&&r.state<nd,r.state=Tl,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}i&&delete e.__transition}}function fN(e){return this.each(function(){kl(this,e)})}function dN(e,t){var n,r;return function(){var o=Qt(this,e),i=o.tween;if(i!==n){r=n=i;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}o.tween=r}}function pN(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Qt(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var s={name:t,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===t){o[l]=s;break}l===u&&o.push(s)}i.tween=o}}function hN(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Mt(this.node(),n).tween,o=0,i=r.length,a;o<i;++o)if((a=r[o]).name===e)return a.value;return null}return this.each((t==null?dN:pN)(n,e,t))}function od(e,t,n){var r=e._id;return e.each(function(){var o=Qt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Mt(o,r).value[t]}}function iy(e,t){var n;return(typeof t=="number"?Zn:t instanceof oa?Yv:(n=oa(t))?(t=n,Yv):Xb)(e,t)}function mN(e){return function(){this.removeAttribute(e)}}function gN(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vN(e,t,n){var r,o=n+"",i;return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function yN(e,t,n){var r,o=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function EN(e,t,n){var r,o,i;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,s)))}}function SN(e,t,n){var r,o,i;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,s)))}}function wN(e,t){var n=ml(e),r=n==="transform"?Jb:iy;return this.attrTween(e,typeof t=="function"?(n.local?SN:EN)(n,r,od(this,"attr."+e,t)):t==null?(n.local?gN:mN)(n):(n.local?yN:vN)(n,r,t))}function _N(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function xN(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function RN(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&xN(e,i)),n}return o._value=t,o}function bN(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&_N(e,i)),n}return o._value=t,o}function NN(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=ml(e);return this.tween(n,(r.local?RN:bN)(r,t))}function ON(e,t){return function(){rd(this,e).delay=+t.apply(this,arguments)}}function TN(e,t){return t=+t,function(){rd(this,e).delay=t}}function AN(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ON:TN)(t,e)):Mt(this.node(),t).delay}function kN(e,t){return function(){Qt(this,e).duration=+t.apply(this,arguments)}}function CN(e,t){return t=+t,function(){Qt(this,e).duration=t}}function IN(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?kN:CN)(t,e)):Mt(this.node(),t).duration}function LN(e,t){if(typeof t!="function")throw new Error;return function(){Qt(this,e).ease=t}}function PN(e){var t=this._id;return arguments.length?this.each(LN(t,e)):Mt(this.node(),t).ease}function DN(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Qt(this,e).ease=n}}function MN(e){if(typeof e!="function")throw new Error;return this.each(DN(this._id,e))}function FN(e){typeof e!="function"&&(e=_v(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],a=i.length,s=r[o]=[],l,u=0;u<a;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&s.push(l);return new vn(r,this._parents,this._name,this._id)}function UN(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l=t[s],u=n[s],c=l.length,f=a[s]=new Array(c),d,h=0;h<c;++h)(d=l[h]||u[h])&&(f[h]=d);for(;s<r;++s)a[s]=t[s];return new vn(a,this._parents,this._name,this._id)}function VN(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 $N(e,t,n){var r,o,i=VN(t)?rd:Qt;return function(){var a=i(this,e),s=a.on;s!==r&&(o=(r=s).copy()).on(t,n),a.on=o}}function BN(e,t){var n=this._id;return arguments.length<2?Mt(this.node(),n).on.on(e):this.each($N(n,e,t))}function zN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function HN(){return this.on("end.remove",zN(this._id))}function jN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Hf(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var s=r[a],l=s.length,u=i[a]=new Array(l),c,f,d=0;d<l;++d)(c=s[d])&&(f=e.call(c,c.__data__,d,s))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Al(u[d],t,n,d,u,Mt(c,n)));return new vn(i,this._parents,t,n)}function WN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wv(e));for(var r=this._groups,o=r.length,i=[],a=[],s=0;s<o;++s)for(var l=r[s],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var d=e.call(c,c.__data__,f,l),h,v=Mt(c,n),y=0,E=d.length;y<E;++y)(h=d[y])&&Al(h,t,n,y,d,v);i.push(d),a.push(c)}return new vn(i,a,t,n)}var YN=Ji.prototype.constructor;function GN(){return new YN(this._groups,this._parents)}function KN(e,t){var n,r,o;return function(){var i=Ao(this,e),a=(this.style.removeProperty(e),Ao(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}function ay(e){return function(){this.style.removeProperty(e)}}function XN(e,t,n){var r,o=n+"",i;return function(){var a=Ao(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}function QN(e,t,n){var r,o,i;return function(){var a=Ao(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Ao(this,e))),a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,s))}}function qN(e,t){var n,r,o,i="style."+t,a="end."+i,s;return function(){var l=Qt(this,e),u=l.on,c=l.value[i]==null?s||(s=ay(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(a,o=c),l.on=r}}function ZN(e,t,n){var r=(e+="")=="transform"?Zb:iy;return t==null?this.styleTween(e,KN(e,r)).on("end.style."+e,ay(e)):typeof t=="function"?this.styleTween(e,QN(e,r,od(this,"style."+e,t))).each(qN(this._id,e)):this.styleTween(e,XN(e,r,t),n).on("end.style."+e,null)}function JN(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function eO(e,t,n){var r,o;function i(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&JN(e,a,n)),r}return i._value=t,i}function tO(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,eO(e,t,n??""))}function nO(e){return function(){this.textContent=e}}function rO(e){return function(){var t=e(this);this.textContent=t??""}}function oO(e){return this.tween("text",typeof e=="function"?rO(od(this,"text",e)):nO(e==null?"":e+""))}function iO(e){return function(t){this.textContent=e.call(this,t)}}function aO(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&iO(o)),t}return r._value=e,r}function sO(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,aO(e))}function lO(){for(var e=this._name,t=this._id,n=sy(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Mt(l,t);Al(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new vn(r,this._parents,e,n)}function uO(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,a){var s={value:a},l={value:function(){--o===0&&i()}};n.each(function(){var u=Qt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),o===0&&i()})}var cO=0;function vn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function sy(){return++cO}var yn=Ji.prototype;vn.prototype={constructor:vn,select:jN,selectAll:WN,selectChild:yn.selectChild,selectChildren:yn.selectChildren,filter:FN,merge:UN,selection:GN,transition:lO,call:yn.call,nodes:yn.nodes,node:yn.node,size:yn.size,empty:yn.empty,each:yn.each,on:BN,attr:wN,attrTween:NN,style:ZN,styleTween:tO,text:oO,textTween:sO,remove:HN,tween:hN,delay:AN,duration:IN,ease:PN,easeVarying:MN,end:uO,[Symbol.iterator]:yn[Symbol.iterator]};function fO(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var dO={time:null,delay:0,duration:250,ease:fO};function pO(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 hO(e){var t,n;e instanceof vn?(t=e._id,e=e._name):(t=sy(),(n=dO).time=Jf(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Al(l,e,t,u,a,n||pO(l,t));return new vn(r,this._parents,e,t)}Ji.prototype.interrupt=fN,Ji.prototype.transition=hO;const Cl=e=>()=>e;function mO(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:o}})}function En(e,t,n){this.k=e,this.x=t,this.y=n}En.prototype={constructor:En,scale:function(e){return e===1?this:new En(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new En(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 Jn=new En(1,0,0);En.prototype;function id(e){e.stopImmediatePropagation()}function ua(e){e.preventDefault(),e.stopImmediatePropagation()}function gO(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function vO(){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 ly(){return this.__zoom||Jn}function yO(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function EO(){return navigator.maxTouchPoints||"ontouchstart"in this}function SO(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function wO(){var e=gO,t=vO,n=SO,r=yO,o=EO,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=rN,u=pl("start","zoom","end"),c,f,d,h=500,v=150,y=0,E=10;function p(R){R.property("__zoom",ly).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",T).filter(o).on("touchstart.zoom",$).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(R,P,k,A){var O=R.selection?R.selection():R;O.property("__zoom",ly),R!==O?_(R,P,k,A):O.interrupt().each(function(){x(this,arguments).event(A).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},p.scaleBy=function(R,P,k,A){p.scaleTo(R,function(){var O=this.__zoom.k,L=typeof P=="function"?P.apply(this,arguments):P;return O*L},k,A)},p.scaleTo=function(R,P,k,A){p.transform(R,function(){var O=t.apply(this,arguments),L=this.__zoom,M=k==null?S(O):typeof k=="function"?k.apply(this,arguments):k,B=L.invert(M),j=typeof P=="function"?P.apply(this,arguments):P;return n(g(m(L,j),M,B),O,a)},k,A)},p.translateBy=function(R,P,k,A){p.transform(R,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),a)},null,A)},p.translateTo=function(R,P,k,A,O){p.transform(R,function(){var L=t.apply(this,arguments),M=this.__zoom,B=A==null?S(L):typeof A=="function"?A.apply(this,arguments):A;return n(Jn.translate(B[0],B[1]).scale(M.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof k=="function"?-k.apply(this,arguments):-k),L,a)},A,O)};function m(R,P){return P=Math.max(i[0],Math.min(i[1],P)),P===R.k?R:new En(P,R.x,R.y)}function g(R,P,k){var A=P[0]-k[0]*R.k,O=P[1]-k[1]*R.k;return A===R.x&&O===R.y?R:new En(R.k,A,O)}function S(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function _(R,P,k,A){R.on("start.zoom",function(){x(this,arguments).event(A).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(A).end()}).tween("zoom",function(){var O=this,L=arguments,M=x(O,L).event(A),B=t.apply(O,L),j=k==null?S(B):typeof k=="function"?k.apply(O,L):k,q=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),Q=O.__zoom,J=typeof P=="function"?P.apply(O,L):P,ee=l(Q.invert(j).concat(q/Q.k),J.invert(j).concat(q/J.k));return function(ne){if(ne===1)ne=J;else{var ie=ee(ne),Se=q/ie[2];ne=new En(Se,j[0]-ie[0]*Se,j[1]-ie[1]*Se)}M.zoom(null,ne)}})}function x(R,P,k){return!k&&R.__zooming||new N(R,P)}function N(R,P){this.that=R,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,P),this.taps=0}N.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,P){return this.mouse&&R!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var P=Pt(this.that).datum();u.call(R,this.that,new mO(R,{sourceEvent:this.sourceEvent,target:p,type:R,transform:this.that.__zoom,dispatch:u}),P)}};function I(R,...P){if(!e.apply(this,arguments))return;var k=x(this,P).event(R),A=this.__zoom,O=Math.max(i[0],Math.min(i[1],A.k*Math.pow(2,r.apply(this,arguments)))),L=Kt(R);if(k.wheel)(k.mouse[0][0]!==L[0]||k.mouse[0][1]!==L[1])&&(k.mouse[1]=A.invert(k.mouse[0]=L)),clearTimeout(k.wheel);else{if(A.k===O)return;k.mouse=[L,A.invert(L)],kl(this),k.start()}ua(R),k.wheel=setTimeout(M,v),k.zoom("mouse",n(g(m(A,O),k.mouse[0],k.mouse[1]),k.extent,a));function M(){k.wheel=null,k.end()}}function D(R,...P){if(d||!e.apply(this,arguments))return;var k=R.currentTarget,A=x(this,P,!0).event(R),O=Pt(R.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",q,!0),L=Kt(R,k),M=R.clientX,B=R.clientY;Iv(R.view),id(R),A.mouse=[L,this.__zoom.invert(L)],kl(this),A.start();function j(Q){if(ua(Q),!A.moved){var J=Q.clientX-M,ee=Q.clientY-B;A.moved=J*J+ee*ee>y}A.event(Q).zoom("mouse",n(g(A.that.__zoom,A.mouse[0]=Kt(Q,k),A.mouse[1]),A.extent,a))}function q(Q){O.on("mousemove.zoom mouseup.zoom",null),Lv(Q.view,A.moved),ua(Q),A.event(Q).end()}}function T(R,...P){if(e.apply(this,arguments)){var k=this.__zoom,A=Kt(R.changedTouches?R.changedTouches[0]:R,this),O=k.invert(A),L=k.k*(R.shiftKey?.5:2),M=n(g(m(k,L),A,O),t.apply(this,P),a);ua(R),s>0?Pt(this).transition().duration(s).call(_,M,A,R):Pt(this).call(p.transform,M,A,R)}}function $(R,...P){if(e.apply(this,arguments)){var k=R.touches,A=k.length,O=x(this,P,R.changedTouches.length===A).event(R),L,M,B,j;for(id(R),M=0;M<A;++M)B=k[M],j=Kt(B,this),j=[j,this.__zoom.invert(j),B.identifier],O.touch0?!O.touch1&&O.touch0[2]!==j[2]&&(O.touch1=j,O.taps=0):(O.touch0=j,L=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(O.taps<2&&(f=j[0],c=setTimeout(function(){c=null},h)),kl(this),O.start())}}function F(R,...P){if(this.__zooming){var k=x(this,P).event(R),A=R.changedTouches,O=A.length,L,M,B,j;for(ua(R),L=0;L<O;++L)M=A[L],B=Kt(M,this),k.touch0&&k.touch0[2]===M.identifier?k.touch0[0]=B:k.touch1&&k.touch1[2]===M.identifier&&(k.touch1[0]=B);if(M=k.that.__zoom,k.touch1){var q=k.touch0[0],Q=k.touch0[1],J=k.touch1[0],ee=k.touch1[1],ne=(ne=J[0]-q[0])*ne+(ne=J[1]-q[1])*ne,ie=(ie=ee[0]-Q[0])*ie+(ie=ee[1]-Q[1])*ie;M=m(M,Math.sqrt(ne/ie)),B=[(q[0]+J[0])/2,(q[1]+J[1])/2],j=[(Q[0]+ee[0])/2,(Q[1]+ee[1])/2]}else if(k.touch0)B=k.touch0[0],j=k.touch0[1];else return;k.zoom("touch",n(g(M,B,j),k.extent,a))}}function z(R,...P){if(this.__zooming){var k=x(this,P).event(R),A=R.changedTouches,O=A.length,L,M;for(id(R),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),L=0;L<O;++L)M=A[L],k.touch0&&k.touch0[2]===M.identifier?delete k.touch0:k.touch1&&k.touch1[2]===M.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(M=Kt(M,this),Math.hypot(f[0]-M[0],f[1]-M[1])<E)){var B=Pt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return p.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:Cl(+R),p):r},p.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Cl(!!R),p):e},p.touchable=function(R){return arguments.length?(o=typeof R=="function"?R:Cl(!!R),p):o},p.extent=function(R){return arguments.length?(t=typeof R=="function"?R:Cl([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),p):t},p.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],p):[i[0],i[1]]},p.translateExtent=function(R){return arguments.length?(a[0][0]=+R[0][0],a[1][0]=+R[1][0],a[0][1]=+R[0][1],a[1][1]=+R[1][1],p):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},p.constrain=function(R){return arguments.length?(n=R,p):n},p.duration=function(R){return arguments.length?(s=+R,p):s},p.interpolate=function(R){return arguments.length?(l=R,p):l},p.on=function(){var R=u.on.apply(u,arguments);return R===u?p:R},p.clickDistance=function(R){return arguments.length?(y=(R=+R)*R,p):Math.sqrt(y)},p.tapDistance=function(R){return arguments.length?(E=+R,p):E},p}const Il=b.createContext(null),_O=Il.Provider,Sn={"001":()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001","002":()=>"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.","003":e=>`Node type "${e}" not found. Using fallback type "default".`,"004":()=>"The React Flow parent container needs a width and a height to render the graph.","005":()=>"Only child nodes can use a parent extent.","006":()=>"Can't create edge. An edge needs a source and a target.","007":e=>`The old edge with id=${e} does not exist.`,"009":e=>`Marker type "${e}" doesn't exist.`,"008":(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,"010":()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.","011":e=>`Edge type "${e}" not found. Using fallback type "default".`},uy=Sn["001"]();function ve(e,t){const n=b.useContext(Il);if(n===null)throw new Error(uy);return gv(n,e,t)}const Ce=()=>{const e=b.useContext(Il);if(e===null)throw new Error(uy);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},xO=e=>e.userSelectionActive?"none":"all";function ad({position:e,children:t,className:n,style:r,...o}){const i=ve(xO),a=`${e}`.split("-");return w("div",{className:tt(["react-flow__panel",n,...a]),style:{...r,pointerEvents:i},...o,children:t})}function RO({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:w(ad,{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:w("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const bO=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:a=[2,4],labelBgBorderRadius:s=2,children:l,className:u,...c})=>{const f=b.useRef(null),[d,h]=b.useState({x:0,y:0,width:0,height:0}),v=tt(["react-flow__edge-textwrapper",u]);return b.useEffect(()=>{if(f.current){const y=f.current.getBBox();h({x:y.x,y:y.y,width:y.width,height:y.height})}},[n]),typeof n>"u"||!n?null:V("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:v,visibility:d.width?"visible":"hidden",...c,children:[o&&w("rect",{width:d.width+2*a[0],x:-a[0],y:-a[1],height:d.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:s,ry:s}),w("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:f,style:r,children:n}),l]})};var NO=b.memo(bO);const sd=e=>({width:e.offsetWidth,height:e.offsetHeight}),Lo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ld=(e={x:0,y:0},t)=>({x:Lo(e.x,t[0][0],t[1][0]),y:Lo(e.y,t[0][1],t[1][1])}),cy=(e,t,n)=>e<t?Lo(Math.abs(e-t),1,50)/50:e>n?-Lo(Math.abs(e-n),1,50)/50:0,fy=(e,t)=>{const n=cy(e.x,35,t.width-35)*20,r=cy(e.y,35,t.height-35)*20;return[n,r]},dy=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},OO=(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)}),py=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),TO=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),hy=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),ud=(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)},AO=e=>Rt(e.width)&&Rt(e.height)&&Rt(e.x)&&Rt(e.y),Rt=e=>!isNaN(e)&&isFinite(e),Oe=Symbol.for("internals"),my=["Enter"," ","Escape"],gy=(e,t)=>{},kO=e=>"nativeEvent"in e;function cd(e){var i,a;const t=kO(e)?e.nativeEvent:e,n=((a=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:a[0])||e.target,r=["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable")),o=e.ctrlKey||e.metaKey||e.shiftKey;return r&&!o||!!(n!=null&&n.closest(".nokey"))}const vy=e=>"clientX"in e,er=(e,t)=>{var i,a;const n=vy(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Po=({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:a,labelBgPadding:s,labelBgBorderRadius:l,style:u,markerEnd:c,markerStart:f,interactionWidth:d=20})=>V(Xe,{children:[w("path",{style:u,d:e,fill:"none",className:"react-flow__edge-path",markerEnd:c,markerStart:f}),d&&w("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),r&&Rt(t)&&Rt(n)?w(NO,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:a,labelBgPadding:s,labelBgBorderRadius:l}):null]});Po.displayName="BaseEdge";function ca(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(i=>i.id===e);o&&n(r,{...o})}}function yy({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,a=Math.abs(r-t)/2,s=r<t?r+a:r-a;return[i,s,o,a]}function Ey({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:a,targetControlY:s}){const l=e*.125+o*.375+a*.375+n*.125,u=t*.125+i*.375+s*.375+r*.125,c=Math.abs(l-e),f=Math.abs(u-t);return[l,u,c,f]}var tr;(function(e){e.Strict="strict",e.Loose="loose"})(tr||(tr={}));var Do;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Do||(Do={}));var fa;(function(e){e.Partial="partial",e.Full="full"})(fa||(fa={}));var nr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(nr||(nr={}));var da;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(da||(da={}));var K;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(K||(K={}));function Sy({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===K.Left||e===K.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function wy({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:i=K.Top}){const[a,s]=Sy({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,u]=Sy({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,f,d,h]=Ey({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:s,targetControlX:l,targetControlY:u});return[`M${e},${t} C${a},${s} ${l},${u} ${r},${o}`,c,f,d,h]}const fd=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=K.Bottom,targetPosition:i=K.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:v,interactionWidth:y})=>{const[E,p,m]=wy({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return w(Po,{path:E,labelX:p,labelY:m,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:v,interactionWidth:y})});fd.displayName="SimpleBezierEdge";const _y={[K.Left]:{x:-1,y:0},[K.Right]:{x:1,y:0},[K.Top]:{x:0,y:-1},[K.Bottom]:{x:0,y:1}},CO=({source:e,sourcePosition:t=K.Bottom,target:n})=>t===K.Left||t===K.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},xy=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function IO({source:e,sourcePosition:t=K.Bottom,target:n,targetPosition:r=K.Top,center:o,offset:i}){const a=_y[t],s=_y[r],l={x:e.x+a.x*i,y:e.y+a.y*i},u={x:n.x+s.x*i,y:n.y+s.y*i},c=CO({source:l,sourcePosition:t,target:u}),f=c.x!==0?"x":"y",d=c[f];let h=[],v,y;const[E,p,m,g]=yy({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*s[f]===-1){v=o.x||E,y=o.y||p;const _=[{x:v,y:l.y},{x:v,y:u.y}],x=[{x:l.x,y},{x:u.x,y}];a[f]===d?h=f==="x"?_:x:h=f==="x"?x:_}else{const _=[{x:l.x,y:u.y}],x=[{x:u.x,y:l.y}];if(f==="x"?h=a.x===d?x:_:h=a.y===d?_:x,t!==r){const N=f==="x"?"y":"x",I=a[f]===s[N],D=l[N]>u[N],T=l[N]<u[N];(a[f]===1&&(!I&&D||I&&T)||a[f]!==1&&(!I&&T||I&&D))&&(h=f==="x"?_:x)}v=h[0].x,y=h[0].y}return[[e,l,...h,u,n],v,y,m,g]}function LO(e,t,n,r){const o=Math.min(xy(e,t)/2,xy(t,n)/2,r),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+o*u},${a}Q ${i},${a} ${i},${a+o*c}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${a+o*l}Q ${i},${a} ${i+o*s},${a}`}function pa({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:i=K.Top,borderRadius:a=5,centerX:s,centerY:l,offset:u=20}){const[c,f,d,h,v]=IO({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:s,y:l},offset:u});return[c.reduce((E,p,m)=>{let g="";return m>0&&m<c.length-1?g=LO(c[m-1],p,c[m+1],a):g=`${m===0?"M":"L"}${p.x} ${p.y}`,E+=g,E},""),f,d,h,v]}const Ll=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,sourcePosition:f=K.Bottom,targetPosition:d=K.Top,markerEnd:h,markerStart:v,pathOptions:y,interactionWidth:E})=>{const[p,m,g]=pa({sourceX:e,sourceY:t,sourcePosition:f,targetX:n,targetY:r,targetPosition:d,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset});return w(Po,{path:p,labelX:m,labelY:g,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:h,markerStart:v,interactionWidth:E})});Ll.displayName="SmoothStepEdge";const dd=b.memo(e=>{var t;return w(Ll,{...e,pathOptions:b.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});dd.displayName="StepEdge";function PO({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,s]=yy({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,s]}const pd=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:d,interactionWidth:h})=>{const[v,y,E]=PO({sourceX:e,sourceY:t,targetX:n,targetY:r});return w(Po,{path:v,labelX:y,labelY:E,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:d,interactionWidth:h})});pd.displayName="StraightEdge";function Pl(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ry({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case K.Left:return[t-Pl(t-r,i),n];case K.Right:return[t+Pl(r-t,i),n];case K.Top:return[t,n-Pl(n-o,i)];case K.Bottom:return[t,n+Pl(o-n,i)]}}function by({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:i=K.Top,curvature:a=.25}){const[s,l]=Ry({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[u,c]=Ry({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[f,d,h,v]=Ey({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${l} ${u},${c} ${r},${o}`,f,d,h,v]}const Dl=b.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=K.Bottom,targetPosition:i=K.Top,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:v,pathOptions:y,interactionWidth:E})=>{const[p,m,g]=by({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:y==null?void 0:y.curvature});return w(Po,{path:p,labelX:m,labelY:g,label:a,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:v,interactionWidth:E})});Dl.displayName="BezierEdge";const hd=b.createContext(null),DO=hd.Provider;hd.Consumer;const MO=()=>b.useContext(hd),FO=e=>"id"in e&&"source"in e&&"target"in e,Ny=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,md=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,UO=(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)),Oy=(e,t)=>{if(!e.source||!e.target)return t;let n;return FO(e)?n={...e}:n={...e,id:Ny(e)},UO(n,t)?t:t.concat(n)},VO=(e,t,n)=>{if(!t.source||!t.target)return n;if(!n.find(i=>i.id===e.id))return gy("007",Sn["007"](e.id)),n;const o={...e,id:Ny(t),source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(i=>i.id!==e.id).concat(o)},Ty=({x:e,y:t},[n,r,o],i,[a,s])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},$O=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),Mo=(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],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},Ay=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:i,y:a}=Mo(o,t).positionAbsolute;return OO(r,py({x:i,y:a,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return TO(n)},ky=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},u=[];return e.forEach(c=>{const{width:f,height:d,selectable:h=!0,hidden:v=!1}=c;if(a&&!h||v)return!1;const{positionAbsolute:y}=Mo(c,s),E={x:y.x,y:y.y,width:f||0,height:d||0},p=ud(l,E),m=typeof f>"u"||typeof d>"u"||f===null||d===null,g=i&&p>0,S=(f||0)*(d||0);(m||g||p>=S||c.dragging)&&u.push(c)}),u},Cy=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},Iy=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),s=n/(e.height*(1+i)),l=Math.min(a,s),u=Lo(l,r,o),c=e.x+e.width/2,f=e.y+e.height/2,d=t/2-c*u,h=n/2-f*u;return[d,h,u]},Pr=(e,t=0)=>e.transition().duration(t);function Ly(e,t,n,r){return(t[n]||[]).reduce((o,i)=>{var a,s;return`${e.id}-${i.id}-${n}`!==r&&o.push({id:i.id||null,type:n,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+i.x+i.width/2,y:(((s=e.positionAbsolute)==null?void 0:s.y)??0)+i.y+i.height/2}),o},[])}function BO(e,t,n){let r=null,o=1/0;return n.forEach(i=>{const a=Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2));a<=t&&a<o&&(o=a,r=i)}),r}const zO={source:null,target:null,sourceHandle:null,targetHandle:null};function Py(e,t,n,r,o,i,a,s){const l=i==="target",u=s.querySelector(`.react-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:c,y:f}=er(e),d=s.elementFromPoint(c,f),h=d!=null&&d.classList.contains("react-flow__handle")?d:u,v={handleDomNode:h,isValid:!1,connection:zO};if(h){const y=Dy(void 0,h),E=h.getAttribute("data-nodeid"),p=h.getAttribute("data-handleid"),m={source:l?E:r,sourceHandle:l?p:o,target:l?r:E,targetHandle:l?o:p};v.connection=m,(n===tr.Strict?l&&y==="source"||!l&&y==="target":E!==r||p!==o)&&(v.isValid=a(m))}return v}function HO({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,i)=>{if(i[Oe]){const{handleBounds:a}=i[Oe];let s=[],l=[];a&&(s=Ly(i,a,"source",`${t}-${n}-${r}`),l=Ly(i,a,"target",`${t}-${n}-${r}`)),o.push(...s,...l)}return o},[])}function Dy(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function gd(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function jO(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function My({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:s,edgeUpdaterType:l,onEdgeUpdateEnd:u}){const c=dy(e.target),{connectionMode:f,domNode:d,autoPanOnConnect:h,connectionRadius:v,onConnectStart:y,panBy:E,getNodes:p,cancelConnection:m}=i();let g=0,S;const{x:_,y:x}=er(e),N=c==null?void 0:c.elementFromPoint(_,x),I=Dy(l,N),D=d==null?void 0:d.getBoundingClientRect();if(!D||!I)return;let T,$=er(e,D),F=!1,z=null,R=!1,P=null;const k=HO({nodes:p(),nodeId:n,handleId:t,handleType:I}),A=()=>{if(!h)return;const[M,B]=fy($,D);E({x:M,y:B}),g=requestAnimationFrame(A)};a({connectionPosition:$,connectionNodeId:n,connectionHandleId:t,connectionHandleType:I,connectionStatus:null}),y==null||y(e,{nodeId:n,handleId:t,handleType:I});function O(M){const{transform:B}=i();$=er(M,D),S=BO(Ty($,B,!1,[1,1]),v,k),F||(A(),F=!0);const j=Py(M,S,f,n,t,o?"target":"source",s,c);if(P=j.handleDomNode,z=j.connection,R=j.isValid,a({connectionPosition:S&&R?$O({x:S.x,y:S.y},B):$,connectionStatus:jO(!!S,R)}),!S&&!R&&!P)return gd(T);z.source!==z.target&&P&&(gd(T),T=P,P.classList.add("connecting","react-flow__handle-connecting"),P.classList.toggle("valid",R),P.classList.toggle("react-flow__handle-valid",R))}function L(M){var B,j;(S||P)&&z&&R&&(r==null||r(z)),(j=(B=i()).onConnectEnd)==null||j.call(B,M),l&&(u==null||u(M)),gd(T),m(),cancelAnimationFrame(g),F=!1,R=!1,z=null,P=null,c.removeEventListener("mousemove",O),c.removeEventListener("mouseup",L),c.removeEventListener("touchmove",O),c.removeEventListener("touchend",L)}c.addEventListener("mousemove",O),c.addEventListener("mouseup",L),c.addEventListener("touchmove",O),c.addEventListener("touchend",L)}const WO=()=>!0,YO=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Fy=b.forwardRef(({type:e="source",position:t=K.Top,isValidConnection:n=WO,isConnectable:r=!0,id:o,onConnect:i,children:a,className:s,onMouseDown:l,onTouchStart:u,...c},f)=>{var x,N;const d=Ce(),h=MO();if(!h)return(N=(x=d.getState()).onError)==null||N.call(x,"010",Sn["010"]()),null;const{connectionStartHandle:v,connectOnClick:y,noPanClassName:E}=ve(YO,nt),p=o||null,m=e==="target",g=I=>{const{defaultEdgeOptions:D,onConnect:T,hasDefaultEdges:$}=d.getState(),F={...D,...I};if($){const{edges:z}=d.getState();d.setState({edges:Oy(F,z)})}T==null||T(F),i==null||i(F)},S=I=>{const D=vy(I);(D&&I.button===0||!D)&&My({event:I,handleId:p,nodeId:h,onConnect:g,isTarget:m,getState:d.getState,setState:d.setState,isValidConnection:n}),D?l==null||l(I):u==null||u(I)},_=I=>{const{onClickConnectStart:D,onClickConnectEnd:T,connectionMode:$}=d.getState();if(!v){D==null||D(I,{nodeId:h,handleId:p,handleType:e}),d.setState({connectionStartHandle:{nodeId:h,type:e,handleId:p}});return}const F=dy(I.target),{connection:z,isValid:R}=Py(I,{nodeId:h,id:p,type:e},$,v.nodeId,v.handleId||null,v.type,n,F);R&&g(z),T==null||T(I),d.setState({connectionStartHandle:null})};return w("div",{"data-handleid":p,"data-nodeid":h,"data-handlepos":t,"data-id":`${h}-${p}-${e}`,className:tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,s,{source:!m,target:m,connectable:r,connecting:(v==null?void 0:v.nodeId)===h&&(v==null?void 0:v.handleId)===p&&(v==null?void 0:v.type)===e}]),onMouseDown:S,onTouchStart:S,onClick:y?_:void 0,ref:f,...c,children:a})});Fy.displayName="Handle";var Fo=b.memo(Fy);const Uy=({data:e,isConnectable:t,targetPosition:n=K.Top,sourcePosition:r=K.Bottom})=>V(Xe,{children:[w(Fo,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,w(Fo,{type:"source",position:r,isConnectable:t})]});Uy.displayName="DefaultNode";var vd=b.memo(Uy);const Vy=({data:e,isConnectable:t,sourcePosition:n=K.Bottom})=>V(Xe,{children:[e==null?void 0:e.label,w(Fo,{type:"source",position:n,isConnectable:t})]});Vy.displayName="InputNode";var $y=b.memo(Vy);const By=({data:e,isConnectable:t,targetPosition:n=K.Top})=>V(Xe,{children:[w(Fo,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]});By.displayName="OutputNode";var zy=b.memo(By);const yd=()=>null;yd.displayName="GroupNode";const GO=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),Ml=e=>e.id;function KO(e,t){return nt(e.selectedNodes.map(Ml),t.selectedNodes.map(Ml))&&nt(e.selectedEdges.map(Ml),t.selectedEdges.map(Ml))}const Hy=b.memo(({onSelectionChange:e})=>{const t=Ce(),{selectedNodes:n,selectedEdges:r}=ve(GO,KO);return b.useEffect(()=>{var i,a;const o={nodes:n,edges:r};e==null||e(o),(a=(i=t.getState()).onSelectionChange)==null||a.call(i,o)},[n,r,e]),null});Hy.displayName="SelectionListener";const XO=e=>!!e.onSelectionChange;function QO({onSelectionChange:e}){const t=ve(XO);return e||t?w(Hy,{onSelectionChange:e}):null}const qO=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 Uo(e,t){b.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function re(e,t,n){b.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const ZO=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:s,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:f,edgesFocusable:d,elevateNodesOnSelect:h,minZoom:v,maxZoom:y,nodeExtent:E,onNodesChange:p,onEdgesChange:m,elementsSelectable:g,connectionMode:S,snapGrid:_,snapToGrid:x,translateExtent:N,connectOnClick:I,defaultEdgeOptions:D,fitView:T,fitViewOptions:$,onNodesDelete:F,onEdgesDelete:z,onNodeDrag:R,onNodeDragStart:P,onNodeDragStop:k,onSelectionDrag:A,onSelectionDragStart:O,onSelectionDragStop:L,noPanClassName:M,nodeOrigin:B,rfId:j,autoPanOnConnect:q,autoPanOnNodeDrag:Q,onError:J,connectionRadius:ee})=>{const{setNodes:ne,setEdges:ie,setDefaultNodesAndEdges:Se,setMinZoom:le,setMaxZoom:Be,setTranslateExtent:ot,setNodeExtent:we,reset:gt}=ve(qO,nt),X=Ce();return b.useEffect(()=>{const Ge=r==null?void 0:r.map(vt=>({...vt,...D}));return Se(n,Ge),()=>{gt()}},[]),re("defaultEdgeOptions",D,X.setState),re("connectionMode",S,X.setState),re("onConnect",o,X.setState),re("onConnectStart",i,X.setState),re("onConnectEnd",a,X.setState),re("onClickConnectStart",s,X.setState),re("onClickConnectEnd",l,X.setState),re("nodesDraggable",u,X.setState),re("nodesConnectable",c,X.setState),re("nodesFocusable",f,X.setState),re("edgesFocusable",d,X.setState),re("elementsSelectable",g,X.setState),re("elevateNodesOnSelect",h,X.setState),re("snapToGrid",x,X.setState),re("snapGrid",_,X.setState),re("onNodesChange",p,X.setState),re("onEdgesChange",m,X.setState),re("connectOnClick",I,X.setState),re("fitViewOnInit",T,X.setState),re("fitViewOnInitOptions",$,X.setState),re("onNodesDelete",F,X.setState),re("onEdgesDelete",z,X.setState),re("onNodeDrag",R,X.setState),re("onNodeDragStart",P,X.setState),re("onNodeDragStop",k,X.setState),re("onSelectionDrag",A,X.setState),re("onSelectionDragStart",O,X.setState),re("onSelectionDragStop",L,X.setState),re("noPanClassName",M,X.setState),re("nodeOrigin",B,X.setState),re("rfId",j,X.setState),re("autoPanOnConnect",q,X.setState),re("autoPanOnNodeDrag",Q,X.setState),re("onError",J,X.setState),re("connectionRadius",ee,X.setState),Uo(e,ne),Uo(t,ie),Uo(v,le),Uo(y,Be),Uo(N,ot),Uo(E,we),null},jy={display:"none"},JO={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Wy="react-flow__node-desc",Yy="react-flow__edge-desc",eT="react-flow__aria-live",tT=e=>e.ariaLiveMessage;function nT({rfId:e}){const t=ve(tT);return w("div",{id:`${eT}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:JO,children:t})}function rT({rfId:e,disableKeyboardA11y:t}){return V(Xe,{children:[V("div",{id:`${Wy}-${e}`,style:jy,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."," "]}),w("div",{id:`${Yy}-${e}`,style:jy,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&w(nT,{rfId:e})]})}const oT=(e,t,n)=>n===K.Left?e-t:n===K.Right?e+t:e,iT=(e,t,n)=>n===K.Top?e-t:n===K.Bottom?e+t:e,Gy="react-flow__edgeupdater",Ky=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:a,type:s})=>w("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:a,className:tt([Gy,`${Gy}-${s}`]),cx:oT(t,r,e),cy:iT(n,r,e),r,stroke:"transparent",fill:"transparent"});var Vo=e=>{const t=({id:n,className:r,type:o,data:i,onClick:a,onEdgeDoubleClick:s,selected:l,animated:u,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:y,style:E,source:p,target:m,sourceX:g,sourceY:S,targetX:_,targetY:x,sourcePosition:N,targetPosition:I,elementsSelectable:D,hidden:T,sourceHandleId:$,targetHandleId:F,onContextMenu:z,onMouseEnter:R,onMouseMove:P,onMouseLeave:k,edgeUpdaterRadius:A,onEdgeUpdate:O,onEdgeUpdateStart:L,onEdgeUpdateEnd:M,markerEnd:B,markerStart:j,rfId:q,ariaLabel:Q,isFocusable:J,pathOptions:ee,interactionWidth:ne})=>{const ie=b.useRef(null),[Se,le]=b.useState(!1),[Be,ot]=b.useState(!1),we=Ce(),gt=b.useMemo(()=>`url(#${md(j,q)})`,[j,q]),X=b.useMemo(()=>`url(#${md(B,q)})`,[B,q]);if(T)return null;const Ge=it=>{const{edges:zt,addSelectedEdges:Yr}=we.getState();if(D&&(we.setState({nodesSelectionActive:!1}),Yr([n])),a){const Gr=zt.find(Cn=>Cn.id===n);a(it,Gr)}},vt=ca(n,we.getState,s),ni=ca(n,we.getState,z),Ha=ca(n,we.getState,R),ja=ca(n,we.getState,P),Wa=ca(n,we.getState,k),mr=(it,zt)=>{if(it.button!==0)return;const Yr=zt?m:p,Gr=(zt?F:$)||null,Cn=zt?"target":"source",wu=()=>!0,Ka=zt,Xa=we.getState().edges.find(Kr=>Kr.id===n);ot(!0),L==null||L(it,Xa,Cn);const zp=Kr=>{ot(!1),M==null||M(Kr,Xa,Cn)};My({event:it,handleId:Gr,nodeId:Yr,onConnect:Kr=>O==null?void 0:O(Xa,Kr),isTarget:Ka,getState:we.getState,setState:we.setState,isValidConnection:wu,edgeUpdaterType:Cn,onEdgeUpdateEnd:zp})},ri=it=>mr(it,!0),gr=it=>mr(it,!1),oi=()=>le(!0),kn=()=>le(!1),Ya=!D&&!a,Ga=typeof O<"u",ii=it=>{var zt;if(my.includes(it.key)&&D){const{unselectNodesAndEdges:Yr,addSelectedEdges:Gr,edges:Cn}=we.getState();it.key==="Escape"?((zt=ie.current)==null||zt.blur(),Yr({edges:[Cn.find(Ka=>Ka.id===n)]})):Gr([n])}};return V("g",{className:tt(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:l,animated:u,inactive:Ya,updating:Se}]),onClick:Ge,onDoubleClick:vt,onContextMenu:ni,onMouseEnter:Ha,onMouseMove:ja,onMouseLeave:Wa,onKeyDown:J?ii:void 0,tabIndex:J?0:void 0,role:J?"button":void 0,"data-testid":`rf__edge-${n}`,"aria-label":Q===null?void 0:Q||`Edge from ${p} to ${m}`,"aria-describedby":J?`${Yy}-${q}`:void 0,ref:ie,children:[!Be&&w(e,{id:n,source:p,target:m,selected:l,animated:u,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:y,data:i,style:E,sourceX:g,sourceY:S,targetX:_,targetY:x,sourcePosition:N,targetPosition:I,sourceHandleId:$,targetHandleId:F,markerStart:gt,markerEnd:X,pathOptions:ee,interactionWidth:ne}),Ga&&V(Xe,{children:[w(Ky,{position:N,centerX:g,centerY:S,radius:A,onMouseDown:ri,onMouseEnter:oi,onMouseOut:kn,type:"source"}),w(Ky,{position:I,centerX:_,centerY:x,radius:A,onMouseDown:gr,onMouseEnter:oi,onMouseOut:kn,type:"target"})]})]})};return t.displayName="EdgeWrapper",b.memo(t)};function aT(e){const t={default:Vo(e.default||Dl),straight:Vo(e.bezier||pd),step:Vo(e.step||dd),smoothstep:Vo(e.step||Ll),simplebezier:Vo(e.simplebezier||fd)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,i)=>(o[i]=Vo(e[i]||Dl),o),n);return{...t,...r}}function Xy(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,o=((n==null?void 0:n.y)||0)+t.y,i=(n==null?void 0:n.width)||t.width,a=(n==null?void 0:n.height)||t.height;switch(e){case K.Top:return{x:r+i/2,y:o};case K.Right:return{x:r+i,y:o+a/2};case K.Bottom:return{x:r+i/2,y:o+a};case K.Left:return{x:r,y:o+a/2}}}function Qy(e,t){return e?t?e.find(n=>n.id===t):e.length===1?e[0]:null:null}const sT=(e,t,n,r,o,i)=>{const a=Xy(n,e,t),s=Xy(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}};function lT({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:a,height:s,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+o),y2:Math.max(e.y+r,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=py({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),f=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),d=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(f*d)>0}function qy(e){var r,o,i,a,s;const t=((r=e==null?void 0:e[Oe])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)<"u"&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}function Zy(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Zy(n,t):!1}function Jy(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 uT(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||!Zy(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>{var i,a;return{id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((i=o.positionAbsolute)==null?void 0:i.x)??0),y:n.y-(((a=o.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode,width:o.width,height:o.height}})}function e0(e,t,n,r,o=[0,0],i){let a=e.extent||r;if(e.extent==="parent")if(e.parentNode&&e.width&&e.height){const u=n.get(e.parentNode),{x:c,y:f}=Mo(u,o).positionAbsolute;a=u&&Rt(c)&&Rt(f)&&Rt(u.width)&&Rt(u.height)?[[c+e.width*o[0],f+e.height*o[1]],[c+u.width-e.width+e.width*o[0],f+u.height-e.height+e.height*o[1]]]:a}else i==null||i("005",Sn["005"]()),a=r;else if(e.extent&&e.parentNode){const u=n.get(e.parentNode),{x:c,y:f}=Mo(u,o).positionAbsolute;a=[[e.extent[0][0]+c,e.extent[0][1]+f],[e.extent[1][0]+c,e.extent[1][1]+f]]}let s={x:0,y:0};if(e.parentNode){const u=n.get(e.parentNode);s=Mo(u,o).positionAbsolute}const l=a?ld(t,a):t;return{position:{x:l.x-s.x,y:l.y-s.y},positionAbsolute:l}}function Ed({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}const t0=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),s={x:a.width*r[0],y:a.height*r[1]};return i.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-a.left-s.x)/n,y:(u.top-a.top-s.y)/n,...sd(l)}})};function ha(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);n(r,{...o})}}function Sd({id:e,store:t,unselect:n=!1}){const{addSelectedNodes:r,unselectNodesAndEdges:o,multiSelectionActive:i,nodeInternals:a}=t.getState(),s=a.get(e);t.setState({nodesSelectionActive:!1}),s.selected?(n||s.selected&&i)&&o({nodes:[s]}):r([e])}function cT(){const e=Ce();return b.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:i}=e.getState(),a=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(a-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:i?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:i?o[1]*Math.round(l.y/o[1]):l.y,...l}},[])}function wd(e){return(t,n,r)=>e==null?void 0:e(t,r)}function n0({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const s=Ce(),[l,u]=b.useState(!1),c=b.useRef([]),f=b.useRef({x:null,y:null}),d=b.useRef(0),h=b.useRef(null),v=b.useRef({x:0,y:0}),y=b.useRef(null),E=b.useRef(!1),p=cT();return b.useEffect(()=>{if(e!=null&&e.current){const m=Pt(e.current),g=({x:_,y:x})=>{const{nodeInternals:N,onNodeDrag:I,onSelectionDrag:D,updateNodePositions:T,nodeExtent:$,snapGrid:F,snapToGrid:z,nodeOrigin:R,onError:P}=s.getState();f.current={x:_,y:x};let k=!1;if(c.current=c.current.map(O=>{const L={x:_-O.distance.x,y:x-O.distance.y};z&&(L.x=F[0]*Math.round(L.x/F[0]),L.y=F[1]*Math.round(L.y/F[1]));const M=e0(O,L,N,$,R,P);return k=k||O.position.x!==M.position.x||O.position.y!==M.position.y,O.position=M.position,O.positionAbsolute=M.positionAbsolute,O}),!k)return;T(c.current,!0,!0),u(!0);const A=o?I:wd(D);if(A&&y.current){const[O,L]=Ed({nodeId:o,dragItems:c.current,nodeInternals:N});A(y.current,O,L)}},S=()=>{if(!h.current)return;const[_,x]=fy(v.current,h.current);if(_!==0||x!==0){const{transform:N,panBy:I}=s.getState();f.current.x=(f.current.x??0)-_/N[2],f.current.y=(f.current.y??0)-x/N[2],g(f.current),I({x:_,y:x})}d.current=requestAnimationFrame(S)};if(t)m.on(".drag",null);else{const _=Cb().on("start",x=>{var k;const{nodeInternals:N,multiSelectionActive:I,domNode:D,nodesDraggable:T,unselectNodesAndEdges:$,onNodeDragStart:F,onSelectionDragStart:z}=s.getState(),R=o?F:wd(z);!a&&!I&&o&&((k=N.get(o))!=null&&k.selected||$()),o&&i&&a&&Sd({id:o,store:s});const P=p(x);if(f.current=P,c.current=uT(N,T,P,o),R&&c.current){const[A,O]=Ed({nodeId:o,dragItems:c.current,nodeInternals:N});R(x.sourceEvent,A,O)}h.current=(D==null?void 0:D.getBoundingClientRect())||null,v.current=er(x.sourceEvent,h.current)}).on("drag",x=>{const N=p(x),{autoPanOnNodeDrag:I}=s.getState();!E.current&&I&&(E.current=!0,S()),(f.current.x!==N.xSnapped||f.current.y!==N.ySnapped)&&c.current&&(y.current=x.sourceEvent,v.current=er(x.sourceEvent,h.current),g(N))}).on("end",x=>{if(u(!1),E.current=!1,cancelAnimationFrame(d.current),c.current){const{updateNodePositions:N,nodeInternals:I,onNodeDragStop:D,onSelectionDragStop:T}=s.getState(),$=o?D:wd(T);if(N(c.current,!1,!1),$){const[F,z]=Ed({nodeId:o,dragItems:c.current,nodeInternals:I});$(x.sourceEvent,F,z)}}}).filter(x=>{const N=x.target;return!x.button&&(!n||!Jy(N,`.${n}`,e))&&(!r||Jy(N,r,e))});return m.call(_),()=>{m.on(".drag",null)}}}},[e,t,n,r,i,s,o,a,p]),l}function r0(){const e=Ce();return b.useCallback(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:i,getNodes:a,snapToGrid:s,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),f=a().filter(m=>m.selected&&(m.draggable||c&&typeof m.draggable>"u")),d=s?l[0]:5,h=s?l[1]:5,v=n.isShiftPressed?4:1,y=n.x*d*v,E=n.y*h*v,p=f.map(m=>{if(m.positionAbsolute){const g={x:m.positionAbsolute.x+y,y:m.positionAbsolute.y+E};s&&(g.x=l[0]*Math.round(g.x/l[0]),g.y=l[1]*Math.round(g.y/l[1]));const{positionAbsolute:S,position:_}=e0(m,g,r,o,void 0,u);m.position=_,m.positionAbsolute=S}return m});i(p,!0,!1)},[])}const $o={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var ma=e=>{const t=({id:n,type:r,data:o,xPos:i,yPos:a,xPosOrigin:s,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:f,onMouseMove:d,onMouseLeave:h,onContextMenu:v,onDoubleClick:y,style:E,className:p,isDraggable:m,isSelectable:g,isConnectable:S,isFocusable:_,selectNodesOnDrag:x,sourcePosition:N,targetPosition:I,hidden:D,resizeObserver:T,dragHandle:$,zIndex:F,isParent:z,noDragClassName:R,noPanClassName:P,initialized:k,disableKeyboardA11y:A,ariaLabel:O,rfId:L})=>{const M=Ce(),B=b.useRef(null),j=b.useRef(N),q=b.useRef(I),Q=b.useRef(r),J=g||m||c||f||d||h,ee=r0(),ne=ha(n,M.getState,f),ie=ha(n,M.getState,d),Se=ha(n,M.getState,h),le=ha(n,M.getState,v),Be=ha(n,M.getState,y),ot=X=>{if(g&&(!x||!m)&&Sd({id:n,store:M}),c){const Ge=M.getState().nodeInternals.get(n);c(X,{...Ge})}},we=X=>{var Ge;if(!cd(X))if(my.includes(X.key)&&g){const vt=X.key==="Escape";vt&&((Ge=B.current)==null||Ge.blur()),Sd({id:n,store:M,unselect:vt})}else!A&&m&&u&&Object.prototype.hasOwnProperty.call($o,X.key)&&(M.setState({ariaLiveMessage:`Moved selected node ${X.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),ee({x:$o[X.key].x,y:$o[X.key].y,isShiftPressed:X.shiftKey}))};b.useEffect(()=>{if(B.current&&!D){const X=B.current;return T==null||T.observe(X),()=>T==null?void 0:T.unobserve(X)}},[D]),b.useEffect(()=>{const X=Q.current!==r,Ge=j.current!==N,vt=q.current!==I;B.current&&(X||Ge||vt)&&(X&&(Q.current=r),Ge&&(j.current=N),vt&&(q.current=I),M.getState().updateNodeDimensions([{id:n,nodeElement:B.current,forceUpdate:!0}]))},[n,r,N,I]);const gt=n0({nodeRef:B,disabled:D||!m,noDragClassName:R,handleSelector:$,nodeId:n,isSelectable:g,selectNodesOnDrag:x});return D?null:w("div",{className:tt(["react-flow__node",`react-flow__node-${r}`,{[P]:m},p,{selected:u,selectable:g,parent:z,dragging:gt}]),ref:B,style:{zIndex:F,transform:`translate(${s}px,${l}px)`,pointerEvents:J?"all":"none",visibility:k?"visible":"hidden",...E},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:ne,onMouseMove:ie,onMouseLeave:Se,onContextMenu:le,onClick:ot,onDoubleClick:Be,onKeyDown:_?we:void 0,tabIndex:_?0:void 0,role:_?"button":void 0,"aria-describedby":A?void 0:`${Wy}-${L}`,"aria-label":O,children:w(DO,{value:n,children:w(e,{id:n,data:o,type:r,xPos:i,yPos:a,selected:u,isConnectable:S,sourcePosition:N,targetPosition:I,dragging:gt,dragHandle:$,zIndex:F})})})};return t.displayName="NodeWrapper",b.memo(t)};function fT(e){const t={input:ma(e.input||$y),default:ma(e.default||vd),output:ma(e.output||zy),group:ma(e.group||yd)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,i)=>(o[i]=ma(e[i]||vd),o),n);return{...t,...r}}const dT=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},pT=typeof document<"u"?document:null;var ga=(e=null,t={target:pT})=>{const[n,r]=b.useState(!1),o=b.useRef(new Set([])),[i,a]=b.useMemo(()=>{if(e!==null){const l=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.split("+")),u=l.reduce((c,f)=>c.concat(...f),[]);return[l,u]}return[[],[]]},[e]);return b.useEffect(()=>{var s,l;if(e!==null){const u=d=>{if(cd(d))return!1;const h=i0(d.code,a);o.current.add(d[h]),o0(i,o.current,!1)&&(d.preventDefault(),r(!0))},c=d=>{if(cd(d))return!1;const h=i0(d.code,a);o0(i,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(d[h])},f=()=>{o.current.clear(),r(!1)};return(s=t==null?void 0:t.target)==null||s.addEventListener("keydown",u),(l=t==null?void 0:t.target)==null||l.addEventListener("keyup",c),window.addEventListener("blur",f),()=>{var d,h;(d=t==null?void 0:t.target)==null||d.removeEventListener("keydown",u),(h=t==null?void 0:t.target)==null||h.removeEventListener("keyup",c),window.removeEventListener("blur",f)}}},[e,r]),n};function o0(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function i0(e,t){return t.includes(e)?"code":"key"}function a0(e,t,n,r){var a,s;if(!e.parentNode)return n;const o=t.get(e.parentNode),i=Mo(o,r);return a0(o,t,{x:(n.x??0)+i.x,y:(n.y??0)+i.y,z:(((a=o[Oe])==null?void 0:a.z)??0)>(n.z??0)?((s=o[Oe])==null?void 0:s.z)??0:n.z??0},r)}function s0(e,t,n){e.forEach(r=>{var o;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:i,y:a,z:s}=a0(r,e,{...r.position,z:((o=r[Oe])==null?void 0:o.z)??0},t);r.positionAbsolute={x:i,y:a},r[Oe].z=s,n!=null&&n[r.id]&&(r[Oe].isParent=!0)}})}function _d(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach(s=>{var f;const l=(Rt(s.zIndex)?s.zIndex:0)+(s.selected?a:0),u=t.get(s.id),c={width:u==null?void 0:u.width,height:u==null?void 0:u.height,...s,positionAbsolute:{x:s.position.x,y:s.position.y}};s.parentNode&&(c.parentNode=s.parentNode,i[s.parentNode]=!0),Object.defineProperty(c,Oe,{enumerable:!1,value:{handleBounds:(f=u==null?void 0:u[Oe])==null?void 0:f.handleBounds,z:l}}),o.set(s.id,c)}),s0(o,n,i),o}function l0(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:f}=e(),d=t.initial&&!u&&c;if(s&&l&&(d||!t.initial)){const v=n().filter(E=>{var m;const p=t.includeHiddenNodes?E.width&&E.height:!E.hidden;return(m=t.nodes)!=null&&m.length?p&&t.nodes.some(g=>g.id===E.id):p}),y=v.every(E=>E.width&&E.height);if(v.length>0&&y){const E=Ay(v,f),[p,m,g]=Iy(E,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),S=Jn.translate(p,m).scale(g);return typeof t.duration=="number"&&t.duration>0?s.transform(Pr(l,t.duration),S):s.transform(l,S),!0}}return!1}function hT(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[Oe]:r[Oe],selected:n.selected})}),new Map(t)}function mT(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function Fl({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:hT(e,o)}),a==null||a(e)),t!=null&&t.length&&(u&&r({edges:mT(t,i)}),s==null||s(t))}const Bo=()=>{},gT={zoomIn:Bo,zoomOut:Bo,zoomTo:Bo,getZoom:()=>1,setViewport:Bo,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Bo,fitBounds:Bo,project:e=>e,viewportInitialized:!1},vT=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),yT=()=>{const e=Ce(),{d3Zoom:t,d3Selection:n}=ve(vT,nt);return b.useMemo(()=>n&&t?{zoomIn:o=>t.scaleBy(Pr(n,o==null?void 0:o.duration),1.2),zoomOut:o=>t.scaleBy(Pr(n,o==null?void 0:o.duration),1/1.2),zoomTo:(o,i)=>t.scaleTo(Pr(n,i==null?void 0:i.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,i)=>{const[a,s,l]=e.getState().transform,u=Jn.translate(o.x??a,o.y??s).scale(o.zoom??l);t.transform(Pr(n,i==null?void 0:i.duration),u)},getViewport:()=>{const[o,i,a]=e.getState().transform;return{x:o,y:i,zoom:a}},fitView:o=>l0(e.getState,o),setCenter:(o,i,a)=>{const{width:s,height:l,maxZoom:u}=e.getState(),c=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,f=s/2-o*c,d=l/2-i*c,h=Jn.translate(f,d).scale(c);t.transform(Pr(n,a==null?void 0:a.duration),h)},fitBounds:(o,i)=>{const{width:a,height:s,minZoom:l,maxZoom:u}=e.getState(),[c,f,d]=Iy(o,a,s,l,u,(i==null?void 0:i.padding)??.1),h=Jn.translate(c,f).scale(d);t.transform(Pr(n,i==null?void 0:i.duration),h)},project:o=>{const{transform:i,snapToGrid:a,snapGrid:s}=e.getState();return Ty(o,i,a,s)},viewportInitialized:!0}:gT,[t,n])};function xd(){const e=yT(),t=Ce(),n=b.useCallback(()=>t.getState().getNodes().map(y=>({...y})),[]),r=b.useCallback(y=>t.getState().nodeInternals.get(y),[]),o=b.useCallback(()=>{const{edges:y=[]}=t.getState();return y.map(E=>({...E}))},[]),i=b.useCallback(y=>{const{edges:E=[]}=t.getState();return E.find(p=>p.id===y)},[]),a=b.useCallback(y=>{const{getNodes:E,setNodes:p,hasDefaultNodes:m,onNodesChange:g}=t.getState(),S=E(),_=typeof y=="function"?y(S):y;if(m)p(_);else if(g){const x=_.length===0?S.map(N=>({type:"remove",id:N.id})):_.map(N=>({item:N,type:"reset"}));g(x)}},[]),s=b.useCallback(y=>{const{edges:E=[],setEdges:p,hasDefaultEdges:m,onEdgesChange:g}=t.getState(),S=typeof y=="function"?y(E):y;if(m)p(S);else if(g){const _=S.length===0?E.map(x=>({type:"remove",id:x.id})):S.map(x=>({item:x,type:"reset"}));g(_)}},[]),l=b.useCallback(y=>{const E=Array.isArray(y)?y:[y],{getNodes:p,setNodes:m,hasDefaultNodes:g,onNodesChange:S}=t.getState();if(g){const x=[...p(),...E];m(x)}else if(S){const _=E.map(x=>({item:x,type:"add"}));S(_)}},[]),u=b.useCallback(y=>{const E=Array.isArray(y)?y:[y],{edges:p=[],setEdges:m,hasDefaultEdges:g,onEdgesChange:S}=t.getState();if(g)m([...p,...E]);else if(S){const _=E.map(x=>({item:x,type:"add"}));S(_)}},[]),c=b.useCallback(()=>{const{getNodes:y,edges:E=[],transform:p}=t.getState(),[m,g,S]=p;return{nodes:y().map(_=>({..._})),edges:E.map(_=>({..._})),viewport:{x:m,y:g,zoom:S}}},[]),f=b.useCallback(({nodes:y,edges:E})=>{const{nodeInternals:p,getNodes:m,edges:g,hasDefaultNodes:S,hasDefaultEdges:_,onNodesDelete:x,onEdgesDelete:N,onNodesChange:I,onEdgesChange:D}=t.getState(),T=(y||[]).map(P=>P.id),$=(E||[]).map(P=>P.id),F=m().reduce((P,k)=>{const A=!T.includes(k.id)&&k.parentNode&&P.find(L=>L.id===k.parentNode);return(typeof k.deletable=="boolean"?k.deletable:!0)&&(T.includes(k.id)||A)&&P.push(k),P},[]),z=g.filter(P=>typeof P.deletable=="boolean"?P.deletable:!0),R=z.filter(P=>$.includes(P.id));if(F||R){const P=Cy(F,z),k=[...R,...P],A=k.reduce((O,L)=>(O.includes(L.id)||O.push(L.id),O),[]);if((_||S)&&(_&&t.setState({edges:g.filter(O=>!A.includes(O.id))}),S&&(F.forEach(O=>{p.delete(O.id)}),t.setState({nodeInternals:new Map(p)}))),A.length>0&&(N==null||N(k),D&&D(A.map(O=>({id:O,type:"remove"})))),F.length>0&&(x==null||x(F),I)){const O=F.map(L=>({id:L.id,type:"remove"}));I(O)}}},[]),d=b.useCallback(y=>{const E=AO(y),p=E?null:t.getState().nodeInternals.get(y.id);return[E?y:hy(p),p,E]},[]),h=b.useCallback((y,E=!0,p)=>{const[m,g,S]=d(y);return m?(p||t.getState().getNodes()).filter(_=>{if(!S&&(_.id===g.id||!_.positionAbsolute))return!1;const x=hy(_),N=ud(x,m);return E&&N>0||N>=y.width*y.height}):[]},[]),v=b.useCallback((y,E,p=!0)=>{const[m]=d(y);if(!m)return!1;const g=ud(m,E);return p&&g>0||g>=y.width*y.height},[]);return b.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:a,setEdges:s,addNodes:l,addEdges:u,toObject:c,deleteElements:f,getIntersectingNodes:h,isNodeIntersecting:v}),[e,n,r,o,i,a,s,l,u,c,f,h,v])}var ET=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Ce(),{deleteElements:r}=xd(),o=ga(e),i=ga(t);b.useEffect(()=>{if(o){const{edges:a,getNodes:s}=n.getState(),l=s().filter(c=>c.selected),u=a.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[o]),b.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])};function ST(e){const t=Ce();b.useEffect(()=>{let n;const r=()=>{var i,a;if(!e.current)return;const o=sd(e.current);(o.height===0||o.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",Sn["004"]())),t.setState({width:o.width||500,height:o.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 Rd={position:"absolute",width:"100%",height:"100%",top:0,left:0},wT=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,bd=e=>({x:e.x,y:e.y,zoom:e.k}),zo=(e,t)=>e.target.closest(`.${t}`),u0=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),_T=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),xT=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=Do.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:f=!0,defaultViewport:d,translateExtent:h,minZoom:v,maxZoom:y,zoomActivationKeyCode:E,preventScrolling:p=!0,children:m,noWheelClassName:g,noPanClassName:S})=>{const _=b.useRef(),x=Ce(),N=b.useRef(!1),I=b.useRef(!1),D=b.useRef(null),T=b.useRef({x:0,y:0,zoom:0}),{d3Zoom:$,d3Selection:F,d3ZoomHandler:z,userSelectionActive:R}=ve(_T,nt),P=ga(E),k=b.useRef(0);return ST(D),b.useEffect(()=>{if(D.current){const A=D.current.getBoundingClientRect(),O=wO().scaleExtent([v,y]).translateExtent(h),L=Pt(D.current).call(O),M=Jn.translate(d.x,d.y).scale(Lo(d.zoom,v,y)),B=[[0,0],[A.width,A.height]],j=O.constrain()(M,B,h);O.transform(L,j),x.setState({d3Zoom:O,d3Selection:L,d3ZoomHandler:L.on("wheel.zoom"),transform:[j.x,j.y,j.k],domNode:D.current.closest(".react-flow")})}},[]),b.useEffect(()=>{F&&$&&(a&&!P&&!R?F.on("wheel.zoom",A=>{if(zo(A,g))return!1;A.preventDefault(),A.stopImmediatePropagation();const O=F.property("__zoom").k||1;if(A.ctrlKey&&i){const j=Kt(A),q=-A.deltaY*(A.deltaMode===1?.05:A.deltaMode?1:.002)*10,Q=O*Math.pow(2,q);$.scaleTo(F,Q,j);return}const L=A.deltaMode===1?20:1,M=l===Do.Vertical?0:A.deltaX*L,B=l===Do.Horizontal?0:A.deltaY*L;$.translateBy(F,-(M/O)*s,-(B/O)*s)}):typeof z<"u"&&F.on("wheel.zoom",function(A,O){if(!p||zo(A,g))return null;A.preventDefault(),z.call(this,A,O)}))},[R,a,l,F,$,z,P,i,p,g]),b.useEffect(()=>{$&&$.on("start",A=>{var L;if(!A.sourceEvent)return null;k.current=A.sourceEvent.button;const{onViewportChangeStart:O}=x.getState();if(N.current=!0,((L=A.sourceEvent)==null?void 0:L.type)==="mousedown"&&x.setState({paneDragging:!0}),t||O){const M=bd(A.transform);T.current=M,O==null||O(M),t==null||t(A.sourceEvent,M)}})},[$,t]),b.useEffect(()=>{$&&(R&&!N.current?$.on("zoom",null):R||$.on("zoom",A=>{const{onViewportChange:O}=x.getState();if(x.setState({transform:[A.transform.x,A.transform.y,A.transform.k]}),I.current=!!(r&&u0(f,k.current??0)),e||O){const L=bd(A.transform);O==null||O(L),e==null||e(A.sourceEvent,L)}}))},[R,$,e,f,r]),b.useEffect(()=>{$&&$.on("end",A=>{if(!A.sourceEvent)return null;const{onViewportChangeEnd:O}=x.getState();if(N.current=!1,x.setState({paneDragging:!1}),r&&u0(f,k.current??0)&&!I.current&&r(A.sourceEvent),I.current=!1,(n||O)&&wT(T.current,A.transform)){const L=bd(A.transform);T.current=L,clearTimeout(_.current),_.current=setTimeout(()=>{O==null||O(L),n==null||n(A.sourceEvent,L)},a?150:0)}})},[$,a,f,n,r]),b.useEffect(()=>{$&&$.filter(A=>{const O=P||o,L=i&&A.ctrlKey;if(A.button===1&&A.type==="mousedown"&&(zo(A,"react-flow__node")||zo(A,"react-flow__edge")))return!0;if(!f&&!O&&!a&&!u&&!i||R||!u&&A.type==="dblclick"||zo(A,g)&&A.type==="wheel"||zo(A,S)&&A.type!=="wheel"||!i&&A.ctrlKey&&A.type==="wheel"||!O&&!a&&!L&&A.type==="wheel"||!f&&(A.type==="mousedown"||A.type==="touchstart")||Array.isArray(f)&&!f.includes(A.button)&&(A.type==="mousedown"||A.type==="touchstart"))return!1;const M=Array.isArray(f)&&f.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||A.type==="wheel")&&M})},[R,$,o,i,a,u,f,c,P]),w("div",{className:"react-flow__renderer",ref:D,style:Rd,children:m})},RT=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function bT(){const{userSelectionActive:e,userSelectionRect:t}=ve(RT,nt);return e&&t?w("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 c0(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,o=t.position.y+t.height-n.height;if(r>0||o>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),o>0&&(n.style.height+=o),t.position.x<0){const i=Math.abs(t.position.x);n.position.x=n.position.x-i,n.style.width+=i,t.position.x=0}if(t.position.y<0){const i=Math.abs(t.position.y);n.position.y=n.position.y-i,n.style.height+=i,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function f0(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,o)=>{const i=e.filter(s=>s.id===o.id);if(i.length===0)return r.push(o),r;const a={...o};for(const s of i)if(s)switch(s.type){case"select":{a.selected=s.selected;break}case"position":{typeof s.position<"u"&&(a.position=s.position),typeof s.positionAbsolute<"u"&&(a.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&c0(r,a);break}case"dimensions":{typeof s.dimensions<"u"&&(a.width=s.dimensions.width,a.height=s.dimensions.height),typeof s.updateStyle<"u"&&(a.style={...a.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(a.resizing=s.resizing),a.expandParent&&c0(r,a);break}case"remove":return r}return r.push(a),r},n)}function d0(e,t){return f0(e,t)}function NT(e,t){return f0(e,t)}const rr=(e,t)=>({id:e,type:"select",selected:t});function Ho(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(rr(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(rr(r.id,!1))),n},[])}const Nd=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},OT=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),p0=b.memo(({isSelecting:e,selectionMode:t=fa.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:a,onPaneScroll:s,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:f})=>{const d=b.useRef(null),h=Ce(),v=b.useRef(0),y=b.useRef(0),E=b.useRef(),{userSelectionActive:p,elementsSelectable:m,dragging:g}=ve(OT,nt),S=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),v.current=0,y.current=0},_=z=>{i==null||i(z),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},x=z=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){z.preventDefault();return}a==null||a(z)},N=s?z=>s(z):void 0,I=z=>{const{resetSelectedElements:R,domNode:P}=h.getState();if(E.current=P==null?void 0:P.getBoundingClientRect(),!m||!e||z.button!==0||z.target!==d.current||!E.current)return;const{x:k,y:A}=er(z,E.current);R(),h.setState({userSelectionRect:{width:0,height:0,startX:k,startY:A,x:k,y:A}}),r==null||r(z)},D=z=>{const{userSelectionRect:R,nodeInternals:P,edges:k,transform:A,onNodesChange:O,onEdgesChange:L,nodeOrigin:M,getNodes:B}=h.getState();if(!e||!E.current||!R)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const j=er(z,E.current),q=R.startX??0,Q=R.startY??0,J={...R,x:j.x<q?j.x:q,y:j.y<Q?j.y:Q,width:Math.abs(j.x-q),height:Math.abs(j.y-Q)},ee=B(),ne=ky(P,J,A,t===fa.Partial,!0,M),ie=Cy(ne,k).map(le=>le.id),Se=ne.map(le=>le.id);if(v.current!==Se.length){v.current=Se.length;const le=Ho(ee,Se);le.length&&(O==null||O(le))}if(y.current!==ie.length){y.current=ie.length;const le=Ho(k,ie);le.length&&(L==null||L(le))}h.setState({userSelectionRect:J})},T=z=>{if(z.button!==0)return;const{userSelectionRect:R}=h.getState();!p&&R&&z.target===d.current&&(_==null||_(z)),h.setState({nodesSelectionActive:v.current>0}),S(),o==null||o(z)},$=z=>{p&&(h.setState({nodesSelectionActive:v.current>0}),o==null||o(z)),S()},F=m&&(e||p);return V("div",{className:tt(["react-flow__pane",{dragging:g,selection:e}]),onClick:F?void 0:Nd(_,d),onContextMenu:Nd(x,d),onWheel:Nd(N,d),onMouseEnter:F?void 0:l,onMouseDown:F?I:void 0,onMouseMove:F?D:u,onMouseUp:F?T:void 0,onMouseLeave:F?$:c,ref:d,style:Rd,children:[f,w(bT,{})]})});p0.displayName="Pane";const TT=e=>{const t=e.getNodes().filter(n=>n.selected);return{...Ay(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function AT({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ce(),{width:o,height:i,x:a,y:s,transformString:l,userSelectionActive:u}=ve(TT,nt),c=r0(),f=b.useRef(null);if(b.useEffect(()=>{var v;n||(v=f.current)==null||v.focus({preventScroll:!0})},[n]),n0({nodeRef:f}),u||!o||!i)return null;const d=e?v=>{const y=r.getState().getNodes().filter(E=>E.selected);e(v,y)}:void 0,h=v=>{Object.prototype.hasOwnProperty.call($o,v.key)&&c({x:$o[v.key].x,y:$o[v.key].y,isShiftPressed:v.shiftKey})};return w("div",{className:tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:w("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:o,height:i,top:s,left:a}})})}var kT=b.memo(AT);const CT=e=>e.nodesSelectionActive,h0=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,deleteKeyCode:s,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:f,selectionOnDrag:d,selectionMode:h,onSelectionStart:v,onSelectionEnd:y,multiSelectionKeyCode:E,panActivationKeyCode:p,zoomActivationKeyCode:m,elementsSelectable:g,zoomOnScroll:S,zoomOnPinch:_,panOnScroll:x,panOnScrollSpeed:N,panOnScrollMode:I,zoomOnDoubleClick:D,panOnDrag:T,defaultViewport:$,translateExtent:F,minZoom:z,maxZoom:R,preventScrolling:P,onSelectionContextMenu:k,noWheelClassName:A,noPanClassName:O,disableKeyboardA11y:L})=>{const M=ve(CT),B=ga(f),q=ga(p)||T,Q=B||d&&q!==!0;return ET({deleteKeyCode:s,multiSelectionKeyCode:E}),w(xT,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:i,elementsSelectable:g,zoomOnScroll:S,zoomOnPinch:_,panOnScroll:x,panOnScrollSpeed:N,panOnScrollMode:I,zoomOnDoubleClick:D,panOnDrag:!B&&q,defaultViewport:$,translateExtent:F,minZoom:z,maxZoom:R,zoomActivationKeyCode:m,preventScrolling:P,noWheelClassName:A,noPanClassName:O,children:V(p0,{onSelectionStart:v,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:q,isSelecting:!!Q,selectionMode:h,children:[e,M&&w(kT,{onSelectionContextMenu:k,noPanClassName:O,disableKeyboardA11y:L})]})})};h0.displayName="FlowRenderer";var IT=b.memo(h0);function LT(e){return ve(b.useCallback(n=>e?ky(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}const PT=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),m0=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:a}=ve(PT,nt),s=LT(e.onlyRenderVisibleElements),l=b.useRef(),u=b.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(f=>{const d=f.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));i(d)});return l.current=c,c},[]);return b.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),w("div",{className:"react-flow__nodes",style:Rd,children:s.map(c=>{var _,x;let f=c.type||"default";e.nodeTypes[f]||(a==null||a("003",Sn["003"](f)),f="default");const d=e.nodeTypes[f]||e.nodeTypes.default,h=!!(c.draggable||t&&typeof c.draggable>"u"),v=!!(c.selectable||o&&typeof c.selectable>"u"),y=!!(c.connectable||n&&typeof c.connectable>"u"),E=!!(c.focusable||r&&typeof c.focusable>"u"),p=e.nodeExtent?ld(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,m=(p==null?void 0:p.x)??0,g=(p==null?void 0:p.y)??0,S=dT({x:m,y:g,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return w(d,{id:c.id,className:c.className,style:c.style,type:f,data:c.data,sourcePosition:c.sourcePosition||K.Bottom,targetPosition:c.targetPosition||K.Top,hidden:c.hidden,xPos:m,yPos:g,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:!!c.selected,isDraggable:h,isSelectable:v,isConnectable:y,isFocusable:E,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((_=c[Oe])==null?void 0:_.z)??0,isParent:!!((x=c[Oe])!=null&&x.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel},c.id)})})};m0.displayName="NodeRenderer";var DT=b.memo(m0);const MT=[{level:0,isMaxLevel:!0,edges:[]}];function FT(e,t,n=!1){let r=-1;const o=e.reduce((a,s)=>{var c,f,d,h;const l=Rt(s.zIndex);let u=l?s.zIndex:0;return n&&(u=l?s.zIndex:Math.max(((f=(c=t.get(s.source))==null?void 0:c[Oe])==null?void 0:f.z)||0,((h=(d=t.get(s.target))==null?void 0:d[Oe])==null?void 0:h.z)||0)),a[u]?a[u].push(s):a[u]=[s],r=u>r?u:r,a},{}),i=Object.entries(o).map(([a,s])=>{const l=+a;return{edges:s,level:l,isMaxLevel:l===r}});return i.length===0?MT:i}function UT(e,t,n){const r=ve(b.useCallback(o=>e?o.edges.filter(i=>{const a=t.get(i.source),s=t.get(i.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&lT({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return FT(r,t,n)}const VT=({color:e="none",strokeWidth:t=1})=>w("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),$T=({color:e="none",strokeWidth:t=1})=>w("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"}),g0={[da.Arrow]:VT,[da.ArrowClosed]:$T};function BT(e){const t=Ce();return b.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(g0,e)?g0[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Sn["009"](e)),null)},[e])}const zT=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:s="auto-start-reverse"})=>{const l=BT(t);return l?w("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:s,refX:"0",refY:"0",children:w(l,{color:n,strokeWidth:a})}):null},HT=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,i)=>([i.markerStart,i.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const s=md(a,t);r.includes(s)||(o.push({id:s,color:a.color||e,...a}),r.push(s))}}),o),[]).sort((o,i)=>o.id.localeCompare(i.id))},v0=({defaultColor:e,rfId:t})=>{const n=ve(b.useCallback(HT({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((i,a)=>i.id!==o[a].id)));return w("defs",{children:n.map(r=>w(zT,{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))})};v0.displayName="MarkerDefinitions";var jT=b.memo(v0);const WT=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),y0=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeUpdate:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:c,onEdgeClick:f,edgeUpdaterRadius:d,onEdgeDoubleClick:h,onEdgeUpdateStart:v,onEdgeUpdateEnd:y,children:E})=>{const{edgesFocusable:p,elementsSelectable:m,width:g,height:S,connectionMode:_,nodeInternals:x,onError:N}=ve(WT,nt),I=UT(t,x,n);return g?V(Xe,{children:[I.map(({level:D,edges:T,isMaxLevel:$})=>V("svg",{style:{zIndex:D},width:g,height:S,className:"react-flow__edges react-flow__container",children:[$&&w(jT,{defaultColor:e,rfId:r}),w("g",{children:T.map(F=>{const[z,R,P]=qy(x.get(F.source)),[k,A,O]=qy(x.get(F.target));if(!P||!O)return null;let L=F.type||"default";o[L]||(N==null||N("011",Sn["011"](L)),L="default");const M=o[L]||o.default,B=_===tr.Strict?A.target:(A.target??[]).concat(A.source??[]),j=Qy(R.source,F.sourceHandle),q=Qy(B,F.targetHandle),Q=(j==null?void 0:j.position)||K.Bottom,J=(q==null?void 0:q.position)||K.Top,ee=!!(F.focusable||p&&typeof F.focusable>"u");if(!j||!q)return N==null||N("008",Sn["008"](j,F)),null;const{sourceX:ne,sourceY:ie,targetX:Se,targetY:le}=sT(z,j,Q,k,q,J);return w(M,{id:F.id,className:tt([F.className,i]),type:L,data:F.data,selected:!!F.selected,animated:!!F.animated,hidden:!!F.hidden,label:F.label,labelStyle:F.labelStyle,labelShowBg:F.labelShowBg,labelBgStyle:F.labelBgStyle,labelBgPadding:F.labelBgPadding,labelBgBorderRadius:F.labelBgBorderRadius,style:F.style,source:F.source,target:F.target,sourceHandleId:F.sourceHandle,targetHandleId:F.targetHandle,markerEnd:F.markerEnd,markerStart:F.markerStart,sourceX:ne,sourceY:ie,targetX:Se,targetY:le,sourcePosition:Q,targetPosition:J,elementsSelectable:m,onEdgeUpdate:a,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:c,onClick:f,edgeUpdaterRadius:d,onEdgeDoubleClick:h,onEdgeUpdateStart:v,onEdgeUpdateEnd:y,rfId:r,ariaLabel:F.ariaLabel,isFocusable:ee,pathOptions:"pathOptions"in F?F.pathOptions:void 0,interactionWidth:F.interactionWidth},F.id)})})]},D)),E]}):null};y0.displayName="EdgeRenderer";var YT=b.memo(y0);const GT=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function KT({children:e}){const t=ve(GT);return w("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}function XT(e){const t=xd(),n=b.useRef(!1);b.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const QT={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top},E0=({nodeId:e,handleType:t,style:n,type:r=nr.Bezier,CustomComponent:o,connectionStatus:i})=>{var x,N,I;const{fromNode:a,handleId:s,toX:l,toY:u,connectionMode:c}=ve(b.useCallback(D=>({fromNode:D.nodeInternals.get(e),handleId:D.connectionHandleId,toX:(D.connectionPosition.x-D.transform[0])/D.transform[2],toY:(D.connectionPosition.y-D.transform[1])/D.transform[2],connectionMode:D.connectionMode}),[e]),nt),f=(x=a==null?void 0:a[Oe])==null?void 0:x.handleBounds;let d=f==null?void 0:f[t];if(c===tr.Loose&&(d=d||(f==null?void 0:f[t==="source"?"target":"source"])),!a||!d)return null;const h=s?d.find(D=>D.id===s):d[0],v=h?h.x+h.width/2:(a.width??0)/2,y=h?h.y+h.height/2:a.height??0,E=(((N=a.positionAbsolute)==null?void 0:N.x)??0)+v,p=(((I=a.positionAbsolute)==null?void 0:I.y)??0)+y,m=h==null?void 0:h.position,g=m?QT[m]:null;if(!m||!g)return null;if(o)return w(o,{connectionLineType:r,connectionLineStyle:n,fromNode:a,fromHandle:h,fromX:E,fromY:p,toX:l,toY:u,fromPosition:m,toPosition:g,connectionStatus:i});let S="";const _={sourceX:E,sourceY:p,sourcePosition:m,targetX:l,targetY:u,targetPosition:g};return r===nr.Bezier?[S]=by(_):r===nr.Step?[S]=pa({..._,borderRadius:0}):r===nr.SmoothStep?[S]=pa(_):r===nr.SimpleBezier?[S]=wy(_):S=`M${E},${p} ${l},${u}`,w("path",{d:S,fill:"none",className:"react-flow__connection-path",style:n})};E0.displayName="ConnectionLine";const qT=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function ZT({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:i,nodesConnectable:a,width:s,height:l,connectionStatus:u}=ve(qT,nt);return!(o&&i&&s&&a)?null:w("svg",{style:e,width:s,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container",children:w("g",{className:tt(["react-flow__connection",u]),children:w(E0,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u})})})}const S0=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:v,onSelectionStart:y,onSelectionEnd:E,connectionLineType:p,connectionLineStyle:m,connectionLineComponent:g,connectionLineContainerStyle:S,selectionKeyCode:_,selectionOnDrag:x,selectionMode:N,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:T,deleteKeyCode:$,onlyRenderVisibleElements:F,elementsSelectable:z,selectNodesOnDrag:R,defaultViewport:P,translateExtent:k,minZoom:A,maxZoom:O,preventScrolling:L,defaultMarkerColor:M,zoomOnScroll:B,zoomOnPinch:j,panOnScroll:q,panOnScrollSpeed:Q,panOnScrollMode:J,zoomOnDoubleClick:ee,panOnDrag:ne,onPaneClick:ie,onPaneMouseEnter:Se,onPaneMouseMove:le,onPaneMouseLeave:Be,onPaneScroll:ot,onPaneContextMenu:we,onEdgeUpdate:gt,onEdgeContextMenu:X,onEdgeMouseEnter:Ge,onEdgeMouseMove:vt,onEdgeMouseLeave:ni,edgeUpdaterRadius:Ha,onEdgeUpdateStart:ja,onEdgeUpdateEnd:Wa,noDragClassName:mr,noWheelClassName:ri,noPanClassName:gr,elevateEdgesOnSelect:oi,disableKeyboardA11y:kn,nodeOrigin:Ya,nodeExtent:Ga,rfId:ii})=>(XT(i),w(IT,{onPaneClick:ie,onPaneMouseEnter:Se,onPaneMouseMove:le,onPaneMouseLeave:Be,onPaneContextMenu:we,onPaneScroll:ot,deleteKeyCode:$,selectionKeyCode:_,selectionOnDrag:x,selectionMode:N,onSelectionStart:y,onSelectionEnd:E,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:T,elementsSelectable:z,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:B,zoomOnPinch:j,zoomOnDoubleClick:ee,panOnScroll:q,panOnScrollSpeed:Q,panOnScrollMode:J,panOnDrag:ne,defaultViewport:P,translateExtent:k,minZoom:A,maxZoom:O,onSelectionContextMenu:v,preventScrolling:L,noDragClassName:mr,noWheelClassName:ri,noPanClassName:gr,disableKeyboardA11y:kn,children:V(KT,{children:[w(YT,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:u,onEdgeUpdate:gt,onlyRenderVisibleElements:F,onEdgeContextMenu:X,onEdgeMouseEnter:Ge,onEdgeMouseMove:vt,onEdgeMouseLeave:ni,onEdgeUpdateStart:ja,onEdgeUpdateEnd:Wa,edgeUpdaterRadius:Ha,defaultMarkerColor:M,noPanClassName:gr,elevateEdgesOnSelect:!!oi,disableKeyboardA11y:kn,rfId:ii,children:w(ZT,{style:m,type:p,component:g,containerStyle:S})}),w("div",{className:"react-flow__edgelabel-renderer"}),w(DT,{nodeTypes:e,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:h,selectNodesOnDrag:R,onlyRenderVisibleElements:F,noPanClassName:gr,noDragClassName:mr,disableKeyboardA11y:kn,nodeOrigin:Ya,nodeExtent:Ga,rfId:ii})]})}));S0.displayName="GraphView";var JT=b.memo(S0);const Od=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],jo={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:Od,nodeExtent:Od,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:tr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:gy},e2=()=>pv((e,t)=>({...jo,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:_d(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n<"u",i=typeof r<"u",a=o?_d(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const f=window.getComputedStyle(c),{m22:d}=new window.DOMMatrixReadOnly(f.transform),h=n.reduce((y,E)=>{const p=o.get(E.id);if(p){const m=sd(E.nodeElement);!!(m.width&&m.height&&(p.width!==m.width||p.height!==m.height||E.forceUpdate))&&(o.set(p.id,{...p,[Oe]:{...p[Oe],handleBounds:{source:t0(".source",E.nodeElement,d,u),target:t0(".target",E.nodeElement,d,u)}},...m}),y.push({id:p.id,type:"dimensions",dimensions:m}))}return y},[]);s0(o,u);const v=a||i&&!a&&l0(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:v}),(h==null?void 0:h.length)>0&&(r==null||r(h))},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:i}=t(),a=n.map(s=>{const l={id:s.id,type:"position",dragging:o};return r&&(l.positionAbsolute=s.positionAbsolute,l.position=s.position),l});i(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(i){const u=d0(n,s()),c=_d(u,o,a,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map(l=>rr(l,!0)):(a=Ho(i(),n),s=Ho(o,[])),Fl({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map(l=>rr(l,!0)):(a=Ho(o,n),s=Ho(i(),[])),Fl({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=n||i(),s=r||o,l=a.map(c=>(c.selected=!1,rr(c.id,!1))),u=s.map(c=>rr(c.id,!1));Fl({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r==null||r.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r==null||r.scaleExtent([o,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(),i=r().filter(s=>s.selected).map(s=>rr(s.id,!1)),a=n.filter(s=>s.selected).map(s=>rr(s.id,!1));Fl({changedNodes:i,changedEdges:a,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=ld(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:i,d3Zoom:a,d3Selection:s,translateExtent:l}=t();if(!a||!s||!n.x&&!n.y)return;const u=Jn.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[o,i]],f=a==null?void 0:a.constrain()(u,c,l);a.transform(s,f)},cancelConnection:()=>e({connectionNodeId:jo.connectionNodeId,connectionHandleId:jo.connectionHandleId,connectionHandleType:jo.connectionHandleType,connectionStatus:jo.connectionStatus}),reset:()=>e({...jo})})),w0=({children:e})=>{const t=b.useRef(null);return t.current||(t.current=e2()),w(_O,{value:t.current,children:e})};w0.displayName="ReactFlowProvider";const _0=({children:e})=>b.useContext(Il)?w(Xe,{children:e}):w(w0,{children:e});_0.displayName="ReactFlowWrapper";function x0(e,t){return b.useRef(null),b.useMemo(()=>t(e),[e])}const t2={input:$y,default:vd,output:zy,group:yd},n2={default:Dl,straight:pd,step:dd,smoothstep:Ll,simplebezier:fd},r2=[0,0],o2=[15,15],i2={x:0,y:0,zoom:1},a2={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},R0=b.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=t2,edgeTypes:a=n2,onNodeClick:s,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onConnect:h,onConnectStart:v,onConnectEnd:y,onClickConnectStart:E,onClickConnectEnd:p,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:S,onNodeContextMenu:_,onNodeDoubleClick:x,onNodeDragStart:N,onNodeDrag:I,onNodeDragStop:D,onNodesDelete:T,onEdgesDelete:$,onSelectionChange:F,onSelectionDragStart:z,onSelectionDrag:R,onSelectionDragStop:P,onSelectionContextMenu:k,onSelectionStart:A,onSelectionEnd:O,connectionMode:L=tr.Strict,connectionLineType:M=nr.Bezier,connectionLineStyle:B,connectionLineComponent:j,connectionLineContainerStyle:q,deleteKeyCode:Q="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:ee=!1,selectionMode:ne=fa.Full,panActivationKeyCode:ie="Space",multiSelectionKeyCode:Se="Meta",zoomActivationKeyCode:le="Meta",snapToGrid:Be=!1,snapGrid:ot=o2,onlyRenderVisibleElements:we=!1,selectNodesOnDrag:gt=!0,nodesDraggable:X,nodesConnectable:Ge,nodesFocusable:vt,nodeOrigin:ni=r2,edgesFocusable:Ha,elementsSelectable:ja,defaultViewport:Wa=i2,minZoom:mr=.5,maxZoom:ri=2,translateExtent:gr=Od,preventScrolling:oi=!0,nodeExtent:kn,defaultMarkerColor:Ya="#b1b1b7",zoomOnScroll:Ga=!0,zoomOnPinch:ii=!0,panOnScroll:it=!1,panOnScrollSpeed:zt=.5,panOnScrollMode:Yr=Do.Free,zoomOnDoubleClick:Gr=!0,panOnDrag:Cn=!0,onPaneClick:wu,onPaneMouseEnter:Ka,onPaneMouseMove:Xa,onPaneMouseLeave:zp,onPaneScroll:wS,onPaneContextMenu:Kr,children:EP,onEdgeUpdate:SP,onEdgeContextMenu:wP,onEdgeDoubleClick:_P,onEdgeMouseEnter:xP,onEdgeMouseMove:RP,onEdgeMouseLeave:bP,onEdgeUpdateStart:NP,onEdgeUpdateEnd:OP,edgeUpdaterRadius:TP=10,onNodesChange:AP,onEdgesChange:kP,noDragClassName:CP="nodrag",noWheelClassName:IP="nowheel",noPanClassName:_S="nopan",fitView:LP=!1,fitViewOptions:PP,connectOnClick:DP=!0,attributionPosition:MP,proOptions:FP,defaultEdgeOptions:UP,elevateNodesOnSelect:VP=!0,elevateEdgesOnSelect:$P=!1,disableKeyboardA11y:xS=!1,autoPanOnConnect:BP=!0,autoPanOnNodeDrag:zP=!0,connectionRadius:HP=20,onError:jP,style:WP,id:RS,...YP},GP)=>{const KP=x0(i,fT),XP=x0(a,aT),Hp=RS||"1";return w("div",{...YP,style:{...WP,...a2},ref:GP,className:tt(["react-flow",o]),"data-testid":"rf__wrapper",id:RS,children:V(_0,{children:[w(JT,{onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:S,onNodeContextMenu:_,onNodeDoubleClick:x,nodeTypes:KP,edgeTypes:XP,connectionLineType:M,connectionLineStyle:B,connectionLineComponent:j,connectionLineContainerStyle:q,selectionKeyCode:J,selectionOnDrag:ee,selectionMode:ne,deleteKeyCode:Q,multiSelectionKeyCode:Se,panActivationKeyCode:ie,zoomActivationKeyCode:le,onlyRenderVisibleElements:we,selectNodesOnDrag:gt,defaultViewport:Wa,translateExtent:gr,minZoom:mr,maxZoom:ri,preventScrolling:oi,zoomOnScroll:Ga,zoomOnPinch:ii,zoomOnDoubleClick:Gr,panOnScroll:it,panOnScrollSpeed:zt,panOnScrollMode:Yr,panOnDrag:Cn,onPaneClick:wu,onPaneMouseEnter:Ka,onPaneMouseMove:Xa,onPaneMouseLeave:zp,onPaneScroll:wS,onPaneContextMenu:Kr,onSelectionContextMenu:k,onSelectionStart:A,onSelectionEnd:O,onEdgeUpdate:SP,onEdgeContextMenu:wP,onEdgeDoubleClick:_P,onEdgeMouseEnter:xP,onEdgeMouseMove:RP,onEdgeMouseLeave:bP,onEdgeUpdateStart:NP,onEdgeUpdateEnd:OP,edgeUpdaterRadius:TP,defaultMarkerColor:Ya,noDragClassName:CP,noWheelClassName:IP,noPanClassName:_S,elevateEdgesOnSelect:$P,rfId:Hp,disableKeyboardA11y:xS,nodeOrigin:ni,nodeExtent:kn}),w(ZO,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:v,onConnectEnd:y,onClickConnectStart:E,onClickConnectEnd:p,nodesDraggable:X,nodesConnectable:Ge,nodesFocusable:vt,edgesFocusable:Ha,elementsSelectable:ja,elevateNodesOnSelect:VP,minZoom:mr,maxZoom:ri,nodeExtent:kn,onNodesChange:AP,onEdgesChange:kP,snapToGrid:Be,snapGrid:ot,connectionMode:L,translateExtent:gr,connectOnClick:DP,defaultEdgeOptions:UP,fitView:LP,fitViewOptions:PP,onNodesDelete:T,onEdgesDelete:$,onNodeDragStart:N,onNodeDrag:I,onNodeDragStop:D,onSelectionDrag:R,onSelectionDragStart:z,onSelectionDragStop:P,noPanClassName:_S,nodeOrigin:ni,rfId:Hp,autoPanOnConnect:BP,autoPanOnNodeDrag:zP,onError:jP,connectionRadius:HP}),w(QO,{onSelectionChange:F}),EP,w(RO,{proOptions:FP,position:MP}),w(rT,{rfId:Hp,disableKeyboardA11y:xS})]})})});R0.displayName="ReactFlow";function s2(){const e=Ce();return b.useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${t}"]`);o&&requestAnimationFrame(()=>r([{id:t,nodeElement:o,forceUpdate:!0}]))},[])}function l2(){return w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:w("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function u2(){return w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:w("path",{d:"M0 0h32v4.2H0z"})})}function c2(){return w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:w("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function f2(){return w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:w("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function d2(){return w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:w("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}const va=({children:e,className:t,...n})=>w("button",{type:"button",className:tt(["react-flow__controls-button",t]),...n,children:e});va.displayName="ControlButton";const p2=e=>e.nodesDraggable&&e.nodesConnectable&&e.elementsSelectable,b0=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:a,onFitView:s,onInteractiveChange:l,className:u,children:c,position:f="bottom-left"})=>{const d=Ce(),[h,v]=b.useState(!1),y=ve(p2),{zoomIn:E,zoomOut:p,fitView:m}=xd();if(b.useEffect(()=>{v(!0)},[]),!h)return null;const g=()=>{E(),i==null||i()},S=()=>{p(),a==null||a()},_=()=>{m(o),s==null||s()},x=()=>{d.setState({nodesDraggable:!y,nodesConnectable:!y,elementsSelectable:!y}),l==null||l(!y)};return V(ad,{className:tt(["react-flow__controls",u]),position:f,style:e,children:[t&&V(Xe,{children:[w(va,{onClick:g,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",children:w(l2,{})}),w(va,{onClick:S,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",children:w(u2,{})})]}),n&&w(va,{className:"react-flow__controls-fitview",onClick:_,title:"fit view","aria-label":"fit view",children:w(c2,{})}),r&&w(va,{className:"react-flow__controls-interactive",onClick:x,title:"toggle interactivity","aria-label":"toggle interactivity",children:y?w(d2,{}):w(f2,{})}),c]})};b0.displayName="Controls";var h2=b.memo(b0);let m2=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const g2=!1,N0="0.0.0",O0="0.0.0",T0="sw-cfb-root",A0={type:"floating",markerEnd:{type:da.Arrow,width:20,height:20,color:"#c2c8d1"},style:{stroke:"#c2c8d1",strokeWidth:1.5}},Ie=()=>m2(),v2=(e,t)=>{var i;const n=new Blob([JSON.stringify({nodes:e,edges:t},null,2)],{type:"application/json"}),r=window.URL.createObjectURL(n),o=window.open();(i=o==null?void 0:o.location)!=null&&i.href&&(o.location.href=r)},y2=e=>e.map(t=>typeof t=="string"?t.trim():t).filter(Boolean).join(),Td=e=>e.split(",").map(t=>t.trim()).filter(Boolean),E2=(e,t)=>{let n;return function(){clearTimeout(n),n=setTimeout(()=>e(),t)}},S2=e=>({...e,...A0}),w2=e=>e.type==="handleCall"?{...e,deletable:!1}:e,_2=e=>{if(e)return`${location.protocol}//${e}`;const t=location.hostname.split(".").slice(-2).join(".");return`${location.protocol}//stack1.${t}`},Ad=()=>[{connectResult:"answered",id:Ie()},{connectResult:"noAnswer",id:Ie()},{connectResult:"busy",id:Ie()},{connectResult:"decline",id:Ie()},{connectResult:"error",id:Ie()}],k0={answer:()=>({}),forwardAddress:()=>({destinations:[],destinationType:"address",options:Ad(),sessionTimeout:void 0,type:"single"}),forwardPhone:()=>({destinations:[],destinationType:"phone",options:Ad(),sessionTimeout:void 0,type:"single"}),forwardResource:()=>({destinations:[],destinationType:"resource",options:Ad(),sessionTimeout:void 0,type:"single"}),hangup:()=>({}),play:()=>({selected:"",text:"",url:""}),promptPlay:()=>({initialTimeout:5,options:[],results:[{id:Ie(),result:"no_match"},{id:Ie(),result:"no_input"}],selected:"",text:"",url:""}),record:()=>({beep:!1,format:"wav",options:[{id:Ie(),recordResult:"success"},{id:Ie(),recordResult:"failed"}],stereo:!1,terminators:""}),recordCallStart:()=>({beep:!1,controlId:Ie(),format:"wav",label:"",options:[{id:Ie(),recordResult:"success"},{id:Ie(),recordResult:"failed"}],stereo:!1,terminators:""}),recordCallStop:()=>({controlId:""}),sendSms:()=>({body:"",fromNumber:"",media:[],region:"",tags:[],toNumber:""}),set:()=>({variables:[]}),unset:()=>({variables:[]}),request:()=>({url:"",method:"POST",headers:{},body:"",options:[{id:Ie(),requestResult:"success"},{id:Ie(),requestResult:"failed"}]})},x2=e=>k0[e]!==void 0,R2=e=>typeof e=="object"&&e!==null&&Object.keys(e).length>0,C0=(e,t={})=>{const{deletable:n=!0,position:r={x:300,y:250},selected:o=!0}=t,i=()=>({id:Ie(),type:e,position:r,deletable:n,data:{missingRequiredParams:!1},selected:o}),a=(l,u)=>({...l,data:{...l.data,...u,missingRequiredParams:!0}});let s=i();if(x2(e)){const l=k0[e]();R2(l)&&(s=a(s,l))}return s},Ul={apiVersion:void 0,builderVersion:O0,cfbAppVersion:N0,relayMLVersion:void 0},b2=e=>{const t={...Ul,...e};Ul.apiVersion=t.apiVersion,Ul.builderVersion=t.builderVersion,Ul.relayMLVersion=t.relayMLVersion},kd=()=>({apiVersion:void 0,builderVersion:O0,cfbAppVersion:N0,relayMLVersion:void 0}),N2={variables:new Map,keyToIdMap:new Map},Dr=dl((e,t)=>({...N2,_dedupeKey(n,r){const o=Array.from(r.values()).find(i=>i.key===n);o&&r.delete(o.id)},isKeyDuplicate(n,r){const o=t().keyToIdMap.get(n);return o?o!==r:!1},removeVariable(n){e(r=>{const o=new Map(r.variables),i=new Map(r.keyToIdMap),a=o.get(n);return a&&(o.delete(n),i.delete(a.key)),{keyToIdMap:i,variables:o}})},setVariables:n=>{e(()=>{const r=new Map,o=new Map;return n.forEach(i=>{const a=o.get(i.key);a&&r.delete(a),r.set(i.id,i),o.set(i.key,i.id)}),{keyToIdMap:o,variables:r}})},upsertVariable:n=>{e(r=>{const o=new Map(r.variables),i=new Map(r.keyToIdMap),a=o.get(n.id),s=i.get(n.key);return s&&o.delete(s),a&&i.delete(a.key),o.set(n.id,n),i.set(n.key,n.id),{keyToIdMap:i,variables:o}})}})),O2=e=>{const t=[];e.forEach(n=>{n.type==="set"&&n.data.variables&&t.push(...n.data.variables)}),Dr.getState().setVariables(t)},T2=e=>{if(e!=null&&e.length){const{removeVariable:t}=Dr.getState();e.forEach(n=>{n.type==="set"&&n.data.variables&&n.data.variables.forEach(o=>t(o.id))})}},A2={entries:[]},Wo=dl((e,t)=>({...A2,getEntries(){return t().entries},getEntryValue(n){var r;return(r=t().entries.find(o=>o.controlId===n))==null?void 0:r.label},isKeyDuplicate(n){return t().entries.some(r=>r.controlId===n)},isValueDuplicate(n,r){const o=t().entries.reduce((i,a)=>{const{label:s,controlId:l}=a;return s!==""&&s===n&&(!r||l!==r)?[...i,a]:i},[]);return Boolean(o.length)},removeEntry(n){e(r=>({entries:r.entries.filter(o=>o.controlId!==n)}))},setEntries:n=>{e(()=>({entries:[...n]}))},upsertEntry:n=>{e(r=>{let o=[...r.entries];const i=Boolean(n.label.trim());return(r.isKeyDuplicate(n.controlId)||!i)&&(o=o.filter(a=>a.controlId!==n.controlId)),i&&o.push({...n}),{entries:o}})}})),k2=e=>{const t=[];e.forEach(n=>{n.type==="recordCallStart"&&n.data.controlId&&n.data.label&&t.push({controlId:n.data.controlId,label:n.data.label})}),Wo.setState({entries:t})},C2=(e,t)=>{const n=[];return t.forEach(r=>{r.type==="recordCallStart"&&r.data.controlId&&(n.push(r.data.controlId),Wo.getState().removeEntry(r.data.controlId))}),n.length?e.reduce((r,o)=>o.type==="recordCallStop"&&n.includes(o.data.controlId)?[...r,{...o,data:{...o.data,controlId:"",missingRequiredParams:!0}}]:r,[]):[]},wn=Oo(),I2=C0("handleCall",{position:{x:300,y:100},deletable:!1}),ya={backButtonHref:void 0,colorMode:"light",edges:[],edgeUpdateSuccessful:!1,flowId:"",flowTitle:"Test flow",hostname:void 0,httpService:void 0,isEdgeConnecting:!1,nodes:[I2],reactFlowInstance:void 0,selectedNode:void 0},Re=dl((e,t)=>({...ya,reset:()=>{e({nodes:[...ya.nodes],edges:[...ya.edges]}),qt()},saveRFDataToServer:async()=>{const{flowId:n,nodes:r,edges:o,httpService:i}=t(),{builderVersion:a}=kd();try{if(!i)throw new Error("Missing httpService");await i.putFlow({flowId:n,builderVersion:a,nodes:r,edges:o})}catch(s){console.error("Put Flow",s)}},exportStoreData:()=>{const{nodes:n,edges:r}=t();v2(n,r)},addNode:n=>{const{nodes:r,reactFlowInstance:o}=t();if(!o)throw new Error("ReactFlowInstance not found");const i=150,a=150,s=o.project({x:i,y:a}),l=C0(n,{position:s}),u=r.map(c=>({...c,selected:!1}));u.push(l),e({nodes:u,selectedNode:l}),qt()},getNodeEdges:n=>t().edges.filter(r=>r.source===n),getTargetEdges:n=>t().edges.filter(r=>r.target===n),partialUpdateNodeData:(n,r)=>{e(o=>({nodes:o.nodes.map(i=>i.id===n?{...i,data:{...i.data,...r}}:i)})),qt()},removeNode:n=>{const r=t().reactFlowInstance;r&&r.deleteElements({nodes:[{id:n}]}),qt()},removeEdge:n=>{const r=t().reactFlowInstance;r&&r.deleteElements({edges:[{id:n}]}),qt()},onInit:async n=>{const{flowId:r,hostname:o}=t();wn.debug("onInit",r,o);const i=_x({baseUrl:_2(o),headers:{Authorization:`Basic ${window.btoa("signalwire:1aG93uXk")}`}}),a=kd(),{apiVersion:s=a.apiVersion,data:l={edges:ya.edges,nodes:ya.nodes},builderVersion:u=a.builderVersion,relayMLVersion:c=a.relayMLVersion}=await i.getFlow({flowId:r});e({httpService:i,reactFlowInstance:n,nodes:l.nodes.map(w2),edges:l.edges.map(S2)}),b2({apiVersion:s,builderVersion:u,relayMLVersion:c}),O2(l.nodes),k2(l.nodes),setTimeout(()=>{n.fitView({duration:1e3,includeHiddenNodes:!0,padding:.3})},50)},onNodesChange:n=>{e({nodes:d0(n,t().nodes)}),qt()},onNodesDelete:n=>{wn.debug("onNodesDelete"),T2(n),C2(t().nodes,n).forEach(o=>{Re.getState().partialUpdateNodeData(o.id,o.data)})},onEdgesChange:n=>{e({edges:NT(n,t().edges)}),qt()},onConnect:n=>{wn.debug("onConnect"),e({edges:Oy(n,t().edges)}),qt()},onConnectStart:()=>{wn.debug("onConnectStart"),e({isEdgeConnecting:!0})},onConnectEnd:()=>{wn.debug("onConnectEnd"),e({isEdgeConnecting:!1})},onEdgeUpdateStart:()=>{wn.debug("onEdgeUpdateStart"),e({edgeUpdateSuccessful:!1})},onEdgeUpdate:(n,r)=>{wn.debug("onEdgeUpdate");const o=VO(n,r,t().edges);e({edges:o,edgeUpdateSuccessful:!0}),qt()},onEdgeUpdateEnd:(n,r)=>{wn.debug("onEdgeUpdateEnd"),t().edgeUpdateSuccessful?e({edgeUpdateSuccessful:!0}):(e(o=>({edges:o.edges.filter(i=>i.id!==r.id)})),qt())},onSelectionChange:({nodes:n})=>{e({selectedNode:n.find(r=>r.selected)})},setColorMode:n=>{e({colorMode:n})}}));window.__useRFStore=Re;const qt=E2(()=>{const{saveRFDataToServer:e}=Re.getState();wn.debug("saveRFDataToServer Debounced"),e()},500),QP="";function L2({fromNode:e,fromPosition:t,fromX:n,fromY:r,toX:o,toY:i}){if(!e)return null;const[a]=pa({borderRadius:20,sourceX:n,sourceY:r,sourcePosition:t,targetPosition:K.Top,targetX:o,targetY:i});return V("g",{children:[w("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:a}),w("circle",{cx:o,cy:i,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})}function P2(e,t,n,r=0){const{width:o,height:i,position:a}=n,s=o??0,l=i??0,u=s/2,c=l/2,f=a.x+u,d=a.y+c,h=e,v=t,y=(h-f)/s-(v-d)/l,E=(h-f)/l+(v-d)/l,p=1/(Math.abs(y)+Math.abs(E)),m=p*y,g=p*E,S=u*(m+g)+f;return{tx:Math.min(Math.max(S,a.x+r),a.x+s-r),ty:a.y}}function Ft(e){return Ft=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},Ft(e)}function bt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D2(e,t){if(Ft(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ft(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function I0(e){var t=D2(e,"string");return Ft(t)==="symbol"?t:String(t)}function L0(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,I0(r.key),r)}}function Nt(e,t,n){return t&&L0(e.prototype,t),n&&L0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function or(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cd(e,t){return Cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Cd(e,t)}function Vl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cd(e,t)}function Ea(e,t){if(t&&(Ft(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return or(e)}function Zt(e){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zt(e)}function _n(e,t,n){return t=I0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M2(e){if(Array.isArray(e))return e}function F2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function P0(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 U2(e,t){if(e){if(typeof e=="string")return P0(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 P0(e,t)}}function V2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $2(e){return M2(e)||F2(e)||U2(e)||V2()}function D0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function M0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D0(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var B2={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},z2=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bt(this,e),this.init(t,n)}return Nt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||B2,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,i){return i&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,M0(M0({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Jt=new z2,ir=function(){function e(){bt(this,e),this.observers={}}return Nt(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function Sa(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function F0(e){return e==null?"":""+e}function H2(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Id(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function U0(e,t,n){var r=Id(e,t,Object),o=r.obj,i=r.k;o[i]=n}function j2(e,t,n,r){var o=Id(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function $l(e,t){var n=Id(e,t),r=n.obj,o=n.k;if(r)return r[o]}function V0(e,t,n){var r=$l(e,n);return r!==void 0?r:$l(t,n)}function $0(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):$0(e[r],t[r],n):e[r]=t[r]);return e}function Yo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var W2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Y2(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return W2[t]}):e}var Bl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,G2=[" ",",","?","!",";"];function K2(e,t,n){t=t||"",n=n||"";var r=G2.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function B0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function zl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B0(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X2(e){var t=Q2();return function(){var r=Zt(e),o;if(t){var i=Zt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ea(this,o)}}function Q2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z0(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o||typeof o[r[i]]=="string"&&i+1<r.length)return;if(o[r[i]]===void 0){for(var a=2,s=r.slice(i,i+a).join(n),l=o[s];l===void 0&&r.length>i+a;)a++,s=r.slice(i,i+a).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=r.slice(i+a).join(n);return u?z0(l,u,n):void 0}o=o[r[i]]}return o}}var q2=function(e){Vl(n,e);var t=X2(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return bt(this,n),o=t.call(this),Bl&&ir.call(or(o)),o.data=r||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return Nt(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[o,i];a&&typeof a!="string"&&(c=c.concat(a)),a&&typeof a=="string"&&(c=c.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(c=o.split("."));var f=$l(this.data,c);return f||!u||typeof a!="string"?f:z0(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var c=[o,i];a&&(c=c.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(c=o.split("."),s=i,i=c[1]),this.addNamespaces(i),U0(this.data,c,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[o,i];o.indexOf(".")>-1&&(c=o.split("."),s=a,a=i,i=c[1]),this.addNamespaces(i);var f=$l(this.data,c)||{};s?$0(f,a,l):f=zl(zl({},f),a),U0(this.data,c,f),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?zl(zl({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(ir),H0={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,o,i))}),n}};function j0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z2(e){var t=J2();return function(){var r=Zt(e),o;if(t){var i=Zt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ea(this,o)}}function J2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var W0={},Y0=function(e){Vl(n,e);var t=Z2(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return bt(this,n),o=t.call(this),Bl&&ir.call(or(o)),H2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,or(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Jt.create("translator"),o}return Nt(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,c=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!K2(o,a,s);if(u&&!c){var f=o.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:o,namespaces:l};var d=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(d[0])>-1)&&(l=d.shift()),o=d.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(Ft(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,c=this.extractFromKey(o[o.length-1],i),f=c.key,d=c.namespaces,h=d[d.length-1],v=i.lng||this.language,y=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(y){var E=i.nsSeparator||this.options.nsSeparator;return l?{res:"".concat(h).concat(E).concat(f),usedKey:f,exactUsedKey:f,usedLng:v,usedNS:h}:"".concat(h).concat(E).concat(f)}return l?{res:f,usedKey:f,exactUsedKey:f,usedLng:v,usedNS:h}:f}var p=this.resolve(o,i),m=p&&p.res,g=p&&p.usedKey||f,S=p&&p.exactUsedKey||f,_=Object.prototype.toString.apply(m),x=["[object Number]","[object Function]","[object RegExp]"],N=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,D=typeof m!="string"&&typeof m!="boolean"&&typeof m!="number";if(I&&m&&D&&x.indexOf(_)<0&&!(typeof N=="string"&&_==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,Ye(Ye({},i),{},{ns:d})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(p.res=T,p):T}if(u){var $=_==="[object Array]",F=$?[]:{},z=$?S:g;for(var R in m)if(Object.prototype.hasOwnProperty.call(m,R)){var P="".concat(z).concat(u).concat(R);F[R]=this.translate(P,Ye(Ye({},i),{joinArrays:!1,ns:d})),F[R]===P&&(F[R]=m[R])}m=F}}else if(I&&typeof N=="string"&&_==="[object Array]")m=m.join(N),m&&(m=this.extendTranslation(m,o,i,a));else{var k=!1,A=!1,O=i.count!==void 0&&typeof i.count!="string",L=n.hasDefaultValue(i),M=O?this.pluralResolver.getSuffix(v,i.count,i):"",B=i["defaultValue".concat(M)]||i.defaultValue;!this.isValidLookup(m)&&L&&(k=!0,m=B),this.isValidLookup(m)||(A=!0,m=f);var j=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,q=j&&A?void 0:m,Q=L&&B!==m&&this.options.updateMissing;if(A||k||Q){if(this.logger.log(Q?"updateKey":"missingKey",v,h,f,Q?B:m),u){var J=this.resolve(f,Ye(Ye({},i),{},{keySeparator:!1}));J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ee=[],ne=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ne&&ne[0])for(var ie=0;ie<ne.length;ie++)ee.push(ne[ie]);else this.options.saveMissingTo==="all"?ee=this.languageUtils.toResolveHierarchy(i.lng||this.language):ee.push(i.lng||this.language);var Se=function(Be,ot,we){var gt=L&&we!==m?we:q;s.options.missingKeyHandler?s.options.missingKeyHandler(Be,h,ot,gt,Q,i):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(Be,h,ot,gt,Q,i),s.emit("missingKey",Be,h,ot,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?ee.forEach(function(le){s.pluralResolver.getSuffixes(le,i).forEach(function(Be){Se([le],f+Be,i["defaultValue".concat(Be)]||B)})}):Se(ee,f,B))}m=this.extendTranslation(m,o,i,p,a),A&&m===f&&this.options.appendNamespaceToMissingKey&&(m="".concat(h,":").concat(f)),(A||k)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(f):f,k?m:void 0):m=this.options.parseMissingKeyHandler(m))}return l?(p.res=m,p):m}},{key:"extendTranslation",value:function(o,i,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,Ye(Ye({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Ye(Ye({},a),{interpolation:Ye(Ye({},this.options.interpolation),a.interpolation)}));var c=typeof o=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(c){var d=o.match(this.interpolator.nestingRegexp);f=d&&d.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Ye(Ye({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,a.lng||this.language,a),c){var v=o.match(this.interpolator.nestingRegexp),y=v&&v.length;f<y&&(a.nest=!1)}a.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var m=arguments.length,g=new Array(m),S=0;S<m;S++)g[S]=arguments[S];return l&&l[0]===g[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(g[0]," in key: ").concat(i[0])),null):u.translate.apply(u,g.concat([i]))},a)),a.interpolation&&this.interpolator.reset()}var E=a.postProcess||this.options.postProcess,p=typeof E=="string"?[E]:E;return o!=null&&p&&p.length&&a.applyPostProcessor!==!1&&(o=H0.handle(p,o,i,this.options&&this.options.postProcessPassResolved?Ye({i18nResolved:s},a):a,this)),o}},{key:"resolve",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,c,f;return typeof o=="string"&&(o=[o]),o.forEach(function(d){if(!i.isValidLookup(s)){var h=i.extractFromKey(d,a),v=h.key;l=v;var y=h.namespaces;i.options.fallbackNS&&(y=y.concat(i.options.fallbackNS));var E=a.count!==void 0&&typeof a.count!="string",p=E&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),m=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",g=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);y.forEach(function(S){i.isValidLookup(s)||(f=S,!W0["".concat(g[0],"-").concat(S)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(f)&&(W0["".concat(g[0],"-").concat(S)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(g.join(", "),`" won't get resolved as namespace "`).concat(f,'" 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!!!")),g.forEach(function(_){if(!i.isValidLookup(s)){c=_;var x=[v];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(x,v,_,S,a);else{var N;E&&(N=i.pluralResolver.getSuffix(_,a.count,a));var I="".concat(i.options.pluralSeparator,"zero");if(E&&(x.push(v+N),p&&x.push(v+I)),m){var D="".concat(v).concat(i.options.contextSeparator).concat(a.context);x.push(D),E&&(x.push(D+N),p&&x.push(D+I))}}for(var T;T=x.pop();)i.isValidLookup(s)||(u=T,s=i.getResource(_,S,T,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),n}(ir);function Ld(e){return e.charAt(0).toUpperCase()+e.slice(1)}var G0=function(){function e(t){bt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Jt.create("languageUtils")}return Nt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Ld(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Ld(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Ld(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(i){if(!o){var a=r.formatLanguageCode(i);(!r.options.supportedLngs||r.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&n.forEach(function(i){if(!o){var a=r.getLanguagePartFromCode(i);if(r.isSupportedCode(a))return o=a;o=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),eA=[{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}],tA={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},nA=["v1","v2","v3"],K0={zero:0,one:1,two:2,few:3,many:4,other:5};function rA(){var e={};return eA.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:tA[t.fc]}})}),e}var oA=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bt(this,e),this.languageUtils=t,this.options=n,this.logger=Jt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=rA()}return Nt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(i){return"".concat(r).concat(i)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return K0[a]-K0[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):i.numbers.map(function(a){return r.getSuffix(n,a,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(n,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(r)):this.getSuffixRetroCompatible(i,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,i=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[i];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!nA.includes(this.options.compatibilityJSON)}}]),e}();function X0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X0(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var iA=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bt(this,e),this.logger=Jt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return Nt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:Y2,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Yo(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Yo(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Yo(r.nestingPrefix):r.nestingPrefixEscaped||Yo("$t("),this.nestingSuffix=r.nestingSuffix?Yo(r.nestingSuffix):r.nestingSuffixEscaped||Yo(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,i){var a=this,s,l,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(E){return E.replace(/\$/g,"$$$$")}var d=function(p){if(p.indexOf(a.formatSeparator)<0){var m=V0(r,c,p);return a.alwaysFormat?a.format(m,void 0,o,Ut(Ut(Ut({},i),r),{},{interpolationkey:p})):m}var g=p.split(a.formatSeparator),S=g.shift().trim(),_=g.join(a.formatSeparator).trim();return a.format(V0(r,c,S),_,o,Ut(Ut(Ut({},i),r),{},{interpolationkey:S}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,v=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(p){return f(p)}},{regex:this.regexp,safeValue:function(p){return a.escapeValue?f(a.escape(p)):f(p)}}];return y.forEach(function(E){for(u=0;s=E.regex.exec(n);){var p=s[1].trim();if(l=d(p),l===void 0)if(typeof h=="function"){var m=h(n,s,i);l=typeof m=="string"?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))l="";else if(v){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(p," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=F0(l));var g=E.safeValue(l);if(n=n.replace(s[0],g),v?(E.regex.lastIndex+=l.length,E.regex.lastIndex-=s[0].length):E.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;function u(h,v){var y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;var E=h.split(new RegExp("".concat(y,"[ ]*{"))),p="{".concat(E[1]);h=E[0],p=this.interpolate(p,l);var m=p.match(/'/g),g=p.match(/"/g);(m&&m.length%2===0&&!g||g.length%2!==0)&&(p=p.replace(/'/g,'"'));try{l=JSON.parse(p),v&&(l=Ut(Ut({},v),l))}catch(S){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),S),"".concat(h).concat(y).concat(p)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(n);){var c=[];l=Ut({},i),l=l.replace&&typeof l.replace!="string"?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;var f=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var d=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=d.shift(),c=d,f=!0}if(s=r(u.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=F0(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),f&&(s=c.reduce(function(h,v){return o.format(h,v,i.lng,Ut(Ut({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function Q0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q0(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aA(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=$2(s),u=l[0],c=l.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=f),f==="false"&&(n[u.trim()]=!1),f==="true"&&(n[u.trim()]=!0),isNaN(f)||(n[u.trim()]=parseInt(f,10))}})}}return{formatName:t,formatOptions:n}}function Go(e){var t={};return function(r,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(r)}}var sA=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bt(this,e),this.logger=Jt.create("formatter"),this.options=t,this.formats={number:Go(function(n,r){var o=new Intl.NumberFormat(n,xn({},r));return function(i){return o.format(i)}}),currency:Go(function(n,r){var o=new Intl.NumberFormat(n,xn(xn({},r),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:Go(function(n,r){var o=new Intl.DateTimeFormat(n,xn({},r));return function(i){return o.format(i)}}),relativetime:Go(function(n,r){var o=new Intl.RelativeTimeFormat(n,xn({},r));return function(i){return o.format(i,r.range||"day")}}),list:Go(function(n,r){var o=new Intl.ListFormat(n,xn({},r));return function(i){return o.format(i)}})},this.init(t)}return Nt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Go(r)}},{key:"format",value:function(n,r,o){var i=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=r.split(this.formatSeparator),l=s.reduce(function(u,c){var f=aA(c),d=f.formatName,h=f.formatOptions;if(i.formats[d]){var v=u;try{var y=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},E=y.locale||y.lng||a.locale||a.lng||o;v=i.formats[d](u,E,xn(xn(xn({},h),a),y))}catch(p){i.logger.warn(p)}return v}else i.logger.warn("there was no format function for ".concat(d));return u},n);return l}}]),e}();function q0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Z0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lA(e){var t=uA();return function(){var r=Zt(e),o;if(t){var i=Zt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ea(this,o)}}function uA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cA(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var fA=function(e){Vl(n,e);var t=lA(n);function n(r,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return bt(this,n),a=t.call(this),Bl&&ir.call(or(a)),a.backend=r,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=Jt.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return Nt(n,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},c={},f={},d={};return o.forEach(function(h){var v=!0;i.forEach(function(y){var E="".concat(h,"|").concat(y);!a.reload&&l.store.hasResourceBundle(h,y)?l.state[E]=2:l.state[E]<0||(l.state[E]===1?c[E]===void 0&&(c[E]=!0):(l.state[E]=1,v=!1,c[E]===void 0&&(c[E]=!0),u[E]===void 0&&(u[E]=!0),d[y]===void 0&&(d[y]=!0)))}),v||(f[h]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(d)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var c={};this.queue.forEach(function(f){j2(f.loaded,[l],u),cA(f,o),i&&f.errors.push(i),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(d){c[d]||(c[d]={});var h=f.loaded[d];h.length&&h.forEach(function(v){c[d][v]===void 0&&(c[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!o.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:c});return}this.readingCalls++;var f=function(y,E){if(s.readingCalls--,s.waitingReads.length>0){var p=s.waitingReads.shift();s.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(y&&E&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,i,a,l+1,u*2,c)},u);return}c(y,E)},d=this.backend[a].bind(this.backend);if(d.length===2){try{var h=d(o,i);h&&typeof h.then=="function"?h.then(function(v){return f(null,v)}).catch(f):f(null,h)}catch(v){f(v)}return}return d(o,i,f)}},{key:"prepareLoading",value:function(o,i){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(c){a.loadOne(c)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(c,f){c&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),c),!c&&f&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),f),i.loaded(o,c,f)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend&&this.backend.create){var f=Z0(Z0({},u),{},{isUpdate:l}),d=this.backend.create.bind(this.backend);if(d.length<6)try{var h;d.length===5?h=d(o,i,a,s,f):h=d(o,i,a,s),h&&typeof h.then=="function"?h.then(function(v){return c(null,v)}).catch(c):c(null,h)}catch(v){c(v)}else d(o,i,a,s,c,f)}!o||!o[0]||this.store.addResource(o[0],i,a,s)}}}]),n}(ir);function J0(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Ft(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Ft(t[2])==="object"||Ft(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function eE(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 tE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tE(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dA(e){var t=pA();return function(){var r=Zt(e),o;if(t){var i=Zt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ea(this,o)}}function pA(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hl(){}function hA(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var jl=function(e){Vl(n,e);var t=dA(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(bt(this,n),r=t.call(this),Bl&&ir.call(or(r)),r.options=eE(o),r.services={},r.logger=Jt,r.modules={external:[]},hA(or(r)),i&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,i),Ea(r,or(r));setTimeout(function(){r.init(o,i)},0)}return r}return Nt(n,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=J0();this.options=en(en(en({},s),this.options),eE(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=en(en({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Jt.init(l(this.modules.logger),this.options):Jt.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=sA);var c=new G0(this.options);this.store=new q2(this.options.resources,this.options);var f=this.services;f.logger=Jt,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new oA(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=l(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new iA(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new fA(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var m=arguments.length,g=new Array(m>1?m-1:0),S=1;S<m;S++)g[S-1]=arguments[S];o.emit.apply(o,[p].concat(g))}),this.modules.languageDetector&&(f.languageDetector=l(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=l(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Y0(this.services,this.options),this.translator.on("*",function(p){for(var m=arguments.length,g=new Array(m>1?m-1:0),S=1;S<m;S++)g[S-1]=arguments[S];o.emit.apply(o,[p].concat(g))}),this.modules.external.forEach(function(p){p.init&&p.init(o)})}if(this.format=this.options.interpolation.format,a||(a=Hl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var 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");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(p){o[p]=function(){var m;return(m=o.store)[p].apply(m,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(p){o[p]=function(){var m;return(m=o.store)[p].apply(m,arguments),o}});var y=Sa(),E=function(){var m=function(S,_){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),y.resolve(_),a(S,_)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return m(null,o.t.bind(o));o.changeLanguage(o.options.lng,m)};return this.options.resources||!this.options.initImmediate?E():setTimeout(E,0),y}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hl,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],c=function(h){if(h){var v=i.services.languageUtils.toResolveHierarchy(h);v.forEach(function(y){u.indexOf(y)<0&&u.push(y)})}};if(l)c(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(d){return c(d)})}this.options.preload&&this.options.preload.forEach(function(d){return c(d)}),this.services.backendConnector.load(u,this.options.ns,function(d){!d&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(d)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=Sa();return o||(o=this.languages),i||(i=this.options.ns),a||(a=Hl),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&H0.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=Sa();this.emit("languageChanging",o);var l=function(d){a.language=d,a.languages=a.services.languageUtils.toResolveHierarchy(d),a.resolvedLanguage=void 0,a.setResolvedLanguage(d)},u=function(d,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(d,function(){return a.t.apply(a,arguments)})},c=function(d){!o&&!d&&a.services.languageDetector&&(d=[]);var h=typeof d=="string"?d:a.services.languageUtils.getBestMatchFromCodes(d);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(v){u(v,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(c,f){var d;if(Ft(f)!=="object"){for(var h=arguments.length,v=new Array(h>2?h-2:0),y=2;y<h;y++)v[y-2]=arguments[y];d=s.options.overloadTranslationOptionHandler([c,f].concat(v))}else d=en({},f);d.lng=d.lng||u.lng,d.lngs=d.lngs||u.lngs,d.ns=d.ns||u.ns,d.keyPrefix=d.keyPrefix||a||u.keyPrefix;var E=s.options.keySeparator||".",p;return d.keyPrefix&&Array.isArray(c)?p=c.map(function(m){return"".concat(d.keyPrefix).concat(E).concat(m)}):p=d.keyPrefix?"".concat(d.keyPrefix).concat(E).concat(c):c,s.t(p,d)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=a,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var c=function(h,v){var y=i.services.backendConnector.state["".concat(h,"|").concat(v)];return y===-1||y===2};if(a.precheck){var f=a.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(s,o)&&(!l||c(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=Sa();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=Sa();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services&&this.services.languageUtils||new G0(J0());return i.indexOf(a.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hl,s=en(en(en({},this.options),i),{isClone:!0}),l=new n(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(c){l[c]=o[c]}),l.services=en({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Y0(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),h=1;h<f;h++)d[h-1]=arguments[h];l.emit.apply(l,[c].concat(d))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(ir);_n(jl,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new jl(e,t)});var Le=jl.createInstance();Le.createInstance=jl.createInstance,Le.createInstance,Le.dir,Le.init,Le.loadResources,Le.reloadResources,Le.use,Le.changeLanguage,Le.getFixedT,Le.t,Le.exists,Le.setDefaultNamespace,Le.hasLoadedNamespace,Le.loadNamespaces,Le.loadLanguages;var nE=[],mA=nE.forEach,gA=nE.slice;function vA(e){return mA.call(gA.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var rE=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,yA=function(t,n,r){var o=r||{};o.path=o.path||"/";var i=encodeURIComponent(n),a="".concat(t,"=").concat(i);if(o.maxAge>0){var s=o.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(s))}if(o.domain){if(!rE.test(o.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(o.domain)}if(o.path){if(!rE.test(o.path))throw new TypeError("option path is invalid");a+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(a+="; HttpOnly"),o.secure&&(a+="; Secure"),o.sameSite){var l=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},oE={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=yA(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(n)===0)return i.substring(n.length,i.length)}return null},remove:function(t){this.create(t,"",-1)}},EA={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=oE.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&oE.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},SA={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),a=0;a<i.length;a++){var s=i[a].indexOf("=");if(s>0){var l=i[a].substring(0,s);l===t.lookupQuerystring&&(n=i[a].substring(s+1))}}}return n}},wa=null,iE=function(){if(wa!==null)return wa;try{wa=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{wa=!1}return wa},wA={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&iE()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&iE()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},_a=null,aE=function(){if(_a!==null)return _a;try{_a=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{_a=!1}return _a},_A={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&aE()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&aE()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},xA={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},RA={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},bA={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},NA={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function OA(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var sE=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bt(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Nt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=vA(r,this.options||{},OA()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(EA),this.addDetector(SA),this.addDetector(wA),this.addDetector(_A),this.addDetector(xA),this.addDetector(RA),this.addDetector(bA),this.addDetector(NA)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var a=r.detectors[i].lookup(r.options);a&&typeof a=="string"&&(a=[a]),a&&(o=o.concat(a))}}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();sE.type="languageDetector";var TA=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,AA={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},kA=function(t){return AA[t]},CA=function(t){return t.replace(TA,kA)};function lE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lE(Object(n),!0).forEach(function(r){_n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var cE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:CA};function IA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cE=uE(uE({},cE),e)}var LA={type:"3rdParty",init:function(t){IA(t.options.react)}};b.createContext(),function(){function e(){bt(this,e),this.usedNamespaces={}}return Nt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();const PA={ABOUT:"About",ADD_OPTION:"Add Option",ADD_VARIABLE:"Add Variable",ANSWER_CALL:"Answer Call",ANSWERED:"Answered",API_VERSION:"API Version",APP_VERSION:"App Version",BEEP_SUBTITLE:"Play a beep before recording",BEEP:"Beep",BUILDER_VERSION:"Builder Version",BUSY:"Busy",CALL_ADDRESSES:"Call Addresses",CALL_NUMBERS:"Call Numbers",CALL_RESOURCES:"Call Resources",CALLER_PRESSES:"Caller Presses",CLOSE:"Close",DECLINE:"Decline",DISCONNECT_CALL_AFTER_RINGING:"Disconnect call after ringing",ENTER_URL:"Enter URL",ERROR_DUPLICATE_RECORDING_LABEL:"This entry already exists. Please use a unique label.",ERROR_DUPLICATE_VARIABLE_KEY:"This variable already exists. Please use a unique key.",ERROR_INVALID_JSON:"Invalid JSON",ERROR_NUMBER_IS_REQUIRED:"A number is required.",ERROR_RECORDING_LABEL_REQUIRED:"A value is required. Maximum 20 characters.",ERROR_STRING_VALUE_REQUIRED:"Invalid character. String value is required.",ERROR_TELEPHONE_KEY_REQUIRED:"A value of 0-9, *, or # is required.",ERROR_TERMINATORS:"This value should contain only 0-9, *, or #.",ERROR_TEXT_IS_REQUIRED:"A text value is required.",ERROR_URL_IS_REQUIRED:"A valid URL is required.",ERROR_VALUE_IS_REQUIRED:"A value is required.",ERROR_VARIABLE_KEY_REQUIRED:"Valid characters are lowercase letters, digits, or underscore. Maximum 20 characters.",SAVE_VARIABLES_SUBTITLE:"Store the response as variables",SAVE_VARIABLES:"Save Variables",ERROR:"Error",FAILED:"Failed",FAILURE:"Failure",FORMAT:"Format",FORWARD_TO_ADDRESS:"Forward to Address",FORWARD_TO_PHONE:"Forward to Phone",FORWARD_TO_RESOURCE:"Forward to Resource",FROM_PHONE_NUMBER:"From Phone Number",FROM:"From",GATHER_INPUT:"Gather Input",HANDLE_CALL:"Handle Call",HANG_UP_CALL:"Hang Up Call",HANG_UP:"Hang Up",INFO_NODE_ANSWER:"This is the info text for the Answer node.",INFO_NODE_FORWARD_TO_ADDRESS:"This is the info text for the Forward to Address node.",INFO_NODE_FORWARD_TO_PHONE:"This is the info text for the Forward to Phone node.",INFO_NODE_FORWARD_TO_RESOURCE:"This is the info text for the Forward to Resource node.",INFO_NODE_GATHER_INPUT_OPTION_REMOVE:"Are you sure? Removing this option will delete the flow connection and move back the following option, if there is one.",INFO_NODE_GATHER_INPUT:"This is the info text for the Gather Input node.",INFO_NODE_HANG_UP:"This is the info text for the Hang Up node.",INFO_NODE_PLAY_AUDIO_FILE:"This is the info text for the Play Audio File node.",INFO_NODE_PLAY:"This is the info text for the Play node.",INFO_NODE_RECORD_CALL_START:"This is the info text for the Record Call Start node.",INFO_NODE_RECORD_CALL_STOP:"This is the info text for the Record Call Stop node.",INFO_NODE_RECORD:"This is the info text for the Record node.",INFO_NODE_REQUEST:"This is the info text for the Request node.",INFO_NODE_SEND_SMS:"This is the info text for the Send SMS node.",INFO_NODE_SET_VARIABLES_OPTION:"Are you sure you want to remove this variable?",INFO_NODE_SET_VARIABLES:"This is the info text for the Set Variables node.",INFO_NODE_TEXT_TO_SPEECH:"This is the info text for the Text to Speech node.",INFO_NODE_UNSET_VARIABLES:"This is the info text for the Unset Variables node.",KEY:"Key",METHOD:"Method",MORE_INFO_TITLE:"More info {{title}}",MULTIPLE_ADDRESSES:"Multiple Addresses",MULTIPLE_NUMBERS:"Multiple Numbers",MULTIPLE_RESOURCES:"Multiple Resources",NAVIGATE_BACK:"Navigate Back",NO_ANSWER:"No Answer",NO_INPUT:"No Input",NO_VARIABLES_SET:"Please set variables first",NUMBER_OF_VARIABLES_SELECTED_one:"{{count}} variable selected",NUMBER_OF_VARIABLES_SELECTED_other:"{{count}} variables selected",OFF:"Off",ON:"On",OPT_NUMBER:"Opt {{index}}",OPTION_NUMBER:"Option {{index}}",OPTIONAL:"optional",OR_SAYS:"Or says",PHONE_NUMBER:"Phone Number",PLAY_AUDIO_FILE:"Play Audio File",PLAY_AUDIO_TTS:"Play Audio or TTS",PROMPT_TEXT_TO_SPEECH:"Prompt Text to Speech",REASON:"Reason",RECORD_CALL_START:"Start Call Recording",RECORD_CALL_STOP:"Stop Call Recording",RECORD:"Voicemail Recording",RECORDING_NAME:"Recording Name",RECORDING:"Recording",RELAYML_VERSION:"RelayML Version",REMOVE_EDGE:"Remove Edge",REMOVE_NODE:"Remove Node {{title}}",REMOVE_OPTION:"Remove Option {{index}}",REMOVE_VARIABLE:"Remove Variable {{index}}",REQUEST_BODY:"Body",REQUEST_HEADERS:"Headers (JSON)",REQUEST:"Request",SECONDS:"seconds",SELECT_VARIABLES_TO_UNSET:"Select Variables to Unset",SELECT_VARIABLES:"Select Variables",SELECT:"Select",SEND_SMS:"Send SMS",SEQUENTIALLY:"Sequentially",SET_VARIABLES:"Set Variables",SETTINGS:"Settings",SIMULTANEOUSLY:"Simultaneously",SINGLE_ADDRESS:"Single Address",SINGLE_NUMBER:"Single Number",SINGLE_RESOURCE:"Single Resource",SMS_TEXT:"SMS Text",STEREO_SUBTITLE:"Enable stereo audio",STEREO:"Stereo",SUCCESS:"Success",TERMINATORS:"Terminators",TEXT_TO_SPEECH:"Text to Speech",TEXT:"Text",TO_PHONE_NUMBER:"To Phone Number",TO:"To",UNKNOWN:"Unknown",UNSET_VARIABLES:"Unset Variables",URL:"URL",VALUE:"Value",VARIABLE_KEY:"Variable {{key}}",WAIT_FOR_INPUT:"Wait for Input",WRITE_SOMETHING:"Write something"},C={ABOUT:"ABOUT",ADD_OPTION:"ADD_OPTION",ADD_VARIABLE:"ADD_VARIABLE",ANSWER_CALL:"ANSWER_CALL",ANSWERED:"ANSWERED",API_VERSION:"API_VERSION",APP_VERSION:"APP_VERSION",BEEP_SUBTITLE:"BEEP_SUBTITLE",BEEP:"BEEP",BUILDER_VERSION:"BUILDER_VERSION",BUSY:"BUSY",CALL_ADDRESSES:"CALL_ADDRESSES",CALL_NUMBERS:"CALL_NUMBERS",CALL_RESOURCES:"CALL_RESOURCES",CALLER_PRESSES:"CALLER_PRESSES",CLOSE:"CLOSE",DECLINE:"DECLINE",DISCONNECT_CALL_AFTER_RINGING:"DISCONNECT_CALL_AFTER_RINGING",ENTER_URL:"ENTER_URL",ERROR_DUPLICATE_RECORDING_LABEL:"ERROR_DUPLICATE_RECORDING_LABEL",ERROR_DUPLICATE_VARIABLE_KEY:"ERROR_DUPLICATE_VARIABLE_KEY",ERROR_INVALID_JSON:"ERROR_INVALID_JSON",ERROR_NUMBER_IS_REQUIRED:"ERROR_NUMBER_IS_REQUIRED",ERROR_RECORDING_LABEL_REQUIRED:"ERROR_RECORDING_LABEL_REQUIRED",ERROR_STRING_VALUE_REQUIRED:"ERROR_STRING_VALUE_REQUIRED",ERROR_TELEPHONE_KEY_REQUIRED:"ERROR_TELEPHONE_KEY_REQUIRED",ERROR_TERMINATORS:"ERROR_TERMINATORS",ERROR_TEXT_IS_REQUIRED:"ERROR_TEXT_IS_REQUIRED",ERROR_URL_IS_REQUIRED:"ERROR_URL_IS_REQUIRED",ERROR_VALUE_IS_REQUIRED:"ERROR_VALUE_IS_REQUIRED",ERROR_VARIABLE_KEY_REQUIRED:"ERROR_VARIABLE_KEY_REQUIRED",ERROR:"ERROR",FAILED:"FAILED",FAILURE:"FAILURE",FORMAT:"FORMAT",FORWARD_TO_ADDRESS:"FORWARD_TO_ADDRESS",FORWARD_TO_PHONE:"FORWARD_TO_PHONE",FORWARD_TO_RESOURCE:"FORWARD_TO_RESOURCE",FROM_PHONE_NUMBER:"FROM_PHONE_NUMBER",FROM:"FROM",GATHER_INPUT:"GATHER_INPUT",HANDLE_CALL:"HANDLE_CALL",HANG_UP_CALL:"HANG_UP_CALL",HANG_UP:"HANG_UP",INFO_NODE_ANSWER:"INFO_NODE_ANSWER",INFO_NODE_FORWARD_TO_ADDRESS:"INFO_NODE_FORWARD_TO_ADDRESS",INFO_NODE_FORWARD_TO_PHONE:"INFO_NODE_FORWARD_TO_PHONE",INFO_NODE_FORWARD_TO_RESOURCE:"INFO_NODE_FORWARD_TO_RESOURCE",INFO_NODE_GATHER_INPUT_OPTION_REMOVE:"INFO_NODE_GATHER_INPUT_OPTION_REMOVE",INFO_NODE_GATHER_INPUT:"INFO_NODE_GATHER_INPUT",INFO_NODE_HANG_UP:"INFO_NODE_HANG_UP",INFO_NODE_PLAY_AUDIO_FILE:"INFO_NODE_PLAY_AUDIO_FILE",INFO_NODE_PLAY:"INFO_NODE_PLAY",INFO_NODE_RECORD_CALL_START:"INFO_NODE_RECORD_CALL_START",INFO_NODE_RECORD_CALL_STOP:"INFO_NODE_RECORD_CALL_STOP",INFO_NODE_RECORD:"INFO_NODE_RECORD",INFO_NODE_REQUEST:"INFO_NODE_REQUEST",INFO_NODE_SEND_SMS:"INFO_NODE_SEND_SMS",INFO_NODE_SET_VARIABLES_OPTION:"INFO_NODE_SET_VARIABLES_OPTION",INFO_NODE_SET_VARIABLES:"INFO_NODE_SET_VARIABLES",INFO_NODE_TEXT_TO_SPEECH:"INFO_NODE_TEXT_TO_SPEECH",INFO_NODE_UNSET_VARIABLES:"INFO_NODE_UNSET_VARIABLES",KEY:"KEY",METHOD:"METHOD",MORE_INFO_TITLE:"MORE_INFO_TITLE",MULTIPLE_ADDRESSES:"MULTIPLE_ADDRESSES",MULTIPLE_NUMBERS:"MULTIPLE_NUMBERS",MULTIPLE_RESOURCES:"MULTIPLE_RESOURCES",NAVIGATE_BACK:"NAVIGATE_BACK",NO_ANSWER:"NO_ANSWER",NO_INPUT:"NO_INPUT",NO_VARIABLES_SET:"NO_VARIABLES_SET",NUMBER_OF_VARIABLES_SELECTED:"NUMBER_OF_VARIABLES_SELECTED",OFF:"OFF",ON:"ON",OPT_NUMBER:"OPT_NUMBER",OPTION_NUMBER:"OPTION_NUMBER",OPTIONAL:"OPTIONAL",OR_SAYS:"OR_SAYS",PHONE_NUMBER:"PHONE_NUMBER",PLAY_AUDIO_FILE:"PLAY_AUDIO_FILE",PLAY_AUDIO_TTS:"PLAY_AUDIO_TTS",PROMPT_TEXT_TO_SPEECH:"PROMPT_TEXT_TO_SPEECH",REASON:"REASON",RECORD_CALL_START:"RECORD_CALL_START",RECORD_CALL_STOP:"RECORD_CALL_STOP",RECORD:"RECORD",RECORDING_NAME:"RECORDING_NAME",RECORDING:"RECORDING",RELAYML_VERSION:"RELAYML_VERSION",REMOVE_EDGE:"REMOVE_EDGE",REMOVE_NODE:"REMOVE_NODE",REMOVE_OPTION:"REMOVE_OPTION",REMOVE_VARIABLE:"REMOVE_VARIABLE",REQUEST_BODY:"REQUEST_BODY",REQUEST_HEADERS:"REQUEST_HEADERS",REQUEST:"REQUEST",SECONDS:"SECONDS",SELECT_VARIABLES_TO_UNSET:"SELECT_VARIABLES_TO_UNSET",SELECT_VARIABLES:"SELECT_VARIABLES",SELECT:"SELECT",SEND_SMS:"SEND_SMS",SEQUENTIALLY:"SEQUENTIALLY",SET_VARIABLES:"SET_VARIABLES",SETTINGS:"SETTINGS",SIMULTANEOUSLY:"SIMULTANEOUSLY",SINGLE_ADDRESS:"SINGLE_ADDRESS",SINGLE_NUMBER:"SINGLE_NUMBER",SINGLE_RESOURCE:"SINGLE_RESOURCE",SMS_TEXT:"SMS_TEXT",STEREO_SUBTITLE:"STEREO_SUBTITLE",STEREO:"STEREO",SAVE_VARIABLES_SUBTITLE:"SAVE_VARIABLES_SUBTITLE",SAVE_VARIABLES:"SAVE_VARIABLES",SUCCESS:"SUCCESS",TERMINATORS:"TERMINATORS",TEXT_TO_SPEECH:"TEXT_TO_SPEECH",TEXT:"TEXT",TO_PHONE_NUMBER:"TO_PHONE_NUMBER",TO:"TO",UNKNOWN:"UNKNOWN",UNSET_VARIABLES:"UNSET_VARIABLES",URL:"URL",VALUE:"VALUE",VARIABLE_KEY:"VARIABLE_KEY",WAIT_FOR_INPUT:"WAIT_FOR_INPUT",WRITE_SOMETHING:"WRITE_SOMETHING"},DA={order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag","path","subdomain"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage","cookie"],excludeCacheFor:["cimode"]},MA={"en-US":{translation:PA}},FA=()=>{Le.use(sE).use(LA).init({debug:g2,detection:DA,fallbackLng:"en-US",interpolation:{escapeValue:!1},keySeparator:!1,resources:MA})};function U(e,t){return t?Le.t(e,t):Le.t(e)}function UA(e){const{id:t,source:n,target:r,sourcePosition:o,sourceX:i,sourceY:a}=e,s=Re(p=>p.removeEdge),l=ve(b.useCallback(p=>p.nodeInternals.get(n),[n])),u=ve(b.useCallback(p=>p.nodeInternals.get(r),[r]));if(!l||!u)return null;const{tx:c,ty:f}=P2(i,a,u,20),[d,h,v]=pa({borderRadius:20,sourceX:i,sourceY:a,sourcePosition:o,targetPosition:K.Top,targetX:c,targetY:f}),y=40,E=(p,m)=>{p.stopPropagation(),s(m)};return V("g",{className:"group",children:[w(Po,{path:d,...e}),w("foreignObject",{width:y,height:y,x:h-y/2,y:v-y/2,className:"hidden group-hover:block",requiredExtensions:"http://www.w3.org/1999/xhtml",children:w("div",{className:"h-10 w-10",children:V("button",{className:"flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-foreground/10 bg-backgroundAlt",onClick:p=>E(p,t),children:[w(nn,{tag:"trash-can",className:"text-negative"}),w("span",{className:"sr-only",children:U(C.REMOVE_EDGE)})]})})})]})}var VA={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},$A={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},BA={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},zA={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]};function fE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fE(Object(n),!0).forEach(function(r){Te(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wl(e){return Wl=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},Wl(e)}function HA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jA(e,t,n){return t&&dE(e.prototype,t),n&&dE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pd(e,t){return YA(e)||KA(e,t)||pE(e,t)||QA()}function xa(e){return WA(e)||GA(e)||pE(e)||XA()}function WA(e){if(Array.isArray(e))return Dd(e)}function YA(e){if(Array.isArray(e))return e}function GA(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KA(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function pE(e,t){if(e){if(typeof e=="string")return Dd(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 Dd(e,t)}}function Dd(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 XA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var hE=function(){},Md={},mE={},gE=null,vE={mark:hE,measure:hE};try{typeof window<"u"&&(Md=window),typeof document<"u"&&(mE=document),typeof MutationObserver<"u"&&(gE=MutationObserver),typeof performance<"u"&&(vE=performance)}catch{}var qA=Md.navigator||{},yE=qA.userAgent,EE=yE===void 0?"":yE,ar=Md,fe=mE,SE=gE,Yl=vE;ar.document;var Rn=!!fe.documentElement&&!!fe.head&&typeof fe.addEventListener=="function"&&typeof fe.createElement=="function",wE=~EE.indexOf("MSIE")||~EE.indexOf("Trident/"),Gl,Kl,Xl,Ql,ql,bn="___FONT_AWESOME___",Fd=16,_E="fa",xE="svg-inline--fa",Mr="data-fa-i2svg",Ud="data-fa-pseudo-element",ZA="data-fa-pseudo-element-pending",Vd="data-prefix",$d="data-icon",RE="fontawesome-i2svg",JA="async",ek=["HTML","HEAD","STYLE","SCRIPT"],bE=function(){try{return!0}catch{return!1}}(),de="classic",Ee="sharp",Bd=[de,Ee];function Ra(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[de]}})}var ba=Ra((Gl={},Te(Gl,de,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),Te(Gl,Ee,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular"}),Gl)),Na=Ra((Kl={},Te(Kl,de,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),Te(Kl,Ee,{solid:"fass",regular:"fasr"}),Kl)),Oa=Ra((Xl={},Te(Xl,de,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),Te(Xl,Ee,{fass:"fa-solid",fasr:"fa-regular"}),Xl)),tk=Ra((Ql={},Te(Ql,de,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),Te(Ql,Ee,{"fa-solid":"fass","fa-regular":"fasr"}),Ql)),nk=/fa(s|r|l|t|d|b|k|ss|sr)?[\-\ ]/,NE="fa-layers-text",rk=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,ok=Ra((ql={},Te(ql,de,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),Te(ql,Ee,{900:"fass",400:"fasr"}),ql)),OE=[1,2,3,4,5,6,7,8,9,10],ik=OE.concat([11,12,13,14,15,16,17,18,19,20]),ak=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Fr={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Ta=new Set;Object.keys(Na[de]).map(Ta.add.bind(Ta)),Object.keys(Na[Ee]).map(Ta.add.bind(Ta));var sk=[].concat(Bd,xa(Ta),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Fr.GROUP,Fr.SWAP_OPACITY,Fr.PRIMARY,Fr.SECONDARY]).concat(OE.map(function(e){return"".concat(e,"x")})).concat(ik.map(function(e){return"w-".concat(e)})),Aa=ar.FontAwesomeConfig||{};function lk(e){var t=fe.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function uk(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(fe&&typeof fe.querySelector=="function"){var ck=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];ck.forEach(function(e){var t=Pd(e,2),n=t[0],r=t[1],o=uk(lk(n));o!=null&&(Aa[r]=o)})}var TE={styleDefault:"solid",familyDefault:"classic",cssPrefix:_E,replacementClass:xE,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Aa.familyPrefix&&(Aa.cssPrefix=Aa.familyPrefix);var Ko=W(W({},TE),Aa);Ko.autoReplaceSvg||(Ko.observeMutations=!1);var G={};Object.keys(TE).forEach(function(e){Object.defineProperty(G,e,{enumerable:!0,set:function(n){Ko[e]=n,ka.forEach(function(r){return r(G)})},get:function(){return Ko[e]}})}),Object.defineProperty(G,"familyPrefix",{enumerable:!0,set:function(t){Ko.cssPrefix=t,ka.forEach(function(n){return n(G)})},get:function(){return Ko.cssPrefix}}),ar.FontAwesomeConfig=G;var ka=[];function fk(e){return ka.push(e),function(){ka.splice(ka.indexOf(e),1)}}var sr=Fd,tn={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function dk(e){if(!(!e||!Rn)){var t=fe.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=fe.head.childNodes,r=null,o=n.length-1;o>-1;o--){var i=n[o],a=(i.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=i)}return fe.head.insertBefore(t,r),e}}var pk="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Ca(){for(var e=12,t="";e-- >0;)t+=pk[Math.random()*62|0];return t}function Xo(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function zd(e){return e.classList?Xo(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function AE(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function hk(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(AE(e[n]),'" ')},"").trim()}function Zl(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function Hd(e){return e.size!==tn.size||e.x!==tn.x||e.y!==tn.y||e.rotate!==tn.rotate||e.flipX||e.flipY}function mk(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(i," ").concat(a," ").concat(s)},u={transform:"translate(".concat(r/2*-1," -256)")};return{outer:o,inner:l,path:u}}function gk(e){var t=e.transform,n=e.width,r=n===void 0?Fd:n,o=e.height,i=o===void 0?Fd:o,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&wE?l+="translate(".concat(t.x/sr-r/2,"em, ").concat(t.y/sr-i/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/sr,"em), calc(-50% + ").concat(t.y/sr,"em)) "):l+="translate(".concat(t.x/sr,"em, ").concat(t.y/sr,"em) "),l+="scale(".concat(t.size/sr*(t.flipX?-1:1),", ").concat(t.size/sr*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var vk=`:root, :host {
|
|
64
|
-
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
|
|
65
|
-
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
|
|
66
|
-
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
|
|
67
|
-
--fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";
|
|
68
|
-
--fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
|
|
69
|
-
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
|
|
70
|
-
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
|
|
71
|
-
--fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
75
|
-
overflow: visible;
|
|
76
|
-
box-sizing: content-box;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.svg-inline--fa {
|
|
80
|
-
display: var(--fa-display, inline-block);
|
|
81
|
-
height: 1em;
|
|
82
|
-
overflow: visible;
|
|
83
|
-
vertical-align: -0.125em;
|
|
84
|
-
}
|
|
85
|
-
.svg-inline--fa.fa-2xs {
|
|
86
|
-
vertical-align: 0.1em;
|
|
87
|
-
}
|
|
88
|
-
.svg-inline--fa.fa-xs {
|
|
89
|
-
vertical-align: 0em;
|
|
90
|
-
}
|
|
91
|
-
.svg-inline--fa.fa-sm {
|
|
92
|
-
vertical-align: -0.0714285705em;
|
|
93
|
-
}
|
|
94
|
-
.svg-inline--fa.fa-lg {
|
|
95
|
-
vertical-align: -0.2em;
|
|
96
|
-
}
|
|
97
|
-
.svg-inline--fa.fa-xl {
|
|
98
|
-
vertical-align: -0.25em;
|
|
99
|
-
}
|
|
100
|
-
.svg-inline--fa.fa-2xl {
|
|
101
|
-
vertical-align: -0.3125em;
|
|
102
|
-
}
|
|
103
|
-
.svg-inline--fa.fa-pull-left {
|
|
104
|
-
margin-right: var(--fa-pull-margin, 0.3em);
|
|
105
|
-
width: auto;
|
|
106
|
-
}
|
|
107
|
-
.svg-inline--fa.fa-pull-right {
|
|
108
|
-
margin-left: var(--fa-pull-margin, 0.3em);
|
|
109
|
-
width: auto;
|
|
110
|
-
}
|
|
111
|
-
.svg-inline--fa.fa-li {
|
|
112
|
-
width: var(--fa-li-width, 2em);
|
|
113
|
-
top: 0.25em;
|
|
114
|
-
}
|
|
115
|
-
.svg-inline--fa.fa-fw {
|
|
116
|
-
width: var(--fa-fw-width, 1.25em);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.fa-layers svg.svg-inline--fa {
|
|
120
|
-
bottom: 0;
|
|
121
|
-
left: 0;
|
|
122
|
-
margin: auto;
|
|
123
|
-
position: absolute;
|
|
124
|
-
right: 0;
|
|
125
|
-
top: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.fa-layers-counter, .fa-layers-text {
|
|
129
|
-
display: inline-block;
|
|
130
|
-
position: absolute;
|
|
131
|
-
text-align: center;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.fa-layers {
|
|
135
|
-
display: inline-block;
|
|
136
|
-
height: 1em;
|
|
137
|
-
position: relative;
|
|
138
|
-
text-align: center;
|
|
139
|
-
vertical-align: -0.125em;
|
|
140
|
-
width: 1em;
|
|
141
|
-
}
|
|
142
|
-
.fa-layers svg.svg-inline--fa {
|
|
143
|
-
-webkit-transform-origin: center center;
|
|
144
|
-
transform-origin: center center;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.fa-layers-text {
|
|
148
|
-
left: 50%;
|
|
149
|
-
top: 50%;
|
|
150
|
-
-webkit-transform: translate(-50%, -50%);
|
|
151
|
-
transform: translate(-50%, -50%);
|
|
152
|
-
-webkit-transform-origin: center center;
|
|
153
|
-
transform-origin: center center;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.fa-layers-counter {
|
|
157
|
-
background-color: var(--fa-counter-background-color, #ff253a);
|
|
158
|
-
border-radius: var(--fa-counter-border-radius, 1em);
|
|
159
|
-
box-sizing: border-box;
|
|
160
|
-
color: var(--fa-inverse, #fff);
|
|
161
|
-
line-height: var(--fa-counter-line-height, 1);
|
|
162
|
-
max-width: var(--fa-counter-max-width, 5em);
|
|
163
|
-
min-width: var(--fa-counter-min-width, 1.5em);
|
|
164
|
-
overflow: hidden;
|
|
165
|
-
padding: var(--fa-counter-padding, 0.25em 0.5em);
|
|
166
|
-
right: var(--fa-right, 0);
|
|
167
|
-
text-overflow: ellipsis;
|
|
168
|
-
top: var(--fa-top, 0);
|
|
169
|
-
-webkit-transform: scale(var(--fa-counter-scale, 0.25));
|
|
170
|
-
transform: scale(var(--fa-counter-scale, 0.25));
|
|
171
|
-
-webkit-transform-origin: top right;
|
|
172
|
-
transform-origin: top right;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.fa-layers-bottom-right {
|
|
176
|
-
bottom: var(--fa-bottom, 0);
|
|
177
|
-
right: var(--fa-right, 0);
|
|
178
|
-
top: auto;
|
|
179
|
-
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
|
180
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
181
|
-
-webkit-transform-origin: bottom right;
|
|
182
|
-
transform-origin: bottom right;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.fa-layers-bottom-left {
|
|
186
|
-
bottom: var(--fa-bottom, 0);
|
|
187
|
-
left: var(--fa-left, 0);
|
|
188
|
-
right: auto;
|
|
189
|
-
top: auto;
|
|
190
|
-
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
|
191
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
192
|
-
-webkit-transform-origin: bottom left;
|
|
193
|
-
transform-origin: bottom left;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.fa-layers-top-right {
|
|
197
|
-
top: var(--fa-top, 0);
|
|
198
|
-
right: var(--fa-right, 0);
|
|
199
|
-
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
|
200
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
201
|
-
-webkit-transform-origin: top right;
|
|
202
|
-
transform-origin: top right;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.fa-layers-top-left {
|
|
206
|
-
left: var(--fa-left, 0);
|
|
207
|
-
right: auto;
|
|
208
|
-
top: var(--fa-top, 0);
|
|
209
|
-
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
|
210
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
211
|
-
-webkit-transform-origin: top left;
|
|
212
|
-
transform-origin: top left;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.fa-1x {
|
|
216
|
-
font-size: 1em;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.fa-2x {
|
|
220
|
-
font-size: 2em;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.fa-3x {
|
|
224
|
-
font-size: 3em;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.fa-4x {
|
|
228
|
-
font-size: 4em;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.fa-5x {
|
|
232
|
-
font-size: 5em;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.fa-6x {
|
|
236
|
-
font-size: 6em;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.fa-7x {
|
|
240
|
-
font-size: 7em;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.fa-8x {
|
|
244
|
-
font-size: 8em;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.fa-9x {
|
|
248
|
-
font-size: 9em;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.fa-10x {
|
|
252
|
-
font-size: 10em;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.fa-2xs {
|
|
256
|
-
font-size: 0.625em;
|
|
257
|
-
line-height: 0.1em;
|
|
258
|
-
vertical-align: 0.225em;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.fa-xs {
|
|
262
|
-
font-size: 0.75em;
|
|
263
|
-
line-height: 0.0833333337em;
|
|
264
|
-
vertical-align: 0.125em;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.fa-sm {
|
|
268
|
-
font-size: 0.875em;
|
|
269
|
-
line-height: 0.0714285718em;
|
|
270
|
-
vertical-align: 0.0535714295em;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.fa-lg {
|
|
274
|
-
font-size: 1.25em;
|
|
275
|
-
line-height: 0.05em;
|
|
276
|
-
vertical-align: -0.075em;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.fa-xl {
|
|
280
|
-
font-size: 1.5em;
|
|
281
|
-
line-height: 0.0416666682em;
|
|
282
|
-
vertical-align: -0.125em;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.fa-2xl {
|
|
286
|
-
font-size: 2em;
|
|
287
|
-
line-height: 0.03125em;
|
|
288
|
-
vertical-align: -0.1875em;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.fa-fw {
|
|
292
|
-
text-align: center;
|
|
293
|
-
width: 1.25em;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.fa-ul {
|
|
297
|
-
list-style-type: none;
|
|
298
|
-
margin-left: var(--fa-li-margin, 2.5em);
|
|
299
|
-
padding-left: 0;
|
|
300
|
-
}
|
|
301
|
-
.fa-ul > li {
|
|
302
|
-
position: relative;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.fa-li {
|
|
306
|
-
left: calc(var(--fa-li-width, 2em) * -1);
|
|
307
|
-
position: absolute;
|
|
308
|
-
text-align: center;
|
|
309
|
-
width: var(--fa-li-width, 2em);
|
|
310
|
-
line-height: inherit;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.fa-border {
|
|
314
|
-
border-color: var(--fa-border-color, #eee);
|
|
315
|
-
border-radius: var(--fa-border-radius, 0.1em);
|
|
316
|
-
border-style: var(--fa-border-style, solid);
|
|
317
|
-
border-width: var(--fa-border-width, 0.08em);
|
|
318
|
-
padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.fa-pull-left {
|
|
322
|
-
float: left;
|
|
323
|
-
margin-right: var(--fa-pull-margin, 0.3em);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.fa-pull-right {
|
|
327
|
-
float: right;
|
|
328
|
-
margin-left: var(--fa-pull-margin, 0.3em);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.fa-beat {
|
|
332
|
-
-webkit-animation-name: fa-beat;
|
|
333
|
-
animation-name: fa-beat;
|
|
334
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
335
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
336
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
337
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
338
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
339
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
340
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
341
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
342
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
|
343
|
-
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.fa-bounce {
|
|
347
|
-
-webkit-animation-name: fa-bounce;
|
|
348
|
-
animation-name: fa-bounce;
|
|
349
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
350
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
351
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
352
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
353
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
354
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
355
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
356
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
357
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
|
358
|
-
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.fa-fade {
|
|
362
|
-
-webkit-animation-name: fa-fade;
|
|
363
|
-
animation-name: fa-fade;
|
|
364
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
365
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
366
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
367
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
368
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
369
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
370
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
371
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
372
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
|
373
|
-
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.fa-beat-fade {
|
|
377
|
-
-webkit-animation-name: fa-beat-fade;
|
|
378
|
-
animation-name: fa-beat-fade;
|
|
379
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
380
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
381
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
382
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
383
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
384
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
385
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
386
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
387
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
|
388
|
-
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.fa-flip {
|
|
392
|
-
-webkit-animation-name: fa-flip;
|
|
393
|
-
animation-name: fa-flip;
|
|
394
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
395
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
396
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
397
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
398
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
399
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
400
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
401
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
402
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
|
403
|
-
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.fa-shake {
|
|
407
|
-
-webkit-animation-name: fa-shake;
|
|
408
|
-
animation-name: fa-shake;
|
|
409
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
410
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
411
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
412
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
413
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
414
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
415
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
416
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
417
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
|
418
|
-
animation-timing-function: var(--fa-animation-timing, linear);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.fa-spin {
|
|
422
|
-
-webkit-animation-name: fa-spin;
|
|
423
|
-
animation-name: fa-spin;
|
|
424
|
-
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
|
425
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
426
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
427
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
428
|
-
-webkit-animation-duration: var(--fa-animation-duration, 2s);
|
|
429
|
-
animation-duration: var(--fa-animation-duration, 2s);
|
|
430
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
431
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
432
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
|
433
|
-
animation-timing-function: var(--fa-animation-timing, linear);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.fa-spin-reverse {
|
|
437
|
-
--fa-animation-direction: reverse;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.fa-pulse,
|
|
441
|
-
.fa-spin-pulse {
|
|
442
|
-
-webkit-animation-name: fa-spin;
|
|
443
|
-
animation-name: fa-spin;
|
|
444
|
-
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
|
445
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
446
|
-
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
|
447
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
448
|
-
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
449
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
450
|
-
-webkit-animation-timing-function: var(--fa-animation-timing, steps(8));
|
|
451
|
-
animation-timing-function: var(--fa-animation-timing, steps(8));
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
@media (prefers-reduced-motion: reduce) {
|
|
455
|
-
.fa-beat,
|
|
456
|
-
.fa-bounce,
|
|
457
|
-
.fa-fade,
|
|
458
|
-
.fa-beat-fade,
|
|
459
|
-
.fa-flip,
|
|
460
|
-
.fa-pulse,
|
|
461
|
-
.fa-shake,
|
|
462
|
-
.fa-spin,
|
|
463
|
-
.fa-spin-pulse {
|
|
464
|
-
-webkit-animation-delay: -1ms;
|
|
465
|
-
animation-delay: -1ms;
|
|
466
|
-
-webkit-animation-duration: 1ms;
|
|
467
|
-
animation-duration: 1ms;
|
|
468
|
-
-webkit-animation-iteration-count: 1;
|
|
469
|
-
animation-iteration-count: 1;
|
|
470
|
-
-webkit-transition-delay: 0s;
|
|
471
|
-
transition-delay: 0s;
|
|
472
|
-
-webkit-transition-duration: 0s;
|
|
473
|
-
transition-duration: 0s;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
@-webkit-keyframes fa-beat {
|
|
477
|
-
0%, 90% {
|
|
478
|
-
-webkit-transform: scale(1);
|
|
479
|
-
transform: scale(1);
|
|
480
|
-
}
|
|
481
|
-
45% {
|
|
482
|
-
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
|
483
|
-
transform: scale(var(--fa-beat-scale, 1.25));
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
@keyframes fa-beat {
|
|
487
|
-
0%, 90% {
|
|
488
|
-
-webkit-transform: scale(1);
|
|
489
|
-
transform: scale(1);
|
|
490
|
-
}
|
|
491
|
-
45% {
|
|
492
|
-
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
|
493
|
-
transform: scale(var(--fa-beat-scale, 1.25));
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
@-webkit-keyframes fa-bounce {
|
|
497
|
-
0% {
|
|
498
|
-
-webkit-transform: scale(1, 1) translateY(0);
|
|
499
|
-
transform: scale(1, 1) translateY(0);
|
|
500
|
-
}
|
|
501
|
-
10% {
|
|
502
|
-
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
|
503
|
-
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
|
504
|
-
}
|
|
505
|
-
30% {
|
|
506
|
-
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
|
507
|
-
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
|
508
|
-
}
|
|
509
|
-
50% {
|
|
510
|
-
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
|
511
|
-
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
|
512
|
-
}
|
|
513
|
-
57% {
|
|
514
|
-
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
|
515
|
-
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
|
516
|
-
}
|
|
517
|
-
64% {
|
|
518
|
-
-webkit-transform: scale(1, 1) translateY(0);
|
|
519
|
-
transform: scale(1, 1) translateY(0);
|
|
520
|
-
}
|
|
521
|
-
100% {
|
|
522
|
-
-webkit-transform: scale(1, 1) translateY(0);
|
|
523
|
-
transform: scale(1, 1) translateY(0);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
@keyframes fa-bounce {
|
|
527
|
-
0% {
|
|
528
|
-
-webkit-transform: scale(1, 1) translateY(0);
|
|
529
|
-
transform: scale(1, 1) translateY(0);
|
|
530
|
-
}
|
|
531
|
-
10% {
|
|
532
|
-
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
|
533
|
-
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
|
534
|
-
}
|
|
535
|
-
30% {
|
|
536
|
-
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
|
537
|
-
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
|
538
|
-
}
|
|
539
|
-
50% {
|
|
540
|
-
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
|
541
|
-
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
|
542
|
-
}
|
|
543
|
-
57% {
|
|
544
|
-
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
|
545
|
-
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
|
546
|
-
}
|
|
547
|
-
64% {
|
|
548
|
-
-webkit-transform: scale(1, 1) translateY(0);
|
|
549
|
-
transform: scale(1, 1) translateY(0);
|
|
550
|
-
}
|
|
551
|
-
100% {
|
|
552
|
-
-webkit-transform: scale(1, 1) translateY(0);
|
|
553
|
-
transform: scale(1, 1) translateY(0);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
@-webkit-keyframes fa-fade {
|
|
557
|
-
50% {
|
|
558
|
-
opacity: var(--fa-fade-opacity, 0.4);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
@keyframes fa-fade {
|
|
562
|
-
50% {
|
|
563
|
-
opacity: var(--fa-fade-opacity, 0.4);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
@-webkit-keyframes fa-beat-fade {
|
|
567
|
-
0%, 100% {
|
|
568
|
-
opacity: var(--fa-beat-fade-opacity, 0.4);
|
|
569
|
-
-webkit-transform: scale(1);
|
|
570
|
-
transform: scale(1);
|
|
571
|
-
}
|
|
572
|
-
50% {
|
|
573
|
-
opacity: 1;
|
|
574
|
-
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
|
575
|
-
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
@keyframes fa-beat-fade {
|
|
579
|
-
0%, 100% {
|
|
580
|
-
opacity: var(--fa-beat-fade-opacity, 0.4);
|
|
581
|
-
-webkit-transform: scale(1);
|
|
582
|
-
transform: scale(1);
|
|
583
|
-
}
|
|
584
|
-
50% {
|
|
585
|
-
opacity: 1;
|
|
586
|
-
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
|
587
|
-
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
@-webkit-keyframes fa-flip {
|
|
591
|
-
50% {
|
|
592
|
-
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
|
593
|
-
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
@keyframes fa-flip {
|
|
597
|
-
50% {
|
|
598
|
-
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
|
599
|
-
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
@-webkit-keyframes fa-shake {
|
|
603
|
-
0% {
|
|
604
|
-
-webkit-transform: rotate(-15deg);
|
|
605
|
-
transform: rotate(-15deg);
|
|
606
|
-
}
|
|
607
|
-
4% {
|
|
608
|
-
-webkit-transform: rotate(15deg);
|
|
609
|
-
transform: rotate(15deg);
|
|
610
|
-
}
|
|
611
|
-
8%, 24% {
|
|
612
|
-
-webkit-transform: rotate(-18deg);
|
|
613
|
-
transform: rotate(-18deg);
|
|
614
|
-
}
|
|
615
|
-
12%, 28% {
|
|
616
|
-
-webkit-transform: rotate(18deg);
|
|
617
|
-
transform: rotate(18deg);
|
|
618
|
-
}
|
|
619
|
-
16% {
|
|
620
|
-
-webkit-transform: rotate(-22deg);
|
|
621
|
-
transform: rotate(-22deg);
|
|
622
|
-
}
|
|
623
|
-
20% {
|
|
624
|
-
-webkit-transform: rotate(22deg);
|
|
625
|
-
transform: rotate(22deg);
|
|
626
|
-
}
|
|
627
|
-
32% {
|
|
628
|
-
-webkit-transform: rotate(-12deg);
|
|
629
|
-
transform: rotate(-12deg);
|
|
630
|
-
}
|
|
631
|
-
36% {
|
|
632
|
-
-webkit-transform: rotate(12deg);
|
|
633
|
-
transform: rotate(12deg);
|
|
634
|
-
}
|
|
635
|
-
40%, 100% {
|
|
636
|
-
-webkit-transform: rotate(0deg);
|
|
637
|
-
transform: rotate(0deg);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
@keyframes fa-shake {
|
|
641
|
-
0% {
|
|
642
|
-
-webkit-transform: rotate(-15deg);
|
|
643
|
-
transform: rotate(-15deg);
|
|
644
|
-
}
|
|
645
|
-
4% {
|
|
646
|
-
-webkit-transform: rotate(15deg);
|
|
647
|
-
transform: rotate(15deg);
|
|
648
|
-
}
|
|
649
|
-
8%, 24% {
|
|
650
|
-
-webkit-transform: rotate(-18deg);
|
|
651
|
-
transform: rotate(-18deg);
|
|
652
|
-
}
|
|
653
|
-
12%, 28% {
|
|
654
|
-
-webkit-transform: rotate(18deg);
|
|
655
|
-
transform: rotate(18deg);
|
|
656
|
-
}
|
|
657
|
-
16% {
|
|
658
|
-
-webkit-transform: rotate(-22deg);
|
|
659
|
-
transform: rotate(-22deg);
|
|
660
|
-
}
|
|
661
|
-
20% {
|
|
662
|
-
-webkit-transform: rotate(22deg);
|
|
663
|
-
transform: rotate(22deg);
|
|
664
|
-
}
|
|
665
|
-
32% {
|
|
666
|
-
-webkit-transform: rotate(-12deg);
|
|
667
|
-
transform: rotate(-12deg);
|
|
668
|
-
}
|
|
669
|
-
36% {
|
|
670
|
-
-webkit-transform: rotate(12deg);
|
|
671
|
-
transform: rotate(12deg);
|
|
672
|
-
}
|
|
673
|
-
40%, 100% {
|
|
674
|
-
-webkit-transform: rotate(0deg);
|
|
675
|
-
transform: rotate(0deg);
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
@-webkit-keyframes fa-spin {
|
|
679
|
-
0% {
|
|
680
|
-
-webkit-transform: rotate(0deg);
|
|
681
|
-
transform: rotate(0deg);
|
|
682
|
-
}
|
|
683
|
-
100% {
|
|
684
|
-
-webkit-transform: rotate(360deg);
|
|
685
|
-
transform: rotate(360deg);
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
@keyframes fa-spin {
|
|
689
|
-
0% {
|
|
690
|
-
-webkit-transform: rotate(0deg);
|
|
691
|
-
transform: rotate(0deg);
|
|
692
|
-
}
|
|
693
|
-
100% {
|
|
694
|
-
-webkit-transform: rotate(360deg);
|
|
695
|
-
transform: rotate(360deg);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
.fa-rotate-90 {
|
|
699
|
-
-webkit-transform: rotate(90deg);
|
|
700
|
-
transform: rotate(90deg);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
.fa-rotate-180 {
|
|
704
|
-
-webkit-transform: rotate(180deg);
|
|
705
|
-
transform: rotate(180deg);
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
.fa-rotate-270 {
|
|
709
|
-
-webkit-transform: rotate(270deg);
|
|
710
|
-
transform: rotate(270deg);
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
.fa-flip-horizontal {
|
|
714
|
-
-webkit-transform: scale(-1, 1);
|
|
715
|
-
transform: scale(-1, 1);
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
.fa-flip-vertical {
|
|
719
|
-
-webkit-transform: scale(1, -1);
|
|
720
|
-
transform: scale(1, -1);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
.fa-flip-both,
|
|
724
|
-
.fa-flip-horizontal.fa-flip-vertical {
|
|
725
|
-
-webkit-transform: scale(-1, -1);
|
|
726
|
-
transform: scale(-1, -1);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
.fa-rotate-by {
|
|
730
|
-
-webkit-transform: rotate(var(--fa-rotate-angle, none));
|
|
731
|
-
transform: rotate(var(--fa-rotate-angle, none));
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
.fa-stack {
|
|
735
|
-
display: inline-block;
|
|
736
|
-
vertical-align: middle;
|
|
737
|
-
height: 2em;
|
|
738
|
-
position: relative;
|
|
739
|
-
width: 2.5em;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.fa-stack-1x,
|
|
743
|
-
.fa-stack-2x {
|
|
744
|
-
bottom: 0;
|
|
745
|
-
left: 0;
|
|
746
|
-
margin: auto;
|
|
747
|
-
position: absolute;
|
|
748
|
-
right: 0;
|
|
749
|
-
top: 0;
|
|
750
|
-
z-index: var(--fa-stack-z-index, auto);
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
.svg-inline--fa.fa-stack-1x {
|
|
754
|
-
height: 1em;
|
|
755
|
-
width: 1.25em;
|
|
756
|
-
}
|
|
757
|
-
.svg-inline--fa.fa-stack-2x {
|
|
758
|
-
height: 2em;
|
|
759
|
-
width: 2.5em;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.fa-inverse {
|
|
763
|
-
color: var(--fa-inverse, #fff);
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
.sr-only,
|
|
767
|
-
.fa-sr-only {
|
|
768
|
-
position: absolute;
|
|
769
|
-
width: 1px;
|
|
770
|
-
height: 1px;
|
|
771
|
-
padding: 0;
|
|
772
|
-
margin: -1px;
|
|
773
|
-
overflow: hidden;
|
|
774
|
-
clip: rect(0, 0, 0, 0);
|
|
775
|
-
white-space: nowrap;
|
|
776
|
-
border-width: 0;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
.sr-only-focusable:not(:focus),
|
|
780
|
-
.fa-sr-only-focusable:not(:focus) {
|
|
781
|
-
position: absolute;
|
|
782
|
-
width: 1px;
|
|
783
|
-
height: 1px;
|
|
784
|
-
padding: 0;
|
|
785
|
-
margin: -1px;
|
|
786
|
-
overflow: hidden;
|
|
787
|
-
clip: rect(0, 0, 0, 0);
|
|
788
|
-
white-space: nowrap;
|
|
789
|
-
border-width: 0;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
.svg-inline--fa .fa-primary {
|
|
793
|
-
fill: var(--fa-primary-color, currentColor);
|
|
794
|
-
opacity: var(--fa-primary-opacity, 1);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.svg-inline--fa .fa-secondary {
|
|
798
|
-
fill: var(--fa-secondary-color, currentColor);
|
|
799
|
-
opacity: var(--fa-secondary-opacity, 0.4);
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
.svg-inline--fa.fa-swap-opacity .fa-primary {
|
|
803
|
-
opacity: var(--fa-secondary-opacity, 0.4);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
.svg-inline--fa.fa-swap-opacity .fa-secondary {
|
|
807
|
-
opacity: var(--fa-primary-opacity, 1);
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
.svg-inline--fa mask .fa-primary,
|
|
811
|
-
.svg-inline--fa mask .fa-secondary {
|
|
812
|
-
fill: black;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
.fad.fa-inverse,
|
|
816
|
-
.fa-duotone.fa-inverse {
|
|
817
|
-
color: var(--fa-inverse, #fff);
|
|
818
|
-
}`;function kE(){var e=_E,t=xE,n=G.cssPrefix,r=G.replacementClass,o=vk;if(n!==e||r!==t){var i=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");o=o.replace(i,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return o}var CE=!1;function jd(){G.autoAddCss&&!CE&&(dk(kE()),CE=!0)}var yk={mixout:function(){return{dom:{css:kE,insertCss:jd}}},hooks:function(){return{beforeDOMElementCreation:function(){jd()},beforeI2svg:function(){jd()}}}},Nn=ar||{};Nn[bn]||(Nn[bn]={}),Nn[bn].styles||(Nn[bn].styles={}),Nn[bn].hooks||(Nn[bn].hooks={}),Nn[bn].shims||(Nn[bn].shims=[]);var Vt=Nn[bn],IE=[],Ek=function e(){fe.removeEventListener("DOMContentLoaded",e),Jl=1,IE.map(function(t){return t()})},Jl=!1;Rn&&(Jl=(fe.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(fe.readyState),Jl||fe.addEventListener("DOMContentLoaded",Ek));function Sk(e){Rn&&(Jl?setTimeout(e,0):IE.push(e))}function Ia(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,o=e.children,i=o===void 0?[]:o;return typeof e=="string"?AE(e):"<".concat(t," ").concat(hk(r),">").concat(i.map(Ia).join(""),"</").concat(t,">")}function LE(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var wk=function(t,n){return function(r,o,i,a){return t.call(n,r,o,i,a)}},Wd=function(t,n,r,o){var i=Object.keys(t),a=i.length,s=o!==void 0?wk(n,o):n,l,u,c;for(r===void 0?(l=1,c=t[i[0]]):(l=0,c=r);l<a;l++)u=i[l],c=s(c,t[u],u,t);return c};function _k(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}function Yd(e){var t=_k(e);return t.length===1?t[0].toString(16):null}function xk(e,t){var n=e.length,r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&n>t+1&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function PE(e){return Object.keys(e).reduce(function(t,n){var r=e[n],o=!!r.icon;return o?t[r.iconName]=r.icon:t[n]=r,t},{})}function Gd(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,o=r===void 0?!1:r,i=PE(t);typeof Vt.hooks.addPack=="function"&&!o?Vt.hooks.addPack(e,PE(t)):Vt.styles[e]=W(W({},Vt.styles[e]||{}),i),e==="fas"&&Gd("fa",t)}var eu,tu,nu,Qo=Vt.styles,Rk=Vt.shims,bk=(eu={},Te(eu,de,Object.values(Oa[de])),Te(eu,Ee,Object.values(Oa[Ee])),eu),Kd=null,DE={},ME={},FE={},UE={},VE={},Nk=(tu={},Te(tu,de,Object.keys(ba[de])),Te(tu,Ee,Object.keys(ba[Ee])),tu);function Ok(e){return~sk.indexOf(e)}function Tk(e,t){var n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r===e&&o!==""&&!Ok(o)?o:null}var $E=function(){var t=function(i){return Wd(Qo,function(a,s,l){return a[l]=Wd(s,i,{}),a},{})};DE=t(function(o,i,a){if(i[3]&&(o[i[3]]=a),i[2]){var s=i[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){o[l.toString(16)]=a})}return o}),ME=t(function(o,i,a){if(o[a]=a,i[2]){var s=i[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){o[l]=a})}return o}),VE=t(function(o,i,a){var s=i[2];return o[a]=a,s.forEach(function(l){o[l]=a}),o});var n="far"in Qo||G.autoFetchSvg,r=Wd(Rk,function(o,i){var a=i[0],s=i[1],l=i[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(o.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(o.unicodes[a.toString(16)]={prefix:s,iconName:l}),o},{names:{},unicodes:{}});FE=r.names,UE=r.unicodes,Kd=ru(G.styleDefault,{family:G.familyDefault})};fk(function(e){Kd=ru(e.styleDefault,{family:G.familyDefault})}),$E();function Xd(e,t){return(DE[e]||{})[t]}function Ak(e,t){return(ME[e]||{})[t]}function Ur(e,t){return(VE[e]||{})[t]}function BE(e){return FE[e]||{prefix:null,iconName:null}}function kk(e){var t=UE[e],n=Xd("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function lr(){return Kd}var Qd=function(){return{prefix:null,iconName:null,rest:[]}};function ru(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?de:n,o=ba[r][e],i=Na[r][e]||Na[r][o],a=e in Vt.styles?e:null;return i||a||null}var zE=(nu={},Te(nu,de,Object.keys(Oa[de])),Te(nu,Ee,Object.keys(Oa[Ee])),nu);function ou(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,o=r===void 0?!1:r,i=(t={},Te(t,de,"".concat(G.cssPrefix,"-").concat(de)),Te(t,Ee,"".concat(G.cssPrefix,"-").concat(Ee)),t),a=null,s=de;(e.includes(i[de])||e.some(function(u){return zE[de].includes(u)}))&&(s=de),(e.includes(i[Ee])||e.some(function(u){return zE[Ee].includes(u)}))&&(s=Ee);var l=e.reduce(function(u,c){var f=Tk(G.cssPrefix,c);if(Qo[c]?(c=bk[s].includes(c)?tk[s][c]:c,a=c,u.prefix=c):Nk[s].indexOf(c)>-1?(a=c,u.prefix=ru(c,{family:s})):f?u.iconName=f:c!==G.replacementClass&&c!==i[de]&&c!==i[Ee]&&u.rest.push(c),!o&&u.prefix&&u.iconName){var d=a==="fa"?BE(u.iconName):{},h=Ur(u.prefix,u.iconName);d.prefix&&(a=null),u.iconName=d.iconName||h||u.iconName,u.prefix=d.prefix||u.prefix,u.prefix==="far"&&!Qo.far&&Qo.fas&&!G.autoFetchSvg&&(u.prefix="fas")}return u},Qd());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===Ee&&(Qo.fass||G.autoFetchSvg)&&(l.prefix="fass",l.iconName=Ur(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=lr()||"fas"),l}var Ck=function(){function e(){HA(this,e),this.definitions={}}return jA(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(s){n.definitions[s]=W(W({},n.definitions[s]||{}),a[s]),Gd(s,a[s]);var l=Oa[de][s];l&&Gd(l,a[s]),$E()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var o=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(o).map(function(i){var a=o[i],s=a.prefix,l=a.iconName,u=a.icon,c=u[2];n[s]||(n[s]={}),c.length>0&&c.forEach(function(f){typeof f=="string"&&(n[s][f]=u)}),n[s][l]=u}),n}}]),e}(),HE=[],qo={},Zo={},Ik=Object.keys(Zo);function Lk(e,t){var n=t.mixoutsTo;return HE=e,qo={},Object.keys(Zo).forEach(function(r){Ik.indexOf(r)===-1&&delete Zo[r]}),HE.forEach(function(r){var o=r.mixout?r.mixout():{};if(Object.keys(o).forEach(function(a){typeof o[a]=="function"&&(n[a]=o[a]),Wl(o[a])==="object"&&Object.keys(o[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=o[a][s]})}),r.hooks){var i=r.hooks();Object.keys(i).forEach(function(a){qo[a]||(qo[a]=[]),qo[a].push(i[a])})}r.provides&&r.provides(Zo)}),n}function qd(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=qo[e]||[];return i.forEach(function(a){t=a.apply(null,[t].concat(r))}),t}function Vr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=qo[e]||[];o.forEach(function(i){i.apply(null,n)})}function On(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Zo[e]?Zo[e].apply(null,t):void 0}function Zd(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||lr();if(t)return t=Ur(n,t)||t,LE(jE.definitions,n,t)||LE(Vt.styles,n,t)}var jE=new Ck,Pk=function(){G.autoReplaceSvg=!1,G.observeMutations=!1,Vr("noAuto")},Dk={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Rn?(Vr("beforeI2svg",t),On("pseudoElements2svg",t),On("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;G.autoReplaceSvg===!1&&(G.autoReplaceSvg=!0),G.observeMutations=!0,Sk(function(){Fk({autoReplaceSvgRoot:n}),Vr("watch",t)})}},Mk={icon:function(t){if(t===null)return null;if(Wl(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Ur(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=ru(t[0]);return{prefix:r,iconName:Ur(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(G.cssPrefix,"-"))>-1||t.match(nk))){var o=ou(t.split(" "),{skipLookups:!0});return{prefix:o.prefix||lr(),iconName:Ur(o.prefix,o.iconName)||o.iconName}}if(typeof t=="string"){var i=lr();return{prefix:i,iconName:Ur(i,t)||t}}}},pt={noAuto:Pk,config:G,dom:Dk,parse:Mk,library:jE,findIconDefinition:Zd,toHtml:Ia},Fk=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?fe:n;(Object.keys(Vt.styles).length>0||G.autoFetchSvg)&&Rn&&G.autoReplaceSvg&&pt.dom.i2svg({node:r})};function iu(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Ia(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Rn){var r=fe.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function Uk(e){var t=e.children,n=e.main,r=e.mask,o=e.attributes,i=e.styles,a=e.transform;if(Hd(a)&&n.found&&!r.found){var s=n.width,l=n.height,u={x:s/l/2,y:.5};o.style=Zl(W(W({},i),{},{"transform-origin":"".concat(u.x+a.x/16,"em ").concat(u.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}function Vk(e){var t=e.prefix,n=e.iconName,r=e.children,o=e.attributes,i=e.symbol,a=i===!0?"".concat(t,"-").concat(G.cssPrefix,"-").concat(n):i;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:W(W({},o),{},{id:a}),children:r}]}]}function Jd(e){var t=e.icons,n=t.main,r=t.mask,o=e.prefix,i=e.iconName,a=e.transform,s=e.symbol,l=e.title,u=e.maskId,c=e.titleId,f=e.extra,d=e.watchable,h=d===void 0?!1:d,v=r.found?r:n,y=v.width,E=v.height,p=o==="fak",m=[G.replacementClass,i?"".concat(G.cssPrefix,"-").concat(i):""].filter(function(D){return f.classes.indexOf(D)===-1}).filter(function(D){return D!==""||!!D}).concat(f.classes).join(" "),g={children:[],attributes:W(W({},f.attributes),{},{"data-prefix":o,"data-icon":i,class:m,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(E)})},S=p&&!~f.classes.indexOf("fa-fw")?{width:"".concat(y/E*16*.0625,"em")}:{};h&&(g.attributes[Mr]=""),l&&(g.children.push({tag:"title",attributes:{id:g.attributes["aria-labelledby"]||"title-".concat(c||Ca())},children:[l]}),delete g.attributes.title);var _=W(W({},g),{},{prefix:o,iconName:i,main:n,mask:r,maskId:u,transform:a,symbol:s,styles:W(W({},S),f.styles)}),x=r.found&&n.found?On("generateAbstractMask",_)||{children:[],attributes:{}}:On("generateAbstractIcon",_)||{children:[],attributes:{}},N=x.children,I=x.attributes;return _.children=N,_.attributes=I,s?Vk(_):Uk(_)}function WE(e){var t=e.content,n=e.width,r=e.height,o=e.transform,i=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,u=W(W(W({},a.attributes),i?{title:i}:{}),{},{class:a.classes.join(" ")});l&&(u[Mr]="");var c=W({},a.styles);Hd(o)&&(c.transform=gk({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);var f=Zl(c);f.length>0&&(u.style=f);var d=[];return d.push({tag:"span",attributes:u,children:[t]}),i&&d.push({tag:"span",attributes:{class:"sr-only"},children:[i]}),d}function $k(e){var t=e.content,n=e.title,r=e.extra,o=W(W(W({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),i=Zl(r.styles);i.length>0&&(o.style=i);var a=[];return a.push({tag:"span",attributes:o,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var ep=Vt.styles;function tp(e){var t=e[0],n=e[1],r=e.slice(4),o=Pd(r,1),i=o[0],a=null;return Array.isArray(i)?a={tag:"g",attributes:{class:"".concat(G.cssPrefix,"-").concat(Fr.GROUP)},children:[{tag:"path",attributes:{class:"".concat(G.cssPrefix,"-").concat(Fr.SECONDARY),fill:"currentColor",d:i[0]}},{tag:"path",attributes:{class:"".concat(G.cssPrefix,"-").concat(Fr.PRIMARY),fill:"currentColor",d:i[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:i}},{found:!0,width:t,height:n,icon:a}}var Bk={found:!1,width:512,height:512};function zk(e,t){!bE&&!G.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function np(e,t){var n=t;return t==="fa"&&G.styleDefault!==null&&(t=lr()),new Promise(function(r,o){if(On("missingIconAbstract"),n==="fa"){var i=BE(e)||{};e=i.iconName||e,t=i.prefix||t}if(e&&t&&ep[t]&&ep[t][e]){var a=ep[t][e];return r(tp(a))}zk(e,t),r(W(W({},Bk),{},{icon:G.showMissingIcons&&e?On("missingIconAbstract")||{}:{}}))})}var YE=function(){},rp=G.measurePerformance&&Yl&&Yl.mark&&Yl.measure?Yl:{mark:YE,measure:YE},La='FA "6.3.0"',Hk=function(t){return rp.mark("".concat(La," ").concat(t," begins")),function(){return GE(t)}},GE=function(t){rp.mark("".concat(La," ").concat(t," ends")),rp.measure("".concat(La," ").concat(t),"".concat(La," ").concat(t," begins"),"".concat(La," ").concat(t," ends"))},op={begin:Hk,end:GE},au=function(){};function KE(e){var t=e.getAttribute?e.getAttribute(Mr):null;return typeof t=="string"}function jk(e){var t=e.getAttribute?e.getAttribute(Vd):null,n=e.getAttribute?e.getAttribute($d):null;return t&&n}function Wk(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(G.replacementClass)}function Yk(){if(G.autoReplaceSvg===!0)return su.replace;var e=su[G.autoReplaceSvg];return e||su.replace}function Gk(e){return fe.createElementNS("http://www.w3.org/2000/svg",e)}function Kk(e){return fe.createElement(e)}function XE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?Gk:Kk:n;if(typeof e=="string")return fe.createTextNode(e);var o=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){o.setAttribute(a,e.attributes[a])});var i=e.children||[];return i.forEach(function(a){o.appendChild(XE(a,{ceFn:r}))}),o}function Xk(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var su={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(o){n.parentNode.insertBefore(XE(o),n)}),n.getAttribute(Mr)===null&&G.keepOriginalSource){var r=fe.createComment(Xk(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~zd(n).indexOf(G.replacementClass))return su.replace(t);var o=new RegExp("".concat(G.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var i=r[0].attributes.class.split(" ").reduce(function(s,l){return l===G.replacementClass||l.match(o)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=i.toSvg.join(" "),i.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",i.toNode.join(" "))}var a=r.map(function(s){return Ia(s)}).join(`
|
|
819
|
-
`);n.setAttribute(Mr,""),n.innerHTML=a}};function QE(e){e()}function qE(e,t){var n=typeof t=="function"?t:au;if(e.length===0)n();else{var r=QE;G.mutateApproach===JA&&(r=ar.requestAnimationFrame||QE),r(function(){var o=Yk(),i=op.begin("mutate");e.map(o),i(),n()})}}var ip=!1;function ZE(){ip=!0}function ap(){ip=!1}var lu=null;function JE(e){if(SE&&G.observeMutations){var t=e.treeCallback,n=t===void 0?au:t,r=e.nodeCallback,o=r===void 0?au:r,i=e.pseudoElementsCallback,a=i===void 0?au:i,s=e.observeMutationsRoot,l=s===void 0?fe:s;lu=new SE(function(u){if(!ip){var c=lr();Xo(u).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!KE(f.addedNodes[0])&&(G.searchPseudoElements&&a(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&G.searchPseudoElements&&a(f.target.parentNode),f.type==="attributes"&&KE(f.target)&&~ak.indexOf(f.attributeName))if(f.attributeName==="class"&&jk(f.target)){var d=ou(zd(f.target)),h=d.prefix,v=d.iconName;f.target.setAttribute(Vd,h||c),v&&f.target.setAttribute($d,v)}else Wk(f.target)&&o(f.target)})}}),Rn&&lu.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Qk(){lu&&lu.disconnect()}function qk(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,o){var i=o.split(":"),a=i[0],s=i.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function Zk(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",o=ou(zd(e));return o.prefix||(o.prefix=lr()),t&&n&&(o.prefix=t,o.iconName=n),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=Ak(o.prefix,e.innerText)||Xd(o.prefix,Yd(e.innerText))),!o.iconName&&G.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=e.firstChild.data)),o}function Jk(e){var t=Xo(e.attributes).reduce(function(o,i){return o.name!=="class"&&o.name!=="style"&&(o[i.name]=i.value),o},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return G.autoA11y&&(n?t["aria-labelledby"]="".concat(G.replacementClass,"-title-").concat(r||Ca()):(t["aria-hidden"]="true",t.focusable="false")),t}function eC(){return{iconName:null,title:null,titleId:null,prefix:null,transform:tn,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function e1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=Zk(e),r=n.iconName,o=n.prefix,i=n.rest,a=Jk(e),s=qd("parseNodeAttributes",{},e),l=t.styleParser?qk(e):[];return W({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:o,transform:tn,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:i,styles:l,attributes:a}},s)}var tC=Vt.styles;function t1(e){var t=G.autoReplaceSvg==="nest"?e1(e,{styleParser:!1}):e1(e);return~t.extra.classes.indexOf(NE)?On("generateLayersText",e,t):On("generateSvgReplacementMutation",e,t)}var ur=new Set;Bd.map(function(e){ur.add("fa-".concat(e))}),Object.keys(ba[de]).map(ur.add.bind(ur)),Object.keys(ba[Ee]).map(ur.add.bind(ur)),ur=xa(ur);function n1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Rn)return Promise.resolve();var n=fe.documentElement.classList,r=function(f){return n.add("".concat(RE,"-").concat(f))},o=function(f){return n.remove("".concat(RE,"-").concat(f))},i=G.autoFetchSvg?ur:Bd.map(function(c){return"fa-".concat(c)}).concat(Object.keys(tC));i.includes("fa")||i.push("fa");var a=[".".concat(NE,":not([").concat(Mr,"])")].concat(i.map(function(c){return".".concat(c,":not([").concat(Mr,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=Xo(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),o("complete");else return Promise.resolve();var l=op.begin("onTree"),u=s.reduce(function(c,f){try{var d=t1(f);d&&c.push(d)}catch(h){bE||h.name==="MissingIcon"&&console.error(h)}return c},[]);return new Promise(function(c,f){Promise.all(u).then(function(d){qE(d,function(){r("active"),r("complete"),o("pending"),typeof t=="function"&&t(),l(),c()})}).catch(function(d){l(),f(d)})})}function nC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;t1(e).then(function(n){n&&qE([n],t)})}function rC(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Zd(t||{}),o=n.mask;return o&&(o=(o||{}).icon?o:Zd(o||{})),e(r,W(W({},n),{},{mask:o}))}}var oC=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,o=r===void 0?tn:r,i=n.symbol,a=i===void 0?!1:i,s=n.mask,l=s===void 0?null:s,u=n.maskId,c=u===void 0?null:u,f=n.title,d=f===void 0?null:f,h=n.titleId,v=h===void 0?null:h,y=n.classes,E=y===void 0?[]:y,p=n.attributes,m=p===void 0?{}:p,g=n.styles,S=g===void 0?{}:g;if(t){var _=t.prefix,x=t.iconName,N=t.icon;return iu(W({type:"icon"},t),function(){return Vr("beforeDOMElementCreation",{iconDefinition:t,params:n}),G.autoA11y&&(d?m["aria-labelledby"]="".concat(G.replacementClass,"-title-").concat(v||Ca()):(m["aria-hidden"]="true",m.focusable="false")),Jd({icons:{main:tp(N),mask:l?tp(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:_,iconName:x,transform:W(W({},tn),o),symbol:a,title:d,maskId:c,titleId:v,extra:{attributes:m,styles:S,classes:E}})})}},iC={mixout:function(){return{icon:rC(oC)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=n1,n.nodeCallback=nC,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,o=r===void 0?fe:r,i=n.callback,a=i===void 0?function(){}:i;return n1(o,a)},t.generateSvgReplacementMutation=function(n,r){var o=r.iconName,i=r.title,a=r.titleId,s=r.prefix,l=r.transform,u=r.symbol,c=r.mask,f=r.maskId,d=r.extra;return new Promise(function(h,v){Promise.all([np(o,s),c.iconName?np(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var E=Pd(y,2),p=E[0],m=E[1];h([n,Jd({icons:{main:p,mask:m},prefix:s,iconName:o,transform:l,symbol:u,maskId:f,title:i,titleId:a,extra:d,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,o=n.attributes,i=n.main,a=n.transform,s=n.styles,l=Zl(s);l.length>0&&(o.style=l);var u;return Hd(a)&&(u=On("generateAbstractTransformGrouping",{main:i,transform:a,containerWidth:i.width,iconWidth:i.width})),r.push(u||i.icon),{children:r,attributes:o}}}},aC={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.classes,i=o===void 0?[]:o;return iu({type:"layer"},function(){Vr("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(G.cssPrefix,"-layers")].concat(xa(i)).join(" ")},children:a}]})}}}},sC={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.title,i=o===void 0?null:o,a=r.classes,s=a===void 0?[]:a,l=r.attributes,u=l===void 0?{}:l,c=r.styles,f=c===void 0?{}:c;return iu({type:"counter",content:n},function(){return Vr("beforeDOMElementCreation",{content:n,params:r}),$k({content:n.toString(),title:i,extra:{attributes:u,styles:f,classes:["".concat(G.cssPrefix,"-layers-counter")].concat(xa(s))}})})}}}},lC={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.transform,i=o===void 0?tn:o,a=r.title,s=a===void 0?null:a,l=r.classes,u=l===void 0?[]:l,c=r.attributes,f=c===void 0?{}:c,d=r.styles,h=d===void 0?{}:d;return iu({type:"text",content:n},function(){return Vr("beforeDOMElementCreation",{content:n,params:r}),WE({content:n,transform:W(W({},tn),i),title:s,extra:{attributes:f,styles:h,classes:["".concat(G.cssPrefix,"-layers-text")].concat(xa(u))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var o=r.title,i=r.transform,a=r.extra,s=null,l=null;if(wE){var u=parseInt(getComputedStyle(n).fontSize,10),c=n.getBoundingClientRect();s=c.width/u,l=c.height/u}return G.autoA11y&&!o&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,WE({content:n.innerHTML,width:s,height:l,transform:i,title:o,extra:a,watchable:!0})])}}},uC=new RegExp('"',"ug"),r1=[1105920,1112319];function cC(e){var t=e.replace(uC,""),n=xk(t,0),r=n>=r1[0]&&n<=r1[1],o=t.length===2?t[0]===t[1]:!1;return{value:Yd(o?t[0]:t),isSecondary:r||o}}function o1(e,t){var n="".concat(ZA).concat(t.replace(":","-"));return new Promise(function(r,o){if(e.getAttribute(n)!==null)return r();var i=Xo(e.children),a=i.filter(function(N){return N.getAttribute(Ud)===t})[0],s=ar.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(rk),u=s.getPropertyValue("font-weight"),c=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&c!=="none"&&c!==""){var f=s.getPropertyValue("content"),d=~["Sharp"].indexOf(l[2])?Ee:de,h=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Na[d][l[2].toLowerCase()]:ok[d][u],v=cC(f),y=v.value,E=v.isSecondary,p=l[0].startsWith("FontAwesome"),m=Xd(h,y),g=m;if(p){var S=kk(y);S.iconName&&S.prefix&&(m=S.iconName,h=S.prefix)}if(m&&!E&&(!a||a.getAttribute(Vd)!==h||a.getAttribute($d)!==g)){e.setAttribute(n,g),a&&e.removeChild(a);var _=eC(),x=_.extra;x.attributes[Ud]=t,np(m,h).then(function(N){var I=Jd(W(W({},_),{},{icons:{main:N,mask:Qd()},prefix:h,iconName:g,extra:x,watchable:!0})),D=fe.createElement("svg");t==="::before"?e.insertBefore(D,e.firstChild):e.appendChild(D),D.outerHTML=I.map(function(T){return Ia(T)}).join(`
|
|
820
|
-
`),e.removeAttribute(n),r()}).catch(o)}else r()}else r()})}function fC(e){return Promise.all([o1(e,"::before"),o1(e,"::after")])}function dC(e){return e.parentNode!==document.head&&!~ek.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Ud)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function i1(e){if(Rn)return new Promise(function(t,n){var r=Xo(e.querySelectorAll("*")).filter(dC).map(fC),o=op.begin("searchPseudoElements");ZE(),Promise.all(r).then(function(){o(),ap(),t()}).catch(function(){o(),ap(),n()})})}var pC={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=i1,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,o=r===void 0?fe:r;G.searchPseudoElements&&i1(o)}}},a1=!1,hC={mixout:function(){return{dom:{unwatch:function(){ZE(),a1=!0}}}},hooks:function(){return{bootstrap:function(){JE(qd("mutationObserverCallbacks",{}))},noAuto:function(){Qk()},watch:function(n){var r=n.observeMutationsRoot;a1?ap():JE(qd("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},s1=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,o){var i=o.toLowerCase().split("-"),a=i[0],s=i.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},mC={mixout:function(){return{parse:{transform:function(n){return s1(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var o=r.getAttribute("data-fa-transform");return o&&(n.transform=s1(o)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,o=n.transform,i=n.containerWidth,a=n.iconWidth,s={transform:"translate(".concat(i/2," 256)")},l="translate(".concat(o.x*32,", ").concat(o.y*32,") "),u="scale(".concat(o.size/16*(o.flipX?-1:1),", ").concat(o.size/16*(o.flipY?-1:1),") "),c="rotate(".concat(o.rotate," 0 0)"),f={transform:"".concat(l," ").concat(u," ").concat(c)},d={transform:"translate(".concat(a/2*-1," -256)")},h={outer:s,inner:f,path:d};return{tag:"g",attributes:W({},h.outer),children:[{tag:"g",attributes:W({},h.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:W(W({},r.icon.attributes),h.path)}]}]}}}},sp={x:0,y:0,width:"100%",height:"100%"};function l1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function gC(e){return e.tag==="g"?e.children:[e]}var vC={hooks:function(){return{parseNodeAttributes:function(n,r){var o=r.getAttribute("data-fa-mask"),i=o?ou(o.split(" ").map(function(a){return a.trim()})):Qd();return i.prefix||(i.prefix=lr()),n.mask=i,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,o=n.attributes,i=n.main,a=n.mask,s=n.maskId,l=n.transform,u=i.width,c=i.icon,f=a.width,d=a.icon,h=mk({transform:l,containerWidth:f,iconWidth:u}),v={tag:"rect",attributes:W(W({},sp),{},{fill:"white"})},y=c.children?{children:c.children.map(l1)}:{},E={tag:"g",attributes:W({},h.inner),children:[l1(W({tag:c.tag,attributes:W(W({},c.attributes),h.path)},y))]},p={tag:"g",attributes:W({},h.outer),children:[E]},m="mask-".concat(s||Ca()),g="clip-".concat(s||Ca()),S={tag:"mask",attributes:W(W({},sp),{},{id:m,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,p]},_={tag:"defs",children:[{tag:"clipPath",attributes:{id:g},children:gC(d)},S]};return r.push(_,{tag:"rect",attributes:W({fill:"currentColor","clip-path":"url(#".concat(g,")"),mask:"url(#".concat(m,")")},sp)}),{children:r,attributes:o}}}},yC={provides:function(t){var n=!1;ar.matchMedia&&(n=ar.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],o={fill:"currentColor"},i={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:W(W({},o),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=W(W({},i),{},{attributeName:"opacity"}),s={tag:"circle",attributes:W(W({},o),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:W(W({},i),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:W(W({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:W(W({},o),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:W(W({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:W(W({},o),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:W(W({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},EC={hooks:function(){return{parseNodeAttributes:function(n,r){var o=r.getAttribute("data-fa-symbol"),i=o===null?!1:o===""?!0:o;return n.symbol=i,n}}}},SC=[yk,iC,aC,sC,lC,pC,hC,mC,vC,yC,EC];Lk(SC,{mixoutsTo:pt}),pt.noAuto;var wC=pt.config;pt.library,pt.dom;var lp=pt.parse;pt.findIconDefinition,pt.toHtml;var _C=pt.icon;pt.layer,pt.text,pt.counter;var Z={},xC={get exports(){return Z},set exports(e){Z=e}},RC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",bC=RC,NC=bC;function u1(){}function c1(){}c1.resetWarningCache=u1;var OC=function(){function e(r,o,i,a,s,l){if(l!==NC){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c1,resetWarningCache:u1};return n.PropTypes=n,n};xC.exports=OC();function f1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(n),!0).forEach(function(r){Jo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uu(e){return uu=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},uu(e)}function Jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TC(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function AC(e,t){if(e==null)return{};var n=TC(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function up(e){return kC(e)||CC(e)||IC(e)||LC()}function kC(e){if(Array.isArray(e))return cp(e)}function CC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IC(e,t){if(e){if(typeof e=="string")return cp(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 cp(e,t)}}function cp(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 LC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
821
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PC(e){var t,n=e.beat,r=e.fade,o=e.beatFade,i=e.bounce,a=e.shake,s=e.flash,l=e.spin,u=e.spinPulse,c=e.spinReverse,f=e.pulse,d=e.fixedWidth,h=e.inverse,v=e.border,y=e.listItem,E=e.flip,p=e.size,m=e.rotation,g=e.pull,S=(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":o,"fa-bounce":i,"fa-shake":a,"fa-flash":s,"fa-spin":l,"fa-spin-reverse":c,"fa-spin-pulse":u,"fa-pulse":f,"fa-fw":d,"fa-inverse":h,"fa-border":v,"fa-li":y,"fa-flip":E===!0,"fa-flip-horizontal":E==="horizontal"||E==="both","fa-flip-vertical":E==="vertical"||E==="both"},Jo(t,"fa-".concat(p),typeof p<"u"&&p!==null),Jo(t,"fa-rotate-".concat(m),typeof m<"u"&&m!==null&&m!==0),Jo(t,"fa-pull-".concat(g),typeof g<"u"&&g!==null),Jo(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(S).map(function(_){return S[_]?_:null}).filter(function(_){return _})}function DC(e){return e=e-0,e===e}function d1(e){return DC(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var MC=["style"];function FC(e){return e.charAt(0).toUpperCase()+e.slice(1)}function UC(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),o=d1(n.slice(0,r)),i=n.slice(r+1).trim();return o.startsWith("webkit")?t[FC(o)]=i:t[o]=i,t},{})}function p1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return p1(e,l)}),o=Object.keys(t.attributes||{}).reduce(function(l,u){var c=t.attributes[u];switch(u){case"class":l.attrs.className=c,delete t.attributes.class;break;case"style":l.attrs.style=UC(c);break;default:u.indexOf("aria-")===0||u.indexOf("data-")===0?l.attrs[u.toLowerCase()]=c:l.attrs[d1(u)]=c}return l},{attrs:{}}),i=n.style,a=i===void 0?{}:i,s=AC(n,MC);return o.attrs.style=cr(cr({},o.attrs.style),a),e.apply(void 0,[t.tag,cr(cr({},o.attrs),s)].concat(up(r)))}var h1=!1;try{h1=!0}catch{}function VC(){if(!h1&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function m1(e){if(e&&uu(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(lp.icon)return lp.icon(e);if(e===null)return null;if(e&&uu(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function fp(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Jo({},e,t):{}}var Pa=Ke.forwardRef(function(e,t){var n=e.icon,r=e.mask,o=e.symbol,i=e.className,a=e.title,s=e.titleId,l=e.maskId,u=m1(n),c=fp("classes",[].concat(up(PC(e)),up(i.split(" ")))),f=fp("transform",typeof e.transform=="string"?lp.transform(e.transform):e.transform),d=fp("mask",m1(r)),h=_C(u,cr(cr(cr(cr({},c),f),d),{},{symbol:o,title:a,titleId:s,maskId:l}));if(!h)return VC("Could not find icon",u),null;var v=h.abstract,y={ref:t};return Object.keys(e).forEach(function(E){Pa.defaultProps.hasOwnProperty(E)||(y[E]=e[E])}),$C(v[0],y)});Pa.displayName="FontAwesomeIcon",Pa.propTypes={beat:Z.bool,border:Z.bool,beatFade:Z.bool,bounce:Z.bool,className:Z.string,fade:Z.bool,flash:Z.bool,mask:Z.oneOfType([Z.object,Z.array,Z.string]),maskId:Z.string,fixedWidth:Z.bool,inverse:Z.bool,flip:Z.oneOf([!0,!1,"horizontal","vertical","both"]),icon:Z.oneOfType([Z.object,Z.array,Z.string]),listItem:Z.bool,pull:Z.oneOf(["right","left"]),pulse:Z.bool,rotation:Z.oneOf([0,90,180,270]),shake:Z.bool,size:Z.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Z.bool,spinPulse:Z.bool,spinReverse:Z.bool,symbol:Z.oneOfType([Z.bool,Z.string]),title:Z.string,titleId:Z.string,transform:Z.oneOfType([Z.string,Z.object]),swapOpacity:Z.bool},Pa.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var $C=p1.bind(null,Ke.createElement);const BC={"arrow-left":$A,"circle-info":BA,"trash-can":VA,xmark:zA},nn=Ke.forwardRef(function({tag:t,className:n="",...r},o){const i=BC[t];if(!i)throw new Error(`Icon ${t} is not supported`);return w(Pa,{ref:o,icon:i,size:"1x",className:n,...r})}),zC=({isSelected:e,nodeId:t,nodeTitle:n,showDelete:r})=>{const o=Re(l=>l.removeNode),i=Re(l=>l.isEdgeConnecting);return V("div",{className:"flex w-full items-center justify-between p-4",children:[w("h2",{className:`text-lg font-semibold leading-6 ${e?"text-primary":""}`,children:n}),r&&!i&&V("button",{className:"opacity-0 transition-opacity group-hover/node-wrapper:opacity-100",onClick:()=>{o(t)},children:[w(nn,{tag:"trash-can",className:"text-negative"}),w("span",{className:"sr-only",children:U(C.REMOVE_NODE,{title:n})})]})]})},HC=({id:e,missingRequiredEntry:t})=>{const n=Re(i=>i.getTargetEdges),[r,o]=b.useState(!1);return b.useEffect(()=>{const i=()=>n(e).length===0;o(i());const a=Re.subscribe((s,l)=>{s.edges.length!==l.edges.length&&o(i()),s.nodes.length!==l.nodes.length&&o(i()),s.edgeUpdateSuccessful!==l.edgeUpdateSuccessful&&o(i())});return()=>a()},[e,n]),r||t?V("div",{className:"flex flex-col gap-y-6 px-4 pb-4 text-sm italic leading-4",children:[r&&w("p",{children:"Not Connected to Flow"}),t&&w("p",{children:"Missing Required Entry"})]}):null},jC=({id:e,isConnectable:t})=>{if(!e)throw new Error("TargetHandle: id is required");return w(Fo,{type:"target",id:`target-${e}`,position:K.Top,isConnectable:t,className:"-top-2 h-4 w-full rounded-none border-none opacity-0"})},ht=({children:e,id:t,isConnectable:n=!0,missingRequiredEntry:r,nodeTitle:o,selected:i,showDelete:a,showValidation:s=!0,target:l=!0})=>V("section",{className:`${i?"shadow-xl":""} group/node-wrapper min-w-[300px] rounded-lg border border-foreground/10 bg-background transition-[visibility]`,children:[l&&t&&w(jC,{id:t,isConnectable:n}),w(zC,{nodeId:t,isSelected:i,nodeTitle:o,showDelete:a}),s&&w(HC,{id:t,missingRequiredEntry:r??!1}),e]}),WC=({children:e,handleClick:t,...n})=>w("li",{role:"presentation",children:V("div",{className:"flex items-center gap-2 rounded-lg bg-secondary p-2 pr-1",role:"option","aria-selected":"true",tabIndex:0,children:[w("span",{className:"text-sm text-foreground",children:e}),V("button",{className:" px-1",onClick:t,onKeyDown:o=>{(o.key==="Backspace"||o.key==="Delete")&&(o.stopPropagation(),t==null||t())},type:"button",...n,children:[w("span",{className:"sr-only",children:"Remove"}),w(nn,{tag:"xmark",size:"xs"})]})]})}),$r=e=>w("div",{className:"relative after:absolute after:right-3 after:top-3 after:h-[7px] after:w-[7px] after:rotate-45 after:border-r after:border-b after:border-foreground after:content-['']",children:w("select",{className:"pr-8",...e,children:e.children})}),YC={positive:"border-positive hover:bg-positive",negative:"border-negative hover:bg-negative",disabled:"border-disabled"},fr=({color:e="positive",enabled:t=!0,id:n,isConnectable:r,position:o=K.Bottom,positionClasses:i="-bottom-2.5"})=>{if(!n)throw new Error("SourceHandle: id is required");return w(Fo,{type:"source",id:n,position:o,isConnectable:r&&t,className:`absolute h-5 w-5 rounded-full border-[3px] bg-background transition-colors ${i} ${YC[t?e:"disabled"]??""}`})},Da=({children:e})=>w("div",{className:"divide-foreground/10 flex w-full items-center divide-x",children:e}),ei=({color:e="positive",enabled:t=!0,id:n,isConnectable:r,optionText:o,position:i=K.Bottom,positionClasses:a="-bottom-2.5"})=>V("div",{className:"relative w-full min-w-[104px] whitespace-nowrap border-t border-foreground/10 py-4",children:[w("div",{className:"flex flex-col items-center justify-center",children:w("p",{className:`${t?"":"text-disabled"} min-h-[1rem] text-sm leading-4`,children:o})}),w(fr,{color:e,enabled:t,id:n,isConnectable:r,position:i,positionClasses:a})]}),GC=({checked:e=!1,name:t,onClick:n})=>V("button",{name:t,onClick:n,type:"button",className:`${e?"bg-primary":"bg-secondary"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out`,role:"switch","aria-checked":e?"true":"false",children:[w("span",{className:"sr-only",children:U(e?C.ON:C.OFF)}),w("span",{className:`pointer-events-none inline-block h-5 w-5 ${e?"translate-x-5":"translate-x-0"} transform rounded-full bg-white shadow transition duration-200 ease-in-out`})]}),g1=({checked:e,clickHandler:t,name:n,subtitle:r,title:o})=>V("div",{className:"mb-2 flex items-center justify-between",children:[V("div",{className:"flex flex-grow flex-col",children:[w("span",{className:"text-base font-medium leading-6 text-foreground",children:o}),r&&w("span",{className:"text-xs text-foreground/50",children:r})]}),w(GC,{checked:e,name:n,onClick:t})]}),Ma=({errorText:e,label:t,name:n,onChange:r,required:o,valid:i,value:a,...s})=>V("label",{children:[w("span",{className:"sr-only",children:t}),w("textarea",{"aria-invalid":i?void 0:"true",className:`peer min-h-[77px] w-full resize-none ${i?"":"invalid"}`,inputMode:"text",minLength:1,name:n,onChange:r,required:o,value:a,...s}),w("p",{className:"requirements",role:"alert",children:e})]}),KC=({dragging:e,id:t,isConnectable:n,selected:r})=>w(ht,{id:t,isConnectable:n,missingRequiredEntry:!1,nodeTitle:"Answer Call",selected:r,showDelete:!e,children:w(fr,{id:t,isConnectable:n,color:"positive"})}),XC={answered:C.SUCCESS,noAnswer:C.NO_ANSWER,busy:C.BUSY,decline:C.DECLINE,error:C.ERROR},QC={address:C.FORWARD_TO_ADDRESS,phone:C.FORWARD_TO_PHONE,resource:C.FORWARD_TO_RESOURCE},dp=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>V(ht,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:U(QC[t.destinationType]),selected:o,showDelete:!n,children:[t.destinations.length>0?w("section",{className:"p-4 pt-2",children:w("ul",{className:"space-y-2",children:t.destinations.map((i,a)=>w("li",{className:"text-sm",children:i},`node-${i}-${a}`))})}):null,w(Da,{children:t.options.map(i=>{const a=XC[i.connectResult],s=i.connectResult==="answered"?"positive":"negative";return w(ei,{id:i.id,optionText:U(a),color:s,isConnectable:r},i.id)})})]}),qC=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>{const i=Re(c=>c.removeEdge),a=Re(c=>c.getNodeEdges),s=t.options.length??0,l=b.useRef(s),u=s2();return b.useEffect(()=>{var c;if(s!==l.current){if(s<l.current){const f=(c=t.options)==null?void 0:c.reduce((h,v)=>[...h,v.id],[]);a(e).filter(h=>h.sourceHandle&&!f.includes(h==null?void 0:h.sourceHandle)).forEach(h=>{i(h.id)})}u(e),l.current=s}},[t.options,a,e,s,i,u]),w(ht,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:"Gather Input",selected:o,showDelete:!n,children:V(Da,{children:[t.options.map((c,f)=>{const d=Boolean(c.command||c.digit);return w(ei,{color:"positive",enabled:d,id:c.id,isConnectable:r,optionText:U(C.OPT_NUMBER,{index:f+1})},c.id)}),t.results.map(c=>w(ei,{color:"negative",id:c.id,isConnectable:r,optionText:c.result==="no_input"?U(C.NO_INPUT):U(C.UNKNOWN)},c.id))]})})},ZC=({id:e,isConnectable:t,selected:n})=>w(ht,{allowDelete:!1,id:e,isConnectable:t,nodeTitle:U(C.HANDLE_CALL),selected:n,showDelete:!1,showValidation:!1,target:!1,children:w(fr,{id:e,color:"positive",isConnectable:t})}),pp={busy:C.BUSY,decline:C.DECLINE,hangup:C.HANG_UP},JC=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>w(ht,{id:n,isConnectable:r,missingRequiredEntry:!1,nodeTitle:"Hang Up",selected:o,showDelete:!t,children:e.reason&&w("section",{className:"p-4 pt-2",children:w("p",{children:U(pp[e.reason])})})}),eI=e=>{try{return new URL(e).pathname.split("/").at(-1)}catch{return""}},tI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{let i=e.selected&&e[e.selected];return i&&e.selected==="url"&&(i=eI(i)||"Play Audio"),V(ht,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:U(C.PLAY_AUDIO_TTS),selected:o,showDelete:!t,children:[i&&w("div",{className:"max-w-[300px] p-4 pt-0",children:e.selected==="url"?w("a",{className:"break-words text-primary underline line-clamp-3",href:e.url,target:"_blank",rel:"noopener noreferrer",children:i}):w("p",{className:"break-words line-clamp-3",children:i})}),w(fr,{id:n,isConnectable:r})]})},nI=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>V(ht,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:U(C.SET_VARIABLES),selected:o,showDelete:!n,children:[t.variables.length>0&&w("div",{className:"flow-root",children:w("div",{className:"inline-block p-4 pt-0 align-middle",children:V("table",{className:"w-80 table-fixed divide-y divide-foreground/10",children:[w("thead",{children:V("tr",{children:[w("th",{scope:"col",className:"py-3.5 text-left text-sm font-semibold",children:U(C.KEY)}),w("th",{scope:"col",className:"px-2 py-3.5 text-left text-sm font-semibold",children:U(C.VALUE)})]})}),w("tbody",{className:"divide-y divide-foreground/10 bg-background text-sm",children:t.variables.map(i=>i.key?V("tr",{children:[w("td",{className:"overflow-hidden text-ellipsis whitespace-nowrap py-2 text-sm",children:i.key}),w("td",{className:"overflow-hidden text-ellipsis whitespace-nowrap break-all px-2 py-2 text-sm",children:i.value})]},i.id):null)})]})})}),w(fr,{id:e,isConnectable:r,color:"positive"})]}),rI=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>{const i=Re(a=>a.partialUpdateNodeData);return b.useEffect(()=>{const a=Dr.subscribe(s=>{const u=Array.from(s.variables.values()).reduce((c,f)=>{const d=t.variables.find(h=>h.setId===f.id);return d&&c.push({...d,key:f.key}),c},[]);i(e,{variables:u,missingRequiredParams:u.length===0})});return()=>a()},[i,e,t.variables]),w(ht,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:U(C.UNSET_VARIABLES),selected:o,showDelete:!n,children:w(fr,{id:e,isConnectable:r,color:"positive"})})},oI={success:C.SUCCESS,failed:C.FAILURE},iI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{var i;return w(ht,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:U(C.RECORD),selected:o,showDelete:!t,children:w(Da,{children:(i=e==null?void 0:e.options)==null?void 0:i.map(a=>{const s=oI[a.recordResult];return w(ei,{id:a.id,optionText:U(s),color:a.recordResult==="success"?"positive":"negative",isConnectable:r},a.id)})})})},aI={success:C.SUCCESS,failed:C.FAILURE},sI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{const{label:i,missingRequiredParams:a,options:s}=e;return V(ht,{id:n,isConnectable:r,missingRequiredEntry:a,nodeTitle:U(C.RECORD_CALL_START),selected:o,showDelete:!t,children:[i&&w("section",{className:"whitespace-nowrap px-4 pb-4 text-sm",children:i}),w(Da,{children:s==null?void 0:s.map(l=>{const u=aI[l.recordResult];return w(ei,{id:l.id,optionText:U(u),color:l.recordResult==="success"?"positive":"negative",isConnectable:r},l.id)})})]})},lI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{var s;const i=(s=Wo(l=>l.entries))==null?void 0:s.find(l=>l.controlId===e.controlId),a=i==null?void 0:i.label;return V(ht,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:U(C.RECORD_CALL_STOP),selected:o,showDelete:!t,children:[a&&w("section",{className:"whitespace-nowrap px-4 pb-4 text-sm",children:a}),w(fr,{id:n,color:"positive",isConnectable:r})]})},uI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>V(ht,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:U(C.SEND_SMS),selected:o,showDelete:!t,children:[(e.body||e.toNumber)&&V("div",{className:"max-w-[300px] p-4 pt-0",children:[e.fromNumber&&V("p",{className:`whitespace-nowrap ${e.body?"pb-2":""}`,children:[U(C.FROM),": ",e.fromNumber]}),e.toNumber&&V("p",{className:`whitespace-nowrap ${e.body?"pb-2":""}`,children:[U(C.TO),": ",e.toNumber]}),e.body&&w("p",{className:"break-words pt-1 line-clamp-3",children:e.body})]}),w(fr,{id:n,isConnectable:r})]}),cI={success:C.SUCCESS,failed:C.FAILED},fI={answer:KC,forwardAddress:dp,forwardPhone:dp,forwardResource:dp,handleCall:ZC,hangup:JC,play:tI,promptPlay:qC,record:iI,recordCallStart:sI,recordCallStop:lI,sendSms:uI,set:nI,unset:rI,request:({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{var i;return w(ht,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:U(C.REQUEST),selected:o,showDelete:!t,children:w(Da,{children:(i=e==null?void 0:e.options)==null?void 0:i.map(a=>{const s=cI[a.requestResult];return w(ei,{id:a.id,optionText:U(s),color:a.requestResult==="success"?"positive":"negative",isConnectable:r},a.id)})})})}},dI={floating:UA},pI=e=>({edges:e.edges,nodes:e.nodes,onConnect:e.onConnect,onConnectEnd:e.onConnectEnd,onConnectStart:e.onConnectStart,onEdgesChange:e.onEdgesChange,onEdgeUpdate:e.onEdgeUpdate,onEdgeUpdateEnd:e.onEdgeUpdateEnd,onEdgeUpdateStart:e.onEdgeUpdateStart,onInit:e.onInit,onNodesChange:e.onNodesChange,onNodesDelete:e.onNodesDelete,onSelectionChange:e.onSelectionChange}),hI=({children:e})=>{const{edges:t,nodes:n,onConnect:r,onConnectEnd:o,onConnectStart:i,onEdgesChange:a,onEdgeUpdate:s,onEdgeUpdateEnd:l,onEdgeUpdateStart:u,onInit:c,onNodesChange:f,onNodesDelete:d,onSelectionChange:h}=Re(pI,nt);return w(R0,{className:"bg-sw-white",connectionLineComponent:L2,connectionMode:tr.Strict,defaultEdgeOptions:A0,edges:t,edgeTypes:dI,nodes:n,nodeTypes:fI,onConnect:r,onConnectEnd:o,onConnectStart:i,onEdgesChange:a,onEdgeUpdate:s,onEdgeUpdateEnd:l,onEdgeUpdateStart:u,onInit:c,onNodesChange:f,onNodesDelete:d,onSelectionChange:h,children:e})},v1=/^[\w\d ']+$/,y1=/^\d+$/,E1=/^\d|\*|#$/,mI=/^[\d|\*|#$]{0,12}$/,gI=/^.{1,20}$/,S1=/^[a-z0-9_]{1,20}$/,Br=e=>(/(?:\/\^)(.+)(?:\$\/)/.exec(e.toString())??[])[1],hp=e=>t=>Boolean(e.exec(t)),mp=e=>hp(E1)(e),gp=e=>hp(v1)(e),w1=e=>hp(S1)(e),_1=e=>typeof e=="string"&&e===""||Array.isArray(e)&&e.length===0?!1:typeof e=="object"&&e!==null?Object.keys(e).length===0?!1:Object.values(e).every(_1):!0,Tn=e=>{const[t,n]=b.useReducer((r,o)=>({...r,...o}),e);return[t,n]},cu=({displayData:e,formRef:t,setCompleted:n})=>{b.useEffect(()=>{var s,l;const r=t.current,o=new FormData(r),i=Object.fromEntries(o.entries());let a=!0;for(const u of Object.keys(i)){if(((s=e[u])==null?void 0:s.valid)!==void 0&&(a=a&&Boolean((l=e[u])==null?void 0:l.valid),a)){const c=r.elements.namedItem(u);c&&"checkValidity"in c&&(a=a&&c.checkValidity())}if(!a)break}n(a)},[e,t,n])},x1={url:C.PLAY_AUDIO_FILE,text:C.TEXT_TO_SPEECH},R1=({displayData:e,handleOnUpdate:t,setDisplayData:n,showDefaultOption:r})=>{var s,l;const o=e.selected.value,i=u=>{const c=u.currentTarget.value;n({selected:{value:c,valid:Boolean(c)||!r}}),t({selected:c})},a=u=>{const c=u.target,{name:f,value:d}=c,h=d.trim();let v=!0;switch(f){case"url":v=c.checkValidity(),n({[f]:{value:d,valid:v}}),t({text:"",url:v?h:""});break;case"text":v=c.checkValidity()&&h.length>0,n({[f]:{value:d,valid:v}}),t({text:v?h:"",url:""});break;default:throw new Error(`Unhandled input name: ${f}`)}};return V("div",{children:[w("label",{children:V($r,{className:"w-full",name:"selected",onChange:i,value:o,children:[r&&w("option",{value:"",children:U(C.SELECT)}),Object.keys(x1).map(u=>w("option",{value:u,children:U(x1[u])},u))]})}),o&&w(vI,{name:o,onChange:a,required:!0,selected:o,valid:(s=e[o])==null?void 0:s.valid,value:(l=e[o])==null?void 0:l.value})]})},vI=({name:e,onChange:t,required:n,selected:r,valid:o,value:i})=>{const s={url:w(Ma,{errorText:U(C.ERROR_URL_IS_REQUIRED),inputMode:"url",label:U(C.PLAY_AUDIO_FILE),name:e,onChange:t,placeholder:U(C.ENTER_URL),required:n,valid:o,value:i}),text:w(Ma,{errorText:U(C.ERROR_VALUE_IS_REQUIRED),inputMode:"text",label:U(C.TEXT_TO_SPEECH),name:e,onChange:t,placeholder:U(C.WRITE_SOMETHING),required:n,valid:o,value:i})}[r];return w(Xe,{children:s})},yI=[{field:"stereo",title:C.STEREO,subtitle:C.STEREO_SUBTITLE},{field:"beep",title:C.BEEP,subtitle:C.BEEP_SUBTITLE}],b1=({displayData:e,handleOnUpdate:t,setDisplayData:n})=>{const r=a=>{const s=a.target.name,l=!e[s].value,u={[s]:{value:l}};n(u),t({[s]:l})},o=a=>{const s=a.target,{name:l,value:u}=s,c=s.checkValidity(),f={[l]:{value:u,valid:c}};n(f),t({[l]:c?u.trim():""})},i=a=>{const s=a.target.name,l=a.target.value,u={[s]:{value:l,valid:!0}};n(u),t({[s]:l})};return V(Xe,{children:[w("div",{className:"mb-5",children:yI.map(a=>{const s=e[a.field].value;return w("div",{children:w(g1,{checked:s,clickHandler:r,name:a.field,subtitle:U(a.subtitle),title:U(a.title)})},a.field)})}),V("label",{children:[U(C.TERMINATORS),w("input",{className:`w-full ${e.terminators.valid?"":"invalid"}`,defaultValue:e.terminators.value||"",maxLength:12,name:"terminators",onChange:o,pattern:Br(mI),placeholder:"#*0",type:"text"}),w("p",{className:"requirements",role:"alert",children:U(C.ERROR_TERMINATORS)})]}),V("label",{children:[U(C.FORMAT),V($r,{className:"w-full",value:e.format.value,name:"format",onChange:i,children:[w("option",{value:"mp3",children:"MP3"}),w("option",{value:"wav",children:"WAV"})]})]})]})};/*!
|
|
60
|
+
*/var Ta=N,aw=Mc;function lw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uw=typeof Object.is=="function"?Object.is:lw,cw=aw.useSyncExternalStore,dw=Ta.useRef,fw=Ta.useEffect,pw=Ta.useMemo,hw=Ta.useDebugValue;Bg.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=dw(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=pw(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var m=s.value;if(o(m,h))return d=m}return d=h}if(m=d,uw(c,h))return m;var v=r(h);return o!==void 0&&o(m,v)?m:(c=h,d=v)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=cw(e,i[0],i[1]);return fw(function(){s.hasValue=!0,s.value=a},[a]),hw(a),a},function(e){e.exports=Bg}(X_);const gw=gf(Pc),{useSyncExternalStoreWithSelector:mw}=gw;function zg(e,t=e.getState,n){const r=mw(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return N.useDebugValue(r),r}const Hg=e=>{var t;((t={VITE_BASIC_AUTH:"78429ef1-283b-4fa9-8ebc-16b59f95bb1f:PT2d31b8e287dde883891cb987786603e6675141a30b7db9ad",VITE_DEFAULT_STYLE_HREF:"https://cdn.signalwire.com/npm/@signalwire/cfb@latest/dist/style.css",BASE_URL:"/cfb/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?Vg(e):e,r=(o,i)=>zg(n,o,i);return Object.assign(r,n),r},Ca=e=>e?Hg(e):Hg;function Je(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,o]of e)if(!Object.is(o,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 vw={value:()=>{}};function ba(){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 Ia(n)}function Ia(e){this._=e}function yw(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ia.prototype=ba.prototype={constructor:Ia,on:function(e,t){var n=this._,r=yw(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=Ew(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=jg(n[o],e.name,t);else if(t==null)for(o in n)n[o]=jg(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ia(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[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],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function Ew(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function jg(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=vw,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Fc="http://www.w3.org/1999/xhtml";const Yg={svg:"http://www.w3.org/2000/svg",xhtml:Fc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Aa(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Yg.hasOwnProperty(t)?{space:Yg[t],local:e}:e}function Sw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Fc&&t.documentElement.namespaceURI===Fc?t.createElement(e):t.createElementNS(n,e)}}function _w(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gg(e){var t=Aa(e);return(t.local?_w:Sw)(t)}function ww(){}function Vc(e){return e==null?ww:function(){return this.querySelector(e)}}function Rw(e){typeof e!="function"&&(e=Vc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),l,u,c=0;c<s;++c)(l=i[c])&&(u=e.call(l,l.__data__,c,i))&&("__data__"in l&&(u.__data__=l.__data__),a[c]=u);return new ut(r,this._parents)}function Nw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ow(){return[]}function Wg(e){return e==null?Ow:function(){return this.querySelectorAll(e)}}function xw(e){return function(){return Nw(e.apply(this,arguments))}}function Tw(e){typeof e=="function"?e=xw(e):e=Wg(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,l,u=0;u<a;++u)(l=s[u])&&(r.push(e.call(l,l.__data__,u,s)),o.push(l));return new ut(r,o)}function Kg(e){return function(){return this.matches(e)}}function Qg(e){return function(t){return t.matches(e)}}var Cw=Array.prototype.find;function bw(e){return function(){return Cw.call(this.children,e)}}function Iw(){return this.firstElementChild}function Aw(e){return this.select(e==null?Iw:bw(typeof e=="function"?e:Qg(e)))}var Lw=Array.prototype.filter;function Dw(){return Array.from(this.children)}function kw(e){return function(){return Lw.call(this.children,e)}}function Pw(e){return this.selectAll(e==null?Dw:kw(typeof e=="function"?e:Qg(e)))}function Mw(e){typeof e!="function"&&(e=Kg(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&a.push(l);return new ut(r,this._parents)}function Xg(e){return new Array(e.length)}function Uw(){return new ut(this._enter||this._groups.map(Xg),this._parents)}function La(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}La.prototype={constructor:La,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 Fw(e){return function(){return e}}function Vw(e,t,n,r,o,i){for(var s=0,a,l=t.length,u=i.length;s<u;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new La(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function Bw(e,t,n,r,o,i,s){var a,l,u=new Map,c=t.length,d=i.length,f=new Array(c),h;for(a=0;a<c;++a)(l=t[a])&&(f[a]=h=s.call(l,l.__data__,a,t)+"",u.has(h)?o[a]=l:u.set(h,l));for(a=0;a<d;++a)h=s.call(e,i[a],a,i)+"",(l=u.get(h))?(r[a]=l,l.__data__=i[a],u.delete(h)):n[a]=new La(e,i[a]);for(a=0;a<c;++a)(l=t[a])&&u.get(f[a])===l&&(o[a]=l)}function $w(e){return e.__data__}function zw(e,t){if(!arguments.length)return Array.from(this,$w);var n=t?Bw:Vw,r=this._parents,o=this._groups;typeof e!="function"&&(e=Fw(e));for(var i=o.length,s=new Array(i),a=new Array(i),l=new Array(i),u=0;u<i;++u){var c=r[u],d=o[u],f=d.length,h=Hw(e.call(c,c&&c.__data__,u,r)),m=h.length,v=a[u]=new Array(m),E=s[u]=new Array(m),p=l[u]=new Array(f);n(c,d,v,E,p,h,t);for(var g=0,S=0,_,w;g<m;++g)if(_=v[g]){for(g>=S&&(S=g+1);!(w=E[S])&&++S<m;);_._next=w||null}}return s=new ut(s,r),s._enter=a,s._exit=l,s}function Hw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jw(){return new ut(this._exit||this._groups.map(Xg),this._parents)}function Yw(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function Gw(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var u=n[l],c=r[l],d=u.length,f=a[l]=new Array(d),h,m=0;m<d;++m)(h=u[m]||c[m])&&(f[m]=h);for(;l<o;++l)a[l]=n[l];return new ut(a,this._parents)}function Ww(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Kw(e){e||(e=Qw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,l=o[i]=new Array(a),u,c=0;c<a;++c)(u=s[c])&&(l[c]=u);l.sort(t)}return new ut(o,this._parents).order()}function Qw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Xw(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function qw(){return Array.from(this)}function Zw(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function Jw(){let e=0;for(const t of this)++e;return e}function e1(){return!this.node()}function t1(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function n1(e){return function(){this.removeAttribute(e)}}function r1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function o1(e,t){return function(){this.setAttribute(e,t)}}function i1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function s1(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function a1(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 l1(e,t){var n=Aa(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?r1:n1:typeof t=="function"?n.local?a1:s1:n.local?i1:o1)(n,t))}function qg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function u1(e){return function(){this.style.removeProperty(e)}}function c1(e,t,n){return function(){this.style.setProperty(e,t,n)}}function d1(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function f1(e,t,n){return arguments.length>1?this.each((t==null?u1:typeof t=="function"?d1:c1)(e,t,n??"")):go(this.node(),e)}function go(e,t){return e.style.getPropertyValue(t)||qg(e).getComputedStyle(e,null).getPropertyValue(t)}function p1(e){return function(){delete this[e]}}function h1(e,t){return function(){this[e]=t}}function g1(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function m1(e,t){return arguments.length>1?this.each((t==null?p1:typeof t=="function"?g1:h1)(e,t)):this.node()[e]}function Zg(e){return e.trim().split(/^|\s+/)}function Bc(e){return e.classList||new Jg(e)}function Jg(e){this._node=e,this._names=Zg(e.getAttribute("class")||"")}Jg.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 em(e,t){for(var n=Bc(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function tm(e,t){for(var n=Bc(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function v1(e){return function(){em(this,e)}}function y1(e){return function(){tm(this,e)}}function E1(e,t){return function(){(t.apply(this,arguments)?em:tm)(this,e)}}function S1(e,t){var n=Zg(e+"");if(arguments.length<2){for(var r=Bc(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?E1:t?v1:y1)(n,t))}function _1(){this.textContent=""}function w1(e){return function(){this.textContent=e}}function R1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function N1(e){return arguments.length?this.each(e==null?_1:(typeof e=="function"?R1:w1)(e)):this.node().textContent}function O1(){this.innerHTML=""}function x1(e){return function(){this.innerHTML=e}}function T1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function C1(e){return arguments.length?this.each(e==null?O1:(typeof e=="function"?T1:x1)(e)):this.node().innerHTML}function b1(){this.nextSibling&&this.parentNode.appendChild(this)}function I1(){return this.each(b1)}function A1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function L1(){return this.each(A1)}function D1(e){var t=typeof e=="function"?e:Gg(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function k1(){return null}function P1(e,t){var n=typeof e=="function"?e:Gg(e),r=t==null?k1:typeof t=="function"?t:Vc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function M1(){var e=this.parentNode;e&&e.removeChild(this)}function U1(){return this.each(M1)}function F1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function V1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function B1(e){return this.select(e?V1:F1)}function $1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function z1(e){return function(t){e.call(this,t,this.__data__)}}function H1(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 j1(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function Y1(e,t,n){return function(){var r=this.__on,o,i=z1(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function G1(e,t,n){var r=H1(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,c;l<u;++l)for(o=0,c=a[l];o<i;++o)if((s=r[o]).type===c.type&&s.name===c.name)return c.value}return}for(a=t?Y1:j1,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function nm(e,t,n){var r=qg(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function W1(e,t){return function(){return nm(this,e,t)}}function K1(e,t){return function(){return nm(this,e,t.apply(this,arguments))}}function Q1(e,t){return this.each((typeof t=="function"?K1:W1)(e,t))}function*X1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var rm=[null];function ut(e,t){this._groups=e,this._parents=t}function bi(){return new ut([[document.documentElement]],rm)}function q1(){return this}ut.prototype=bi.prototype={constructor:ut,select:Rw,selectAll:Tw,selectChild:Aw,selectChildren:Pw,filter:Mw,data:zw,enter:Uw,exit:jw,join:Yw,merge:Gw,selection:q1,order:Ww,sort:Kw,call:Xw,nodes:qw,node:Zw,size:Jw,empty:e1,each:t1,attr:l1,style:f1,property:m1,classed:S1,text:N1,html:C1,raise:I1,lower:L1,append:D1,insert:P1,remove:U1,clone:B1,datum:$1,on:G1,dispatch:Q1,[Symbol.iterator]:X1};function At(e){return typeof e=="string"?new ut([[document.querySelector(e)]],[document.documentElement]):new ut([[e]],rm)}function Z1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ht(e,t){if(e=Z1(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 o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const J1={passive:!1},Ii={capture:!0,passive:!1};function $c(e){e.stopImmediatePropagation()}function mo(e){e.preventDefault(),e.stopImmediatePropagation()}function om(e){var t=e.document.documentElement,n=At(e).on("dragstart.drag",mo,Ii);"onselectstart"in t?n.on("selectstart.drag",mo,Ii):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function im(e,t){var n=e.document.documentElement,r=At(e).on("dragstart.drag",null);t&&(r.on("click.drag",mo,Ii),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 Da=e=>()=>e;function zc(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:u,dispatch:c}){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:o,enumerable:!0,configurable:!0},active:{value:i,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:c}})}zc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function eR(e){return!e.ctrlKey&&!e.button}function tR(){return this.parentNode}function nR(e,t){return t??{x:e.x,y:e.y}}function rR(){return navigator.maxTouchPoints||"ontouchstart"in this}function oR(){var e=eR,t=tR,n=nR,r=rR,o={},i=ba("start","drag","end"),s=0,a,l,u,c,d=0;function f(_){_.on("mousedown.drag",h).filter(r).on("touchstart.drag",E).on("touchmove.drag",p,J1).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(_,w){if(!(c||!e.call(this,_,w))){var R=S(this,t.call(this,_,w),_,w,"mouse");R&&(At(_.view).on("mousemove.drag",m,Ii).on("mouseup.drag",v,Ii),om(_.view),$c(_),u=!1,a=_.clientX,l=_.clientY,R("start",_))}}function m(_){if(mo(_),!u){var w=_.clientX-a,R=_.clientY-l;u=w*w+R*R>d}o.mouse("drag",_)}function v(_){At(_.view).on("mousemove.drag mouseup.drag",null),im(_.view,u),mo(_),o.mouse("end",_)}function E(_,w){if(e.call(this,_,w)){var R=_.changedTouches,C=t.call(this,_,w),A=R.length,B,b;for(B=0;B<A;++B)(b=S(this,C,_,w,R[B].identifier,R[B]))&&($c(_),b("start",_,R[B]))}}function p(_){var w=_.changedTouches,R=w.length,C,A;for(C=0;C<R;++C)(A=o[w[C].identifier])&&(mo(_),A("drag",_,w[C]))}function g(_){var w=_.changedTouches,R=w.length,C,A;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),C=0;C<R;++C)(A=o[w[C].identifier])&&($c(_),A("end",_,w[C]))}function S(_,w,R,C,A,B){var b=i.copy(),V=Ht(B||R,w),$,F,O;if((O=n.call(_,new zc("beforestart",{sourceEvent:R,target:f,identifier:A,active:s,x:V[0],y:V[1],dx:0,dy:0,dispatch:b}),C))!=null)return $=O.x-V[0]||0,F=O.y-V[1]||0,function P(D,I,T){var k=V,U;switch(D){case"start":o[A]=P,U=s++;break;case"end":delete o[A],--s;case"drag":V=Ht(T||I,w),U=s;break}b.call(D,_,new zc(D,{sourceEvent:I,subject:O,target:f,identifier:A,active:U,x:V[0]+$,y:V[1]+F,dx:V[0]-k[0],dy:V[1]-k[1],dispatch:b}),C)}}return f.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Da(!!_),f):e},f.container=function(_){return arguments.length?(t=typeof _=="function"?_:Da(_),f):t},f.subject=function(_){return arguments.length?(n=typeof _=="function"?_:Da(_),f):n},f.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:Da(!!_),f):r},f.on=function(){var _=i.on.apply(i,arguments);return _===i?f:_},f.clickDistance=function(_){return arguments.length?(d=(_=+_)*_,f):Math.sqrt(d)},f}function Hc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function sm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ai(){}var Li=.7,ka=1/Li,vo="\\s*([+-]?\\d+)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iR=/^#([0-9a-f]{3,8})$/,sR=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),aR=new RegExp(`^rgb\\(${jt},${jt},${jt}\\)$`),lR=new RegExp(`^rgba\\(${vo},${vo},${vo},${Di}\\)$`),uR=new RegExp(`^rgba\\(${jt},${jt},${jt},${Di}\\)$`),cR=new RegExp(`^hsl\\(${Di},${jt},${jt}\\)$`),dR=new RegExp(`^hsla\\(${Di},${jt},${jt},${Di}\\)$`),am={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};Hc(Ai,ki,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lm,formatHex:lm,formatHex8:fR,formatHsl:pR,formatRgb:um,toString:um});function lm(){return this.rgb().formatHex()}function fR(){return this.rgb().formatHex8()}function pR(){return hm(this).formatHsl()}function um(){return this.rgb().formatRgb()}function ki(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iR.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?cm(t):n===3?new et(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pa(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=sR.exec(e))?new et(t[1],t[2],t[3],1):(t=aR.exec(e))?new et(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=lR.exec(e))?Pa(t[1],t[2],t[3],t[4]):(t=uR.exec(e))?Pa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cR.exec(e))?pm(t[1],t[2]/100,t[3]/100,1):(t=dR.exec(e))?pm(t[1],t[2]/100,t[3]/100,t[4]):am.hasOwnProperty(e)?cm(am[e]):e==="transparent"?new et(NaN,NaN,NaN,0):null}function cm(e){return new et(e>>16&255,e>>8&255,e&255,1)}function Pa(e,t,n,r){return r<=0&&(e=t=n=NaN),new et(e,t,n,r)}function hR(e){return e instanceof Ai||(e=ki(e)),e?(e=e.rgb(),new et(e.r,e.g,e.b,e.opacity)):new et}function jc(e,t,n,r){return arguments.length===1?hR(e):new et(e,t,n,r??1)}function et(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Hc(et,jc,sm(Ai,{brighter(e){return e=e==null?ka:Math.pow(ka,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Li:Math.pow(Li,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new et(mr(this.r),mr(this.g),mr(this.b),Ma(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:dm,formatHex:dm,formatHex8:gR,formatRgb:fm,toString:fm}));function dm(){return`#${vr(this.r)}${vr(this.g)}${vr(this.b)}`}function gR(){return`#${vr(this.r)}${vr(this.g)}${vr(this.b)}${vr((isNaN(this.opacity)?1:this.opacity)*255)}`}function fm(){const e=Ma(this.opacity);return`${e===1?"rgb(":"rgba("}${mr(this.r)}, ${mr(this.g)}, ${mr(this.b)}${e===1?")":`, ${e})`}`}function Ma(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vr(e){return e=mr(e),(e<16?"0":"")+e.toString(16)}function pm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Lt(e,t,n,r)}function hm(e){if(e instanceof Lt)return new Lt(e.h,e.s,e.l,e.opacity);if(e instanceof Ai||(e=ki(e)),!e)return new Lt;if(e instanceof Lt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new Lt(s,a,l,e.opacity)}function mR(e,t,n,r){return arguments.length===1?hm(e):new Lt(e,t,n,r??1)}function Lt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Hc(Lt,mR,sm(Ai,{brighter(e){return e=e==null?ka:Math.pow(ka,e),new Lt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Li:Math.pow(Li,e),new Lt(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,o=2*n-r;return new et(Yc(e>=240?e-240:e+120,o,r),Yc(e,o,r),Yc(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Lt(gm(this.h),Ua(this.s),Ua(this.l),Ma(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=Ma(this.opacity);return`${e===1?"hsl(":"hsla("}${gm(this.h)}, ${Ua(this.s)*100}%, ${Ua(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gm(e){return e=(e||0)%360,e<0?e+360:e}function Ua(e){return Math.max(0,Math.min(1,e||0))}function Yc(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 mm=e=>()=>e;function vR(e,t){return function(n){return e+n*t}}function yR(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 ER(e){return(e=+e)==1?vm:function(t,n){return n-t?yR(t,n,e):mm(isNaN(t)?n:t)}}function vm(e,t){var n=t-e;return n?vR(e,n):mm(isNaN(e)?t:e)}const ym=function e(t){var n=ER(t);function r(o,i){var s=n((o=jc(o)).r,(i=jc(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),u=vm(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=a(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r}(1);function Un(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Gc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wc=new RegExp(Gc.source,"g");function SR(e){return function(){return e}}function _R(e){return function(t){return e(t)+""}}function wR(e,t){var n=Gc.lastIndex=Wc.lastIndex=0,r,o,i,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=Gc.exec(e))&&(o=Wc.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:Un(r,o)})),n=Wc.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?_R(l[0].x):SR(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)a[(d=l[c]).i]=d.x(u);return a.join("")})}var Em=180/Math.PI,Kc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Sm(e,t,n,r,o,i){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:o,translateY:i,rotate:Math.atan2(t,e)*Em,skewX:Math.atan(l)*Em,scaleX:s,scaleY:a}}var Fa;function RR(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Kc:Sm(t.a,t.b,t.c,t.d,t.e,t.f)}function NR(e){return e==null||(Fa||(Fa=document.createElementNS("http://www.w3.org/2000/svg","g")),Fa.setAttribute("transform",e),!(e=Fa.transform.baseVal.consolidate()))?Kc:(e=e.matrix,Sm(e.a,e.b,e.c,e.d,e.e,e.f))}function _m(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,d,f,h,m){if(u!==d||c!==f){var v=h.push("translate(",null,t,null,n);m.push({i:v-4,x:Un(u,d)},{i:v-2,x:Un(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function s(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(o(d)+"rotate(",null,r)-2,x:Un(u,c)})):c&&d.push(o(d)+"rotate("+c+r)}function a(u,c,d,f){u!==c?f.push({i:d.push(o(d)+"skewX(",null,r)-2,x:Un(u,c)}):c&&d.push(o(d)+"skewX("+c+r)}function l(u,c,d,f,h,m){if(u!==d||c!==f){var v=h.push(o(h)+"scale(",null,",",null,")");m.push({i:v-4,x:Un(u,d)},{i:v-2,x:Un(c,f)})}else(d!==1||f!==1)&&h.push(o(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,d,f),s(u.rotate,c.rotate,d,f),a(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var m=-1,v=f.length,E;++m<v;)d[(E=f[m]).i]=E.x(h);return d.join("")}}}var OR=_m(RR,"px, ","px)","deg)"),xR=_m(NR,", ",")",")"),TR=1e-12;function wm(e){return((e=Math.exp(e))+1/e)/2}function CR(e){return((e=Math.exp(e))-1/e)/2}function bR(e){return((e=Math.exp(2*e))-1)/(e+1)}const IR=function e(t,n,r){function o(i,s){var a=i[0],l=i[1],u=i[2],c=s[0],d=s[1],f=s[2],h=c-a,m=d-l,v=h*h+m*m,E,p;if(v<TR)p=Math.log(f/u)/t,E=function(C){return[a+C*h,l+C*m,u*Math.exp(t*C*p)]};else{var g=Math.sqrt(v),S=(f*f-u*u+r*v)/(2*u*n*g),_=(f*f-u*u-r*v)/(2*f*n*g),w=Math.log(Math.sqrt(S*S+1)-S),R=Math.log(Math.sqrt(_*_+1)-_);p=(R-w)/t,E=function(C){var A=C*p,B=wm(w),b=u/(n*g)*(B*bR(t*A+w)-CR(w));return[a+b*h,l+b*m,u*B/wm(t*A+w)]}}return E.duration=p*1e3*t/Math.SQRT2,E}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,l=a*a;return e(s,a,l)},o}(Math.SQRT2,2,4);var yo=0,Pi=0,Mi=0,Rm=1e3,Va,Ui,Ba=0,yr=0,$a=0,Fi=typeof performance=="object"&&performance.now?performance:Date,Nm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qc(){return yr||(Nm(AR),yr=Fi.now()+$a)}function AR(){yr=0}function za(){this._call=this._time=this._next=null}za.prototype=Om.prototype={constructor:za,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Qc():+n)+(t==null?0:+t),!this._next&&Ui!==this&&(Ui?Ui._next=this:Va=this,Ui=this),this._call=e,this._time=n,Xc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xc())}};function Om(e,t,n){var r=new za;return r.restart(e,t,n),r}function LR(){Qc(),++yo;for(var e=Va,t;e;)(t=yr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--yo}function xm(){yr=(Ba=Fi.now())+$a,yo=Pi=0;try{LR()}finally{yo=0,kR(),yr=0}}function DR(){var e=Fi.now(),t=e-Ba;t>Rm&&($a-=t,Ba=e)}function kR(){for(var e,t=Va,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:Va=n);Ui=e,Xc(r)}function Xc(e){if(!yo){Pi&&(Pi=clearTimeout(Pi));var t=e-yr;t>24?(e<1/0&&(Pi=setTimeout(xm,e-Fi.now()-$a)),Mi&&(Mi=clearInterval(Mi))):(Mi||(Ba=Fi.now(),Mi=setInterval(DR,Rm)),yo=1,Nm(xm))}}function Tm(e,t,n){var r=new za;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var PR=ba("start","end","cancel","interrupt"),MR=[],Cm=0,bm=1,qc=2,Ha=3,Im=4,Zc=5,ja=6;function Ya(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;UR(e,n,{name:t,index:r,group:o,on:PR,tween:MR,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Cm})}function Jc(e,t){var n=Dt(e,t);if(n.state>Cm)throw new Error("too late; already scheduled");return n}function Yt(e,t){var n=Dt(e,t);if(n.state>Ha)throw new Error("too late; already running");return n}function Dt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function UR(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Om(i,0,n.time);function i(u){n.state=bm,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,h;if(n.state!==bm)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Ha)return Tm(s);h.state===Im?(h.state=ja,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=ja,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(Tm(function(){n.state===Ha&&(n.state=Im,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=qc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===qc){for(n.state=Ha,o=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=h);o.length=d+1}}function a(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Zc,1),d=-1,f=o.length;++d<f;)o[d].call(e,c);n.state===Zc&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=ja,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Ga(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>qc&&r.state<Zc,r.state=ja,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function FR(e){return this.each(function(){Ga(this,e)})}function VR(e,t){var n,r;return function(){var o=Yt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function BR(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Yt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===t){o[l]=a;break}l===u&&o.push(a)}i.tween=o}}function $R(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Dt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?VR:BR)(n,e,t))}function ed(e,t,n){var r=e._id;return e.each(function(){var o=Yt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Dt(o,r).value[t]}}function Am(e,t){var n;return(typeof t=="number"?Un:t instanceof ki?ym:(n=ki(t))?(t=n,ym):wR)(e,t)}function zR(e){return function(){this.removeAttribute(e)}}function HR(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jR(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function YR(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function GR(e,t,n){var r,o,i;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===o?i:(o=l,i=t(r=s,a)))}}function WR(e,t,n){var r,o,i;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===o?i:(o=l,i=t(r=s,a)))}}function KR(e,t){var n=Aa(e),r=n==="transform"?xR:Am;return this.attrTween(e,typeof t=="function"?(n.local?WR:GR)(n,r,ed(this,"attr."+e,t)):t==null?(n.local?HR:zR)(n):(n.local?YR:jR)(n,r,t))}function QR(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function XR(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function qR(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&XR(e,i)),n}return o._value=t,o}function ZR(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&QR(e,i)),n}return o._value=t,o}function JR(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=Aa(e);return this.tween(n,(r.local?qR:ZR)(r,t))}function eN(e,t){return function(){Jc(this,e).delay=+t.apply(this,arguments)}}function tN(e,t){return t=+t,function(){Jc(this,e).delay=t}}function nN(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eN:tN)(t,e)):Dt(this.node(),t).delay}function rN(e,t){return function(){Yt(this,e).duration=+t.apply(this,arguments)}}function oN(e,t){return t=+t,function(){Yt(this,e).duration=t}}function iN(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rN:oN)(t,e)):Dt(this.node(),t).duration}function sN(e,t){if(typeof t!="function")throw new Error;return function(){Yt(this,e).ease=t}}function aN(e){var t=this._id;return arguments.length?this.each(sN(t,e)):Dt(this.node(),t).ease}function lN(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Yt(this,e).ease=n}}function uN(e){if(typeof e!="function")throw new Error;return this.each(lN(this._id,e))}function cN(e){typeof e!="function"&&(e=Kg(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&a.push(l);return new cn(r,this._parents,this._name,this._id)}function dN(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l=t[a],u=n[a],c=l.length,d=s[a]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;a<r;++a)s[a]=t[a];return new cn(s,this._parents,this._name,this._id)}function fN(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 pN(e,t,n){var r,o,i=fN(t)?Jc:Yt;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function hN(e,t){var n=this._id;return arguments.length<2?Dt(this.node(),n).on.on(e):this.each(pN(n,e,t))}function gN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function mN(){return this.on("end.remove",gN(this._id))}function vN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Vc(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],l=a.length,u=i[s]=new Array(l),c,d,f=0;f<l;++f)(c=a[f])&&(d=e.call(c,c.__data__,f,a))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Ya(u[f],t,n,f,u,Dt(c,n)));return new cn(i,this._parents,t,n)}function yN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wg(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l=r[a],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,m=Dt(c,n),v=0,E=f.length;v<E;++v)(h=f[v])&&Ya(h,t,n,v,f,m);i.push(f),s.push(c)}return new cn(i,s,t,n)}var EN=bi.prototype.constructor;function SN(){return new EN(this._groups,this._parents)}function _N(e,t){var n,r,o;return function(){var i=go(this,e),s=(this.style.removeProperty(e),go(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function Lm(e){return function(){this.style.removeProperty(e)}}function wN(e,t,n){var r,o=n+"",i;return function(){var s=go(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function RN(e,t,n){var r,o,i;return function(){var s=go(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),go(this,e))),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}function NN(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var l=Yt(this,e),u=l.on,c=l.value[i]==null?a||(a=Lm(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(s,o=c),l.on=r}}function ON(e,t,n){var r=(e+="")=="transform"?OR:Am;return t==null?this.styleTween(e,_N(e,r)).on("end.style."+e,Lm(e)):typeof t=="function"?this.styleTween(e,RN(e,r,ed(this,"style."+e,t))).each(NN(this._id,e)):this.styleTween(e,wN(e,r,t),n).on("end.style."+e,null)}function xN(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function TN(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&xN(e,s,n)),r}return i._value=t,i}function CN(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,TN(e,t,n??""))}function bN(e){return function(){this.textContent=e}}function IN(e){return function(){var t=e(this);this.textContent=t??""}}function AN(e){return this.tween("text",typeof e=="function"?IN(ed(this,"text",e)):bN(e==null?"":e+""))}function LN(e){return function(t){this.textContent=e.call(this,t)}}function DN(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&LN(o)),t}return r._value=e,r}function kN(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,DN(e))}function PN(){for(var e=this._name,t=this._id,n=Dm(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,u=0;u<a;++u)if(l=s[u]){var c=Dt(l,t);Ya(l,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new cn(r,this._parents,e,n)}function MN(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){--o===0&&i()}};n.each(function(){var u=Yt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),o===0&&i()})}var UN=0;function cn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Dm(){return++UN}var dn=bi.prototype;cn.prototype={constructor:cn,select:vN,selectAll:yN,selectChild:dn.selectChild,selectChildren:dn.selectChildren,filter:cN,merge:dN,selection:SN,transition:PN,call:dn.call,nodes:dn.nodes,node:dn.node,size:dn.size,empty:dn.empty,each:dn.each,on:hN,attr:KR,attrTween:JR,style:ON,styleTween:CN,text:AN,textTween:kN,remove:mN,tween:$R,delay:nN,duration:iN,ease:aN,easeVarying:uN,end:MN,[Symbol.iterator]:dn[Symbol.iterator]};function FN(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var VN={time:null,delay:0,duration:250,ease:FN};function BN(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 $N(e){var t,n;e instanceof cn?(t=e._id,e=e._name):(t=Dm(),(n=VN).time=Qc(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,u=0;u<a;++u)(l=s[u])&&Ya(l,e,t,u,s,n||BN(l,t));return new cn(r,this._parents,e,t)}bi.prototype.interrupt=FR,bi.prototype.transition=$N;const Wa=e=>()=>e;function zN(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:o}})}function fn(e,t,n){this.k=e,this.x=t,this.y=n}fn.prototype={constructor:fn,scale:function(e){return e===1?this:new fn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new fn(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 Fn=new fn(1,0,0);fn.prototype;function td(e){e.stopImmediatePropagation()}function Vi(e){e.preventDefault(),e.stopImmediatePropagation()}function HN(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function jN(){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 km(){return this.__zoom||Fn}function YN(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function GN(){return navigator.maxTouchPoints||"ontouchstart"in this}function WN(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function KN(){var e=HN,t=jN,n=WN,r=YN,o=GN,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=IR,u=ba("start","zoom","end"),c,d,f,h=500,m=150,v=0,E=10;function p(O){O.property("__zoom",km).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",b).filter(o).on("touchstart.zoom",V).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(O,P,D,I){var T=O.selection?O.selection():O;T.property("__zoom",km),O!==T?w(O,P,D,I):T.interrupt().each(function(){R(this,arguments).event(I).start().zoom(null,typeof P=="function"?P.apply(this,arguments):P).end()})},p.scaleBy=function(O,P,D,I){p.scaleTo(O,function(){var T=this.__zoom.k,k=typeof P=="function"?P.apply(this,arguments):P;return T*k},D,I)},p.scaleTo=function(O,P,D,I){p.transform(O,function(){var T=t.apply(this,arguments),k=this.__zoom,U=D==null?_(T):typeof D=="function"?D.apply(this,arguments):D,z=k.invert(U),j=typeof P=="function"?P.apply(this,arguments):P;return n(S(g(k,j),U,z),T,s)},D,I)},p.translateBy=function(O,P,D,I){p.transform(O,function(){return n(this.__zoom.translate(typeof P=="function"?P.apply(this,arguments):P,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),s)},null,I)},p.translateTo=function(O,P,D,I,T){p.transform(O,function(){var k=t.apply(this,arguments),U=this.__zoom,z=I==null?_(k):typeof I=="function"?I.apply(this,arguments):I;return n(Fn.translate(z[0],z[1]).scale(U.k).translate(typeof P=="function"?-P.apply(this,arguments):-P,typeof D=="function"?-D.apply(this,arguments):-D),k,s)},I,T)};function g(O,P){return P=Math.max(i[0],Math.min(i[1],P)),P===O.k?O:new fn(P,O.x,O.y)}function S(O,P,D){var I=P[0]-D[0]*O.k,T=P[1]-D[1]*O.k;return I===O.x&&T===O.y?O:new fn(O.k,I,T)}function _(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function w(O,P,D,I){O.on("start.zoom",function(){R(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(I).end()}).tween("zoom",function(){var T=this,k=arguments,U=R(T,k).event(I),z=t.apply(T,k),j=D==null?_(z):typeof D=="function"?D.apply(T,k):D,K=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),W=T.__zoom,J=typeof P=="function"?P.apply(T,k):P,X=l(W.invert(j).concat(K/W.k),J.invert(j).concat(K/J.k));return function(te){if(te===1)te=J;else{var oe=X(te),ge=K/oe[2];te=new fn(ge,j[0]-oe[0]*ge,j[1]-oe[1]*ge)}U.zoom(null,te)}})}function R(O,P,D){return!D&&O.__zooming||new C(O,P)}function C(O,P){this.that=O,this.args=P,this.active=0,this.sourceEvent=null,this.extent=t.apply(O,P),this.taps=0}C.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,P){return this.mouse&&O!=="mouse"&&(this.mouse[1]=P.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=P.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=P.invert(this.touch1[0])),this.that.__zoom=P,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var P=At(this.that).datum();u.call(O,this.that,new zN(O,{sourceEvent:this.sourceEvent,target:p,type:O,transform:this.that.__zoom,dispatch:u}),P)}};function A(O,...P){if(!e.apply(this,arguments))return;var D=R(this,P).event(O),I=this.__zoom,T=Math.max(i[0],Math.min(i[1],I.k*Math.pow(2,r.apply(this,arguments)))),k=Ht(O);if(D.wheel)(D.mouse[0][0]!==k[0]||D.mouse[0][1]!==k[1])&&(D.mouse[1]=I.invert(D.mouse[0]=k)),clearTimeout(D.wheel);else{if(I.k===T)return;D.mouse=[k,I.invert(k)],Ga(this),D.start()}Vi(O),D.wheel=setTimeout(U,m),D.zoom("mouse",n(S(g(I,T),D.mouse[0],D.mouse[1]),D.extent,s));function U(){D.wheel=null,D.end()}}function B(O,...P){if(f||!e.apply(this,arguments))return;var D=O.currentTarget,I=R(this,P,!0).event(O),T=At(O.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",K,!0),k=Ht(O,D),U=O.clientX,z=O.clientY;om(O.view),td(O),I.mouse=[k,this.__zoom.invert(k)],Ga(this),I.start();function j(W){if(Vi(W),!I.moved){var J=W.clientX-U,X=W.clientY-z;I.moved=J*J+X*X>v}I.event(W).zoom("mouse",n(S(I.that.__zoom,I.mouse[0]=Ht(W,D),I.mouse[1]),I.extent,s))}function K(W){T.on("mousemove.zoom mouseup.zoom",null),im(W.view,I.moved),Vi(W),I.event(W).end()}}function b(O,...P){if(e.apply(this,arguments)){var D=this.__zoom,I=Ht(O.changedTouches?O.changedTouches[0]:O,this),T=D.invert(I),k=D.k*(O.shiftKey?.5:2),U=n(S(g(D,k),I,T),t.apply(this,P),s);Vi(O),a>0?At(this).transition().duration(a).call(w,U,I,O):At(this).call(p.transform,U,I,O)}}function V(O,...P){if(e.apply(this,arguments)){var D=O.touches,I=D.length,T=R(this,P,O.changedTouches.length===I).event(O),k,U,z,j;for(td(O),U=0;U<I;++U)z=D[U],j=Ht(z,this),j=[j,this.__zoom.invert(j),z.identifier],T.touch0?!T.touch1&&T.touch0[2]!==j[2]&&(T.touch1=j,T.taps=0):(T.touch0=j,k=!0,T.taps=1+!!c);c&&(c=clearTimeout(c)),k&&(T.taps<2&&(d=j[0],c=setTimeout(function(){c=null},h)),Ga(this),T.start())}}function $(O,...P){if(this.__zooming){var D=R(this,P).event(O),I=O.changedTouches,T=I.length,k,U,z,j;for(Vi(O),k=0;k<T;++k)U=I[k],z=Ht(U,this),D.touch0&&D.touch0[2]===U.identifier?D.touch0[0]=z:D.touch1&&D.touch1[2]===U.identifier&&(D.touch1[0]=z);if(U=D.that.__zoom,D.touch1){var K=D.touch0[0],W=D.touch0[1],J=D.touch1[0],X=D.touch1[1],te=(te=J[0]-K[0])*te+(te=J[1]-K[1])*te,oe=(oe=X[0]-W[0])*oe+(oe=X[1]-W[1])*oe;U=g(U,Math.sqrt(te/oe)),z=[(K[0]+J[0])/2,(K[1]+J[1])/2],j=[(W[0]+X[0])/2,(W[1]+X[1])/2]}else if(D.touch0)z=D.touch0[0],j=D.touch0[1];else return;D.zoom("touch",n(S(U,z,j),D.extent,s))}}function F(O,...P){if(this.__zooming){var D=R(this,P).event(O),I=O.changedTouches,T=I.length,k,U;for(td(O),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),k=0;k<T;++k)U=I[k],D.touch0&&D.touch0[2]===U.identifier?delete D.touch0:D.touch1&&D.touch1[2]===U.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(U=Ht(U,this),Math.hypot(d[0]-U[0],d[1]-U[1])<E)){var z=At(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return p.wheelDelta=function(O){return arguments.length?(r=typeof O=="function"?O:Wa(+O),p):r},p.filter=function(O){return arguments.length?(e=typeof O=="function"?O:Wa(!!O),p):e},p.touchable=function(O){return arguments.length?(o=typeof O=="function"?O:Wa(!!O),p):o},p.extent=function(O){return arguments.length?(t=typeof O=="function"?O:Wa([[+O[0][0],+O[0][1]],[+O[1][0],+O[1][1]]]),p):t},p.scaleExtent=function(O){return arguments.length?(i[0]=+O[0],i[1]=+O[1],p):[i[0],i[1]]},p.translateExtent=function(O){return arguments.length?(s[0][0]=+O[0][0],s[1][0]=+O[1][0],s[0][1]=+O[0][1],s[1][1]=+O[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(O){return arguments.length?(n=O,p):n},p.duration=function(O){return arguments.length?(a=+O,p):a},p.interpolate=function(O){return arguments.length?(l=O,p):l},p.on=function(){var O=u.on.apply(u,arguments);return O===u?p:O},p.clickDistance=function(O){return arguments.length?(v=(O=+O)*O,p):Math.sqrt(v)},p.tapDistance=function(O){return arguments.length?(E=+O,p):E},p}const Ka=N.createContext(null),QN=Ka.Provider,Vn={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".`},Pm=Vn.error001();function le(e,t){const n=N.useContext(Ka);if(n===null)throw new Error(Pm);return zg(n,e,t)}const Oe=()=>{const e=N.useContext(Ka);if(e===null)throw new Error(Pm);return N.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},XN=e=>e.userSelectionActive?"none":"all";function nd({position:e,children:t,className:n,style:r,...o}){const i=le(XN),s=`${e}`.split("-");return y("div",{className:Ze(["react-flow__panel",n,...s]),style:{...r,pointerEvents:i},...o,children:t})}function qN({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:y(nd,{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:y("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const ZN=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:l,className:u,...c})=>{const d=N.useRef(null),[f,h]=N.useState({x:0,y:0,width:0,height:0}),m=Ze(["react-flow__edge-textwrapper",u]);return N.useEffect(()=>{if(d.current){const v=d.current.getBBox();h({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),typeof n>"u"||!n?null:M("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...c,children:[o&&y("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:a,ry:a}),y("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:d,style:r,children:n}),l]})};var JN=N.memo(ZN);const rd=e=>({width:e.offsetWidth,height:e.offsetHeight}),Eo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),od=(e={x:0,y:0},t)=>({x:Eo(e.x,t[0][0],t[1][0]),y:Eo(e.y,t[0][1],t[1][1])}),Mm=(e,t,n)=>e<t?Eo(Math.abs(e-t),1,50)/50:e>n?-Eo(Math.abs(e-n),1,50)/50:0,Um=(e,t)=>{const n=Mm(e.x,35,t.width-35)*20,r=Mm(e.y,35,t.height-35)*20;return[n,r]},Fm=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},eO=(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)}),Vm=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),tO=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Bm=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),id=(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)},nO=e=>St(e.width)&&St(e.height)&&St(e.x)&&St(e.y),St=e=>!isNaN(e)&&isFinite(e),_e=Symbol.for("internals"),$m=["Enter"," ","Escape"],rO=(e,t)=>{},oO=e=>"nativeEvent"in e;function sd(e){var o,i;const t=oO(e)?e.nativeEvent:e,n=((i=(o=t.composedPath)==null?void 0:o.call(t))==null?void 0:i[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 zm=e=>"clientX"in e,Bn=(e,t)=>{var i,s;const n=zm(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},So=({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l,style:u,markerEnd:c,markerStart:d,interactionWidth:f=20})=>M(Ee,{children:[y("path",{style:u,d:e,fill:"none",className:"react-flow__edge-path",markerEnd:c,markerStart:d}),f&&y("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}),r&&St(t)&&St(n)?y(JN,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l}):null]});So.displayName="BaseEdge";function Bi(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(i=>i.id===e);o&&n(r,{...o})}}function Hm({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[i,a,o,s]}function jm({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:a}){const l=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+a*.375+r*.125,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}var $n;(function(e){e.Strict="strict",e.Loose="loose"})($n||($n={}));var _o;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(_o||(_o={}));var $i;(function(e){e.Partial="partial",e.Full="full"})($i||($i={}));var zn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(zn||(zn={}));var zi;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(zi||(zi={}));var G;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(G||(G={}));function Ym({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===G.Left||e===G.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Gm({sourceX:e,sourceY:t,sourcePosition:n=G.Bottom,targetX:r,targetY:o,targetPosition:i=G.Top}){const[s,a]=Ym({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,u]=Ym({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,d,f,h]=jm({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${a} ${l},${u} ${r},${o}`,c,d,f,h]}const ad=N.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=G.Bottom,targetPosition:i=G.Top,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:m,interactionWidth:v})=>{const[E,p,g]=Gm({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return y(So,{path:E,labelX:p,labelY:g,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:m,interactionWidth:v})});ad.displayName="SimpleBezierEdge";const Wm={[G.Left]:{x:-1,y:0},[G.Right]:{x:1,y:0},[G.Top]:{x:0,y:-1},[G.Bottom]:{x:0,y:1}},iO=({source:e,sourcePosition:t=G.Bottom,target:n})=>t===G.Left||t===G.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},Km=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function sO({source:e,sourcePosition:t=G.Bottom,target:n,targetPosition:r=G.Top,center:o,offset:i}){const s=Wm[t],a=Wm[r],l={x:e.x+s.x*i,y:e.y+s.y*i},u={x:n.x+a.x*i,y:n.y+a.y*i},c=iO({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h=[],m,v;const[E,p,g,S]=Hm({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[d]*a[d]===-1){m=o.x||E,v=o.y||p;const w=[{x:m,y:l.y},{x:m,y:u.y}],R=[{x:l.x,y:v},{x:u.x,y:v}];s[d]===f?h=d==="x"?w:R:h=d==="x"?R:w}else{const w=[{x:l.x,y:u.y}],R=[{x:u.x,y:l.y}];if(d==="x"?h=s.x===f?R:w:h=s.y===f?w:R,t!==r){const C=d==="x"?"y":"x",A=s[d]===a[C],B=l[C]>u[C],b=l[C]<u[C];(s[d]===1&&(!A&&B||A&&b)||s[d]!==1&&(!A&&b||A&&B))&&(h=d==="x"?w:R)}m=h[0].x,v=h[0].y}return[[e,l,...h,u,n],m,v,g,S]}function aO(e,t,n,r){const o=Math.min(Km(e,t)/2,Km(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*c}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${s+o*l}Q ${i},${s} ${i+o*a},${s}`}function Hi({sourceX:e,sourceY:t,sourcePosition:n=G.Bottom,targetX:r,targetY:o,targetPosition:i=G.Top,borderRadius:s=5,centerX:a,centerY:l,offset:u=20}){const[c,d,f,h,m]=sO({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:a,y:l},offset:u});return[c.reduce((E,p,g)=>{let S="";return g>0&&g<c.length-1?S=aO(c[g-1],p,c[g+1],s):S=`${g===0?"M":"L"}${p.x} ${p.y}`,E+=S,E},""),d,f,h,m]}const Qa=N.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:c,sourcePosition:d=G.Bottom,targetPosition:f=G.Top,markerEnd:h,markerStart:m,pathOptions:v,interactionWidth:E})=>{const[p,g,S]=Hi({sourceX:e,sourceY:t,sourcePosition:d,targetX:n,targetY:r,targetPosition:f,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset});return y(So,{path:p,labelX:g,labelY:S,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:h,markerStart:m,interactionWidth:E})});Qa.displayName="SmoothStepEdge";const ld=N.memo(e=>{var t;return y(Qa,{...e,pathOptions:N.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});ld.displayName="StepEdge";function lO({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,a]=Hm({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,a]}const ud=N.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})=>{const[m,v,E]=lO({sourceX:e,sourceY:t,targetX:n,targetY:r});return y(So,{path:m,labelX:v,labelY:E,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:c,markerEnd:d,markerStart:f,interactionWidth:h})});ud.displayName="StraightEdge";function Xa(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Qm({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case G.Left:return[t-Xa(t-r,i),n];case G.Right:return[t+Xa(r-t,i),n];case G.Top:return[t,n-Xa(n-o,i)];case G.Bottom:return[t,n+Xa(o-n,i)]}}function Xm({sourceX:e,sourceY:t,sourcePosition:n=G.Bottom,targetX:r,targetY:o,targetPosition:i=G.Top,curvature:s=.25}){const[a,l]=Qm({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,c]=Qm({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[d,f,h,m]=jm({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${a},${l} ${u},${c} ${r},${o}`,d,f,h,m]}const qa=N.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=G.Bottom,targetPosition:i=G.Top,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:m,pathOptions:v,interactionWidth:E})=>{const[p,g,S]=Xm({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:v==null?void 0:v.curvature});return y(So,{path:p,labelX:g,labelY:S,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:m,interactionWidth:E})});qa.displayName="BezierEdge";const cd=N.createContext(null),uO=cd.Provider;cd.Consumer;const cO=()=>N.useContext(cd),dO=e=>"id"in e&&"source"in e&&"target"in e,qm=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,dd=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,fO=(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)),Zm=(e,t)=>{if(!e.source||!e.target)return t;let n;return dO(e)?n={...e}:n={...e,id:qm(e)},fO(n,t)?t:t.concat(n)},pO=(e,t,n,r={shouldReplaceId:!0})=>{const{id:o,...i}=e;if(!t.source||!t.target||!n.find(l=>l.id===o))return n;const a={...i,id:r.shouldReplaceId?qm(t):o,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter(l=>l.id!==o).concat(a)},Jm=({x:e,y:t},[n,r,o],i,[s,a])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:s*Math.round(l.x/s),y:a*Math.round(l.y/a)}:l},hO=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),wo=(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],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},ev=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:i,y:s}=wo(o,t).positionAbsolute;return eO(r,Vm({x:i,y:s,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return tO(n)},tv=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1,a=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},u=[];return e.forEach(c=>{const{width:d,height:f,selectable:h=!0,hidden:m=!1}=c;if(s&&!h||m)return!1;const{positionAbsolute:v}=wo(c,a),E={x:v.x,y:v.y,width:d||0,height:f||0},p=id(l,E),g=typeof d>"u"||typeof f>"u"||d===null||f===null,S=i&&p>0,_=(d||0)*(f||0);(g||S||p>=_||c.dragging)&&u.push(c)}),u},nv=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},rv=(e,t,n,r,o,i=.1)=>{const s=t/(e.width*(1+i)),a=n/(e.height*(1+i)),l=Math.min(s,a),u=Eo(l,r,o),c=e.x+e.width/2,d=e.y+e.height/2,f=t/2-c*u,h=n/2-d*u;return[f,h,u]},Er=(e,t=0)=>e.transition().duration(t);function ov(e,t,n,r){return(t[n]||[]).reduce((o,i)=>{var s,a;return`${e.id}-${i.id}-${n}`!==r&&o.push({id:i.id||null,type:n,nodeId:e.id,x:(((s=e.positionAbsolute)==null?void 0:s.x)??0)+i.x+i.width/2,y:(((a=e.positionAbsolute)==null?void 0:a.y)??0)+i.y+i.height/2}),o},[])}function gO(e,t,n){let r=null,o=1/0;return n.forEach(i=>{const s=Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2));s<=t&&s<o&&(o=s,r=i)}),r}const mO={source:null,target:null,sourceHandle:null,targetHandle:null};function iv(e,t,n,r,o,i,s,a){const l=i==="target",u=a.querySelector(`.react-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:c,y:d}=Bn(e),f=a.elementFromPoint(c,d),h=f!=null&&f.classList.contains("react-flow__handle")?f:u,m={handleDomNode:h,isValid:!1,connection:mO,endHandle:null};if(h){const v=sv(void 0,h),E=h.getAttribute("data-nodeid"),p=h.getAttribute("data-handleid"),g=h.classList.contains("connectable"),S=h.classList.contains("connectableend"),_={source:l?E:r,sourceHandle:l?p:o,target:l?r:E,targetHandle:l?o:p};m.connection=_,g&&S&&(n===$n.Strict?l&&v==="source"||!l&&v==="target":E!==r||p!==o)&&(m.endHandle={nodeId:E,handleId:p,type:v},m.isValid=s(_))}return m}function vO({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,i)=>{if(i[_e]){const{handleBounds:s}=i[_e];let a=[],l=[];s&&(a=ov(i,s,"source",`${t}-${n}-${r}`),l=ov(i,s,"target",`${t}-${n}-${r}`)),o.push(...a,...l)}return o},[])}function sv(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function fd(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function yO(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function av({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:s,isValidConnection:a,edgeUpdaterType:l,onEdgeUpdateEnd:u}){const c=Fm(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:h,connectionRadius:m,onConnectStart:v,panBy:E,getNodes:p,cancelConnection:g}=i();let S=0,_;const{x:w,y:R}=Bn(e),C=c==null?void 0:c.elementFromPoint(w,R),A=sv(l,C),B=f==null?void 0:f.getBoundingClientRect();if(!B||!A)return;let b,V=Bn(e,B),$=!1,F=null,O=!1,P=null;const D=vO({nodes:p(),nodeId:n,handleId:t,handleType:A}),I=()=>{if(!h)return;const[U,z]=Um(V,B);E({x:U,y:z}),S=requestAnimationFrame(I)};s({connectionPosition:V,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:A,connectionStartHandle:{nodeId:n,handleId:t,type:A},connectionEndHandle:null}),v==null||v(e,{nodeId:n,handleId:t,handleType:A});function T(U){const{transform:z}=i();V=Bn(U,B),_=gO(Jm(V,z,!1,[1,1]),m,D),$||(I(),$=!0);const j=iv(U,_,d,n,t,o?"target":"source",a,c);if(P=j.handleDomNode,F=j.connection,O=j.isValid,s({connectionPosition:_&&O?hO({x:_.x,y:_.y},z):V,connectionStatus:yO(!!_,O),connectionEndHandle:j.endHandle}),!_&&!O&&!P)return fd(b);F.source!==F.target&&P&&(fd(b),b=P,P.classList.add("connecting","react-flow__handle-connecting"),P.classList.toggle("valid",O),P.classList.toggle("react-flow__handle-valid",O))}function k(U){var z,j;(_||P)&&F&&O&&(r==null||r(F)),(j=(z=i()).onConnectEnd)==null||j.call(z,U),l&&(u==null||u(U)),fd(b),g(),cancelAnimationFrame(S),$=!1,O=!1,F=null,P=null,c.removeEventListener("mousemove",T),c.removeEventListener("mouseup",k),c.removeEventListener("touchmove",T),c.removeEventListener("touchend",k)}c.addEventListener("mousemove",T),c.addEventListener("mouseup",k),c.addEventListener("touchmove",T),c.addEventListener("touchend",k)}const lv=()=>!0,EO=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),SO=(e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:s}=r;return{connecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n||(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===n}},uv=N.forwardRef(({type:e="source",position:t=G.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:a,children:l,className:u,onMouseDown:c,onTouchStart:d,...f},h)=>{var B,b;const m=s||null,v=e==="target",E=Oe(),p=cO(),{connectOnClick:g,noPanClassName:S}=le(EO,Je),{connecting:_,clickConnecting:w}=le(SO(p,m,e));p||(b=(B=E.getState()).onError)==null||b.call(B,"010",Vn.error010());const R=V=>{const{defaultEdgeOptions:$,onConnect:F,hasDefaultEdges:O}=E.getState(),P={...$,...V};if(O){const{edges:D,setEdges:I}=E.getState();I(Zm(P,D))}F==null||F(P),a==null||a(P)},C=V=>{if(!p)return;const $=zm(V);o&&($&&V.button===0||!$)&&av({event:V,handleId:m,nodeId:p,onConnect:R,isTarget:v,getState:E.getState,setState:E.setState,isValidConnection:n||E.getState().isValidConnection||lv}),$?c==null||c(V):d==null||d(V)},A=V=>{const{onClickConnectStart:$,onClickConnectEnd:F,connectionClickStartHandle:O,connectionMode:P,isValidConnection:D}=E.getState();if(!p||!O&&!o)return;if(!O){$==null||$(V,{nodeId:p,handleId:m,handleType:e}),E.setState({connectionClickStartHandle:{nodeId:p,type:e,handleId:m}});return}const I=Fm(V.target),T=n||D||lv,{connection:k,isValid:U}=iv(V,{nodeId:p,id:m,type:e},P,O.nodeId,O.handleId||null,O.type,T,I);U&&R(k),F==null||F(V),E.setState({connectionClickStartHandle:null})};return y("div",{"data-handleid":m,"data-nodeid":p,"data-handlepos":t,"data-id":`${p}-${m}-${e}`,className:Ze(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",S,u,{source:!v,target:v,connectable:r,connectablestart:o,connectableend:i,connecting:w,connectionindicator:r&&(o&&!_||i&&_)}]),onMouseDown:C,onTouchStart:C,onClick:g?A:void 0,ref:h,...f,children:l})});uv.displayName="Handle";var Ro=N.memo(uv);const cv=({data:e,isConnectable:t,targetPosition:n=G.Top,sourcePosition:r=G.Bottom})=>M(Ee,{children:[y(Ro,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,y(Ro,{type:"source",position:r,isConnectable:t})]});cv.displayName="DefaultNode";var pd=N.memo(cv);const dv=({data:e,isConnectable:t,sourcePosition:n=G.Bottom})=>M(Ee,{children:[e==null?void 0:e.label,y(Ro,{type:"source",position:n,isConnectable:t})]});dv.displayName="InputNode";var fv=N.memo(dv);const pv=({data:e,isConnectable:t,targetPosition:n=G.Top})=>M(Ee,{children:[y(Ro,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]});pv.displayName="OutputNode";var hv=N.memo(pv);const hd=()=>null;hd.displayName="GroupNode";const _O=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected)}),Za=e=>e.id;function wO(e,t){return Je(e.selectedNodes.map(Za),t.selectedNodes.map(Za))&&Je(e.selectedEdges.map(Za),t.selectedEdges.map(Za))}const gv=N.memo(({onSelectionChange:e})=>{const t=Oe(),{selectedNodes:n,selectedEdges:r}=le(_O,wO);return N.useEffect(()=>{var i,s;const o={nodes:n,edges:r};e==null||e(o),(s=(i=t.getState()).onSelectionChange)==null||s.call(i,o)},[n,r,e]),null});gv.displayName="SelectionListener";const RO=e=>!!e.onSelectionChange;function NO({onSelectionChange:e}){const t=le(RO);return e||t?y(gv,{onSelectionChange:e}):null}const OO=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 No(e,t){N.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Z(e,t,n){N.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const xO=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:s,onClickConnectStart:a,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:c,nodesFocusable:d,edgesFocusable:f,edgesUpdatable:h,elevateNodesOnSelect:m,minZoom:v,maxZoom:E,nodeExtent:p,onNodesChange:g,onEdgesChange:S,elementsSelectable:_,connectionMode:w,snapGrid:R,snapToGrid:C,translateExtent:A,connectOnClick:B,defaultEdgeOptions:b,fitView:V,fitViewOptions:$,onNodesDelete:F,onEdgesDelete:O,onNodeDrag:P,onNodeDragStart:D,onNodeDragStop:I,onSelectionDrag:T,onSelectionDragStart:k,onSelectionDragStop:U,noPanClassName:z,nodeOrigin:j,rfId:K,autoPanOnConnect:W,autoPanOnNodeDrag:J,onError:X,connectionRadius:te,isValidConnection:oe})=>{const{setNodes:ge,setEdges:ue,setDefaultNodesAndEdges:xe,setMinZoom:Ye,setMaxZoom:ft,setTranslateExtent:me,setNodeExtent:de,reset:tt}=le(OO,Je),Q=Oe();return N.useEffect(()=>{const Jn=r==null?void 0:r.map(Tr=>({...Tr,...b}));return xe(n,Jn),()=>{tt()}},[]),Z("defaultEdgeOptions",b,Q.setState),Z("connectionMode",w,Q.setState),Z("onConnect",o,Q.setState),Z("onConnectStart",i,Q.setState),Z("onConnectEnd",s,Q.setState),Z("onClickConnectStart",a,Q.setState),Z("onClickConnectEnd",l,Q.setState),Z("nodesDraggable",u,Q.setState),Z("nodesConnectable",c,Q.setState),Z("nodesFocusable",d,Q.setState),Z("edgesFocusable",f,Q.setState),Z("edgesUpdatable",h,Q.setState),Z("elementsSelectable",_,Q.setState),Z("elevateNodesOnSelect",m,Q.setState),Z("snapToGrid",C,Q.setState),Z("snapGrid",R,Q.setState),Z("onNodesChange",g,Q.setState),Z("onEdgesChange",S,Q.setState),Z("connectOnClick",B,Q.setState),Z("fitViewOnInit",V,Q.setState),Z("fitViewOnInitOptions",$,Q.setState),Z("onNodesDelete",F,Q.setState),Z("onEdgesDelete",O,Q.setState),Z("onNodeDrag",P,Q.setState),Z("onNodeDragStart",D,Q.setState),Z("onNodeDragStop",I,Q.setState),Z("onSelectionDrag",T,Q.setState),Z("onSelectionDragStart",k,Q.setState),Z("onSelectionDragStop",U,Q.setState),Z("noPanClassName",z,Q.setState),Z("nodeOrigin",j,Q.setState),Z("rfId",K,Q.setState),Z("autoPanOnConnect",W,Q.setState),Z("autoPanOnNodeDrag",J,Q.setState),Z("onError",X,Q.setState),Z("connectionRadius",te,Q.setState),Z("isValidConnection",oe,Q.setState),No(e,ge),No(t,ue),No(v,Ye),No(E,ft),No(A,me),No(p,de),null},mv={display:"none"},TO={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},vv="react-flow__node-desc",yv="react-flow__edge-desc",CO="react-flow__aria-live",bO=e=>e.ariaLiveMessage;function IO({rfId:e}){const t=le(bO);return y("div",{id:`${CO}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:TO,children:t})}function AO({rfId:e,disableKeyboardA11y:t}){return M(Ee,{children:[M("div",{id:`${vv}-${e}`,style:mv,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."," "]}),y("div",{id:`${yv}-${e}`,style:mv,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&y(IO,{rfId:e})]})}const LO=(e,t,n)=>n===G.Left?e-t:n===G.Right?e+t:e,DO=(e,t,n)=>n===G.Top?e-t:n===G.Bottom?e+t:e,Ev="react-flow__edgeupdater",Sv=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:a})=>y("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Ze([Ev,`${Ev}-${a}`]),cx:LO(t,r,e),cy:DO(n,r,e),r,stroke:"transparent",fill:"transparent"}),kO=()=>!0;var Oo=e=>{const t=({id:n,className:r,type:o,data:i,onClick:s,onEdgeDoubleClick:a,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:v,style:E,source:p,target:g,sourceX:S,sourceY:_,targetX:w,targetY:R,sourcePosition:C,targetPosition:A,elementsSelectable:B,hidden:b,sourceHandleId:V,targetHandleId:$,onContextMenu:F,onMouseEnter:O,onMouseMove:P,onMouseLeave:D,edgeUpdaterRadius:I,onEdgeUpdate:T,onEdgeUpdateStart:k,onEdgeUpdateEnd:U,markerEnd:z,markerStart:j,rfId:K,ariaLabel:W,isFocusable:J,isUpdatable:X,pathOptions:te,interactionWidth:oe})=>{const ge=N.useRef(null),[ue,xe]=N.useState(!1),[Ye,ft]=N.useState(!1),me=Oe(),de=N.useMemo(()=>`url(#${dd(j,K)})`,[j,K]),tt=N.useMemo(()=>`url(#${dd(z,K)})`,[z,K]);if(b)return null;const Q=nt=>{const{edges:Ut,addSelectedEdges:Ir}=me.getState();if(B&&(me.setState({nodesSelectionActive:!1}),Ir([n])),s){const Ar=Ut.find(Lr=>Lr.id===n);s(nt,Ar)}},Jn=Bi(n,me.getState,a),Tr=Bi(n,me.getState,F),as=Bi(n,me.getState,O),ls=Bi(n,me.getState,P),ko=Bi(n,me.getState,D),Cr=(nt,Ut)=>{if(nt.button!==0)return;const{edges:Ir,isValidConnection:Ar}=me.getState(),Lr=Ut?g:p,yl=(Ut?$:V)||null,Dr=Ut?"target":"source",df=Ar||kO,ff=Ut,cs=Ir.find(kr=>kr.id===n);ft(!0),k==null||k(nt,cs,Dr);const pf=kr=>{ft(!1),U==null||U(kr,cs,Dr)};av({event:nt,handleId:yl,nodeId:Lr,onConnect:kr=>T==null?void 0:T(cs,kr),isTarget:ff,getState:me.getState,setState:me.setState,isValidConnection:df,edgeUpdaterType:Dr,onEdgeUpdateEnd:pf})},er=nt=>Cr(nt,!0),Po=nt=>Cr(nt,!1),tr=()=>xe(!0),br=()=>xe(!1),us=!B&&!s,Mo=nt=>{var Ut;if($m.includes(nt.key)&&B){const{unselectNodesAndEdges:Ir,addSelectedEdges:Ar,edges:Lr}=me.getState();nt.key==="Escape"?((Ut=ge.current)==null||Ut.blur(),Ir({edges:[Lr.find(Dr=>Dr.id===n)]})):Ar([n])}};return M("g",{className:Ze(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:l,animated:u,inactive:us,updating:ue}]),onClick:Q,onDoubleClick:Jn,onContextMenu:Tr,onMouseEnter:as,onMouseMove:ls,onMouseLeave:ko,onKeyDown:J?Mo:void 0,tabIndex:J?0:void 0,role:J?"button":void 0,"data-testid":`rf__edge-${n}`,"aria-label":W===null?void 0:W||`Edge from ${p} to ${g}`,"aria-describedby":J?`${yv}-${K}`:void 0,ref:ge,children:[!Ye&&y(e,{id:n,source:p,target:g,selected:l,animated:u,label:c,labelStyle:d,labelShowBg:f,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:v,data:i,style:E,sourceX:S,sourceY:_,targetX:w,targetY:R,sourcePosition:C,targetPosition:A,sourceHandleId:V,targetHandleId:$,markerStart:de,markerEnd:tt,pathOptions:te,interactionWidth:oe}),X&&M(Ee,{children:[(X==="source"||X===!0)&&y(Sv,{position:C,centerX:S,centerY:_,radius:I,onMouseDown:er,onMouseEnter:tr,onMouseOut:br,type:"source"}),(X==="target"||X===!0)&&y(Sv,{position:A,centerX:w,centerY:R,radius:I,onMouseDown:Po,onMouseEnter:tr,onMouseOut:br,type:"target"})]})]})};return t.displayName="EdgeWrapper",N.memo(t)};function PO(e){const t={default:Oo(e.default||qa),straight:Oo(e.bezier||ud),step:Oo(e.step||ld),smoothstep:Oo(e.step||Qa),simplebezier:Oo(e.simplebezier||ad)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,i)=>(o[i]=Oo(e[i]||qa),o),n);return{...t,...r}}function _v(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,o=((n==null?void 0:n.y)||0)+t.y,i=(n==null?void 0:n.width)||t.width,s=(n==null?void 0:n.height)||t.height;switch(e){case G.Top:return{x:r+i/2,y:o};case G.Right:return{x:r+i,y:o+s/2};case G.Bottom:return{x:r+i/2,y:o+s};case G.Left:return{x:r,y:o+s/2}}}function wv(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const MO=(e,t,n,r,o,i)=>{const s=_v(n,e,t),a=_v(i,r,o);return{sourceX:s.x,sourceY:s.y,targetX:a.x,targetY:a.y}};function UO({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,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+o),y2:Math.max(e.y+r,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=Vm({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:a/l[2]}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function Rv(e){var r,o,i,s,a;const t=((r=e==null?void 0:e[_e])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)<"u"&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.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 Nv(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Nv(n,t):!1}function Ov(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 FO(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||!Nv(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>{var i,s;return{id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((i=o.positionAbsolute)==null?void 0:i.x)??0),y:n.y-(((s=o.positionAbsolute)==null?void 0:s.y)??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode,width:o.width,height:o.height}})}function xv(e,t,n,r,o=[0,0],i){let s=e.extent||r;if(e.extent==="parent")if(e.parentNode&&e.width&&e.height){const u=n.get(e.parentNode),{x:c,y:d}=wo(u,o).positionAbsolute;s=u&&St(c)&&St(d)&&St(u.width)&&St(u.height)?[[c+e.width*o[0],d+e.height*o[1]],[c+u.width-e.width+e.width*o[0],d+u.height-e.height+e.height*o[1]]]:s}else i==null||i("005",Vn.error005()),s=r;else if(e.extent&&e.parentNode){const u=n.get(e.parentNode),{x:c,y:d}=wo(u,o).positionAbsolute;s=[[e.extent[0][0]+c,e.extent[0][1]+d],[e.extent[1][0]+c,e.extent[1][1]+d]]}let a={x:0,y:0};if(e.parentNode){const u=n.get(e.parentNode);a=wo(u,o).positionAbsolute}const l=s?od(t,s):t;return{position:{x:l.x-a.x,y:l.y-a.y},positionAbsolute:l}}function gd({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}const Tv=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),s=t.getBoundingClientRect(),a={x:s.width*r[0],y:s.height*r[1]};return i.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,...rd(l)}})};function ji(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);n(r,{...o})}}function md({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeInternals:a}=t.getState(),l=a.get(e);t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&s)&&(i({nodes:[l]}),requestAnimationFrame(()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.blur()})):o([e])}function VO(){const e=Oe();return N.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:i}=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:i?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:i?o[1]*Math.round(l.y/o[1]):l.y,...l}},[])}function vd(e){return(t,n,r)=>e==null?void 0:e(t,r)}function Cv({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:s}){const a=Oe(),[l,u]=N.useState(!1),c=N.useRef([]),d=N.useRef({x:null,y:null}),f=N.useRef(0),h=N.useRef(null),m=N.useRef({x:0,y:0}),v=N.useRef(null),E=N.useRef(!1),p=VO();return N.useEffect(()=>{if(e!=null&&e.current){const g=At(e.current),S=({x:w,y:R})=>{const{nodeInternals:C,onNodeDrag:A,onSelectionDrag:B,updateNodePositions:b,nodeExtent:V,snapGrid:$,snapToGrid:F,nodeOrigin:O,onError:P}=a.getState();d.current={x:w,y:R};let D=!1;if(c.current=c.current.map(T=>{const k={x:w-T.distance.x,y:R-T.distance.y};F&&(k.x=$[0]*Math.round(k.x/$[0]),k.y=$[1]*Math.round(k.y/$[1]));const U=xv(T,k,C,V,O,P);return D=D||T.position.x!==U.position.x||T.position.y!==U.position.y,T.position=U.position,T.positionAbsolute=U.positionAbsolute,T}),!D)return;b(c.current,!0,!0),u(!0);const I=o?A:vd(B);if(I&&v.current){const[T,k]=gd({nodeId:o,dragItems:c.current,nodeInternals:C});I(v.current,T,k)}},_=()=>{if(!h.current)return;const[w,R]=Um(m.current,h.current);if(w!==0||R!==0){const{transform:C,panBy:A}=a.getState();d.current.x=(d.current.x??0)-w/C[2],d.current.y=(d.current.y??0)-R/C[2],S(d.current),A({x:w,y:R})}f.current=requestAnimationFrame(_)};if(t)g.on(".drag",null);else{const w=oR().on("start",R=>{var D;const{nodeInternals:C,multiSelectionActive:A,domNode:B,nodesDraggable:b,unselectNodesAndEdges:V,onNodeDragStart:$,onSelectionDragStart:F}=a.getState(),O=o?$:vd(F);!s&&!A&&o&&((D=C.get(o))!=null&&D.selected||V()),o&&i&&s&&md({id:o,store:a,nodeRef:e});const P=p(R);if(d.current=P,c.current=FO(C,b,P,o),O&&c.current){const[I,T]=gd({nodeId:o,dragItems:c.current,nodeInternals:C});O(R.sourceEvent,I,T)}h.current=(B==null?void 0:B.getBoundingClientRect())||null,m.current=Bn(R.sourceEvent,h.current)}).on("drag",R=>{const C=p(R),{autoPanOnNodeDrag:A}=a.getState();!E.current&&A&&(E.current=!0,_()),(d.current.x!==C.xSnapped||d.current.y!==C.ySnapped)&&c.current&&(v.current=R.sourceEvent,m.current=Bn(R.sourceEvent,h.current),S(C))}).on("end",R=>{if(u(!1),E.current=!1,cancelAnimationFrame(f.current),c.current){const{updateNodePositions:C,nodeInternals:A,onNodeDragStop:B,onSelectionDragStop:b}=a.getState(),V=o?B:vd(b);if(C(c.current,!1,!1),V){const[$,F]=gd({nodeId:o,dragItems:c.current,nodeInternals:A});V(R.sourceEvent,$,F)}}}).filter(R=>{const C=R.target;return!R.button&&(!n||!Ov(C,`.${n}`,e))&&(!r||Ov(C,r,e))});return g.call(w),()=>{g.on(".drag",null)}}}},[e,t,n,r,i,a,o,s,p]),l}function bv(){const e=Oe();return N.useCallback(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:i,getNodes:s,snapToGrid:a,snapGrid:l,onError:u,nodesDraggable:c}=e.getState(),d=s().filter(g=>g.selected&&(g.draggable||c&&typeof g.draggable>"u")),f=a?l[0]:5,h=a?l[1]:5,m=n.isShiftPressed?4:1,v=n.x*f*m,E=n.y*h*m,p=d.map(g=>{if(g.positionAbsolute){const S={x:g.positionAbsolute.x+v,y:g.positionAbsolute.y+E};a&&(S.x=l[0]*Math.round(S.x/l[0]),S.y=l[1]*Math.round(S.y/l[1]));const{positionAbsolute:_,position:w}=xv(g,S,r,o,void 0,u);g.position=w,g.positionAbsolute=_}return g});i(p,!0,!1)},[])}const xo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Yi=e=>{const t=({id:n,type:r,data:o,xPos:i,yPos:s,xPosOrigin:a,yPosOrigin:l,selected:u,onClick:c,onMouseEnter:d,onMouseMove:f,onMouseLeave:h,onContextMenu:m,onDoubleClick:v,style:E,className:p,isDraggable:g,isSelectable:S,isConnectable:_,isFocusable:w,selectNodesOnDrag:R,sourcePosition:C,targetPosition:A,hidden:B,resizeObserver:b,dragHandle:V,zIndex:$,isParent:F,noDragClassName:O,noPanClassName:P,initialized:D,disableKeyboardA11y:I,ariaLabel:T,rfId:k})=>{const U=Oe(),z=N.useRef(null),j=N.useRef(C),K=N.useRef(A),W=N.useRef(r),J=S||g||c||d||f||h,X=bv(),te=ji(n,U.getState,d),oe=ji(n,U.getState,f),ge=ji(n,U.getState,h),ue=ji(n,U.getState,m),xe=ji(n,U.getState,v),Ye=de=>{if(S&&(!R||!g)&&md({id:n,store:U,nodeRef:z}),c){const tt=U.getState().nodeInternals.get(n);c(de,{...tt})}},ft=de=>{if(!sd(de))if($m.includes(de.key)&&S){const tt=de.key==="Escape";md({id:n,store:U,unselect:tt,nodeRef:z})}else!I&&g&&u&&Object.prototype.hasOwnProperty.call(xo,de.key)&&(U.setState({ariaLiveMessage:`Moved selected node ${de.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~s}`}),X({x:xo[de.key].x,y:xo[de.key].y,isShiftPressed:de.shiftKey}))};N.useEffect(()=>{if(z.current&&!B){const de=z.current;return b==null||b.observe(de),()=>b==null?void 0:b.unobserve(de)}},[B]),N.useEffect(()=>{const de=W.current!==r,tt=j.current!==C,Q=K.current!==A;z.current&&(de||tt||Q)&&(de&&(W.current=r),tt&&(j.current=C),Q&&(K.current=A),U.getState().updateNodeDimensions([{id:n,nodeElement:z.current,forceUpdate:!0}]))},[n,r,C,A]);const me=Cv({nodeRef:z,disabled:B||!g,noDragClassName:O,handleSelector:V,nodeId:n,isSelectable:S,selectNodesOnDrag:R});return B?null:y("div",{className:Ze(["react-flow__node",`react-flow__node-${r}`,{[P]:g},p,{selected:u,selectable:S,parent:F,dragging:me}]),ref:z,style:{zIndex:$,transform:`translate(${a}px,${l}px)`,pointerEvents:J?"all":"none",visibility:D?"visible":"hidden",...E},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:te,onMouseMove:oe,onMouseLeave:ge,onContextMenu:ue,onClick:Ye,onDoubleClick:xe,onKeyDown:w?ft:void 0,tabIndex:w?0:void 0,role:w?"button":void 0,"aria-describedby":I?void 0:`${vv}-${k}`,"aria-label":T,children:y(uO,{value:n,children:y(e,{id:n,data:o,type:r,xPos:i,yPos:s,selected:u,isConnectable:_,sourcePosition:C,targetPosition:A,dragging:me,dragHandle:V,zIndex:$})})})};return t.displayName="NodeWrapper",N.memo(t)};function BO(e){const t={input:Yi(e.input||fv),default:Yi(e.default||pd),output:Yi(e.output||hv),group:Yi(e.group||hd)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,i)=>(o[i]=Yi(e[i]||pd),o),n);return{...t,...r}}const $O=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},zO=typeof document<"u"?document:null;var Gi=(e=null,t={target:zO})=>{const[n,r]=N.useState(!1),o=N.useRef(!1),i=N.useRef(new Set([])),[s,a]=N.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.split("+")),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return N.useEffect(()=>{var l,u;if(e!==null){const c=h=>{if(o.current=h.ctrlKey||h.metaKey||h.shiftKey,!o.current&&sd(h))return!1;const m=Av(h.code,a);i.current.add(h[m]),Iv(s,i.current,!1)&&(h.preventDefault(),r(!0))},d=h=>{if(!o.current&&sd(h))return!1;const m=Av(h.code,a);Iv(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[m]),o.current=!1},f=()=>{i.current.clear(),r(!1)};return(l=t==null?void 0:t.target)==null||l.addEventListener("keydown",c),(u=t==null?void 0:t.target)==null||u.addEventListener("keyup",d),window.addEventListener("blur",f),()=>{var h,m;(h=t==null?void 0:t.target)==null||h.removeEventListener("keydown",c),(m=t==null?void 0:t.target)==null||m.removeEventListener("keyup",d),window.removeEventListener("blur",f)}}},[e,r]),n};function Iv(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Av(e,t){return t.includes(e)?"code":"key"}function Lv(e,t,n,r){var s,a;if(!e.parentNode)return n;const o=t.get(e.parentNode),i=wo(o,r);return Lv(o,t,{x:(n.x??0)+i.x,y:(n.y??0)+i.y,z:(((s=o[_e])==null?void 0:s.z)??0)>(n.z??0)?((a=o[_e])==null?void 0:a.z)??0:n.z??0},r)}function Dv(e,t,n){e.forEach(r=>{var o;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:i,y:s,z:a}=Lv(r,e,{...r.position,z:((o=r[_e])==null?void 0:o.z)??0},t);r.positionAbsolute={x:i,y:s},r[_e].z=a,n!=null&&n[r.id]&&(r[_e].isParent=!0)}})}function yd(e,t,n,r){const o=new Map,i={},s=r?1e3:0;return e.forEach(a=>{var d;const l=(St(a.zIndex)?a.zIndex:0)+(a.selected?s:0),u=t.get(a.id),c={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&&(c.parentNode=a.parentNode,i[a.parentNode]=!0),Object.defineProperty(c,_e,{enumerable:!1,value:{handleBounds:(d=u==null?void 0:u[_e])==null?void 0:d.handleBounds,z:l}}),o.set(a.id,c)}),Dv(o,n,i),o}function kv(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:s,d3Zoom:a,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:d}=e(),f=t.initial&&!u&&c;if(a&&l&&(f||!t.initial)){const m=n().filter(E=>{var g;const p=t.includeHiddenNodes?E.width&&E.height:!E.hidden;return(g=t.nodes)!=null&&g.length?p&&t.nodes.some(S=>S.id===E.id):p}),v=m.every(E=>E.width&&E.height);if(m.length>0&&v){const E=ev(m,d),[p,g,S]=rv(E,r,o,t.minZoom??i,t.maxZoom??s,t.padding??.1),_=Fn.translate(p,g).scale(S);return typeof t.duration=="number"&&t.duration>0?a.transform(Er(l,t.duration),_):a.transform(l,_),!0}}return!1}function HO(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[_e]:r[_e],selected:n.selected})}),new Map(t)}function jO(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function Ja({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:s,onEdgesChange:a,hasDefaultNodes:l,hasDefaultEdges:u}=n();e!=null&&e.length&&(l&&r({nodeInternals:HO(e,o)}),s==null||s(e)),t!=null&&t.length&&(u&&r({edges:jO(t,i)}),a==null||a(t))}const To=()=>{},YO={zoomIn:To,zoomOut:To,zoomTo:To,getZoom:()=>1,setViewport:To,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:To,fitBounds:To,project:e=>e,viewportInitialized:!1},GO=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),WO=()=>{const e=Oe(),{d3Zoom:t,d3Selection:n}=le(GO,Je);return N.useMemo(()=>n&&t?{zoomIn:o=>t.scaleBy(Er(n,o==null?void 0:o.duration),1.2),zoomOut:o=>t.scaleBy(Er(n,o==null?void 0:o.duration),1/1.2),zoomTo:(o,i)=>t.scaleTo(Er(n,i==null?void 0:i.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,i)=>{const[s,a,l]=e.getState().transform,u=Fn.translate(o.x??s,o.y??a).scale(o.zoom??l);t.transform(Er(n,i==null?void 0:i.duration),u)},getViewport:()=>{const[o,i,s]=e.getState().transform;return{x:o,y:i,zoom:s}},fitView:o=>kv(e.getState,o),setCenter:(o,i,s)=>{const{width:a,height:l,maxZoom:u}=e.getState(),c=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:u,d=a/2-o*c,f=l/2-i*c,h=Fn.translate(d,f).scale(c);t.transform(Er(n,s==null?void 0:s.duration),h)},fitBounds:(o,i)=>{const{width:s,height:a,minZoom:l,maxZoom:u}=e.getState(),[c,d,f]=rv(o,s,a,l,u,(i==null?void 0:i.padding)??.1),h=Fn.translate(c,d).scale(f);t.transform(Er(n,i==null?void 0:i.duration),h)},project:o=>{const{transform:i,snapToGrid:s,snapGrid:a}=e.getState();return Jm(o,i,s,a)},viewportInitialized:!0}:YO,[t,n])};function Ed(){const e=WO(),t=Oe(),n=N.useCallback(()=>t.getState().getNodes().map(v=>({...v})),[]),r=N.useCallback(v=>t.getState().nodeInternals.get(v),[]),o=N.useCallback(()=>{const{edges:v=[]}=t.getState();return v.map(E=>({...E}))},[]),i=N.useCallback(v=>{const{edges:E=[]}=t.getState();return E.find(p=>p.id===v)},[]),s=N.useCallback(v=>{const{getNodes:E,setNodes:p,hasDefaultNodes:g,onNodesChange:S}=t.getState(),_=E(),w=typeof v=="function"?v(_):v;if(g)p(w);else if(S){const R=w.length===0?_.map(C=>({type:"remove",id:C.id})):w.map(C=>({item:C,type:"reset"}));S(R)}},[]),a=N.useCallback(v=>{const{edges:E=[],setEdges:p,hasDefaultEdges:g,onEdgesChange:S}=t.getState(),_=typeof v=="function"?v(E):v;if(g)p(_);else if(S){const w=_.length===0?E.map(R=>({type:"remove",id:R.id})):_.map(R=>({item:R,type:"reset"}));S(w)}},[]),l=N.useCallback(v=>{const E=Array.isArray(v)?v:[v],{getNodes:p,setNodes:g,hasDefaultNodes:S,onNodesChange:_}=t.getState();if(S){const R=[...p(),...E];g(R)}else if(_){const w=E.map(R=>({item:R,type:"add"}));_(w)}},[]),u=N.useCallback(v=>{const E=Array.isArray(v)?v:[v],{edges:p=[],setEdges:g,hasDefaultEdges:S,onEdgesChange:_}=t.getState();if(S)g([...p,...E]);else if(_){const w=E.map(R=>({item:R,type:"add"}));_(w)}},[]),c=N.useCallback(()=>{const{getNodes:v,edges:E=[],transform:p}=t.getState(),[g,S,_]=p;return{nodes:v().map(w=>({...w})),edges:E.map(w=>({...w})),viewport:{x:g,y:S,zoom:_}}},[]),d=N.useCallback(({nodes:v,edges:E})=>{const{nodeInternals:p,getNodes:g,edges:S,hasDefaultNodes:_,hasDefaultEdges:w,onNodesDelete:R,onEdgesDelete:C,onNodesChange:A,onEdgesChange:B}=t.getState(),b=(v||[]).map(P=>P.id),V=(E||[]).map(P=>P.id),$=g().reduce((P,D)=>{const I=!b.includes(D.id)&&D.parentNode&&P.find(k=>k.id===D.parentNode);return(typeof D.deletable=="boolean"?D.deletable:!0)&&(b.includes(D.id)||I)&&P.push(D),P},[]),F=S.filter(P=>typeof P.deletable=="boolean"?P.deletable:!0),O=F.filter(P=>V.includes(P.id));if($||O){const P=nv($,F),D=[...O,...P],I=D.reduce((T,k)=>(T.includes(k.id)||T.push(k.id),T),[]);if((w||_)&&(w&&t.setState({edges:S.filter(T=>!I.includes(T.id))}),_&&($.forEach(T=>{p.delete(T.id)}),t.setState({nodeInternals:new Map(p)}))),I.length>0&&(C==null||C(D),B&&B(I.map(T=>({id:T,type:"remove"})))),$.length>0&&(R==null||R($),A)){const T=$.map(k=>({id:k.id,type:"remove"}));A(T)}}},[]),f=N.useCallback(v=>{const E=nO(v),p=E?null:t.getState().nodeInternals.get(v.id);return[E?v:Bm(p),p,E]},[]),h=N.useCallback((v,E=!0,p)=>{const[g,S,_]=f(v);return g?(p||t.getState().getNodes()).filter(w=>{if(!_&&(w.id===S.id||!w.positionAbsolute))return!1;const R=Bm(w),C=id(R,g);return E&&C>0||C>=v.width*v.height}):[]},[]),m=N.useCallback((v,E,p=!0)=>{const[g]=f(v);if(!g)return!1;const S=id(g,E);return p&&S>0||S>=v.width*v.height},[]);return N.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:s,setEdges:a,addNodes:l,addEdges:u,toObject:c,deleteElements:d,getIntersectingNodes:h,isNodeIntersecting:m}),[e,n,r,o,i,s,a,l,u,c,d,h,m])}var KO=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Oe(),{deleteElements:r}=Ed(),o=Gi(e),i=Gi(t);N.useEffect(()=>{if(o){const{edges:s,getNodes:a}=n.getState(),l=a().filter(c=>c.selected),u=s.filter(c=>c.selected);r({nodes:l,edges:u}),n.setState({nodesSelectionActive:!1})}},[o]),N.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])};function QO(e){const t=Oe();N.useEffect(()=>{let n;const r=()=>{var i,s;if(!e.current)return;const o=rd(e.current);(o.height===0||o.width===0)&&((s=(i=t.getState()).onError)==null||s.call(i,"004",Vn.error004())),t.setState({width:o.width||500,height:o.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 Sd={position:"absolute",width:"100%",height:"100%",top:0,left:0},XO=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,_d=e=>({x:e.x,y:e.y,zoom:e.k}),Co=(e,t)=>e.target.closest(`.${t}`),Pv=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),qO=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ZO=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:l=_o.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:d=!0,defaultViewport:f,translateExtent:h,minZoom:m,maxZoom:v,zoomActivationKeyCode:E,preventScrolling:p=!0,children:g,noWheelClassName:S,noPanClassName:_})=>{const w=N.useRef(),R=Oe(),C=N.useRef(!1),A=N.useRef(!1),B=N.useRef(null),b=N.useRef({x:0,y:0,zoom:0}),{d3Zoom:V,d3Selection:$,d3ZoomHandler:F,userSelectionActive:O}=le(qO,Je),P=Gi(E),D=N.useRef(0);return QO(B),N.useEffect(()=>{if(B.current){const I=B.current.getBoundingClientRect(),T=KN().scaleExtent([m,v]).translateExtent(h),k=At(B.current).call(T),U=Fn.translate(f.x,f.y).scale(Eo(f.zoom,m,v)),z=[[0,0],[I.width,I.height]],j=T.constrain()(U,z,h);T.transform(k,j),R.setState({d3Zoom:T,d3Selection:k,d3ZoomHandler:k.on("wheel.zoom"),transform:[j.x,j.y,j.k],domNode:B.current.closest(".react-flow")})}},[]),N.useEffect(()=>{$&&V&&(s&&!P&&!O?$.on("wheel.zoom",I=>{if(Co(I,S))return!1;I.preventDefault(),I.stopImmediatePropagation();const T=$.property("__zoom").k||1;if(I.ctrlKey&&i){const j=Ht(I),K=-I.deltaY*(I.deltaMode===1?.05:I.deltaMode?1:.002)*10,W=T*Math.pow(2,K);V.scaleTo($,W,j);return}const k=I.deltaMode===1?20:1,U=l===_o.Vertical?0:I.deltaX*k,z=l===_o.Horizontal?0:I.deltaY*k;V.translateBy($,-(U/T)*a,-(z/T)*a)},{passive:!1}):typeof F<"u"&&$.on("wheel.zoom",function(I,T){if(!p||Co(I,S))return null;I.preventDefault(),F.call(this,I,T)},{passive:!1}))},[O,s,l,$,V,F,P,i,p,S]),N.useEffect(()=>{V&&V.on("start",I=>{var k;if(!I.sourceEvent)return null;D.current=I.sourceEvent.button;const{onViewportChangeStart:T}=R.getState();if(C.current=!0,((k=I.sourceEvent)==null?void 0:k.type)==="mousedown"&&R.setState({paneDragging:!0}),t||T){const U=_d(I.transform);b.current=U,T==null||T(U),t==null||t(I.sourceEvent,U)}})},[V,t]),N.useEffect(()=>{V&&(O&&!C.current?V.on("zoom",null):O||V.on("zoom",I=>{const{onViewportChange:T}=R.getState();if(R.setState({transform:[I.transform.x,I.transform.y,I.transform.k]}),A.current=!!(r&&Pv(d,D.current??0)),e||T){const k=_d(I.transform);T==null||T(k),e==null||e(I.sourceEvent,k)}}))},[O,V,e,d,r]),N.useEffect(()=>{V&&V.on("end",I=>{if(!I.sourceEvent)return null;const{onViewportChangeEnd:T}=R.getState();if(C.current=!1,R.setState({paneDragging:!1}),r&&Pv(d,D.current??0)&&!A.current&&r(I.sourceEvent),A.current=!1,(n||T)&&XO(b.current,I.transform)){const k=_d(I.transform);b.current=k,clearTimeout(w.current),w.current=setTimeout(()=>{T==null||T(k),n==null||n(I.sourceEvent,k)},s?150:0)}})},[V,s,d,n,r]),N.useEffect(()=>{V&&V.filter(I=>{const T=P||o,k=i&&I.ctrlKey;if(I.button===1&&I.type==="mousedown"&&(Co(I,"react-flow__node")||Co(I,"react-flow__edge")))return!0;if(!d&&!T&&!s&&!u&&!i||O||!u&&I.type==="dblclick"||Co(I,S)&&I.type==="wheel"||Co(I,_)&&I.type!=="wheel"||!i&&I.ctrlKey&&I.type==="wheel"||!T&&!s&&!k&&I.type==="wheel"||!d&&(I.type==="mousedown"||I.type==="touchstart")||Array.isArray(d)&&!d.includes(I.button)&&(I.type==="mousedown"||I.type==="touchstart"))return!1;const U=Array.isArray(d)&&d.includes(I.button)||!I.button||I.button<=1;return(!I.ctrlKey||I.type==="wheel")&&U})},[O,V,o,i,s,u,d,c,P]),y("div",{className:"react-flow__renderer",ref:B,style:Sd,children:g})},JO=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ex(){const{userSelectionActive:e,userSelectionRect:t}=le(JO,Je);return e&&t?y("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 Mv(e,t){const n=e.find(r=>r.id===t.parentNode);if(n){const r=t.position.x+t.width-n.width,o=t.position.y+t.height-n.height;if(r>0||o>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),o>0&&(n.style.height+=o),t.position.x<0){const i=Math.abs(t.position.x);n.position.x=n.position.x-i,n.style.width+=i,t.position.x=0}if(t.position.y<0){const i=Math.abs(t.position.y);n.position.y=n.position.y-i,n.style.height+=i,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function Uv(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,o)=>{const i=e.filter(a=>a.id===o.id);if(i.length===0)return r.push(o),r;const s={...o};for(const a of i)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&&Mv(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&&Mv(r,s);break}case"remove":return r}return r.push(s),r},n)}function Fv(e,t){return Uv(e,t)}function tx(e,t){return Uv(e,t)}const Hn=(e,t)=>({id:e,type:"select",selected:t});function bo(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(Hn(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(Hn(r.id,!1))),n},[])}const wd=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},nx=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Vv=N.memo(({isSelecting:e,selectionMode:t=$i.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:s,onPaneScroll:a,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:c,children:d})=>{const f=N.useRef(null),h=Oe(),m=N.useRef(0),v=N.useRef(0),E=N.useRef(),{userSelectionActive:p,elementsSelectable:g,dragging:S}=le(nx,Je),_=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),m.current=0,v.current=0},w=F=>{i==null||i(F),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},R=F=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){F.preventDefault();return}s==null||s(F)},C=a?F=>a(F):void 0,A=F=>{const{resetSelectedElements:O,domNode:P}=h.getState();if(E.current=P==null?void 0:P.getBoundingClientRect(),!g||!e||F.button!==0||F.target!==f.current||!E.current)return;const{x:D,y:I}=Bn(F,E.current);O(),h.setState({userSelectionRect:{width:0,height:0,startX:D,startY:I,x:D,y:I}}),r==null||r(F)},B=F=>{const{userSelectionRect:O,nodeInternals:P,edges:D,transform:I,onNodesChange:T,onEdgesChange:k,nodeOrigin:U,getNodes:z}=h.getState();if(!e||!E.current||!O)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const j=Bn(F,E.current),K=O.startX??0,W=O.startY??0,J={...O,x:j.x<K?j.x:K,y:j.y<W?j.y:W,width:Math.abs(j.x-K),height:Math.abs(j.y-W)},X=z(),te=tv(P,J,I,t===$i.Partial,!0,U),oe=nv(te,D).map(ue=>ue.id),ge=te.map(ue=>ue.id);if(m.current!==ge.length){m.current=ge.length;const ue=bo(X,ge);ue.length&&(T==null||T(ue))}if(v.current!==oe.length){v.current=oe.length;const ue=bo(D,oe);ue.length&&(k==null||k(ue))}h.setState({userSelectionRect:J})},b=F=>{if(F.button!==0)return;const{userSelectionRect:O}=h.getState();!p&&O&&F.target===f.current&&(w==null||w(F)),h.setState({nodesSelectionActive:m.current>0}),_(),o==null||o(F)},V=F=>{p&&(h.setState({nodesSelectionActive:m.current>0}),o==null||o(F)),_()},$=g&&(e||p);return M("div",{className:Ze(["react-flow__pane",{dragging:S,selection:e}]),onClick:$?void 0:wd(w,f),onContextMenu:wd(R,f),onWheel:wd(C,f),onMouseEnter:$?void 0:l,onMouseDown:$?A:void 0,onMouseMove:$?B:u,onMouseUp:$?b:void 0,onMouseLeave:$?V:c,ref:f,style:Sd,children:[d,y(ex,{})]})});Vv.displayName="Pane";const rx=e=>{const t=e.getNodes().filter(n=>n.selected);return{...ev(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function ox({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Oe(),{width:o,height:i,x:s,y:a,transformString:l,userSelectionActive:u}=le(rx,Je),c=bv(),d=N.useRef(null);if(N.useEffect(()=>{var m;n||(m=d.current)==null||m.focus({preventScroll:!0})},[n]),Cv({nodeRef:d}),u||!o||!i)return null;const f=e?m=>{const v=r.getState().getNodes().filter(E=>E.selected);e(m,v)}:void 0,h=m=>{Object.prototype.hasOwnProperty.call(xo,m.key)&&c({x:xo[m.key].x,y:xo[m.key].y,isShiftPressed:m.shiftKey})};return y("div",{className:Ze(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:y("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:o,height:i,top:a,left:s}})})}var ix=N.memo(ox);const sx=e=>e.nodesSelectionActive,Bv=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,deleteKeyCode:a,onMove:l,onMoveStart:u,onMoveEnd:c,selectionKeyCode:d,selectionOnDrag:f,selectionMode:h,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:E,panActivationKeyCode:p,zoomActivationKeyCode:g,elementsSelectable:S,zoomOnScroll:_,zoomOnPinch:w,panOnScroll:R,panOnScrollSpeed:C,panOnScrollMode:A,zoomOnDoubleClick:B,panOnDrag:b,defaultViewport:V,translateExtent:$,minZoom:F,maxZoom:O,preventScrolling:P,onSelectionContextMenu:D,noWheelClassName:I,noPanClassName:T,disableKeyboardA11y:k})=>{const U=le(sx),z=Gi(d),K=Gi(p)||b,W=z||f&&K!==!0;return KO({deleteKeyCode:a,multiSelectionKeyCode:E}),y(ZO,{onMove:l,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:i,elementsSelectable:S,zoomOnScroll:_,zoomOnPinch:w,panOnScroll:R,panOnScrollSpeed:C,panOnScrollMode:A,zoomOnDoubleClick:B,panOnDrag:!z&&K,defaultViewport:V,translateExtent:$,minZoom:F,maxZoom:O,zoomActivationKeyCode:g,preventScrolling:P,noWheelClassName:I,noPanClassName:T,children:M(Vv,{onSelectionStart:m,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:K,isSelecting:!!W,selectionMode:h,children:[e,U&&y(ix,{onSelectionContextMenu:D,noPanClassName:T,disableKeyboardA11y:k})]})})};Bv.displayName="FlowRenderer";var ax=N.memo(Bv);function lx(e){return le(N.useCallback(n=>e?tv(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}const ux=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),$v=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:s}=le(ux,Je),a=lx(e.onlyRenderVisibleElements),l=N.useRef(),u=N.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(d=>{const f=d.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));i(f)});return l.current=c,c},[]);return N.useEffect(()=>()=>{var c;(c=l==null?void 0:l.current)==null||c.disconnect()},[]),y("div",{className:"react-flow__nodes",style:Sd,children:a.map(c=>{var w,R;let d=c.type||"default";e.nodeTypes[d]||(s==null||s("003",Vn.error003(d)),d="default");const f=e.nodeTypes[d]||e.nodeTypes.default,h=!!(c.draggable||t&&typeof c.draggable>"u"),m=!!(c.selectable||o&&typeof c.selectable>"u"),v=!!(c.connectable||n&&typeof c.connectable>"u"),E=!!(c.focusable||r&&typeof c.focusable>"u"),p=e.nodeExtent?od(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,g=(p==null?void 0:p.x)??0,S=(p==null?void 0:p.y)??0,_=$O({x:g,y:S,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return y(f,{id:c.id,className:c.className,style:c.style,type:d,data:c.data,sourcePosition:c.sourcePosition||G.Bottom,targetPosition:c.targetPosition||G.Top,hidden:c.hidden,xPos:g,yPos:S,xPosOrigin:_.x,yPosOrigin:_.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:h,isSelectable:m,isConnectable:v,isFocusable:E,resizeObserver:u,dragHandle:c.dragHandle,zIndex:((w=c[_e])==null?void 0:w.z)??0,isParent:!!((R=c[_e])!=null&&R.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel},c.id)})})};$v.displayName="NodeRenderer";var cx=N.memo($v);const dx=[{level:0,isMaxLevel:!0,edges:[]}];function fx(e,t,n=!1){let r=-1;const o=e.reduce((s,a)=>{var c,d,f,h;const l=St(a.zIndex);let u=l?a.zIndex:0;return n&&(u=l?a.zIndex:Math.max(((d=(c=t.get(a.source))==null?void 0:c[_e])==null?void 0:d.z)||0,((h=(f=t.get(a.target))==null?void 0:f[_e])==null?void 0:h.z)||0)),s[u]?s[u].push(a):s[u]=[a],r=u>r?u:r,s},{}),i=Object.entries(o).map(([s,a])=>{const l=+s;return{edges:a,level:l,isMaxLevel:l===r}});return i.length===0?dx:i}function px(e,t,n){const r=le(N.useCallback(o=>e?o.edges.filter(i=>{const s=t.get(i.source),a=t.get(i.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)&&UO({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:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return fx(r,t,n)}const hx=({color:e="none",strokeWidth:t=1})=>y("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),gx=({color:e="none",strokeWidth:t=1})=>y("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"}),zv={[zi.Arrow]:hx,[zi.ArrowClosed]:gx};function mx(e){const t=Oe();return N.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(zv,e)?zv[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Vn.error009(e)),null)},[e])}const vx=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const l=mx(t);return l?y("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:y(l,{color:n,strokeWidth:s})}):null},yx=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,i)=>([i.markerStart,i.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const a=dd(s,t);r.includes(a)||(o.push({id:a,color:s.color||e,...s}),r.push(a))}}),o),[]).sort((o,i)=>o.id.localeCompare(i.id))},Hv=({defaultColor:e,rfId:t})=>{const n=le(N.useCallback(yx({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((i,s)=>i.id!==o[s].id)));return y("defs",{children:n.map(r=>y(vx,{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))})};Hv.displayName="MarkerDefinitions";var Ex=N.memo(Hv);const Sx=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}),jv=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeUpdate:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:c,onEdgeClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:m,onEdgeUpdateEnd:v,children:E})=>{const{edgesFocusable:p,edgesUpdatable:g,elementsSelectable:S,width:_,height:w,connectionMode:R,nodeInternals:C,onError:A}=le(Sx,Je),B=px(t,C,n);return _?M(Ee,{children:[B.map(({level:b,edges:V,isMaxLevel:$})=>M("svg",{style:{zIndex:b},width:_,height:w,className:"react-flow__edges react-flow__container",children:[$&&y(Ex,{defaultColor:e,rfId:r}),y("g",{children:V.map(F=>{const[O,P,D]=Rv(C.get(F.source)),[I,T,k]=Rv(C.get(F.target));if(!D||!k)return null;let U=F.type||"default";o[U]||(A==null||A("011",Vn.error011(U)),U="default");const z=o[U]||o.default,j=R===$n.Strict?T.target:(T.target??[]).concat(T.source??[]),K=wv(P.source,F.sourceHandle),W=wv(j,F.targetHandle),J=(K==null?void 0:K.position)||G.Bottom,X=(W==null?void 0:W.position)||G.Top,te=!!(F.focusable||p&&typeof F.focusable>"u"),oe=typeof s<"u"&&(F.updatable||g&&typeof F.updatable>"u");if(!K||!W)return A==null||A("008",Vn.error008(K,F)),null;const{sourceX:ge,sourceY:ue,targetX:xe,targetY:Ye}=MO(O,K,J,I,W,X);return y(z,{id:F.id,className:Ze([F.className,i]),type:U,data:F.data,selected:!!F.selected,animated:!!F.animated,hidden:!!F.hidden,label:F.label,labelStyle:F.labelStyle,labelShowBg:F.labelShowBg,labelBgStyle:F.labelBgStyle,labelBgPadding:F.labelBgPadding,labelBgBorderRadius:F.labelBgBorderRadius,style:F.style,source:F.source,target:F.target,sourceHandleId:F.sourceHandle,targetHandleId:F.targetHandle,markerEnd:F.markerEnd,markerStart:F.markerStart,sourceX:ge,sourceY:ue,targetX:xe,targetY:Ye,sourcePosition:J,targetPosition:X,elementsSelectable:S,onEdgeUpdate:s,onContextMenu:a,onMouseEnter:l,onMouseMove:u,onMouseLeave:c,onClick:d,edgeUpdaterRadius:f,onEdgeDoubleClick:h,onEdgeUpdateStart:m,onEdgeUpdateEnd:v,rfId:r,ariaLabel:F.ariaLabel,isFocusable:te,isUpdatable:oe,pathOptions:"pathOptions"in F?F.pathOptions:void 0,interactionWidth:F.interactionWidth},F.id)})})]},b)),E]}):null};jv.displayName="EdgeRenderer";var _x=N.memo(jv);const wx=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Rx({children:e}){const t=le(wx);return y("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}function Nx(e){const t=Ed(),n=N.useRef(!1);N.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Ox={[G.Left]:G.Right,[G.Right]:G.Left,[G.Top]:G.Bottom,[G.Bottom]:G.Top},Yv=({nodeId:e,handleType:t,style:n,type:r=zn.Bezier,CustomComponent:o,connectionStatus:i})=>{var R,C,A;const{fromNode:s,handleId:a,toX:l,toY:u,connectionMode:c}=le(N.useCallback(B=>({fromNode:B.nodeInternals.get(e),handleId:B.connectionHandleId,toX:(B.connectionPosition.x-B.transform[0])/B.transform[2],toY:(B.connectionPosition.y-B.transform[1])/B.transform[2],connectionMode:B.connectionMode}),[e]),Je),d=(R=s==null?void 0:s[_e])==null?void 0:R.handleBounds;let f=d==null?void 0:d[t];if(c===$n.Loose&&(f=f||(d==null?void 0:d[t==="source"?"target":"source"])),!s||!f)return null;const h=a?f.find(B=>B.id===a):f[0],m=h?h.x+h.width/2:(s.width??0)/2,v=h?h.y+h.height/2:s.height??0,E=(((C=s.positionAbsolute)==null?void 0:C.x)??0)+m,p=(((A=s.positionAbsolute)==null?void 0:A.y)??0)+v,g=h==null?void 0:h.position,S=g?Ox[g]:null;if(!g||!S)return null;if(o)return y(o,{connectionLineType:r,connectionLineStyle:n,fromNode:s,fromHandle:h,fromX:E,fromY:p,toX:l,toY:u,fromPosition:g,toPosition:S,connectionStatus:i});let _="";const w={sourceX:E,sourceY:p,sourcePosition:g,targetX:l,targetY:u,targetPosition:S};return r===zn.Bezier?[_]=Xm(w):r===zn.Step?[_]=Hi({...w,borderRadius:0}):r===zn.SmoothStep?[_]=Hi(w):r===zn.SimpleBezier?[_]=Gm(w):_=`M${E},${p} ${l},${u}`,y("path",{d:_,fill:"none",className:"react-flow__connection-path",style:n})};Yv.displayName="ConnectionLine";const xx=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function Tx({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:i,nodesConnectable:s,width:a,height:l,connectionStatus:u}=le(xx,Je);return!(o&&i&&a&&s)?null:y("svg",{style:e,width:a,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container",children:y("g",{className:Ze(["react-flow__connection",u]),children:y(Yv,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u})})})}const Gv=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:s,onEdgeClick:a,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:m,onSelectionStart:v,onSelectionEnd:E,connectionLineType:p,connectionLineStyle:g,connectionLineComponent:S,connectionLineContainerStyle:_,selectionKeyCode:w,selectionOnDrag:R,selectionMode:C,multiSelectionKeyCode:A,panActivationKeyCode:B,zoomActivationKeyCode:b,deleteKeyCode:V,onlyRenderVisibleElements:$,elementsSelectable:F,selectNodesOnDrag:O,defaultViewport:P,translateExtent:D,minZoom:I,maxZoom:T,preventScrolling:k,defaultMarkerColor:U,zoomOnScroll:z,zoomOnPinch:j,panOnScroll:K,panOnScrollSpeed:W,panOnScrollMode:J,zoomOnDoubleClick:X,panOnDrag:te,onPaneClick:oe,onPaneMouseEnter:ge,onPaneMouseMove:ue,onPaneMouseLeave:xe,onPaneScroll:Ye,onPaneContextMenu:ft,onEdgeUpdate:me,onEdgeContextMenu:de,onEdgeMouseEnter:tt,onEdgeMouseMove:Q,onEdgeMouseLeave:Jn,edgeUpdaterRadius:Tr,onEdgeUpdateStart:as,onEdgeUpdateEnd:ls,noDragClassName:ko,noWheelClassName:Cr,noPanClassName:er,elevateEdgesOnSelect:Po,disableKeyboardA11y:tr,nodeOrigin:br,nodeExtent:us,rfId:Mo})=>(Nx(i),y(ax,{onPaneClick:oe,onPaneMouseEnter:ge,onPaneMouseMove:ue,onPaneMouseLeave:xe,onPaneContextMenu:ft,onPaneScroll:Ye,deleteKeyCode:V,selectionKeyCode:w,selectionOnDrag:R,selectionMode:C,onSelectionStart:v,onSelectionEnd:E,multiSelectionKeyCode:A,panActivationKeyCode:B,zoomActivationKeyCode:b,elementsSelectable:F,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:z,zoomOnPinch:j,zoomOnDoubleClick:X,panOnScroll:K,panOnScrollSpeed:W,panOnScrollMode:J,panOnDrag:te,defaultViewport:P,translateExtent:D,minZoom:I,maxZoom:T,onSelectionContextMenu:m,preventScrolling:k,noDragClassName:ko,noWheelClassName:Cr,noPanClassName:er,disableKeyboardA11y:tr,children:M(Rx,{children:[y(_x,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:u,onEdgeUpdate:me,onlyRenderVisibleElements:$,onEdgeContextMenu:de,onEdgeMouseEnter:tt,onEdgeMouseMove:Q,onEdgeMouseLeave:Jn,onEdgeUpdateStart:as,onEdgeUpdateEnd:ls,edgeUpdaterRadius:Tr,defaultMarkerColor:U,noPanClassName:er,elevateEdgesOnSelect:!!Po,disableKeyboardA11y:tr,rfId:Mo,children:y(Tx,{style:g,type:p,component:S,containerStyle:_})}),y("div",{className:"react-flow__edgelabel-renderer"}),y(cx,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:d,onNodeMouseLeave:f,onNodeContextMenu:h,selectNodesOnDrag:O,onlyRenderVisibleElements:$,noPanClassName:er,noDragClassName:ko,disableKeyboardA11y:tr,nodeOrigin:br,nodeExtent:us,rfId:Mo})]})}));Gv.displayName="GraphView";var Cx=N.memo(Gv);const Rd=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],jn={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:Rd,nodeExtent:Rd,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:$n.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:rO,isValidConnection:void 0},bx=()=>Vg((e,t)=>({...jn,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:yd(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n<"u",i=typeof r<"u",s=o?yd(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:s,fitViewOnInitOptions:a,domNode:l,nodeOrigin:u}=t(),c=l==null?void 0:l.querySelector(".react-flow__viewport");if(!c)return;const d=window.getComputedStyle(c),{m22:f}=new window.DOMMatrixReadOnly(d.transform),h=n.reduce((v,E)=>{const p=o.get(E.id);if(p){const g=rd(E.nodeElement);!!(g.width&&g.height&&(p.width!==g.width||p.height!==g.height||E.forceUpdate))&&(o.set(p.id,{...p,[_e]:{...p[_e],handleBounds:{source:Tv(".source",E.nodeElement,f,u),target:Tv(".target",E.nodeElement,f,u)}},...g}),v.push({id:p.id,type:"dimensions",dimensions:g}))}return v},[]);Dv(o,u);const m=s||i&&!s&&kv(t,{initial:!0,...a});e({nodeInternals:new Map(o),fitViewOnInitDone:m}),(h==null?void 0:h.length)>0&&(r==null||r(h))},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:i}=t(),s=n.map(a=>{const l={id:a.id,type:"position",dragging:o};return r&&(l.positionAbsolute=a.positionAbsolute,l.position=a.position),l});i(s)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:s,getNodes:a,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(i){const u=Fv(n,a()),c=yd(u,o,s,l);e({nodeInternals:c})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let s,a=null;r?s=n.map(l=>Hn(l,!0)):(s=bo(i(),n),a=bo(o,[])),Ja({changedNodes:s,changedEdges:a,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let s,a=null;r?s=n.map(l=>Hn(l,!0)):(s=bo(o,n),a=bo(i(),[])),Ja({changedNodes:a,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),s=n||i(),a=r||o,l=s.map(c=>(c.selected=!1,Hn(c.id,!1))),u=a.map(c=>Hn(c.id,!1));Ja({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r==null||r.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r==null||r.scaleExtent([o,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(),i=r().filter(a=>a.selected).map(a=>Hn(a.id,!1)),s=n.filter(a=>a.selected).map(a=>Hn(a.id,!1));Ja({changedNodes:i,changedEdges:s,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=od(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:i,d3Zoom:s,d3Selection:a,translateExtent:l}=t();if(!s||!a||!n.x&&!n.y)return;const u=Fn.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[o,i]],d=s==null?void 0:s.constrain()(u,c,l);s.transform(a,d)},cancelConnection:()=>e({connectionNodeId:jn.connectionNodeId,connectionHandleId:jn.connectionHandleId,connectionHandleType:jn.connectionHandleType,connectionStatus:jn.connectionStatus,connectionStartHandle:jn.connectionStartHandle,connectionEndHandle:jn.connectionEndHandle}),reset:()=>e({...jn})})),Wv=({children:e})=>{const t=N.useRef(null);return t.current||(t.current=bx()),y(QN,{value:t.current,children:e})};Wv.displayName="ReactFlowProvider";const Kv=({children:e})=>N.useContext(Ka)?y(Ee,{children:e}):y(Wv,{children:e});Kv.displayName="ReactFlowWrapper";function Qv(e,t){return N.useRef(null),N.useMemo(()=>t(e),[e])}const Ix={input:fv,default:pd,output:hv,group:hd},Ax={default:qa,straight:ud,step:ld,smoothstep:Qa,simplebezier:ad},Lx=[0,0],Dx=[15,15],kx={x:0,y:0,zoom:1},Px={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Xv=N.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=Ix,edgeTypes:s=Ax,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:m,onConnectEnd:v,onClickConnectStart:E,onClickConnectEnd:p,onNodeMouseEnter:g,onNodeMouseMove:S,onNodeMouseLeave:_,onNodeContextMenu:w,onNodeDoubleClick:R,onNodeDragStart:C,onNodeDrag:A,onNodeDragStop:B,onNodesDelete:b,onEdgesDelete:V,onSelectionChange:$,onSelectionDragStart:F,onSelectionDrag:O,onSelectionDragStop:P,onSelectionContextMenu:D,onSelectionStart:I,onSelectionEnd:T,connectionMode:k=$n.Strict,connectionLineType:U=zn.Bezier,connectionLineStyle:z,connectionLineComponent:j,connectionLineContainerStyle:K,deleteKeyCode:W="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:X=!1,selectionMode:te=$i.Full,panActivationKeyCode:oe="Space",multiSelectionKeyCode:ge="Meta",zoomActivationKeyCode:ue="Meta",snapToGrid:xe=!1,snapGrid:Ye=Dx,onlyRenderVisibleElements:ft=!1,selectNodesOnDrag:me=!0,nodesDraggable:de,nodesConnectable:tt,nodesFocusable:Q,nodeOrigin:Jn=Lx,edgesFocusable:Tr,edgesUpdatable:as,elementsSelectable:ls,defaultViewport:ko=kx,minZoom:Cr=.5,maxZoom:er=2,translateExtent:Po=Rd,preventScrolling:tr=!0,nodeExtent:br,defaultMarkerColor:us="#b1b1b7",zoomOnScroll:Mo=!0,zoomOnPinch:nt=!0,panOnScroll:Ut=!1,panOnScrollSpeed:Ir=.5,panOnScrollMode:Ar=_o.Free,zoomOnDoubleClick:Lr=!0,panOnDrag:yl=!0,onPaneClick:Dr,onPaneMouseEnter:df,onPaneMouseMove:ff,onPaneMouseLeave:cs,onPaneScroll:pf,onPaneContextMenu:K0,children:kr,onEdgeUpdate:BA,onEdgeContextMenu:$A,onEdgeDoubleClick:zA,onEdgeMouseEnter:HA,onEdgeMouseMove:jA,onEdgeMouseLeave:YA,onEdgeUpdateStart:GA,onEdgeUpdateEnd:WA,edgeUpdaterRadius:KA=10,onNodesChange:QA,onEdgesChange:XA,noDragClassName:qA="nodrag",noWheelClassName:ZA="nowheel",noPanClassName:Q0="nopan",fitView:JA=!1,fitViewOptions:eL,connectOnClick:tL=!0,attributionPosition:nL,proOptions:rL,defaultEdgeOptions:oL,elevateNodesOnSelect:iL=!0,elevateEdgesOnSelect:sL=!1,disableKeyboardA11y:X0=!1,autoPanOnConnect:aL=!0,autoPanOnNodeDrag:lL=!0,connectionRadius:uL=20,isValidConnection:cL,onError:dL,style:fL,id:q0,...pL},hL)=>{const gL=Qv(i,BO),mL=Qv(s,PO),hf=q0||"1";return y("div",{...pL,style:{...fL,...Px},ref:hL,className:Ze(["react-flow",o]),"data-testid":"rf__wrapper",id:q0,children:M(Kv,{children:[y(Cx,{onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:g,onNodeMouseMove:S,onNodeMouseLeave:_,onNodeContextMenu:w,onNodeDoubleClick:R,nodeTypes:gL,edgeTypes:mL,connectionLineType:U,connectionLineStyle:z,connectionLineComponent:j,connectionLineContainerStyle:K,selectionKeyCode:J,selectionOnDrag:X,selectionMode:te,deleteKeyCode:W,multiSelectionKeyCode:ge,panActivationKeyCode:oe,zoomActivationKeyCode:ue,onlyRenderVisibleElements:ft,selectNodesOnDrag:me,defaultViewport:ko,translateExtent:Po,minZoom:Cr,maxZoom:er,preventScrolling:tr,zoomOnScroll:Mo,zoomOnPinch:nt,zoomOnDoubleClick:Lr,panOnScroll:Ut,panOnScrollSpeed:Ir,panOnScrollMode:Ar,panOnDrag:yl,onPaneClick:Dr,onPaneMouseEnter:df,onPaneMouseMove:ff,onPaneMouseLeave:cs,onPaneScroll:pf,onPaneContextMenu:K0,onSelectionContextMenu:D,onSelectionStart:I,onSelectionEnd:T,onEdgeUpdate:BA,onEdgeContextMenu:$A,onEdgeDoubleClick:zA,onEdgeMouseEnter:HA,onEdgeMouseMove:jA,onEdgeMouseLeave:YA,onEdgeUpdateStart:GA,onEdgeUpdateEnd:WA,edgeUpdaterRadius:KA,defaultMarkerColor:us,noDragClassName:qA,noWheelClassName:ZA,noPanClassName:Q0,elevateEdgesOnSelect:sL,rfId:hf,disableKeyboardA11y:X0,nodeOrigin:Jn,nodeExtent:br}),y(xO,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:m,onConnectEnd:v,onClickConnectStart:E,onClickConnectEnd:p,nodesDraggable:de,nodesConnectable:tt,nodesFocusable:Q,edgesFocusable:Tr,edgesUpdatable:as,elementsSelectable:ls,elevateNodesOnSelect:iL,minZoom:Cr,maxZoom:er,nodeExtent:br,onNodesChange:QA,onEdgesChange:XA,snapToGrid:xe,snapGrid:Ye,connectionMode:k,translateExtent:Po,connectOnClick:tL,defaultEdgeOptions:oL,fitView:JA,fitViewOptions:eL,onNodesDelete:b,onEdgesDelete:V,onNodeDragStart:C,onNodeDrag:A,onNodeDragStop:B,onSelectionDrag:O,onSelectionDragStart:F,onSelectionDragStop:P,noPanClassName:Q0,nodeOrigin:Jn,rfId:hf,autoPanOnConnect:aL,autoPanOnNodeDrag:lL,onError:dL,connectionRadius:uL,isValidConnection:cL}),y(NO,{onSelectionChange:$}),kr,y(qN,{proOptions:rL,position:nL}),y(AO,{rfId:hf,disableKeyboardA11y:X0})]})})});Xv.displayName="ReactFlow";function Mx(){const e=Oe();return N.useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),o=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${t}"]`);o&&requestAnimationFrame(()=>r([{id:t,nodeElement:o,forceUpdate:!0}]))},[])}const Ux=e=>t=>t.nodeInternals.size===0?!1:t.getNodes().filter(n=>e.includeHiddenNodes?!0:!n.hidden).every(n=>{var r;return((r=n[_e])==null?void 0:r.handleBounds)!==void 0}),Fx={includeHiddenNodes:!1};function Vx(e=Fx){return le(Ux(e))}function Bx(){return y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function $x(){return y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y("path",{d:"M0 0h32v4.2H0z"})})}function zx(){return y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Hx(){return y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function jx(){return y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}const Io=({children:e,className:t,...n})=>y("button",{type:"button",className:Ze(["react-flow__controls-button",t]),...n,children:e});Io.displayName="ControlButton";const Yx=e=>e.nodesDraggable&&e.nodesConnectable&&e.elementsSelectable,qv=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:a,onInteractiveChange:l,className:u,children:c,position:d="bottom-left"})=>{const f=Oe(),[h,m]=N.useState(!1),v=le(Yx),{zoomIn:E,zoomOut:p,fitView:g}=Ed();if(N.useEffect(()=>{m(!0)},[]),!h)return null;const S=()=>{E(),i==null||i()},_=()=>{p(),s==null||s()},w=()=>{g(o),a==null||a()},R=()=>{f.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),l==null||l(!v)};return M(nd,{className:Ze(["react-flow__controls",u]),position:d,style:e,"data-testid":"rf__controls",children:[t&&M(Ee,{children:[y(Io,{onClick:S,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",children:y(Bx,{})}),y(Io,{onClick:_,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",children:y($x,{})})]}),n&&y(Io,{className:"react-flow__controls-fitview",onClick:w,title:"fit view","aria-label":"fit view",children:y(zx,{})}),r&&y(Io,{className:"react-flow__controls-interactive",onClick:R,title:"toggle interactivity","aria-label":"toggle interactivity",children:v?y(jx,{}):y(Hx,{})}),c]})};qv.displayName="Controls";var Gx=N.memo(qv);const Wx=!1,Zv="0.0.0",Jv="0.0.0",ey="sw/nodeType",ty=640,ny={type:"floating",markerEnd:{type:zi.Arrow,width:20,height:20,color:"#c2c8d1"},style:{stroke:"#c2c8d1",strokeWidth:1.5}},Kx="422",Qx="404";let Xx=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const we=()=>Xx(),qx=()=>{const e={},t=document.querySelector('meta[name="csrf-token"]');return t&&(e["X-CSRF-Token"]=t==null?void 0:t.content),e},Zx=(e,t)=>{var i;const n=new Blob([JSON.stringify({nodes:e,edges:t},null,2)],{type:"application/json"}),r=window.URL.createObjectURL(n),o=window.open();(i=o==null?void 0:o.location)!=null&&i.href&&(o.location.href=r)},Jx=e=>e.map(t=>typeof t=="string"?t.trim():t).filter(Boolean).join(),Nd=e=>e.split(",").map(t=>t.trim()).filter(Boolean),eT=e=>({...e,...ny}),tT=e=>e.type==="handleCall"?{...e,deletable:!1}:e,ry=e=>e==="success"?"positive":"negative",nT=e=>e.toLowerCase().replace(/ /g,"-"),Od=()=>[{result:"success",id:we()},{result:"noAnswer",id:we()},{result:"busy",id:we()},{result:"decline",id:we()},{result:"error",id:we()}],oy={answer:()=>({}),forwardAddress:()=>({destinations:[],destinationType:"address",options:Od(),sessionTimeout:void 0,type:"single"}),forwardPhone:()=>({destinations:[],destinationType:"phone",options:Od(),sessionTimeout:void 0,type:"single"}),forwardResource:()=>({destinations:[],destinationType:"resource",options:Od(),sessionTimeout:void 0,type:"single"}),hangup:()=>({}),play:()=>({selected:"",text:"",url:""}),promptPlay:()=>({initialTimeout:5,options:[],results:[{id:we(),result:"no_match"},{id:we(),result:"no_input"}],selected:"",text:"",url:""}),record:()=>({beep:!1,format:"wav",stereo:!1,terminators:""}),recordCallStart:()=>({beep:!1,controlId:we(),format:"wav",label:"",stereo:!1,terminators:""}),recordCallStop:()=>({controlId:""}),sendSms:()=>({body:"",fromNumber:"",media:[],region:"",tags:[],toNumber:""}),set:()=>({variables:[]}),unset:()=>({variables:[]}),request:()=>({url:"",method:"POST",headers:{},body:"",options:[{id:we(),result:"success"},{id:we(),result:"failed"}]}),cond:()=>({options:[],fallback:we()}),condRequest:()=>({body:"",error:we(),fallback:we(),headers:{},method:"POST",options:[],url:""})};function kt(e){return kt=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},kt(e)}function _t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rT(e,t){if(kt(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(kt(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iy(e){var t=rT(e,"string");return kt(t)==="symbol"?t:String(t)}function sy(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,iy(r.key),r)}}function wt(e,t,n){return t&&sy(e.prototype,t),n&&sy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xd(e,t){return xd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},xd(e,t)}function el(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xd(e,t)}function Wi(e,t){if(t&&(kt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yn(e)}function Gt(e){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gt(e)}function pn(e,t,n){return t=iy(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oT(e){if(Array.isArray(e))return e}function iT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ay(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 sT(e,t){if(e){if(typeof e=="string")return ay(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 ay(e,t)}}function aT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lT(e){return oT(e)||iT(e)||sT(e)||aT()}function ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ly(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var uT={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},cT=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_t(this,e),this.init(t,n)}return wt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||uT,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,i){return i&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,uy(uy({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Wt=new cT,Gn=function(){function e(){_t(this,e),this.observers={}}return wt(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(this.observers[n]){var s=[].concat(this.observers[n]);s.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function Ki(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function cy(e){return e==null?"":""+e}function dT(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Td(e,t,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var s=r(i.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function dy(e,t,n){var r=Td(e,t,Object),o=r.obj,i=r.k;o[i]=n}function fT(e,t,n,r){var o=Td(e,t,Object),i=o.obj,s=o.k;i[s]=i[s]||[],r&&(i[s]=i[s].concat(n)),r||i[s].push(n)}function tl(e,t){var n=Td(e,t),r=n.obj,o=n.k;if(r)return r[o]}function fy(e,t,n){var r=tl(e,n);return r!==void 0?r:tl(t,n)}function py(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):py(e[r],t[r],n):e[r]=t[r]);return e}function Ao(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pT={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function hT(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return pT[t]}):e}var nl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,gT=[" ",",","?","!",";"];function mT(e,t,n){t=t||"",n=n||"";var r=gT.filter(function(a){return t.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),i=!o.test(e);if(!i){var s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}function hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hy(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vT(e){var t=yT();return function(){var r=Gt(e),o;if(t){var i=Gt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Wi(this,o)}}function yT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gy(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o||typeof o[r[i]]=="string"&&i+1<r.length)return;if(o[r[i]]===void 0){for(var s=2,a=r.slice(i,i+s).join(n),l=o[a];l===void 0&&r.length>i+s;)s++,a=r.slice(i,i+s).join(n),l=o[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]}var u=r.slice(i+s).join(n);return u?gy(l,u,n):void 0}o=o[r[i]]}return o}}var ET=function(e){el(n,e);var t=vT(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return _t(this,n),o=t.call(this),nl&&Gn.call(Yn(o)),o.data=r||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return wt(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[o,i];s&&typeof s!="string"&&(c=c.concat(s)),s&&typeof s=="string"&&(c=c.concat(l?s.split(l):s)),o.indexOf(".")>-1&&(c=o.split("."));var d=tl(this.data,c);return d||!u||typeof s!="string"?d:gy(this.data&&this.data[o]&&this.data[o][i],s,l)}},{key:"addResource",value:function(o,i,s,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var c=[o,i];s&&(c=c.concat(u?s.split(u):s)),o.indexOf(".")>-1&&(c=o.split("."),a=i,i=c[1]),this.addNamespaces(i),dy(this.data,c,a),l.silent||this.emit("added",o,i,s,a)}},{key:"addResources",value:function(o,i,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in s)(typeof s[l]=="string"||Object.prototype.toString.apply(s[l])==="[object Array]")&&this.addResource(o,i,l,s[l],{silent:!0});a.silent||this.emit("added",o,i,s)}},{key:"addResourceBundle",value:function(o,i,s,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[o,i];o.indexOf(".")>-1&&(c=o.split("."),a=s,s=i,i=c[1]),this.addNamespaces(i);var d=tl(this.data,c)||{};a?py(d,s,l):d=rl(rl({},d),s),dy(this.data,c,d),u.silent||this.emit("added",o,i,s)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?rl(rl({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),s=i&&Object.keys(i)||[];return!!s.find(function(a){return i[a]&&Object.keys(i[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Gn),my={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,i){var s=this;return t.forEach(function(a){s.processors[a]&&(n=s.processors[a].process(n,r,o,i))}),n}};function vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vy(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ST(e){var t=_T();return function(){var r=Gt(e),o;if(t){var i=Gt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Wi(this,o)}}function _T(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var yy={},Ey=function(e){el(n,e);var t=ST(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _t(this,n),o=t.call(this),nl&&Gn.call(Yn(o)),dT(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Yn(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Wt.create("translator"),o}return wt(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var s=this.resolve(o,i);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(o,i){var s=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=s&&o.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!mT(o,s,a);if(u&&!c){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var f=o.split(s);(s!==a||s===a&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),o=f.join(a)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,s){var a=this;if(kt(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,c=this.extractFromKey(o[o.length-1],i),d=c.key,f=c.namespaces,h=f[f.length-1],m=i.lng||this.language,v=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(m&&m.toLowerCase()==="cimode"){if(v){var E=i.nsSeparator||this.options.nsSeparator;return l?{res:"".concat(h).concat(E).concat(d),usedKey:d,exactUsedKey:d,usedLng:m,usedNS:h}:"".concat(h).concat(E).concat(d)}return l?{res:d,usedKey:d,exactUsedKey:d,usedLng:m,usedNS:h}:d}var p=this.resolve(o,i),g=p&&p.res,S=p&&p.usedKey||d,_=p&&p.exactUsedKey||d,w=Object.prototype.toString.apply(g),R=["[object Number]","[object Function]","[object RegExp]"],C=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,B=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(A&&g&&B&&R.indexOf(w)<0&&!(typeof C=="string"&&w==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,g,He(He({},i),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(p.res=b,p):b}if(u){var V=w==="[object Array]",$=V?[]:{},F=V?_:S;for(var O in g)if(Object.prototype.hasOwnProperty.call(g,O)){var P="".concat(F).concat(u).concat(O);$[O]=this.translate(P,He(He({},i),{joinArrays:!1,ns:f})),$[O]===P&&($[O]=g[O])}g=$}}else if(A&&typeof C=="string"&&w==="[object Array]")g=g.join(C),g&&(g=this.extendTranslation(g,o,i,s));else{var D=!1,I=!1,T=i.count!==void 0&&typeof i.count!="string",k=n.hasDefaultValue(i),U=T?this.pluralResolver.getSuffix(m,i.count,i):"",z=i["defaultValue".concat(U)]||i.defaultValue;!this.isValidLookup(g)&&k&&(D=!0,g=z),this.isValidLookup(g)||(I=!0,g=d);var j=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,K=j&&I?void 0:g,W=k&&z!==g&&this.options.updateMissing;if(I||D||W){if(this.logger.log(W?"updateKey":"missingKey",m,h,d,W?z:g),u){var J=this.resolve(d,He(He({},i),{},{keySeparator:!1}));J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var X=[],te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&te&&te[0])for(var oe=0;oe<te.length;oe++)X.push(te[oe]);else this.options.saveMissingTo==="all"?X=this.languageUtils.toResolveHierarchy(i.lng||this.language):X.push(i.lng||this.language);var ge=function(xe,Ye,ft){var me=k&&ft!==g?ft:K;a.options.missingKeyHandler?a.options.missingKeyHandler(xe,h,Ye,me,W,i):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(xe,h,Ye,me,W,i),a.emit("missingKey",xe,h,Ye,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?X.forEach(function(ue){a.pluralResolver.getSuffixes(ue,i).forEach(function(xe){ge([ue],d+xe,i["defaultValue".concat(xe)]||z)})}):ge(X,d,z))}g=this.extendTranslation(g,o,i,p,s),I&&g===d&&this.options.appendNamespaceToMissingKey&&(g="".concat(h,":").concat(d)),(I||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,D?g:void 0):g=this.options.parseMissingKeyHandler(g))}return l?(p.res=g,p):g}},{key:"extendTranslation",value:function(o,i,s,a,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,He(He({},this.options.interpolation.defaultVariables),s),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(He(He({},s),{interpolation:He(He({},this.options.interpolation),s.interpolation)}));var c=typeof o=="string"&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(c){var f=o.match(this.interpolator.nestingRegexp);d=f&&f.length}var h=s.replace&&typeof s.replace!="string"?s.replace:s;if(this.options.interpolation.defaultVariables&&(h=He(He({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,s.lng||this.language,s),c){var m=o.match(this.interpolator.nestingRegexp),v=m&&m.length;d<v&&(s.nest=!1)}s.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var g=arguments.length,S=new Array(g),_=0;_<g;_++)S[_]=arguments[_];return l&&l[0]===S[0]&&!s.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(S[0]," in key: ").concat(i[0])),null):u.translate.apply(u,S.concat([i]))},s)),s.interpolation&&this.interpolator.reset()}var E=s.postProcess||this.options.postProcess,p=typeof E=="string"?[E]:E;return o!=null&&p&&p.length&&s.applyPostProcessor!==!1&&(o=my.handle(p,o,i,this.options&&this.options.postProcessPassResolved?He({i18nResolved:a},s):s,this)),o}},{key:"resolve",value:function(o){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,l,u,c,d;return typeof o=="string"&&(o=[o]),o.forEach(function(f){if(!i.isValidLookup(a)){var h=i.extractFromKey(f,s),m=h.key;l=m;var v=h.namespaces;i.options.fallbackNS&&(v=v.concat(i.options.fallbackNS));var E=s.count!==void 0&&typeof s.count!="string",p=E&&!s.ordinal&&s.count===0&&i.pluralResolver.shouldUseIntlApi(),g=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",S=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);v.forEach(function(_){i.isValidLookup(a)||(d=_,!yy["".concat(S[0],"-").concat(_)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(d)&&(yy["".concat(S[0],"-").concat(_)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(S.join(", "),`" won't get resolved as namespace "`).concat(d,'" 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!!!")),S.forEach(function(w){if(!i.isValidLookup(a)){c=w;var R=[m];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(R,m,w,_,s);else{var C;E&&(C=i.pluralResolver.getSuffix(w,s.count,s));var A="".concat(i.options.pluralSeparator,"zero");if(E&&(R.push(m+C),p&&R.push(m+A)),g){var B="".concat(m).concat(i.options.contextSeparator).concat(s.context);R.push(B),E&&(R.push(B+C),p&&R.push(B+A))}}for(var b;b=R.pop();)i.isValidLookup(a)||(u=b,a=i.getResource(w,_,b,s))}}))})}}),{res:a,usedKey:l,exactUsedKey:u,usedLng:c,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,s,a):this.resourceStore.getResource(o,i,s,a)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var s in o)if(Object.prototype.hasOwnProperty.call(o,s)&&i===s.substring(0,i.length)&&o[s]!==void 0)return!0;return!1}}]),n}(Gn);function Cd(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Sy=function(){function e(t){_t(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wt.create("languageUtils")}return wt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Cd(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Cd(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Cd(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(i){if(!o){var s=r.formatLanguageCode(i);(!r.options.supportedLngs||r.isSupportedCode(s))&&(o=s)}}),!o&&this.options.supportedLngs&&n.forEach(function(i){if(!o){var s=r.getLanguagePartFromCode(i);if(r.isSupportedCode(s))return o=s;o=r.options.supportedLngs.find(function(a){if(a.indexOf(s)===0)return a})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],a=function(u){u&&(o.isSupportedCode(u)?s.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),i.forEach(function(l){s.indexOf(l)<0&&a(o.formatLanguageCode(l))}),s}}]),e}(),wT=[{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}],RT={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},NT=["v1","v2","v3"],_y={zero:0,one:1,two:2,few:3,many:4,other:5};function OT(){var e={};return wT.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:RT[t.fc]}})}),e}var xT=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_t(this,e),this.languageUtils=t,this.options=n,this.logger=Wt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=OT()}return wt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(i){return"".concat(r).concat(i)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(s,a){return _y[s]-_y[a]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):i.numbers.map(function(s){return r.getSuffix(n,s,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(n,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(r)):this.getSuffixRetroCompatible(i,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,i=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[i];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var a=function(){return o.options.prepend&&s.toString()?o.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!NT.includes(this.options.compatibilityJSON)}}]),e}();function wy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var TT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_t(this,e),this.logger=Wt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return wt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:hT,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Ao(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Ao(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Ao(r.nestingPrefix):r.nestingPrefixEscaped||Ao("$t("),this.nestingSuffix=r.nestingSuffix?Ao(r.nestingSuffix):r.nestingSuffixEscaped||Ao(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,i){var s=this,a,l,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(E){return E.replace(/\$/g,"$$$$")}var f=function(p){if(p.indexOf(s.formatSeparator)<0){var g=fy(r,c,p);return s.alwaysFormat?s.format(g,void 0,o,Pt(Pt(Pt({},i),r),{},{interpolationkey:p})):g}var S=p.split(s.formatSeparator),_=S.shift().trim(),w=S.join(s.formatSeparator).trim();return s.format(fy(r,c,_),w,o,Pt(Pt(Pt({},i),r),{},{interpolationkey:_}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,m=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(p){return d(p)}},{regex:this.regexp,safeValue:function(p){return s.escapeValue?d(s.escape(p)):d(p)}}];return v.forEach(function(E){for(u=0;a=E.regex.exec(n);){var p=a[1].trim();if(l=f(p),l===void 0)if(typeof h=="function"){var g=h(n,a,i);l=typeof g=="string"?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))l="";else if(m){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(p," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=cy(l));var S=E.safeValue(l);if(n=n.replace(a[0],S),m?(E.regex.lastIndex+=l.length,E.regex.lastIndex-=a[0].length):E.regex.lastIndex=0,u++,u>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,l;function u(h,m){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var E=h.split(new RegExp("".concat(v,"[ ]*{"))),p="{".concat(E[1]);h=E[0],p=this.interpolate(p,l);var g=p.match(/'/g),S=p.match(/"/g);(g&&g.length%2===0&&!S||S.length%2!==0)&&(p=p.replace(/'/g,'"'));try{l=JSON.parse(p),m&&(l=Pt(Pt({},m),l))}catch(_){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),_),"".concat(h).concat(v).concat(p)}return delete l.defaultValue,h}for(;s=this.nestingRegexp.exec(n);){var c=[];l=Pt({},i),l=l.replace&&typeof l.replace!="string"?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;var d=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var f=s[1].split(this.formatSeparator).map(function(h){return h.trim()});s[1]=f.shift(),c=f,d=!0}if(a=r(u.call(this,s[1].trim(),l),l),a&&s[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=cy(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),d&&(a=c.reduce(function(h,m){return o.format(h,m,i.lng,Pt(Pt({},i),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),e}();function Ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ry(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CT(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var i=o.split(";");i.forEach(function(s){if(s){var a=s.split(":"),l=lT(a),u=l[0],c=l.slice(1),d=c.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=d),d==="false"&&(n[u.trim()]=!1),d==="true"&&(n[u.trim()]=!0),isNaN(d)||(n[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function Lo(e){var t={};return function(r,o,i){var s=o+JSON.stringify(i),a=t[s];return a||(a=e(o,i),t[s]=a),a(r)}}var bT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_t(this,e),this.logger=Wt.create("formatter"),this.options=t,this.formats={number:Lo(function(n,r){var o=new Intl.NumberFormat(n,hn({},r));return function(i){return o.format(i)}}),currency:Lo(function(n,r){var o=new Intl.NumberFormat(n,hn(hn({},r),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:Lo(function(n,r){var o=new Intl.DateTimeFormat(n,hn({},r));return function(i){return o.format(i)}}),relativetime:Lo(function(n,r){var o=new Intl.RelativeTimeFormat(n,hn({},r));return function(i){return o.format(i,r.range||"day")}}),list:Lo(function(n,r){var o=new Intl.ListFormat(n,hn({},r));return function(i){return o.format(i)}})},this.init(t)}return wt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Lo(r)}},{key:"format",value:function(n,r,o){var i=this,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r.split(this.formatSeparator),l=a.reduce(function(u,c){var d=CT(c),f=d.formatName,h=d.formatOptions;if(i.formats[f]){var m=u;try{var v=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},E=v.locale||v.lng||s.locale||s.lng||o;m=i.formats[f](u,E,hn(hn(hn({},h),s),v))}catch(p){i.logger.warn(p)}return m}else i.logger.warn("there was no format function for ".concat(f));return u},n);return l}}]),e}();function Ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ny(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ny(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IT(e){var t=AT();return function(){var r=Gt(e),o;if(t){var i=Gt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Wi(this,o)}}function AT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function LT(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var DT=function(e){el(n,e);var t=IT(n);function n(r,o,i){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return _t(this,n),s=t.call(this),nl&&Gn.call(Yn(s)),s.backend=r,s.store=o,s.services=i,s.languageUtils=i.languageUtils,s.options=a,s.logger=Wt.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(i,a.backend,a),s}return wt(n,[{key:"queueLoad",value:function(o,i,s,a){var l=this,u={},c={},d={},f={};return o.forEach(function(h){var m=!0;i.forEach(function(v){var E="".concat(h,"|").concat(v);!s.reload&&l.store.hasResourceBundle(h,v)?l.state[E]=2:l.state[E]<0||(l.state[E]===1?c[E]===void 0&&(c[E]=!0):(l.state[E]=1,m=!1,c[E]===void 0&&(c[E]=!0),u[E]===void 0&&(u[E]=!0),f[v]===void 0&&(f[v]=!0)))}),m||(d[h]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(o,i,s){var a=o.split("|"),l=a[0],u=a[1];i&&this.emit("failedLoading",l,u,i),s&&this.store.addResourceBundle(l,u,s),this.state[o]=i?-1:2;var c={};this.queue.forEach(function(d){fT(d.loaded,[l],u),LT(d,o),i&&d.errors.push(i),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){c[f]||(c[f]={});var h=d.loaded[f];h.length&&h.forEach(function(m){c[f][m]===void 0&&(c[f][m]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,i,s){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!o.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:s,tried:l,wait:u,callback:c});return}this.readingCalls++;var d=function(v,E){if(a.readingCalls--,a.waitingReads.length>0){var p=a.waitingReads.shift();a.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(v&&E&&l<a.maxRetries){setTimeout(function(){a.read.call(a,o,i,s,l+1,u*2,c)},u);return}c(v,E)},f=this.backend[s].bind(this.backend);if(f.length===2){try{var h=f(o,i);h&&typeof h.then=="function"?h.then(function(m){return d(null,m)}).catch(d):d(null,h)}catch(m){d(m)}return}return f(o,i,d)}},{key:"prepareLoading",value:function(o,i){var s=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(c){s.loadOne(c)})}},{key:"load",value:function(o,i,s){this.prepareLoading(o,i,{},s)}},{key:"reload",value:function(o,i,s){this.prepareLoading(o,i,{reload:!0},s)}},{key:"loadOne",value:function(o){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=o.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,function(c,d){c&&i.logger.warn("".concat(s,"loading namespace ").concat(u," for language ").concat(l," failed"),c),!c&&d&&i.logger.log("".concat(s,"loaded namespace ").concat(u," for language ").concat(l),d),i.loaded(o,c,d)})}},{key:"saveMissing",value:function(o,i,s,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend&&this.backend.create){var d=Oy(Oy({},u),{},{isUpdate:l}),f=this.backend.create.bind(this.backend);if(f.length<6)try{var h;f.length===5?h=f(o,i,s,a,d):h=f(o,i,s,a),h&&typeof h.then=="function"?h.then(function(m){return c(null,m)}).catch(c):c(null,h)}catch(m){c(m)}else f(o,i,s,a,c,d)}!o||!o[0]||this.store.addResource(o[0],i,s,a)}}}]),n}(Gn);function xy(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(kt(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),kt(t[2])==="object"||kt(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ty(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 Cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cy(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kT(e){var t=PT();return function(){var r=Gt(e),o;if(t){var i=Gt(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Wi(this,o)}}function PT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ol(){}function MT(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var il=function(e){el(n,e);var t=kT(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(_t(this,n),r=t.call(this),nl&&Gn.call(Yn(r)),r.options=Ty(o),r.services={},r.logger=Wt,r.modules={external:[]},MT(Yn(r)),i&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,i),Wi(r,Yn(r));setTimeout(function(){r.init(o,i)},0)}return r}return wt(n,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(s=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var a=xy();this.options=Kt(Kt(Kt({},a),this.options),Ty(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Kt(Kt({},a.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Wt.init(l(this.modules.logger),this.options):Wt.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=bT);var c=new Sy(this.options);this.store=new ET(this.options.resources,this.options);var d=this.services;d.logger=Wt,d.resourceStore=this.store,d.languageUtils=c,d.pluralResolver=new xT(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new TT(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new DT(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var g=arguments.length,S=new Array(g>1?g-1:0),_=1;_<g;_++)S[_-1]=arguments[_];o.emit.apply(o,[p].concat(S))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Ey(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,S=new Array(g>1?g-1:0),_=1;_<g;_++)S[_-1]=arguments[_];o.emit.apply(o,[p].concat(S))}),this.modules.external.forEach(function(p){p.init&&p.init(o)})}if(this.format=this.options.interpolation.format,s||(s=ol),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(p){o[p]=function(){var g;return(g=o.store)[p].apply(g,arguments)}});var m=["addResource","addResources","addResourceBundle","removeResourceBundle"];m.forEach(function(p){o[p]=function(){var g;return(g=o.store)[p].apply(g,arguments),o}});var v=Ki(),E=function(){var g=function(_,w){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),v.resolve(w),s(_,w)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return g(null,o.t.bind(o));o.changeLanguage(o.options.lng,g)};return this.options.resources||!this.options.initImmediate?E():setTimeout(E,0),v}},{key:"loadResources",value:function(o){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ol,a=s,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(a=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var u=[],c=function(h){if(h){var m=i.services.languageUtils.toResolveHierarchy(h);m.forEach(function(v){u.indexOf(v)<0&&u.push(v)})}};if(l)c(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return c(f)})}this.options.preload&&this.options.preload.forEach(function(f){return c(f)}),this.services.backendConnector.load(u,this.options.ns,function(f){!f&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),a(f)})}else a(null)}},{key:"reloadResources",value:function(o,i,s){var a=Ki();return o||(o=this.languages),i||(i=this.options.ns),s||(s=ol),this.services.backendConnector.reload(o,i,function(l){a.resolve(),s(l)}),a}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&my.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var s=this.languages[i];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(o,i){var s=this;this.isLanguageChangingTo=o;var a=Ki();this.emit("languageChanging",o);var l=function(f){s.language=f,s.languages=s.services.languageUtils.toResolveHierarchy(f),s.resolvedLanguage=void 0,s.setResolvedLanguage(f)},u=function(f,h){h?(l(h),s.translator.changeLanguage(h),s.isLanguageChangingTo=void 0,s.emit("languageChanged",h),s.logger.log("languageChanged",h)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),i&&i(f,function(){return s.t.apply(s,arguments)})},c=function(f){!o&&!f&&s.services.languageDetector&&(f=[]);var h=typeof f=="string"?f:s.services.languageUtils.getBestMatchFromCodes(f);h&&(s.language||l(h),s.translator.language||s.translator.changeLanguage(h),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage&&s.services.languageDetector.cacheUserLanguage(h)),s.loadResources(h,function(m){u(m,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(o),a}},{key:"getFixedT",value:function(o,i,s){var a=this,l=function u(c,d){var f;if(kt(d)!=="object"){for(var h=arguments.length,m=new Array(h>2?h-2:0),v=2;v<h;v++)m[v-2]=arguments[v];f=a.options.overloadTranslationOptionHandler([c,d].concat(m))}else f=Kt({},d);f.lng=f.lng||u.lng,f.lngs=f.lngs||u.lngs,f.ns=f.ns||u.ns,f.keyPrefix=f.keyPrefix||s||u.keyPrefix;var E=a.options.keySeparator||".",p;return f.keyPrefix&&Array.isArray(c)?p=c.map(function(g){return"".concat(f.keyPrefix).concat(E).concat(g)}):p=f.keyPrefix?"".concat(f.keyPrefix).concat(E).concat(c):c,a.t(p,f)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=s,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var c=function(h,m){var v=i.services.backendConnector.state["".concat(h,"|").concat(m)];return v===-1||v===2};if(s.precheck){var d=s.precheck(this,c);if(d!==void 0)return d}return!!(this.hasResourceBundle(a,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,o)&&(!l||c(u,o)))}},{key:"loadNamespaces",value:function(o,i){var s=this,a=Ki();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),i&&i(l)}),a):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var s=Ki();typeof o=="string"&&(o=[o]);var a=this.options.preload||[],l=o.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){s.resolve(),i&&i(u)}),s):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["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"],s=this.services&&this.services.languageUtils||new Sy(xy());return i.indexOf(s.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ol,a=Kt(Kt(Kt({},this.options),i),{isClone:!0}),l=new n(a);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(c){l[c]=o[c]}),l.services=Kt({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Ey(l.services,l.options),l.translator.on("*",function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),h=1;h<d;h++)f[h-1]=arguments[h];l.emit.apply(l,[c].concat(f))}),l.init(a,s),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Gn);pn(il,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new il(e,t)});var be=il.createInstance();be.createInstance=il.createInstance,be.createInstance,be.dir,be.init,be.loadResources,be.reloadResources,be.use,be.changeLanguage,be.getFixedT,be.t,be.exists,be.setDefaultNamespace,be.hasLoadedNamespace,be.loadNamespaces,be.loadLanguages;var by=[],UT=by.forEach,FT=by.slice;function VT(e){return UT.call(FT.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var Iy=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,BT=function(t,n,r){var o=r||{};o.path=o.path||"/";var i=encodeURIComponent(n),s="".concat(t,"=").concat(i);if(o.maxAge>0){var a=o.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(o.domain){if(!Iy.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(o.domain)}if(o.path){if(!Iy.test(o.path))throw new TypeError("option path is invalid");s+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(s+="; HttpOnly"),o.secure&&(s+="; Secure"),o.sameSite){var l=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Ay={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=BT(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(n)===0)return i.substring(n.length,i.length)}return null},remove:function(t){this.create(t,"",-1)}},$T={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=Ay.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&Ay.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},zT={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),s=0;s<i.length;s++){var a=i[s].indexOf("=");if(a>0){var l=i[s].substring(0,a);l===t.lookupQuerystring&&(n=i[s].substring(a+1))}}}return n}},Qi=null,Ly=function(){if(Qi!==null)return Qi;try{Qi=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Qi=!1}return Qi},HT={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&Ly()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&Ly()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Xi=null,Dy=function(){if(Xi!==null)return Xi;try{Xi=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Xi=!1}return Xi},jT={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&Dy()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&Dy()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},YT={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},GT={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},WT={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},KT={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function QT(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var ky=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_t(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return wt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=VT(r,this.options||{},QT()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector($T),this.addDetector(zT),this.addDetector(HT),this.addDetector(jT),this.addDetector(YT),this.addDetector(GT),this.addDetector(WT),this.addDetector(KT)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var s=r.detectors[i].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(o=o.concat(s))}}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();ky.type="languageDetector";var XT=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,qT={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ZT=function(t){return qT[t]},JT=function(t){return t.replace(XT,ZT)};function Py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function My(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Py(Object(n),!0).forEach(function(r){pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Py(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Uy={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:JT};function eC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Uy=My(My({},Uy),e)}var tC={type:"3rdParty",init:function(t){eC(t.options.react)}};N.createContext(),function(){function e(){_t(this,e),this.usedNamespaces={}}return wt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();const nC={ABOUT:"About",ACTION:"Action",ADD_CONDITION:"Add Condition",ADD_OPTION:"Add Option",ADD_VARIABLE:"Add Variable",ANSWER_CALL:"Answer Call",API_VERSION:"API Version",APP_VERSION:"App Version",BEEP_SUBTITLE:"Play a beep before recording",BEEP:"Beep",BUILDER_VERSION:"Builder Version",BUSY:"Busy",CALL_ADDRESSES:"Call Addresses",CALL_NUMBERS:"Call Numbers",CALL_RESOURCES:"Call Resources",CALLER_PRESSES:"Caller Presses",CHOOSE_OPTION_SINGLE_MULTIPLE:"Choose single or multiple",CHOOSE_OPTION_TTS_AUDIO:"Choose how to play the message",CLOSE:"Close",COND_NUMBER:"Cond {{index}}",CONDITION_NUMBER:"Condition {{index}}",CONDITIONS:"Conditions",DECISION:"Decision",DECLINE:"Decline",DEPRECATED:"Deprecated",DISCONNECT_CALL_AFTER_RINGING:"Disconnect call after ringing",DOCUMENT_OUT_OF_SYNC:"Document Out of Sync",ELSE:"Else",ENTER_URL:"Enter URL",ERROR_ADD_RECORDING_FIRST:"Please add a Start Call Recording node first.",ERROR_DUPLICATE_RECORDING_LABEL:"This entry already exists. Please use a unique label.",ERROR_DUPLICATE_VARIABLE_KEY:"This variable already exists. Please use a unique key.",ERROR_INVALID_JSON:"Invalid JSON",ERROR_NUMBER_IS_REQUIRED:"A number is required.",ERROR_NUMBER_MIN_MAX_IS_REQUIRED:"A number between {{min}} and {{max}} is required.",ERROR_RECORDING_LABEL_REQUIRED:"A value is required. Maximum 20 characters.",ERROR_TELEPHONE_KEY_REQUIRED:"A value of 0-9, *, or # is required.",ERROR_TERMINATORS:"This value should contain only 0-9, *, or #.",ERROR_TEXT_IS_REQUIRED:"A text value is required.",ERROR_URL_IS_REQUIRED:"A valid URL is required.",ERROR_VALUE_IS_REQUIRED:"A value is required.",ERROR_VARIABLE_KEY_REQUIRED:"Valid characters are lowercase letters, digits, or underscore. Maximum 20 characters.",ERROR:"Error",FAILED:"Failed",FAILURE:"Failure",FORMAT:"Format",FORWARD_TO_ADDRESS:"Forward to Address",FORWARD_TO_PHONE:"Forward to Phone",FORWARD_TO_RESOURCE:"Forward to Resource",FORWARD:"Forward",FROM_PHONE_NUMBER:"From Phone Number",FROM:"From",GATHER_INPUT:"Gather Input",GO_BACK:"Go Back",HANDLE_CALL:"Handle Call",HANG_UP_CALL:"Hang Up Call",HANG_UP:"Hang Up",IGNORE:"Ignore",INFO_DEPLOY:"Deploy the latest changes for the current call flow.",INFO_NODE_COND:"Sets branching (when, then, else) based on the specified JavaScript condition.",INFO_NODE_FORWARD_TO_ADDRESS:"Forwards the current call to the specified Address as defined within your SignalWire space.",INFO_NODE_FORWARD_TO_PHONE:"Forwards the current call to the specified phone number (must be E.164 format).",INFO_NODE_FORWARD_TO_RESOURCE:"Forwards the current call to the specified Resource as defined within your SignalWire space.",INFO_NODE_GATHER_INPUT:"Plays an audio file or Text to Speech phrase and waits for a keypress or spoken input from the caller, allowing them to proceed through the call flow based on their input.",INFO_NODE_HANG_UP:"Ends the call with the ability to provide a reason (hangup, busy, or decline).",INFO_NODE_OPTION_REMOVE:"Are you sure? Removing this option will delete the flow connection and move back the following option, if there is one.",INFO_NODE_PLAY:"Plays an audio file or Text to Speech phrase. A valid URL must be provided for the audio file to be played. Text to Speech will read aloud the provided text using the voice option that is selected.",INFO_NODE_RECORD_CALL_START:"Triggers background recording of both sides of the call. Options can be set to enable stereo audio, play a notification beep before recording, set a digit to stop recording (terminator), and specify the recording name and format (WAV or MP3).",INFO_NODE_RECORD_CALL_STOP:"Triggers a background call recording to stop at a specific point in the call flow, if it has not already been terminated.",INFO_NODE_RECORD:"Triggers foreground recording of both sides of the call and waits for the recording to end. Options can be set to enable stereo audio, play a notification beep before recording, set a digit to stop recording (terminator), and specify the recording name and format (WAV or MP3).",INFO_NODE_REQUEST:"Makes an HTTP request (GET/POST/PUT/DELETE HTTP) to the specified URL. Responses can be parsed and stored as variables for further use in your flow.",INFO_NODE_SEND_SMS:"Sends an SMS message to the specified phone number. The 'From' phone number must be enabled for messaging (a 10DLC number assigned to an active TCR campaign or a verified toll free number).",INFO_NODE_SET_VARIABLES_OPTION:"Are you sure you want to remove this variable?",INFO_NODE_SET_VARIABLES:"Sets script variables by accepting an object which maps variable names to values.",INFO_NODE_UNSET_VARIABLES:"Unsets script variables.",INFO_STATUS_ERROR_OUT_OF_SYNC:"This document is locked because another user has made updates to the Call Flow. Refresh the page to discard your changes and unlock the flow with the latest updates.",INFO_STATUS_ERROR:"An error occurred while loading or saving the flow.",INPUT:"Input",KEY:"Key",METHOD:"Method",MORE_INFO_DEPLOY_ERROR:"There was an error deploying the Call Flow. Please try again. {{message}}",MORE_INFO_DEPLOY:"Deploying a Call Flow makes it live.",MORE_INFO_STATUS_ERROR:"More info on Flow document error",MORE_INFO_TITLE:"More info {{title}}",MULTIPLE_ADDRESSES:"Multiple Addresses",MULTIPLE_NUMBERS:"Multiple Numbers",MULTIPLE_RESOURCES:"Multiple Resources",NAVIGATE_BACK:"Navigate Back",NO_ANSWER:"No Answer",NO_INPUT:"No Input",NO_VARIABLES_SET:"Please set variables first",NUMBER_OF_VARIABLES_SELECTED_one:"{{count}} variable selected",NUMBER_OF_VARIABLES_SELECTED_other:"{{count}} variables selected",OFF:"Off",ON:"On",OPT_NUMBER:"Opt {{index}}",OPTION_NUMBER:"Option {{index}}",OPTIONAL:"optional",OR_SAYS:"Or says",PHONE_NUMBER:"Phone Number",PLAY_AUDIO_FILE:"Play Audio File",PLAY_AUDIO_TTS:"Play Audio or TTS",REASON:"Reason",RECORD_CALL_START:"Start Call Recording",RECORD_CALL_STOP:"Stop Call Recording",RECORD:"Record",RECORDING_NAME_DEFAULT:"Recording {{index}}",RECORDING_NAME:"Recording Name",RECORDING:"Recording",RELAYML_VERSION:"SWML Version",REMOVE_CONDITION:"Remove Condition {{index}}",REMOVE_EDGE:"Remove Edge",REMOVE_NODE:"Remove Node {{title}}",REMOVE_OPTION:"Remove Option {{index}}",REMOVE_VARIABLE:"Remove Variable {{index}}",REQUEST_BODY:"Body",REQUEST_HEADERS:"Headers (JSON)",REQUEST:"Request",RESYNC:"Resync",SAVE_VARIABLES_SUBTITLE:"Store the response as variables",SAVE_VARIABLES:"Save Variables",SECONDS:"seconds",SELECT_VARIABLES_TO_UNSET:"Select Variables to Unset",SELECT_VARIABLES:"Select Variables",SELECT:"Select",SEND_SMS:"Send SMS",SEQUENTIALLY:"Sequentially",SET_VARIABLES:"Set Variables",SETTINGS:"Settings",SIMULTANEOUSLY:"Simultaneously",SINGLE_ADDRESS:"Single Address",SINGLE_NUMBER:"Single Number",SINGLE_RESOURCE:"Single Resource",SMS_TEXT:"SMS Text",STATUS_DEPLOY_ERROR:"Deploy Error",STATUS_DEPLOY:"Deploy",STATUS_DEPLOYED:"Deployed",STATUS_DEPLOYING:"Deploying...",STATUS_ERROR:"Error",STATUS_LOADING:"Loading...",STATUS_LOCKED:"Locked",STATUS_SAVED:"Saved",STATUS_SAVING:"Saving...",STEREO_SUBTITLE:"Enable stereo audio",STEREO:"Stereo",SUCCESS:"Success",TERMINATORS:"Terminators",TEXT_TO_SPEECH:"Text to Speech",TEXT:"Text",TO_PHONE_NUMBER:"To Phone Number",TO:"To",TOAST_DOCUMENT_OUT_OF_SYNC:'Updates have been made to this Call Flow by another user and your recent changes have not been saved. Choose "Ignore" to view your changes in a locked state or "Resync" to abandon your changes and adopt the latest updates.',UNKNOWN:"Unknown",UNSET_VARIABLES:"Unset Variables",URL:"URL",VALUE:"Value",VARIABLE_KEY:"Variable {{key}}",VOICEMAIL_RECORDING:"Voicemail Recording",WAIT_FOR_INPUT:"Wait for Input",WRITE_SOMETHING:"Write something"},x={ABOUT:"ABOUT",ACTION:"ACTION",ADD_CONDITION:"ADD_CONDITION",ADD_OPTION:"ADD_OPTION",ADD_VARIABLE:"ADD_VARIABLE",ANSWER_CALL:"ANSWER_CALL",API_VERSION:"API_VERSION",APP_VERSION:"APP_VERSION",BEEP_SUBTITLE:"BEEP_SUBTITLE",BEEP:"BEEP",BUILDER_VERSION:"BUILDER_VERSION",BUSY:"BUSY",CALL_ADDRESSES:"CALL_ADDRESSES",CALL_NUMBERS:"CALL_NUMBERS",CALL_RESOURCES:"CALL_RESOURCES",CALLER_PRESSES:"CALLER_PRESSES",CHOOSE_OPTION_SINGLE_MULTIPLE:"CHOOSE_OPTION_SINGLE_MULTIPLE",CHOOSE_OPTION_TTS_AUDIO:"CHOOSE_OPTION_TTS_AUDIO",CLOSE:"CLOSE",COND_NUMBER:"COND_NUMBER",CONDITION_NUMBER:"CONDITION_NUMBER",CONDITIONS:"CONDITIONS",DECISION:"DECISION",DECLINE:"DECLINE",DEPRECATED:"DEPRECATED",DISCONNECT_CALL_AFTER_RINGING:"DISCONNECT_CALL_AFTER_RINGING",DOCUMENT_OUT_OF_SYNC:"DOCUMENT_OUT_OF_SYNC",ELSE:"ELSE",ENTER_URL:"ENTER_URL",ERROR_ADD_RECORDING_FIRST:"ERROR_ADD_RECORDING_FIRST",ERROR_DUPLICATE_RECORDING_LABEL:"ERROR_DUPLICATE_RECORDING_LABEL",ERROR_DUPLICATE_VARIABLE_KEY:"ERROR_DUPLICATE_VARIABLE_KEY",ERROR_INVALID_JSON:"ERROR_INVALID_JSON",ERROR_NUMBER_IS_REQUIRED:"ERROR_NUMBER_IS_REQUIRED",ERROR_NUMBER_MIN_MAX_IS_REQUIRED:"ERROR_NUMBER_MIN_MAX_IS_REQUIRED",ERROR_RECORDING_LABEL_REQUIRED:"ERROR_RECORDING_LABEL_REQUIRED",ERROR_TELEPHONE_KEY_REQUIRED:"ERROR_TELEPHONE_KEY_REQUIRED",ERROR_TERMINATORS:"ERROR_TERMINATORS",ERROR_TEXT_IS_REQUIRED:"ERROR_TEXT_IS_REQUIRED",ERROR_URL_IS_REQUIRED:"ERROR_URL_IS_REQUIRED",ERROR_VALUE_IS_REQUIRED:"ERROR_VALUE_IS_REQUIRED",ERROR_VARIABLE_KEY_REQUIRED:"ERROR_VARIABLE_KEY_REQUIRED",ERROR:"ERROR",FAILED:"FAILED",FAILURE:"FAILURE",FORMAT:"FORMAT",FORWARD_TO_ADDRESS:"FORWARD_TO_ADDRESS",FORWARD_TO_PHONE:"FORWARD_TO_PHONE",FORWARD_TO_RESOURCE:"FORWARD_TO_RESOURCE",FORWARD:"FORWARD",FROM_PHONE_NUMBER:"FROM_PHONE_NUMBER",FROM:"FROM",GATHER_INPUT:"GATHER_INPUT",GO_BACK:"GO_BACK",HANDLE_CALL:"HANDLE_CALL",HANG_UP_CALL:"HANG_UP_CALL",HANG_UP:"HANG_UP",IGNORE:"IGNORE",INFO_DEPLOY:"INFO_DEPLOY",INFO_NODE_COND:"INFO_NODE_COND",INFO_NODE_FORWARD_TO_ADDRESS:"INFO_NODE_FORWARD_TO_ADDRESS",INFO_NODE_FORWARD_TO_PHONE:"INFO_NODE_FORWARD_TO_PHONE",INFO_NODE_FORWARD_TO_RESOURCE:"INFO_NODE_FORWARD_TO_RESOURCE",INFO_NODE_GATHER_INPUT:"INFO_NODE_GATHER_INPUT",INFO_NODE_HANG_UP:"INFO_NODE_HANG_UP",INFO_NODE_OPTION_REMOVE:"INFO_NODE_OPTION_REMOVE",INFO_NODE_PLAY:"INFO_NODE_PLAY",INFO_NODE_RECORD_CALL_START:"INFO_NODE_RECORD_CALL_START",INFO_NODE_RECORD_CALL_STOP:"INFO_NODE_RECORD_CALL_STOP",INFO_NODE_RECORD:"INFO_NODE_RECORD",INFO_NODE_REQUEST:"INFO_NODE_REQUEST",INFO_NODE_SEND_SMS:"INFO_NODE_SEND_SMS",INFO_NODE_SET_VARIABLES_OPTION:"INFO_NODE_SET_VARIABLES_OPTION",INFO_NODE_SET_VARIABLES:"INFO_NODE_SET_VARIABLES",INFO_NODE_UNSET_VARIABLES:"INFO_NODE_UNSET_VARIABLES",INFO_STATUS_ERROR_OUT_OF_SYNC:"INFO_STATUS_ERROR_OUT_OF_SYNC",INFO_STATUS_ERROR:"INFO_STATUS_ERROR",INPUT:"INPUT",KEY:"KEY",METHOD:"METHOD",MORE_INFO_DEPLOY_ERROR:"MORE_INFO_DEPLOY_ERROR",MORE_INFO_DEPLOY:"MORE_INFO_DEPLOY",MORE_INFO_STATUS_ERROR:"MORE_INFO_STATUS_ERROR",MORE_INFO_TITLE:"MORE_INFO_TITLE",MULTIPLE_ADDRESSES:"MULTIPLE_ADDRESSES",MULTIPLE_NUMBERS:"MULTIPLE_NUMBERS",MULTIPLE_RESOURCES:"MULTIPLE_RESOURCES",NAVIGATE_BACK:"NAVIGATE_BACK",NO_ANSWER:"NO_ANSWER",NO_INPUT:"NO_INPUT",NO_VARIABLES_SET:"NO_VARIABLES_SET",NUMBER_OF_VARIABLES_SELECTED:"NUMBER_OF_VARIABLES_SELECTED",OFF:"OFF",ON:"ON",OPT_NUMBER:"OPT_NUMBER",OPTION_NUMBER:"OPTION_NUMBER",OPTIONAL:"OPTIONAL",OR_SAYS:"OR_SAYS",PHONE_NUMBER:"PHONE_NUMBER",PLAY_AUDIO_FILE:"PLAY_AUDIO_FILE",PLAY_AUDIO_TTS:"PLAY_AUDIO_TTS",REASON:"REASON",RECORD_CALL_START:"RECORD_CALL_START",RECORD_CALL_STOP:"RECORD_CALL_STOP",RECORD:"RECORD",RECORDING_NAME_DEFAULT:"RECORDING_NAME_DEFAULT",RECORDING_NAME:"RECORDING_NAME",RECORDING:"RECORDING",RELAYML_VERSION:"RELAYML_VERSION",REMOVE_CONDITION:"REMOVE_CONDITION",REMOVE_EDGE:"REMOVE_EDGE",REMOVE_NODE:"REMOVE_NODE",REMOVE_OPTION:"REMOVE_OPTION",REMOVE_VARIABLE:"REMOVE_VARIABLE",REQUEST_BODY:"REQUEST_BODY",REQUEST_HEADERS:"REQUEST_HEADERS",REQUEST:"REQUEST",RESYNC:"RESYNC",SAVE_VARIABLES_SUBTITLE:"SAVE_VARIABLES_SUBTITLE",SAVE_VARIABLES:"SAVE_VARIABLES",SECONDS:"SECONDS",SELECT_VARIABLES_TO_UNSET:"SELECT_VARIABLES_TO_UNSET",SELECT_VARIABLES:"SELECT_VARIABLES",SELECT:"SELECT",SEND_SMS:"SEND_SMS",SEQUENTIALLY:"SEQUENTIALLY",SET_VARIABLES:"SET_VARIABLES",SETTINGS:"SETTINGS",SIMULTANEOUSLY:"SIMULTANEOUSLY",SINGLE_ADDRESS:"SINGLE_ADDRESS",SINGLE_NUMBER:"SINGLE_NUMBER",SINGLE_RESOURCE:"SINGLE_RESOURCE",SMS_TEXT:"SMS_TEXT",STATUS_DEPLOY_ERROR:"STATUS_DEPLOY_ERROR",STATUS_DEPLOY:"STATUS_DEPLOY",STATUS_DEPLOYED:"STATUS_DEPLOYED",STATUS_DEPLOYING:"STATUS_DEPLOYING",STATUS_ERROR:"STATUS_ERROR",STATUS_LOADING:"STATUS_LOADING",STATUS_LOCKED:"STATUS_LOCKED",STATUS_SAVED:"STATUS_SAVED",STATUS_SAVING:"STATUS_SAVING",STEREO_SUBTITLE:"STEREO_SUBTITLE",STEREO:"STEREO",SUCCESS:"SUCCESS",TERMINATORS:"TERMINATORS",TEXT_TO_SPEECH:"TEXT_TO_SPEECH",TEXT:"TEXT",TO_PHONE_NUMBER:"TO_PHONE_NUMBER",TO:"TO",TOAST_DOCUMENT_OUT_OF_SYNC:"TOAST_DOCUMENT_OUT_OF_SYNC",UNKNOWN:"UNKNOWN",UNSET_VARIABLES:"UNSET_VARIABLES",URL:"URL",VALUE:"VALUE",VARIABLE_KEY:"VARIABLE_KEY",VOICEMAIL_RECORDING:"VOICEMAIL_RECORDING",WAIT_FOR_INPUT:"WAIT_FOR_INPUT",WRITE_SOMETHING:"WRITE_SOMETHING"},rC={order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag","path","subdomain"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage","cookie"],excludeCacheFor:["cimode"]},oC={"en-US":{translation:nC}},iC=()=>{be.use(ky).use(tC).init({debug:Wx,detection:rC,fallbackLng:"en-US",interpolation:{escapeValue:!1},keySeparator:!1,resources:oC})};function L(e,t){return t?be.t(e,t):be.t(e)}const sC={entries:[],nextLabelIndex:0},Wn=Ca((e,t)=>({...sC,getEntries(){return t().entries},getEntryValue(n){var r;return(r=t().entries.find(o=>o.controlId===n))==null?void 0:r.label},getGeneratedLabel(){let n="";do this.nextLabelIndex++,n=L(x.RECORDING_NAME_DEFAULT,{index:this.nextLabelIndex});while(this.isValueDuplicate(n));return n},isKeyDuplicate(n){return t().entries.some(r=>r.controlId===n)},isValueDuplicate(n,r){const o=t().entries.reduce((i,s)=>{const{label:a,controlId:l}=s;return a!==""&&a===n&&(!r||l!==r)?[...i,s]:i},[]);return Boolean(o.length)},removeEntry(n){e(r=>({entries:r.entries.filter(o=>o.controlId!==n)}))},upsertEntry:n=>{e(r=>{let o=[...r.entries];const i=Boolean(n.label.trim());return(r.isKeyDuplicate(n.controlId)||!i)&&(o=o.filter(s=>s.controlId!==n.controlId)),i&&o.push({...n}),{entries:o}})}})),aC=e=>{const t=[];e.forEach(n=>{n.type==="recordCallStart"&&n.data.controlId&&n.data.label&&t.push({controlId:n.data.controlId,label:n.data.label})}),Wn.setState({entries:t,nextLabelIndex:t.length})},lC=(e,t)=>{const n=[];return t.forEach(r=>{r.type==="recordCallStart"&&r.data.controlId&&(n.push(r.data.controlId),Wn.getState().removeEntry(r.data.controlId))}),n.length?e.reduce((r,o)=>o.type==="recordCallStop"&&n.includes(o.data.controlId)?[...r,{...o,data:{...o.data,controlId:"",missingRequiredParams:!0}}]:r,[]):[]},Fy={recordCallStart:e=>{const t=Wn.getState().getGeneratedLabel();return Wn.getState().upsertEntry({controlId:e.data.controlId,label:t}),{...e,data:{...e.data,label:t}}}},uC=e=>oy[e]!==void 0,cC=e=>typeof e=="object"&&e!==null&&Object.keys(e).length>0,dC=e=>Fy[e.type]!==void 0,Vy=(e,t={})=>{const{deletable:n=!0,position:r={x:300,y:250},selected:o=!0}=t,i=()=>({id:we(),type:e,position:r,deletable:n,data:{missingRequiredParams:!1},selected:o}),s=(l,u)=>({...l,data:{...l.data,...u,missingRequiredParams:!0}});let a=i();if(uC(e)){const l=oy[e]();cC(l)&&(a=s(a,l))}return dC(a)&&(a=Fy[a.type](a)),a},sl={apiVersion:void 0,builderVersion:Jv,cfbAppVersion:Zv,relayMLVersion:void 0},fC=e=>{const t={...sl,...e};sl.apiVersion=t.apiVersion,sl.builderVersion=t.builderVersion,sl.relayMLVersion=t.relayMLVersion},bd=()=>({apiVersion:void 0,builderVersion:Jv,cfbAppVersion:Zv,relayMLVersion:void 0}),By=1e3,Id=qe(),pC=e=>(t,n,r)=>{let o,i;const s=async()=>{const{httpService:a,nodes:l,edges:u,documentVersion:c}=n(),{builderVersion:d}=bd();Id.debug("Saving data to server"),t({dataHandlingStatus:"saving",saveFlowStatus:"saving"}),clearTimeout(i);try{if(!a)throw new Error("Missing httpService");const h={documentVersion:(await a.putFlow({documentVersion:c,builderVersion:d,nodes:l,edges:u})).document_version};switch(n().dataHandlingStatus){case"saving":t({...h,dataHandlingStatus:"queueing",saveFlowStatus:"saved"});break;case"holding":t({...h,saveFlowStatus:"awaiting-save"}),Id.debug("Setting up a new save for held changes"),i=setTimeout(()=>{s()},By);break;default:Id.debug("Saving data to server - invalid state")}}catch(f){console.error("Put Flow",f),f instanceof Error&&f.message.includes(Kx)?t({dataHandlingStatus:"holding",flowInteractive:!1,httpError:"document-sync",saveFlowStatus:"error"}):t({dataHandlingStatus:"queueing",saveFlowStatus:"error"})}};return r.setState=(a,l,...u)=>{const{dataHandlingStatus:c,initializing:d}=n(),f=typeof a=="function"?a(n()):a;!d&&(f.nodes||f.edges)?c==="queueing"?(f.saveFlowStatus="awaiting-save",t(f,l,...u),clearTimeout(o),o=setTimeout(()=>{s()},By)):(f.dataHandlingStatus="holding",t(f,l,...u)):"initializing"in f&&f.initializing!==d?(f.dataHandlingStatus="queueing",f.saveFlowStatus="saved",t(f,l,...u)):t(f,l,...u)},e(r.setState,n,r)},hC={variables:new Map,keyToIdMap:new Map},Sr=Ca((e,t)=>({...hC,_dedupeKey(n,r){const o=Array.from(r.values()).find(i=>i.key===n);o&&r.delete(o.id)},isKeyDuplicate(n,r){const o=t().keyToIdMap.get(n);return o?o!==r:!1},removeVariable(n){e(r=>{const o=new Map(r.variables),i=new Map(r.keyToIdMap),s=o.get(n);return s&&(o.delete(n),i.delete(s.key)),{keyToIdMap:i,variables:o}})},setVariables:n=>{e(()=>{const r=new Map,o=new Map;return n.forEach(i=>{const s=o.get(i.key);s&&r.delete(s),r.set(i.id,i),o.set(i.key,i.id)}),{keyToIdMap:o,variables:r}})},upsertVariable:n=>{e(r=>{const o=new Map(r.variables),i=new Map(r.keyToIdMap),s=o.get(n.id),a=i.get(n.key);return a&&o.delete(a),s&&i.delete(s.key),o.set(n.id,n),i.set(n.key,n.id),{keyToIdMap:i,variables:o}})}})),gC=e=>{const t=[];e.forEach(n=>{n.type==="set"&&n.data.variables&&t.push(...n.data.variables)}),Sr.getState().setVariables(t)},mC=e=>{if(e!=null&&e.length){const{removeVariable:t}=Sr.getState();e.forEach(n=>{n.type==="set"&&n.data.variables&&n.data.variables.forEach(o=>t(o.id))})}},Ie=qe(),vC=Vy("handleCall",{position:{x:300,y:100},deletable:!1}),qi={backButtonHref:void 0,colorMode:"light",dataHandlingStatus:"queueing",deployFlowURL:"",documentVersion:0,edges:[],flowId:"",flowInteractive:!0,flowTitle:"",getFlowURL:"",httpError:void 0,httpService:void 0,initializing:!0,isDraggingNode:!1,isEdgeConnecting:!1,isEdgeUpdateSuccessful:!1,nodes:[],reactFlowInstance:void 0,rootAppHeight:void 0,rootAppWidth:void 0,rootElementId:"",saveFlowStatus:"initial",selectedNode:void 0,updateFlowURL:"",updatingSourceHandleId:void 0},yC=(e,t)=>({...qi,reset:()=>{Ie.debug("Reset!"),e({nodes:[...qi.nodes],edges:[...qi.edges]})},exportStoreData:()=>{const{nodes:n,edges:r}=t();Zx(n,r)},addNode:({nodeType:n,x:r=150,y:o=150})=>{Ie.debug("Add Node",n);const{nodes:i,reactFlowInstance:s,flowInteractive:a}=t();if(!a){Ie.debug("Flow is not interactive, not adding node");return}if(!s)throw new Error("ReactFlowInstance not found");const l=Vy(n,{position:s.project({x:r,y:o})}),u=i.map(c=>({...c,selected:!1}));u.push(l),e({nodes:u,selectedNode:l})},getNodeEdges:n=>t().edges.filter(r=>r.source===n),getTargetEdges:n=>t().edges.filter(r=>r.target===n),partialUpdateNodeData:(n,r)=>{var s;if(Ie.debug("partialUpdateNodeData",n,r),!t().flowInteractive){Ie.debug("Flow is not interactive, not updating node data");return}const o=[],i=t().nodes.map(a=>{if(a.id===n){if("options"in r&&"options"in a.data){const l=a.data.options.map(c=>c.id),u=r.options.map(c=>c.id);o.push(...l.filter(c=>!u.includes(c)))}return{...a,data:{...a.data,...r}}}return a});if(o.length){const a=t().edges.filter(l=>l.sourceHandle&&o.includes(l.sourceHandle));Ie.debug("Remove orphaned edges",{sourceHandleDeleted:o,edgesToDelete:a}),(s=t().reactFlowInstance)==null||s.deleteElements({edges:a})}e({nodes:i})},removeNode:n=>{Ie.debug("removeNode",n);const r=t().reactFlowInstance;r&&r.deleteElements({nodes:[{id:n}]})},removeEdge:n=>{Ie.debug("removeEdge",n);const r=t().reactFlowInstance;r&&r.deleteElements({edges:[{id:n}]})},onInit:async n=>{const{getFlowURL:r,updateFlowURL:o,deployFlowURL:i}=t();Ie.log("onInit",{getFlowURL:r,updateFlowURL:o});try{const s=Q_({getFlowURL:r,deployFlowURL:i,updateFlowURL:o,headers:qx()}),a=bd(),{id:l,title:u,document_version:c,flow_data:d}=await s.getFlow();let f=d;f||(f={apiVersion:a.apiVersion,builderVersion:a.builderVersion,relayMLVersion:a.relayMLVersion,edges:qi.edges,nodes:qi.nodes.concat([vC])}),e({httpService:s,reactFlowInstance:n,flowId:l,flowTitle:u,documentVersion:c,nodes:f.nodes.map(tT),edges:f.edges.map(eT)}),fC({apiVersion:f.apiVersion,builderVersion:f.builderVersion,relayMLVersion:f.relayMLVersion}),gC(f.nodes),aC(f.nodes)}catch(s){Ie.error("Could not load flow. URL:",r);let a="unknown";s instanceof Error&&s.message.includes(Qx)&&(a="not-found"),e({httpError:a})}},onNodeDragStart:()=>{e({isDraggingNode:!0})},onNodeDragStop:()=>{e({isDraggingNode:!1})},onNodesChange:n=>{e({nodes:Fv(n,t().nodes)})},onNodesDelete:n=>{Ie.debug("onNodesDelete"),mC(n),lC(t().nodes,n).forEach(o=>{q.getState().partialUpdateNodeData(o.id,o.data)})},onEdgesChange:n=>{e({edges:tx(n,t().edges)})},onEdgesDelete:n=>{Ie.debug("onEdgesDelete [noop]",n)},onConnect:n=>{Ie.debug("onConnect"),e({edges:Zm(n,t().edges)})},onConnectStart:()=>{Ie.debug("onConnectStart"),e({isEdgeConnecting:!0})},onConnectEnd:()=>{Ie.debug("onConnectEnd"),e({isEdgeConnecting:!1})},onEdgeUpdateStart:(n,r)=>{Ie.debug("onEdgeUpdateStart"),e({isEdgeUpdateSuccessful:!1,updatingSourceHandleId:r.sourceHandle??void 0})},onEdgeUpdate:(n,r)=>{Ie.debug("onEdgeUpdate"),e({edges:pO(n,r,t().edges),isEdgeUpdateSuccessful:!0})},onEdgeUpdateEnd:(n,r)=>{var o;Ie.debug("onEdgeUpdateEnd"),t().isEdgeUpdateSuccessful?e({isEdgeUpdateSuccessful:!0}):(o=t().reactFlowInstance)==null||o.deleteElements({edges:[{id:r.id}]}),e({updatingSourceHandleId:void 0})},onSelectionChange:({nodes:n})=>{e({selectedNode:n.find(r=>r.selected)})},setColorMode:n=>{e({colorMode:n})}}),q=Ca()(pC(yC));window.__useRFStore=q;const EC={"not-found":{title:"Call Flow not found",message:"Please ensure that the Call Flow exists and the URL is correct.",status:"404"},unknown:{title:"Unknown error",message:"An unknown error occurred. Please try again or go back.",status:""}},SC=({errorType:e})=>{const t=q(i=>i.backButtonHref),{title:n,message:r,status:o}=EC[e];return y("section",{className:"flex min-h-full w-full items-center justify-center bg-background px-6",children:M("div",{className:"text-center",children:[o&&y("p",{className:"text-2xl font-semibold text-foreground/50",children:o}),y("h1",{className:"mt-4 text-3xl font-bold tracking-tight text-foreground",children:n}),y("p",{className:"mt-6 leading-7 text-foreground",children:r}),t&&y("div",{className:"mt-8 flex items-center justify-center gap-x-6",children:y("a",{href:t,className:"rounded-md bg-foreground px-3.5 py-2.5 text-sm font-semibold text-background shadow-sm transition-colors hover:bg-foreground/80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground",children:L(x.GO_BACK)})})]})})},mk="";function _C({fromNode:e,fromPosition:t,fromX:n,fromY:r,toX:o,toY:i}){if(!e)return null;const[s]=Hi({borderRadius:20,sourceX:n,sourceY:r,sourcePosition:t,targetPosition:G.Top,targetX:o,targetY:i});return M("g",{children:[y("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:s}),y("circle",{cx:o,cy:i,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})}const Zi=40;function wC(e,t,n,r=0,o=!1){const{width:i,height:s,position:a}=n,l=i??0,u=s??0,c=l/2,d=u/2;if(o)return{tx:a.x,ty:a.y+d};const f=a.x+c,h=a.y+d,m=e,v=t,E=(m-f)/l-(v-h)/u,p=(m-f)/u+(v-h)/u,g=1/(Math.abs(E)+Math.abs(p)),S=g*E,_=g*p,w=c*(S+_)+f;return{tx:Math.min(Math.max(w,a.x+r),a.x+l-r),ty:a.y}}const RC=({isCircular:e,sourceX:t,labelX:n,sourceY:r,labelY:o})=>e?{x:t-Zi*1.5,y:r}:{x:n-Zi/2,y:o-Zi/2};function NC(e){const{id:t,source:n,target:r,sourcePosition:o,sourceX:i,sourceY:s}=e,a=q(p=>p.removeEdge),l=le(N.useCallback(p=>p.nodeInternals.get(n),[n])),u=le(N.useCallback(p=>p.nodeInternals.get(r),[r]));if(!l||!u)return null;const c=n===r,{tx:d,ty:f}=wC(i,s,u,20,c),[h,m,v]=Hi({borderRadius:20,sourceX:i,sourceY:s,sourcePosition:o,targetPosition:c?G.Left:G.Top,targetX:d,targetY:f}),E=(p,g)=>{p.stopPropagation(),a(g)};return M("g",{className:"group",children:[y(So,{path:h,...e}),y("foreignObject",{width:Zi,height:Zi,className:"hidden group-hover:block",requiredExtensions:"http://www.w3.org/1999/xhtml",...RC({isCircular:c,sourceX:i,labelX:m,sourceY:s,labelY:v}),children:y("div",{className:"h-10 w-10",children:M("button",{className:"flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-foreground/10 bg-backgroundAlt",onClick:p=>E(p,t),children:[y(Fe,{tag:"trash-can",className:"text-negative"}),y("span",{className:"sr-only",children:L(x.REMOVE_EDGE)})]})})})]})}var OC={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},xC={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},TC={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},CC={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},bC={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]},IC={prefix:"fas",iconName:"up-from-bracket",icon:[448,512,[],"e590","M73.9 134.1L196.7 11.3C203.9 4.1 213.8 0 224 0s20.1 4.1 27.3 11.3L374.1 134.1c6.4 6.4 9.9 15 9.9 24c0 18.7-15.2 33.9-33.9 33.9H288V320c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V192H97.9C79.2 192 64 176.8 64 158.1c0-9 3.6-17.6 9.9-24zM64 352v64c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V352c0-17.7 14.3-32 32-32s32 14.3 32 32v64c0 53-43 96-96 96H96c-53 0-96-43-96-96V352c0-17.7 14.3-32 32-32s32 14.3 32 32z"]};const AC={"arrow-left":TC,"circle-exclamation":xC,"circle-info":CC,"up-from-bracket":IC,"trash-can":OC,xmark:bC},Fe=N.forwardRef(function({className:t="",size:n="",tag:r},o){const i=AC[r];return i?y("svg",{"aria-hidden":"true","data-prefix":i.prefix,"data-icon":r,className:`svg-inline--fa fa-${r} ${n?`fa-${n}`:""} ${t}`,focusable:"false",ref:o,role:"img",viewBox:`0 0 ${i.icon[0]} ${i.icon[1]}`,xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:i.icon[4],fill:"currentColor"})}):(qe().debug(`Unknown icon: ${r}`),null)}),LC=({isSelected:e,nodeId:t,nodeTitle:n,showDelete:r})=>{const o=q(l=>l.removeNode),i=q(l=>l.isEdgeConnecting);return M("div",{className:"flex w-full items-center justify-between p-4",children:[y("h2",{className:`text-lg font-semibold leading-6 ${e?"text-primary":""}`,children:n}),r&&!i&&M("button",{className:"opacity-0 transition-opacity group-hover/node-wrapper:opacity-100",onClick:()=>{o(t)},children:[y(Fe,{tag:"trash-can",className:"text-negative"}),y("span",{className:"sr-only",children:L(x.REMOVE_NODE,{title:n})})]})]})},DC=({id:e,missingRequiredEntry:t})=>{const n=q(i=>i.getTargetEdges),[r,o]=N.useState(!1);return N.useEffect(()=>{const i=()=>n(e).length===0;o(i());const s=q.subscribe((a,l)=>{a.edges.length!==l.edges.length&&o(i()),a.nodes.length!==l.nodes.length&&o(i()),a.isEdgeUpdateSuccessful!==l.isEdgeUpdateSuccessful&&o(i())});return()=>s()},[e,n]),r||t?M("div",{className:"flex flex-col gap-y-6 px-4 pb-4 text-sm italic leading-4",children:[r&&y("p",{children:"Not Connected to Flow"}),t&&y("p",{children:"Missing Required Entry"})]}):null},kC=({id:e,isConnectable:t})=>{if(!e)throw new Error("TargetHandle: id is required");return y(Ro,{type:"target",id:`target-${e}`,position:G.Top,isConnectable:t,className:"mt-1 h-4 w-full rounded-none rounded-t-md border-none bg-primary opacity-0 transition-opacity hover:opacity-100"})},je=({children:e,id:t,isConnectable:n=!0,missingRequiredEntry:r,nodeTitle:o,selected:i,showDelete:s,showValidation:a=!0,target:l=!0})=>M("section",{className:`${i?"shadow-xl":""} group/node-wrapper min-w-[300px] rounded-lg border border-foreground/10 bg-background transition-[visibility]`,children:[l&&t&&y(kC,{id:t,isConnectable:n}),y(LC,{nodeId:t,isSelected:i,nodeTitle:o,showDelete:s}),a&&y(DC,{id:t,missingRequiredEntry:r??!1}),e]}),PC=({children:e,handleClick:t,...n})=>y("li",{role:"presentation",children:M("div",{className:"flex items-center gap-2 rounded-lg bg-secondary p-2 pr-1",role:"option","aria-selected":"true",tabIndex:0,children:[y("span",{className:"text-sm text-foreground",children:e}),M("button",{className:" px-1",onClick:t,onKeyDown:o=>{(o.key==="Backspace"||o.key==="Delete")&&(o.stopPropagation(),t==null||t())},type:"button",...n,children:[y("span",{className:"sr-only",children:"Remove"}),y(Fe,{tag:"xmark",size:"xs"})]})]})}),Kn=e=>y("div",{className:"relative after:absolute after:right-3 after:top-3 after:h-[7px] after:w-[7px] after:rotate-45 after:border-r after:border-b after:border-foreground after:content-['']",children:y("select",{className:"pr-8",...e,children:e.children})}),MC={disabled:"border-disabled cursor-not-allowed",negative:"border-negative hover:bg-negative",positive:"border-positive hover:bg-positive"},Qt=({color:e="positive",enabled:t=!0,id:n,isConnectable:r,position:o=G.Bottom,positionClasses:i="-bottom-2.5"})=>{if(!n)throw new Error("SourceHandle: id is required");const s=t?e:"disabled",a=q(f=>f.updatingSourceHandleId),c=!q(f=>f.edges.some(h=>h.sourceHandle===n))||a===n;return y("div",{className:`absolute top-auto left-1/2 h-5 w-5 -translate-x-1/2 rounded-full ${i} ${c&&r&&t?"":"nodrag cursor-not-allowed"}`,children:y(Ro,{className:`bottom-0 h-full w-full border-[3px] bg-background transition-colors ${MC[s]??""}`,id:n,isConnectable:c&&r&&t,position:o,type:"source"})})},Ji=({children:e})=>y("div",{className:"divide-foreground/10 flex w-full items-center divide-x",children:e}),gn=({color:e="positive",enabled:t=!0,id:n,isConnectable:r,optionText:o,position:i=G.Bottom,positionClasses:s="-bottom-2.5"})=>M("div",{className:"relative w-full min-w-[104px] whitespace-nowrap border-t border-foreground/10 py-4",children:[y("div",{className:"flex flex-col items-center justify-center",children:y("p",{className:`${t?"":"text-disabled"} min-h-[1rem] text-sm leading-4`,children:o})}),y(Qt,{color:e,enabled:t,id:n,isConnectable:r,position:i,positionClasses:s})]}),UC=({checked:e=!1,name:t,onClick:n})=>M("button",{name:t,onClick:n,type:"button",className:`${e?"bg-primary":"bg-secondary"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out`,role:"switch","aria-checked":e?"true":"false",children:[y("span",{className:"sr-only",children:L(e?x.ON:x.OFF)}),y("span",{className:`pointer-events-none inline-block h-5 w-5 ${e?"translate-x-5":"translate-x-0"} transform rounded-full bg-white shadow transition duration-200 ease-in-out`})]}),Ad=({checked:e,clickHandler:t,name:n,subtitle:r,title:o})=>M("div",{className:"mb-2 flex items-center justify-between",children:[M("div",{className:"flex flex-grow flex-col",children:[y("span",{className:"text-base font-medium leading-6 text-foreground",children:o}),r&&y("span",{className:"text-xs text-foreground/50",children:r})]}),y(UC,{checked:e,name:n,onClick:t})]}),_r=({errorText:e,label:t,name:n,onChange:r,required:o,valid:i,value:s,...a})=>M("label",{children:[y("span",{className:"sr-only",children:t}),y("textarea",{"aria-invalid":i?void 0:"true",className:`peer min-h-[77px] w-full resize-none ${i?"":"invalid"}`,inputMode:"text",minLength:1,name:n,onChange:r,required:o,value:s,...a}),y("p",{className:"requirements",role:"alert",children:e})]});/*!
|
|
822
62
|
* tabbable 6.1.1
|
|
823
63
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
824
|
-
*/var EI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],vp=EI.join(","),N1=typeof Element>"u",Fa=N1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fu=!N1&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},du=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},SI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},wI=function(t,n,r){if(du(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(vp));return n&&Fa.call(t,vp)&&o.unshift(t),o=o.filter(r),o},_I=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!du(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var c=Fa.call(a,vp);c&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!du(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&d){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},O1=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||SI(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},xI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},T1=function(t){return t.tagName==="INPUT"},RI=function(t){return T1(t)&&t.type==="hidden"},bI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},NI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},OI=function(t){if(!t.name)return!0;var n=t.form||fu(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=NI(o,t.form);return!i||i===t},TI=function(t){return T1(t)&&t.type==="radio"},AI=function(t){return TI(t)&&!OI(t)},kI=function(t){var n,r=t&&fu(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var u,c,f;r=fu(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},A1=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},CI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fa.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fa.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,u=fu(t);if(l&&!l.shadowRoot&&o(l)===!0)return A1(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(kI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return A1(t);return!1},II=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Fa.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},LI=function(t,n){return!(n.disabled||du(n)||RI(n)||CI(n,t)||bI(n)||II(n))},k1=function(t,n){return!(AI(n)||O1(n)<0||!LI(t,n))},PI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},DI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=O1(s,a),u=a?e(o.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:u})}),r.sort(xI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},C1=function(t,n){n=n||{};var r;return n.getShadowRoot?r=_I([t],n.includeContainer,{filter:k1.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:PI}):r=wI(t,n.includeContainer,k1.bind(null,n)),DI(r)};function Ua(e){return e.split("-")[1]}function yp(e){return e==="y"?"height":"width"}function zr(e){return e.split("-")[0]}function Va(e){return["top","bottom"].includes(zr(e))?"x":"y"}function I1(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=Va(t),l=yp(s),u=r[l]/2-o[l]/2,c=s==="x";let f;switch(zr(t)){case"top":f={x:i,y:r.y-o.height};break;case"bottom":f={x:i,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:a};break;case"left":f={x:r.x-o.width,y:a};break;default:f={x:r.x,y:r.y}}switch(Ua(t)){case"start":f[s]-=u*(n&&c?-1:1);break;case"end":f[s]+=u*(n&&c?-1:1)}return f}const MI=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=I1(u,r,l),d=r,h={},v=0;for(let y=0;y<s.length;y++){const{name:E,fn:p}=s[y],{x:m,y:g,data:S,reset:_}=await p({x:c,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=m??c,f=g??f,h={...h,[E]:{...h[E],...S}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(d=_.placement),_.rects&&(u=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:c,y:f}=I1(u,d,l)),y=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:h}};function L1(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Ep(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function P1(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=t,v=L1(h),y=s[d?f==="floating"?"reference":"floating":f],E=Ep(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),p=f==="floating"?{...a.floating,x:r,y:o}:a.reference,m=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),g=await(i.isElement==null?void 0:i.isElement(m))&&await(i.getScale==null?void 0:i.getScale(m))||{x:1,y:1},S=Ep(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p,offsetParent:m,strategy:l}):p);return{top:(E.top-S.top+v.top)/g.y,bottom:(S.bottom-E.bottom+v.bottom)/g.y,left:(E.left-S.left+v.left)/g.x,right:(S.right-E.right+v.right)/g.x}}const FI=Math.min,UI=Math.max;function Sp(e,t,n){return UI(e,FI(t,n))}const D1=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=L1(r),c={x:o,y:i},f=Va(a),d=yp(f),h=await l.getDimensions(n),v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=s.reference[d]+s.reference[f]-c[f]-s.floating[d],p=c[f]-s.reference[f],m=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let g=m?f==="y"?m.clientHeight||0:m.clientWidth||0:0;g===0&&(g=s.floating[d]);const S=E/2-p/2,_=u[v],x=g-h[d]-u[y],N=g/2-h[d]/2+S,I=Sp(_,N,x),D=Ua(a)!=null&&N!=I&&s.reference[d]/2-(N<_?u[v]:u[y])-h[d]/2<0;return{[f]:c[f]-(D?N<_?_-N:x-N:0),data:{[f]:I,centerOffset:N-I}}}});["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const VI={left:"right",right:"left",bottom:"top",top:"bottom"};function pu(e){return e.replace(/left|right|bottom|top/g,t=>VI[t])}function $I(e,t,n){n===void 0&&(n=!1);const r=Ua(e),o=Va(e),i=yp(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=pu(a)),{main:a,cross:pu(a)}}const BI={start:"end",end:"start"};function wp(e){return e.replace(/start|end/g,t=>BI[t])}const zI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=e,E=zr(r),p=zr(a)===a,m=await(s.isRTL==null?void 0:s.isRTL(l.floating)),g=f||(p||!v?[pu(a)]:function($){const F=pu($);return[wp($),F,wp(F)]}(a));f||h==="none"||g.push(...function($,F,z,R){const P=Ua($);let k=function(A,O,L){const M=["left","right"],B=["right","left"],j=["top","bottom"],q=["bottom","top"];switch(A){case"top":case"bottom":return L?O?B:M:O?M:B;case"left":case"right":return O?j:q;default:return[]}}(zr($),z==="start",R);return P&&(k=k.map(A=>A+"-"+P),F&&(k=k.concat(k.map(wp)))),k}(a,v,h,m));const S=[a,...g],_=await P1(t,y),x=[];let N=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&x.push(_[E]),c){const{main:$,cross:F}=$I(r,i,m);x.push(_[$],_[F])}if(N=[...N,{placement:r,overflows:x}],!x.every($=>$<=0)){var I,D;const $=(((I=o.flip)==null?void 0:I.index)||0)+1,F=S[$];if(F)return{data:{index:$,overflows:N},reset:{placement:F}};let z=(D=N.filter(R=>R.overflows[0]<=0).sort((R,P)=>R.overflows[1]-P.overflows[1])[0])==null?void 0:D.placement;if(!z)switch(d){case"bestFit":{var T;const R=(T=N.map(P=>[P.placement,P.overflows.filter(k=>k>0).reduce((k,A)=>k+A,0)]).sort((P,k)=>P[1]-k[1])[0])==null?void 0:T[0];R&&(z=R);break}case"initialPlacement":z=a}if(r!==z)return{reset:{placement:z}}}return{}}}},HI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,c=await(l.isRTL==null?void 0:l.isRTL(u.floating)),f=zr(s),d=Ua(s),h=Va(s)==="x",v=["left","top"].includes(f)?-1:1,y=c&&h?-1:1,E=typeof a=="function"?a(i):a;let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...E};return d&&typeof g=="number"&&(m=d==="end"?-1*g:g),h?{x:m*y,y:p*v}:{x:p*v,y:m*y}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function jI(e){return e==="x"?"y":"x"}const WI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:p,y:m}=E;return{x:p,y:m}}},...l}=e,u={x:n,y:r},c=await P1(t,l),f=Va(zr(o)),d=jI(f);let h=u[f],v=u[d];if(i){const E=f==="y"?"bottom":"right";h=Sp(h+c[f==="y"?"top":"left"],h,h-c[E])}if(a){const E=d==="y"?"bottom":"right";v=Sp(v+c[d==="y"?"top":"left"],v,v-c[E])}const y=s.fn({...t,[f]:h,[d]:v});return{...y,data:{x:y.x-n,y:y.y-r}}}}};function mt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rn(e){return mt(e).getComputedStyle(e)}const M1=Math.min,$a=Math.max,hu=Math.round;function F1(e){const t=rn(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,a=hu(n)!==o||hu(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function dr(e){return V1(e)?(e.nodeName||"").toLowerCase():""}let mu;function U1(){if(mu)return mu;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(mu=e.brands.map(t=>t.brand+"/"+t.version).join(" "),mu):navigator.userAgent}function on(e){return e instanceof mt(e).HTMLElement}function $t(e){return e instanceof mt(e).Element}function V1(e){return e instanceof mt(e).Node}function $1(e){return typeof ShadowRoot>"u"?!1:e instanceof mt(e).ShadowRoot||e instanceof ShadowRoot}function gu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function YI(e){return["table","td","th"].includes(dr(e))}function _p(e){const t=/firefox/i.test(U1()),n=rn(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(o=>n.willChange.includes(o))||["paint","layout","strict","content"].some(o=>{const i=n.contain;return i!=null&&i.includes(o)})}function xp(){return/^((?!chrome|android).)*safari/i.test(U1())}function Rp(e){return["html","body","#document"].includes(dr(e))}function B1(e){return $t(e)?e:e.contextElement}const z1={x:1,y:1};function ti(e){const t=B1(e);if(!on(t))return z1;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=F1(t);let a=(i?hu(n.width):n.width)/r,s=(i?hu(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function Hr(e,t,n,r){var o,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=B1(e);let l=z1;t&&(r?$t(r)&&(l=ti(r)):l=ti(e));const u=s?mt(s):window,c=xp()&&n;let f=(a.left+(c&&((o=u.visualViewport)==null?void 0:o.offsetLeft)||0))/l.x,d=(a.top+(c&&((i=u.visualViewport)==null?void 0:i.offsetTop)||0))/l.y,h=a.width/l.x,v=a.height/l.y;if(s){const y=mt(s),E=r&&$t(r)?mt(r):r;let p=y.frameElement;for(;p&&r&&E!==y;){const m=ti(p),g=p.getBoundingClientRect(),S=getComputedStyle(p);g.x+=(p.clientLeft+parseFloat(S.paddingLeft))*m.x,g.y+=(p.clientTop+parseFloat(S.paddingTop))*m.y,f*=m.x,d*=m.y,h*=m.x,v*=m.y,f+=g.x,d+=g.y,p=mt(p).frameElement}}return{width:h,height:v,top:d,right:f+h,bottom:d+v,left:f,x:f,y:d}}function pr(e){return((V1(e)?e.ownerDocument:e.document)||window.document).documentElement}function vu(e){return $t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function H1(e){return Hr(pr(e)).left+vu(e).scrollLeft}function Ba(e){if(dr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$1(e)&&e.host||pr(e);return $1(t)?t.host:t}function j1(e){const t=Ba(e);return Rp(t)?t.ownerDocument.body:on(t)&&gu(t)?t:j1(t)}function hr(e,t){var n;t===void 0&&(t=[]);const r=j1(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=mt(r);return o?t.concat(i,i.visualViewport||[],gu(r)?r:[]):t.concat(r,hr(r))}function W1(e,t,n){let r;if(t==="viewport")r=function(a,s){const l=mt(a),u=pr(a),c=l.visualViewport;let f=u.clientWidth,d=u.clientHeight,h=0,v=0;if(c){f=c.width,d=c.height;const y=xp();(!y||y&&s==="fixed")&&(h=c.offsetLeft,v=c.offsetTop)}return{width:f,height:d,x:h,y:v}}(e,n);else if(t==="document")r=function(a){const s=pr(a),l=vu(a),u=a.ownerDocument.body,c=$a(s.scrollWidth,s.clientWidth,u.scrollWidth,u.clientWidth),f=$a(s.scrollHeight,s.clientHeight,u.scrollHeight,u.clientHeight);let d=-l.scrollLeft+H1(a);const h=-l.scrollTop;return rn(u).direction==="rtl"&&(d+=$a(s.clientWidth,u.clientWidth)-c),{width:c,height:f,x:d,y:h}}(pr(e));else if($t(t))r=function(a,s){const l=Hr(a,!0,s==="fixed"),u=l.top+a.clientTop,c=l.left+a.clientLeft,f=on(a)?ti(a):{x:1,y:1};return{width:a.clientWidth*f.x,height:a.clientHeight*f.y,x:c*f.x,y:u*f.y}}(t,n);else{const a={...t};if(xp()){var o,i;const s=mt(e);a.x-=((o=s.visualViewport)==null?void 0:o.offsetLeft)||0,a.y-=((i=s.visualViewport)==null?void 0:i.offsetTop)||0}r=a}return Ep(r)}function Y1(e,t){return on(e)&&rn(e).position!=="fixed"?t?t(e):e.offsetParent:null}function G1(e,t){const n=mt(e);let r=Y1(e,t);for(;r&&YI(r)&&rn(r).position==="static";)r=Y1(r,t);return r&&(dr(r)==="html"||dr(r)==="body"&&rn(r).position==="static"&&!_p(r))?n:r||function(o){let i=Ba(o);for(;on(i)&&!Rp(i);){if(_p(i))return i;i=Ba(i)}return null}(e)||n}function GI(e,t,n){const r=on(t),o=pr(t),i=Hr(e,!0,n==="fixed",t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((dr(t)!=="body"||gu(o))&&(a=vu(t)),on(t)){const l=Hr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=H1(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}const KI={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=n==="clippingAncestors"?function(u,c){const f=c.get(u);if(f)return f;let d=hr(u).filter(E=>$t(E)&&dr(E)!=="body"),h=null;const v=rn(u).position==="fixed";let y=v?Ba(u):u;for(;$t(y)&&!Rp(y);){const E=rn(y),p=_p(y);E.position==="fixed"?h=null:(v?p||h:p||E.position!=="static"||!h||!["absolute","fixed"].includes(h.position))?h=E:d=d.filter(m=>m!==y),y=Ba(y)}return c.set(u,d),d}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce((u,c)=>{const f=W1(t,c,o);return u.top=$a(f.top,u.top),u.right=M1(f.right,u.right),u.bottom=M1(f.bottom,u.bottom),u.left=$a(f.left,u.left),u},W1(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=on(n),i=pr(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&r!=="fixed")&&((dr(n)!=="body"||gu(i))&&(a=vu(n)),on(n))){const u=Hr(n);s=ti(n),l.x=u.x+n.clientLeft,l.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:$t,getDimensions:function(e){return on(e)?F1(e):e.getBoundingClientRect()},getOffsetParent:G1,getDocumentElement:pr,getScale:ti,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||G1,i=this.getDimensions;return{reference:GI(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>rn(e).direction==="rtl"};function XI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=o&&!s,u=l||i?[...$t(e)?hr(e):e.contextElement?hr(e.contextElement):[],...hr(t)]:[];u.forEach(h=>{l&&h.addEventListener("scroll",n,{passive:!0}),i&&h.addEventListener("resize",n)});let c,f=null;if(a){let h=!0;f=new ResizeObserver(()=>{h||n(),h=!1}),$t(e)&&!s&&f.observe(e),$t(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t)}let d=s?Hr(e):null;return s&&function h(){const v=Hr(e);!d||v.x===d.x&&v.y===d.y&&v.width===d.width&&v.height===d.height||n(),d=v,c=requestAnimationFrame(h)}(),n(),()=>{var h;u.forEach(v=>{l&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),(h=f)==null||h.disconnect(),f=null,s&&cancelAnimationFrame(c)}}const QI=(e,t,n)=>{const r=new Map,o={platform:KI,...n},i={...o.platform,_c:r};return MI(e,t,{...o,platform:i})},qI=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?D1({element:t.current,padding:n}).fn(o):{}:t?D1({element:t,padding:n}).fn(o):{}}}};var yu=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Eu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Eu(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Eu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function K1(e){const t=b.useRef(e);return yu(()=>{t.current=e}),t}function ZI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:a}=e,[s,l]=b.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,c]=b.useState(r);Eu(u,r)||c(r);const f=b.useRef(null),d=b.useRef(null),h=b.useRef(s),v=K1(i),y=K1(o),[E,p]=b.useState(null),[m,g]=b.useState(null),S=b.useCallback(T=>{f.current!==T&&(f.current=T,p(T))},[]),_=b.useCallback(T=>{d.current!==T&&(d.current=T,g(T))},[]),x=b.useCallback(()=>{if(!f.current||!d.current)return;const T={placement:t,strategy:n,middleware:u};y.current&&(T.platform=y.current),QI(f.current,d.current,T).then($=>{const F={...$,isPositioned:!0};N.current&&!Eu(h.current,F)&&(h.current=F,qr.flushSync(()=>{l(F)}))})},[u,t,n,y]);yu(()=>{a===!1&&h.current.isPositioned&&(h.current.isPositioned=!1,l(T=>({...T,isPositioned:!1})))},[a]);const N=b.useRef(!1);yu(()=>(N.current=!0,()=>{N.current=!1}),[]),yu(()=>{if(E&&m){if(v.current)return v.current(E,m,x);x()}},[E,m,x,v]);const I=b.useMemo(()=>({reference:f,floating:d,setReference:S,setFloating:_}),[S,_]),D=b.useMemo(()=>({reference:E,floating:m}),[E,m]);return b.useMemo(()=>({...s,update:x,refs:I,elements:D,reference:S,floating:_}),[s,x,I,D,S,_])}var jr=typeof document<"u"?b.useLayoutEffect:b.useEffect;let bp=!1,JI=0;const X1=()=>"floating-ui-"+JI++;function eL(){const[e,t]=b.useState(()=>bp?X1():void 0);return jr(()=>{e==null&&t(X1())},[]),b.useEffect(()=>{bp||(bp=!0)},[]),e}const Np=th["useId".toString()]||eL;function tL(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const nL=b.createContext(null),rL=b.createContext(null),Q1=()=>{var e;return((e=b.useContext(nL))==null?void 0:e.id)||null},Op=()=>b.useContext(rL);function An(e){return(e==null?void 0:e.ownerDocument)||document}function q1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function oL(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Tp(e){return An(e).defaultView||window}function an(e){return e?e instanceof Tp(e).Element:!1}function Z1(e){return e?e instanceof Tp(e).HTMLElement:!1}function iL(e){if(typeof ShadowRoot>"u")return!1;const t=Tp(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aL(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(q1())||t.test(oL()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function sL(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function J1(){return/apple/i.test(navigator.vendor)}function lL(){return q1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function eS(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tS(e){const t=b.useRef(e);return jr(()=>{t.current=e}),t}const nS="data-floating-ui-safe-polygon";function Ap(e,t,n){return n&&!eS(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}const uL=function(e,t){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:a=0,move:s=!0}=t===void 0?{}:t;const{open:l,onOpenChange:u,dataRef:c,events:f,elements:{domReference:d,floating:h},refs:v}=e,y=Op(),E=Q1(),p=tS(o),m=tS(r),g=b.useRef(),S=b.useRef(),_=b.useRef(),x=b.useRef(),N=b.useRef(!0),I=b.useRef(!1),D=b.useRef(()=>{}),T=b.useCallback(()=>{var R;const P=(R=c.current.openEvent)==null?void 0:R.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[c]);b.useEffect(()=>{if(!n)return;function R(){clearTimeout(S.current),clearTimeout(x.current),N.current=!0}return f.on("dismiss",R),()=>{f.off("dismiss",R)}},[n,f]),b.useEffect(()=>{if(!n||!p.current||!l)return;function R(){T()&&u(!1)}const P=An(h).documentElement;return P.addEventListener("mouseleave",R),()=>{P.removeEventListener("mouseleave",R)}},[h,l,u,n,p,c,T]);const $=b.useCallback(function(R){R===void 0&&(R=!0);const P=Ap(m.current,"close",g.current);P&&!_.current?(clearTimeout(S.current),S.current=setTimeout(()=>u(!1),P)):R&&(clearTimeout(S.current),u(!1))},[m,u]),F=b.useCallback(()=>{D.current(),_.current=void 0},[]),z=b.useCallback(()=>{if(I.current){const R=An(v.floating.current).body;R.style.pointerEvents="",R.removeAttribute(nS),I.current=!1}},[v]);return b.useEffect(()=>{if(!n)return;function R(){return c.current.openEvent?["click","mousedown"].includes(c.current.openEvent.type):!1}function P(O){if(clearTimeout(S.current),N.current=!1,i&&!eS(g.current)||a>0&&Ap(m.current,"open")===0)return;c.current.openEvent=O;const L=Ap(m.current,"open",g.current);L?S.current=setTimeout(()=>{u(!0)},L):u(!0)}function k(O){if(R())return;D.current();const L=An(h);if(clearTimeout(x.current),p.current){l||clearTimeout(S.current),_.current=p.current({...e,tree:y,x:O.clientX,y:O.clientY,onClose(){z(),F(),$()}});const M=_.current;L.addEventListener("mousemove",M),D.current=()=>{L.removeEventListener("mousemove",M)};return}$()}function A(O){R()||p.current==null||p.current({...e,tree:y,x:O.clientX,y:O.clientY,onClose(){z(),F(),$()}})(O)}if(an(d)){const O=d;return l&&O.addEventListener("mouseleave",A),h==null||h.addEventListener("mouseleave",A),s&&O.addEventListener("mousemove",P,{once:!0}),O.addEventListener("mouseenter",P),O.addEventListener("mouseleave",k),()=>{l&&O.removeEventListener("mouseleave",A),h==null||h.removeEventListener("mouseleave",A),s&&O.removeEventListener("mousemove",P),O.removeEventListener("mouseenter",P),O.removeEventListener("mouseleave",k)}}},[d,h,n,e,i,a,s,$,F,z,u,l,y,m,p,c]),jr(()=>{var R;if(n&&l&&(R=p.current)!=null&&R.__options.blockPointerEvents&&T()){const A=An(h).body;if(A.setAttribute(nS,""),A.style.pointerEvents="none",I.current=!0,an(d)&&h){var P,k;const O=d,L=y==null||(P=y.nodesRef.current.find(M=>M.id===E))==null||(k=P.context)==null?void 0:k.elements.floating;return L&&(L.style.pointerEvents=""),O.style.pointerEvents="auto",h.style.pointerEvents="auto",()=>{O.style.pointerEvents="",h.style.pointerEvents=""}}}},[n,l,E,h,d,y,p,c,T]),jr(()=>{l||(g.current=void 0,F(),z())},[l,F,z]),b.useEffect(()=>()=>{F(),clearTimeout(S.current),clearTimeout(x.current),z()},[n,F,z]),b.useMemo(()=>{if(!n)return{};function R(P){g.current=P.pointerType}return{reference:{onPointerDown:R,onPointerEnter:R,onMouseMove(){l||a===0||(clearTimeout(x.current),x.current=setTimeout(()=>{N.current||u(!0)},a))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),$(!1)}}}},[f,n,a,l,u,$])};function kp(){return kp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kp.apply(this,arguments)}function rS(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Cp(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&iL(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Ip(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})})||[],n=n.concat(r);return n}function cL(e){return"composedPath"in e?e.composedPath()[0]:e.target}const oS=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function iS(e,t){const n=C1(e,oS());t==="prev"&&n.reverse();const r=n.indexOf(rS(An(e)));return n.slice(r+1)[0]}function fL(){return iS(document.body,"next")}function dL(){return iS(document.body,"prev")}function Lp(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Cp(n,r)}function pL(e){C1(e,oS()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function hL(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const mL=th["useInsertionEffect".toString()]||(e=>e());function Pp(e){const t=b.useRef(()=>{});return mL(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const aS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Dp,Mp;function sS(e){e.key==="Tab"&&(Dp=e.target,clearTimeout(Mp))}function gL(e){const t=Dp===e.relatedTarget;return Dp=e.relatedTarget,clearTimeout(Mp),t}const lS=b.forwardRef(function(t,n){const r=Pp(t.onFocus),[o,i]=b.useState();return jr(()=>(J1()&&i("button"),document.addEventListener("keydown",sS),()=>{document.removeEventListener("keydown",sS)}),[]),b.createElement("span",kp({},t,{ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,"data-floating-ui-focus-guard":"",style:aS,onFocus:a=>{J1()&&lL()&&!gL(a)?(a.persist(),Mp=window.setTimeout(()=>{r(a)},50)):r(a)}}))}),uS=b.createContext(null),vL=function(e){let{id:t,enabled:n=!0}=e===void 0?{}:e;const[r,o]=b.useState(null),i=Np(),a=EL();return jr(()=>{if(!n)return;const s=t?document.getElementById(t):null;if(s)s.setAttribute("data-floating-ui-portal",""),o(s);else{const l=document.createElement("div");t!==""&&(l.id=t||i),l.setAttribute("data-floating-ui-portal",""),o(l);const u=(a==null?void 0:a.portalNode)||document.body;return u.appendChild(l),()=>{u.removeChild(l)}}},[t,a,i,n]),r},yL=e=>{let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=vL({id:n,enabled:!r}),[a,s]=b.useState(null),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),f=b.useRef(null),d=!!a&&!a.modal&&!!(r||i)&&o;return b.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function h(v){i&&Lp(v)&&(v.type==="focusin"?hL:pL)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,a==null?void 0:a.modal]),b.createElement(uS.Provider,{value:b.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},d&&i&&b.createElement(lS,{"data-type":"outside",ref:l,onFocus:h=>{if(Lp(h,i)){var v;(v=c.current)==null||v.focus()}else{const y=dL()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),d&&i&&b.createElement("span",{"aria-owns":i.id,style:aS}),r?qr.createPortal(t,r):i?qr.createPortal(t,i):null,d&&i&&b.createElement(lS,{"data-type":"outside",ref:u,onFocus:h=>{if(Lp(h,i)){var v;(v=f.current)==null||v.focus()}else{const y=fL()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1))}}}))},EL=()=>b.useContext(uS);function Su(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}const SL={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wL={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},_L=function(e){var t,n;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(t=e.escapeKey)!=null?t:!0,outsidePressBubbles:typeof e=="boolean"?e:(n=e.outsidePress)!=null?n:!0}},xL=function(e,t){let{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:h="pointerdown",referencePress:v=!1,referencePressEvent:y="pointerdown",ancestorScroll:E=!1,bubbles:p=!0}=t===void 0?{}:t;const m=Op(),g=Q1()!=null,S=Pp(typeof d=="function"?d:()=>!1),_=typeof d=="function"?S:d,x=b.useRef(!1),{escapeKeyBubbles:N,outsidePressBubbles:I}=_L(p);return b.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=N,u.current.__outsidePressBubbles=I;function D(R){if(R.key==="Escape"){const P=m?Ip(m.nodesRef.current,i):[];if(P.length>0){let k=!0;if(P.forEach(A=>{var O;if((O=A.context)!=null&&O.open&&!A.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function T(R){const P=x.current;if(x.current=!1,P||typeof _=="function"&&!_(R))return;const k=cL(R);if(Z1(k)&&l){const L=l.ownerDocument.defaultView||window,M=k.scrollWidth>k.clientWidth,B=k.scrollHeight>k.clientHeight;let j=B&&R.offsetX>k.clientWidth;if(B&&L.getComputedStyle(k).direction==="rtl"&&(j=R.offsetX<=k.offsetWidth-k.clientWidth),j||M&&R.offsetY>k.clientHeight)return}const A=m&&Ip(m.nodesRef.current,i).some(L=>{var M;return Su(R,(M=L.context)==null?void 0:M.elements.floating)});if(Su(R,l)||Su(R,s)||A)return;const O=m?Ip(m.nodesRef.current,i):[];if(O.length>0){let L=!0;if(O.forEach(M=>{var B;if((B=M.context)!=null&&B.open&&!M.context.dataRef.current.__outsidePressBubbles){L=!1;return}}),!L)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:g?{preventScroll:!0}:aL(R)||sL(R)}}),r(!1)}function $(){r(!1)}const F=An(l);f&&F.addEventListener("keydown",D),_&&F.addEventListener(h,T);let z=[];return E&&(an(s)&&(z=hr(s)),an(l)&&(z=z.concat(hr(l))),!an(a)&&a&&a.contextElement&&(z=z.concat(hr(a.contextElement)))),z=z.filter(R=>{var P;return R!==((P=F.defaultView)==null?void 0:P.visualViewport)}),z.forEach(R=>{R.addEventListener("scroll",$,{passive:!0})}),()=>{f&&F.removeEventListener("keydown",D),_&&F.removeEventListener(h,T),z.forEach(R=>{R.removeEventListener("scroll",$)})}},[u,l,s,a,f,_,h,o,m,i,n,r,E,c,N,I,g]),b.useEffect(()=>{x.current=!1},[_,h]),b.useMemo(()=>c?{reference:{[SL[y]]:()=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[wL[h]]:()=>{x.current=!0}}}:{},[c,o,v,h,y,r])},RL=function(e,t){let{open:n,onOpenChange:r,dataRef:o,events:i,refs:a,elements:{floating:s,domReference:l}}=e,{enabled:u=!0,keyboardOnly:c=!0}=t===void 0?{}:t;const f=b.useRef(""),d=b.useRef(!1),h=b.useRef();return b.useEffect(()=>{if(!u)return;const y=An(s).defaultView||window;function E(){!n&&Z1(l)&&l===rS(An(l))&&(d.current=!0)}return y.addEventListener("blur",E),()=>{y.removeEventListener("blur",E)}},[s,l,n,u]),b.useEffect(()=>{if(!u)return;function v(y){(y.type==="referencePress"||y.type==="escapeKey")&&(d.current=!0)}return i.on("dismiss",v),()=>{i.off("dismiss",v)}},[i,u]),b.useEffect(()=>()=>{clearTimeout(h.current)},[]),b.useMemo(()=>u?{reference:{onPointerDown(v){let{pointerType:y}=v;f.current=y,d.current=!!(y&&c)},onMouseLeave(){d.current=!1},onFocus(v){var y;d.current||v.type==="focus"&&((y=o.current.openEvent)==null?void 0:y.type)==="mousedown"&&o.current.openEvent&&Su(o.current.openEvent,l)||(o.current.openEvent=v.nativeEvent,r(!0))},onBlur(v){d.current=!1;const y=v.relatedTarget,E=an(y)&&y.hasAttribute("data-floating-ui-focus-guard")&&y.getAttribute("data-type")==="outside";h.current=setTimeout(()=>{Cp(a.floating.current,y)||Cp(l,y)||E||r(!1)})}}}:{},[u,c,l,a,o,r])};function cS(e){return b.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const bL=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=Np(),a=Np();return b.useMemo(()=>{const s={id:i,role:o};return r?o==="tooltip"?{reference:{"aria-describedby":n?i:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[r,o,n,i,a])};function NL(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=ZI(e),i=Op(),a=b.useRef(null),s=b.useRef({}),l=b.useState(()=>tL())[0],[u,c]=b.useState(null),f=b.useCallback(p=>{const m=an(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),contextElement:p}:p;o.refs.setReference(m)},[o.refs]),d=b.useCallback(p=>{(an(p)||p===null)&&(a.current=p,c(p)),(an(o.refs.reference.current)||o.refs.reference.current===null||p!==null&&!an(p))&&o.refs.setReference(p)},[o.refs]),h=b.useMemo(()=>({...o.refs,setReference:d,setPositionReference:f,domReference:a}),[o.refs,d,f]),v=b.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),y=Pp(n),E=b.useMemo(()=>({...o,refs:h,elements:v,dataRef:s,nodeId:r,events:l,open:t,onOpenChange:y}),[o,r,l,t,y,h,v]);return jr(()=>{const p=i==null?void 0:i.nodesRef.current.find(m=>m.id===r);p&&(p.context=E)}),b.useMemo(()=>({...o,context:E,refs:h,reference:d,positionReference:f}),[o,h,E,d,f])}function Fp(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var u;(u=r.get(s))==null||u.push(l),o[s]=function(){for(var c,f=arguments.length,d=new Array(f),h=0;h<f;h++)d[h]=arguments[h];(c=r.get(s))==null||c.forEach(v=>v(...d))}}}else o[s]=l}),o),{})}}const OL=function(e){e===void 0&&(e=[]);const t=e,n=b.useCallback(i=>Fp(i,e,"reference"),t),r=b.useCallback(i=>Fp(i,e,"floating"),t),o=b.useCallback(i=>Fp(i,e,"item"),e.map(i=>i==null?void 0:i.item));return b.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function TL({initialOpen:e=!1,placement:t="top",open:n,onOpenChange:r}={}){const o=Ke.useRef(null),[i,a]=Ke.useState(e),s=n??i,l=r??a,u=NL({placement:t,open:s,onOpenChange:l,whileElementsMounted:XI,strategy:"fixed",middleware:[HI(8),zI(),WI({padding:8}),qI({element:o})]}),c=u.context,f=uL(c,{move:!1,enabled:n==null}),d=RL(c,{enabled:n==null}),h=xL(c),v=bL(c,{role:"tooltip"}),y=OL([f,d,h,v]);return Ke.useMemo(()=>({open:s,setOpen:l,arrowRef:o,...y,...u}),[s,l,y,u])}const fS=Ke.createContext(null),Up=()=>{const e=Ke.useContext(fS);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e};function AL({children:e,...t}){const n=TL(t);return w(fS.Provider,{value:n,children:e})}const kL={top:"-bottom-1 before:border-t-0 before:border-l-0",bottom:"-top-1 before:border-b-0 before:border-r-0",right:"-right-1 before:border-r-0 before:border-t-0",left:"-left-1 before:border-l-0 before:border-b-0"},CL=({placement:e="top"})=>{const t=Up(),[n,r]=b.useState(t.middlewareData.arrow);b.useEffect(()=>{t.middlewareData.arrow&&r(t.middlewareData.arrow)},[t.middlewareData.arrow]);const o={top:n!=null&&n.y?`${n.y??0}px`:void 0,left:n!=null&&n.x?`${n.x??0}px`:void 0},i=`${kL[e]}`;return w("div",{ref:t.arrowRef,style:o,className:`tooltip-arrow absolute w-2 h-2 bg-inherit rotate-45
|
|
825
|
-
before:absolute before:
|
|
826
|
-
${i}`})},IL=Ke.forwardRef(function(t,n){var s;const r=b.useRef(null),o=Up(),i=document.getElementById(T0);if(i&&!r.current&&(r.current=(s=i.shadowRoot)==null?void 0:s.getRootNode()),!r.current)throw new Error(`shadowRoot id:${T0} not found. Floating portal cannot be rendered`);const a=cS([o.refs.setFloating,n]);return w(yL,{root:r.current,children:o.open&&V("div",{className:"relative max-w-sm rounded-md bg-foreground p-2 text-sm leading-4 text-background shadow-sm",ref:a,style:{position:o.strategy,top:o.y??0,left:o.x??0,visibility:o.x==null?"hidden":"visible",...t.style},...o.getFloatingProps(t),children:[t.children,w(CL,{placement:o.placement})]})})}),LL=Ke.forwardRef(function({children:t,asChild:n=!1,...r},o){const i=Up(),a=cS([i.refs.setReference,o,t==null?void 0:t.ref]);return n&&Ke.isValidElement(t)?Ke.cloneElement(t,i.getReferenceProps({ref:a,...r,...t.props,"data-state":i.open?"open":"closed"})):w("button",{ref:a,"data-state":i.open?"open":"closed",...i.getReferenceProps(r),children:t})}),Vp=({asChild:e=!0,children:t,placement:n="top",trigger:r=w(nn,{tag:"circle-info"})})=>V(AL,{placement:n,children:[w(LL,{asChild:e,children:r}),w(IL,{children:t})]}),Bt=({children:e,formRef:t,info:n,handleOnChange:r=()=>null,title:o})=>w("form",{className:"flex h-full flex-col overflow-hidden",noValidate:!0,onChange:r,ref:t,children:V("div",{className:"flex flex-col overflow-hidden",children:[V("legend",{className:"mb-2 flex w-full shrink-0 items-center justify-between px-4",children:[w("span",{className:"text-lg font-semibold leading-6",children:o}),n&&w(Vp,{trigger:V("div",{role:"tooltip",tabIndex:0,children:[w("span",{className:"sr-only",children:U(C.MORE_INFO_TITLE,{title:o})}),w(nn,{tag:"circle-info"})]}),children:n})]}),w("div",{className:"mx-1 flex-1 overflow-y-auto px-3",children:e})]})}),PL={address:{info:C.INFO_NODE_FORWARD_TO_ADDRESS,title:C.FORWARD_TO_ADDRESS,call:C.CALL_ADDRESSES,single:C.SINGLE_ADDRESS,multiple:C.MULTIPLE_ADDRESSES},phone:{info:C.INFO_NODE_FORWARD_TO_PHONE,title:C.FORWARD_TO_PHONE,call:C.CALL_NUMBERS,single:C.SINGLE_NUMBER,multiple:C.MULTIPLE_NUMBERS},resource:{info:C.INFO_NODE_FORWARD_TO_RESOURCE,title:C.FORWARD_TO_RESOURCE,call:C.CALL_RESOURCES,single:C.SINGLE_RESOURCE,multiple:C.MULTIPLE_RESOURCES}},$p=({destinationType:e,nodeData:t,handleOnUpdate:n})=>{const r=b.useRef(),o=PL[e],i={single:o.single,multiple:o.multiple},a={callOrder:{value:"serial"},destinationList:{value:y2(t.destinations),valid:!0},destinationSingle:{value:t.destinations.length===1&&t.destinations[0]?t.destinations[0]:"",valid:!0},sessionTimeout:{value:void 0,valid:!0},type:{value:t.type??"single"}},[s,l]=Tn(a);cu({displayData:s,formRef:r,setCompleted:h=>{n({},h)}});const c=h=>{const v=h.currentTarget.value,y=s.destinationSingle.value;let E="single",p=y.trim()?[y.trim()]:[];v==="multiple"&&(E=s.callOrder.value,p=Td(s.destinationList.value)),l({type:{value:E}}),n({destinations:p,type:E})},f=h=>{const v=h.currentTarget.value;l({type:{value:v}}),n({type:v})},d=h=>{const v=h.target,{name:y,value:E}=v;let p=!0;switch(y){case"destinationSingle":p=v.checkValidity()&&E.trim().length>0,l({[y]:{value:E,valid:p}}),n({destinations:p?[E.trim()]:[]});break;case"destinationList":p=v.checkValidity()&&Boolean(Td(E).length),l({[y]:{value:E,valid:p}}),n({destinations:p?Td(E):[]});break;case"sessionTimeout":p=v.checkValidity(),l({[y]:{value:E?Number.parseInt(E,10):void 0,valid:p}}),n({sessionTimeout:p&&E?Number.parseInt(E,10):void 0});break;default:throw new Error(`Unhandled input name: ${y}`)}};return V(Bt,{info:U(o.info),title:U(o.title),formRef:r,children:[w("div",{className:"mb-1",children:w("label",{children:w($r,{className:"w-full",name:"quantity",onChange:c,value:s.type.value==="single"?"single":"multiple",children:Object.keys(i).map(h=>w("option",{value:h,children:U(i[h])},h))})})}),w("div",{children:s.type.value==="single"?w(DL,{displayData:s,destinationType:e,handleChange:d}):w(ML,{displayData:s,destinationType:e,handleCallOrderSelectChange:f,handleChange:d,labels:o})}),e!=="phone"&&V("label",{children:[w("div",{children:U(C.DISCONNECT_CALL_AFTER_RINGING)}),V("div",{className:"flex flex-wrap items-center gap-x-2",children:[w("input",{className:`w-14 ${s.sessionTimeout.valid?"":"invalid"}`,defaultValue:s.sessionTimeout.value,min:0,name:"sessionTimeout",onChange:d,pattern:Br(y1),type:"number",inputMode:"numeric"}),U(C.SECONDS),w("p",{className:"requirements w-full",role:"alert",children:U(C.ERROR_NUMBER_IS_REQUIRED)})]})]})]})},DL=({displayData:e,destinationType:t,handleChange:n})=>V(Xe,{children:[V("label",{children:[w("input",{className:`w-full ${e.destinationSingle.valid?"":"invalid"}`,defaultValue:e.destinationSingle.value,name:"destinationSingle",onChange:n,placeholder:"+1 (204) 000 0000",required:!0,type:t==="phone"?"tel":"text"}),w("p",{className:"requirements",role:"alert",children:U(C.ERROR_VALUE_IS_REQUIRED)})]}),t!=="phone"&&w("div",{className:"mb-4 pt-4 text-xs uppercase",children:U(C.SETTINGS)})]}),ML=({displayData:e,destinationType:t,handleCallOrderSelectChange:n,handleChange:r,labels:o})=>{const i={serial:C.SEQUENTIALLY,parallel:C.SIMULTANEOUSLY};return V(Xe,{children:[V("label",{children:[w("textarea",{className:`min-h-[77px] w-full ${e.destinationList.valid?"":"invalid"}`,name:"destinationList",onChange:r,placeholder:"+1 (204) 123 0000, +1 (204) 456 0000, +1 (204) 789 0000",required:!0,value:e.destinationList.value}),w("p",{className:"requirements",role:"alert",children:U(C.ERROR_VALUE_IS_REQUIRED)})]}),w("div",{className:"mb-4 pt-4 text-xs uppercase",children:U(C.SETTINGS)}),V("div",{className:`${t==="phone"?"":"mb-4"}`,children:[w("div",{children:U(o.call)}),w("label",{children:w($r,{className:"w-full",name:"callOrder",onChange:n,value:e.type.value,children:Object.keys(i).map(a=>w("option",{value:a,children:U(i[a])},a))})})]})]})},dS=()=>({value:{id:Ie(),command:"",digit:""},valid:!0}),Bp=e=>e.every(t=>t.valid),FL=({nodeData:e,handleOnUpdate:t})=>{const n=b.useRef(),r={initialTimeout:{value:e.initialTimeout??5,valid:!0},url:{value:e.url,valid:!0},text:{value:e.text,valid:!0},selected:{value:e.selected||"text",valid:!0},options:{value:e.options.length?e.options.map(v=>({value:v,valid:Boolean(v.command||v.digit)})):[dS()],valid:!0}},[o,i]=Tn(r);cu({displayData:o,formRef:n,setCompleted:v=>{t({},v)}});const s=v=>{v.preventDefault();const y=[...o.options.value,dS()];i({options:{value:y,valid:Bp(y)}}),t({options:y.map(E=>E.value)})},l=v=>{const E=o.options.value.filter((p,m)=>m!==v);i({options:{value:E,valid:Bp(E)}}),t({options:E.map(p=>p.value)})},u=(v,y)=>v.map(p=>p.value.id===y.value.id?{...p,...y}:p),c=v=>v.map(y=>{const E=y.value.command.trim(),p=y.value.digit.trim();return{...y.value,command:gp(E)?E:"",digit:mp(p)?p:""}}),f=(v,y)=>{const E=o.options.value;if(!E[v])throw new Error(`Option not found at index ${v}`);const p=E[v],m={...p==null?void 0:p.value,...y},g=m.command.trim(),S=m.digit.trim(),_=Boolean(g)&&gp(g)||Boolean(S)&&mp(S),x={value:m,valid:_},N=u(o.options.value,x);i({options:{value:N,valid:Bp(N)}}),t({options:c(N)})},d=(v,y)=>{const E=v.target,{name:p,value:m}=E;let g=!0;switch(p){case"digit":case"command":y!==void 0&&f(y,{[p]:m});break;case"initialTimeout":{g=E.checkValidity(),i({[p]:{value:Number.parseInt(m,10),valid:g}}),t({initialTimeout:g&&m?parseInt(m,10):5});break}default:throw new Error(`Unhandled input name: ${p}`)}},h=o.options.value;return w(Bt,{formRef:n,info:U(C.INFO_NODE_GATHER_INPUT),title:U(C.GATHER_INPUT),children:V("div",{className:"divide-y divide-foreground/10",children:[w("div",{className:"mb-2",children:w(R1,{displayData:o,handleOnUpdate:t,setDisplayData:i})}),h.map((v,y,E)=>V("div",{className:"mb-3",children:[V("div",{className:"flex items-center",children:[w("h2",{className:"nowrap flex-1 py-6 text-sm font-medium uppercase leading-4 text-foreground/50",children:U(C.OPTION_NUMBER,{index:y+1})}),Boolean(h.length>1)&&w(Vp,{trigger:V("button",{className:"px-2",onClick:()=>l(y),type:"button",children:[w("span",{className:"sr-only",children:U(C.REMOVE_OPTION,{index:y+1})}),w(nn,{tag:"xmark"})]}),children:U(C.INFO_NODE_GATHER_INPUT_OPTION_REMOVE)})]}),V("label",{className:"flex flex-col",children:[U(C.CALLER_PRESSES),w("input",{className:`w-1/4 ${!v.valid||v.value.digit&&!mp(v.value.digit)?"invalid":""}`,defaultValue:v.value.digit,maxLength:1,name:"digit",onChange:p=>d(p,y),pattern:Br(E1),type:"text"}),w("p",{className:"requirements",role:"alert",children:U(C.ERROR_TELEPHONE_KEY_REQUIRED)})]}),V("label",{className:"flex flex-col",children:[U(C.OR_SAYS),w("input",{className:`w-full ${!v.valid||v.value.command&&!gp(v.value.command)?"invalid":""}`,defaultValue:v.value.command,name:"command",onChange:p=>d(p,y),pattern:`${Br(v1)}|''`,type:"text"}),w("p",{className:"requirements",role:"alert",children:U(C.ERROR_TEXT_IS_REQUIRED)})]}),y===E.length-1&&V("button",{onClick:s,type:"button",className:"mb-3 text-primary",children:["+ ",U(C.ADD_OPTION)]})]},v.value.id)),V("div",{className:"pt-6",children:[w("h2",{className:"pb-6 text-sm uppercase leading-4 text-foreground/50",children:U(C.SETTINGS)}),V("label",{children:[w("div",{className:"w-full",children:U(C.WAIT_FOR_INPUT)}),V("div",{className:"flex flex-wrap items-center gap-x-2",children:[w("input",{className:`w-14 ${o.initialTimeout.valid?"":"invalid"}`,defaultValue:o.initialTimeout.value,min:1,max:99,name:"initialTimeout",onChange:d,pattern:Br(y1),type:"number",inputMode:"numeric"}),U(C.SECONDS),w("p",{className:"requirements w-full",role:"alert",children:U(C.ERROR_NUMBER_IS_REQUIRED)})]})]})]})]})})},UL=({nodeData:e,handleOnChange:t})=>w(Bt,{handleOnChange:t,info:U(C.INFO_NODE_HANG_UP),title:U(C.HANG_UP),children:V("label",{children:[V("p",{className:"mb-2 whitespace-nowrap",children:[U(C.REASON)," (",U(C.OPTIONAL),")"]}),V($r,{className:"w-full",defaultValue:e.reason,name:"reason",children:[w("option",{value:"",children:U(C.SELECT)}),Object.keys(pp).map(n=>w("option",{value:n,children:U(pp[n])},n))]})]})}),VL=({nodeData:e,handleOnUpdate:t})=>{const n=b.useRef(),r={url:{value:e.url,valid:!0},text:{value:e.text,valid:!0},selected:{value:e.selected,valid:Boolean(e.selected)}},[o,i]=Tn(r);return cu({displayData:o,formRef:n,setCompleted:s=>{t({},s)}}),w(Bt,{formRef:n,info:U(C.INFO_NODE_PLAY),title:U(C.PLAY_AUDIO_TTS),children:w(R1,{displayData:o,handleOnUpdate:t,setDisplayData:i,showDefaultOption:!0})})},pS=()=>({id:Ie(),key:"",value:"",valid:!0}),hS=e=>e.reduce((t,{id:n,key:r,value:o,valid:i})=>(i&&r.trim().length>0&&t.push({id:n,key:r,value:o}),t),[]),$L=({nodeData:e,handleOnUpdate:t})=>{var y;const n=Dr(E=>E.isKeyDuplicate),r={variables:{value:e.variables.length>0?e.variables.map(E=>({...E,valid:!0})):[pS()],valid:!0}},[o,i]=Tn(r),a=Dr(E=>E.upsertVariable),s=Dr(E=>E.removeVariable),l=E=>{E.preventDefault(),i({variables:{value:[...o.variables.value,pS()],valid:!0}})},u=E=>E.key.trim().length>0&&!n(E.key,E.id)&&w1(E.key),c=E=>E.every(p=>p.valid),f=E=>o.variables.value.map(p=>p.id===E.id?{...p,...E}:p),d=(E,p)=>{const m=o.variables.value[E];if(!m)throw new Error(`Variable not found at index ${E}`);const g={...m,...p};g.valid=u(g);const S=f(g),_=c(S);i({variables:{value:S,valid:_}}),t({variables:hS(S)},_),g.valid?a({id:g.id,key:g.key,value:g.value}):s(g.id)},h=E=>{const p=o.variables.value[E];if(p){const m=o.variables.value.filter((S,_)=>_!==E),g=c(m);i({variables:{value:m,valid:g}}),t({variables:hS(m)},g),s(p.id)}},v=(E,p)=>{const m=E.target,g=m.name;if(m.checkValidity())switch(g){case"key":case"value":d(p,{[g]:m.value});break;default:throw new Error(`Unhandled input name: ${g}`)}else d(p,{[g]:"",valid:!1})};return w(Bt,{info:U(C.INFO_NODE_SET_VARIABLES),title:U(C.SET_VARIABLES),children:w("div",{className:"divide-y divide-foreground/10",children:(y=o.variables.value)==null?void 0:y.map((E,p,m)=>{const g=n(E.key,E.id);return V("div",{className:"mb-3",children:[V("div",{className:"flex flex-nowrap",children:[w("h3",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap py-6 text-sm font-medium uppercase leading-4 text-foreground/50",children:U(C.VARIABLE_KEY,{key:E.key})}),Boolean(m.length>1)&&w(Vp,{trigger:V("button",{className:"px-2",onClick:()=>h(p),type:"button",children:[w("span",{className:"sr-only",children:U(C.REMOVE_VARIABLE,{key:E.key})}),w(nn,{tag:"xmark"})]}),children:U(C.INFO_NODE_SET_VARIABLES_OPTION)})]}),V("label",{className:"flex flex-col",children:[U(C.KEY),w("input",{className:`w-full ${(E.valid||w1(E.key))&&!g?"":"invalid"}`,defaultValue:E.key,name:"key",onChange:S=>v(S,p),pattern:Br(S1),type:"text"}),w("p",{className:"requirements",children:U(g?C.ERROR_DUPLICATE_VARIABLE_KEY:C.ERROR_VARIABLE_KEY_REQUIRED)})]}),V("label",{className:"flex flex-col",children:[U(C.VALUE),w("input",{className:"w-full",defaultValue:E.value,name:"value",onChange:S=>v(S,p),type:"text"}),w("p",{className:"requirements",children:U(C.ERROR_TEXT_IS_REQUIRED)})]}),p===m.length-1&&V("button",{onClick:l,type:"button",className:"mb-3 text-primary",children:["+ ",U(C.ADD_VARIABLE)]})]},E.id)})})})},BL=(e,t)=>{b.useEffect(()=>{var o;const n=(o=e.current)==null?void 0:o.getRootNode(),r=i=>{var s;const a=i.target;a instanceof Node&&!((s=e.current)!=null&&s.contains(a))&&t(i)};return n&&n.addEventListener("pointerdown",r),()=>{n&&n.removeEventListener("pointerdown",r)}},[e,t])},zL=({key:e,setId:t})=>({id:Ie(),key:e,setId:t}),HL=e=>e.length>0,jL=({nodeData:e,handleOnUpdate:t})=>{const r={currentFocus:void 0,listOpen:!1,setVariablesList:Array.from(Dr(v=>v.variables).values()).map(v=>({...v,selected:Boolean(e.variables.find(y=>y.setId===v.id))})).sort((v,y)=>v.key.toLowerCase().localeCompare(y.key.toLowerCase())),unsetVariables:e.variables},[o,i]=Tn(r),a=v=>o.setVariablesList.map(y=>y.id===v?{...y,selected:!y.selected}:y),s=v=>{const y=o.setVariablesList[v];if(!y)throw new Error("Variable not found");if(y.selected){const E=o.unsetVariables.findIndex(p=>p.setId===y.id);l(E)}else{const E=[...o.unsetVariables,zL({key:y.key,setId:y.id})];i({unsetVariables:E,setVariablesList:a(y.id)}),t({variables:E},!0)}},l=v=>{const y=o.unsetVariables[v];if(!y)throw new Error("Cannot Remove Variable, not found");const E=o.unsetVariables.filter(p=>p.id!==y.id);i({unsetVariables:E,setVariablesList:a(y.setId)}),t({variables:E},HL(E))},u=b.useRef(null);BL(u,()=>i({listOpen:!1}));const c=v=>{(v.key==="Escape"||v.key==="Esc")&&i({listOpen:!1})},f=(v,y)=>{v.preventDefault(),(v.key===" "||v.code==="Space"||v.key==="Enter")&&s(y),c(v)},d=()=>{i({listOpen:!o.listOpen})},h=o.unsetVariables.length;return V(Bt,{info:U(C.INFO_NODE_UNSET_VARIABLES),title:U(C.UNSET_VARIABLES),children:[V("div",{className:"my-1 flex flex-col",children:[w("label",{id:"listbox-label",className:"sr-only",children:U(C.SELECT_VARIABLES_TO_UNSET)}),V("div",{className:"relative",ref:u,children:[w("button",{"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"listbox-label",className:`relative w-full cursor-pointer rounded-md border border-foreground/10 bg-transparent py-1.5 px-3 text-left shadow-sm
|
|
64
|
+
*/var FC=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ld=FC.join(","),$y=typeof Element>"u",es=$y?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,al=!$y&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ll=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},VC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},BC=function(t,n,r){if(ll(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ld));return n&&es.call(t,Ld)&&o.unshift(t),o=o.filter(r),o},$C=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ll(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else{var c=es.call(s,Ld);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ll(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},zy=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||VC(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},zC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Hy=function(t){return t.tagName==="INPUT"},HC=function(t){return Hy(t)&&t.type==="hidden"},jC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},YC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},GC=function(t){if(!t.name)return!0;var n=t.form||al(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=YC(o,t.form);return!i||i===t},WC=function(t){return Hy(t)&&t.type==="radio"},KC=function(t){return WC(t)&&!GC(t)},QC=function(t){var n,r=t&&al(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var u,c,d;r=al(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((c=o)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},jy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},XC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=es.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(es.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,u=al(t);if(l&&!l.shadowRoot&&o(l)===!0)return jy(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if(QC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return jy(t);return!1},qC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return es.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ZC=function(t,n){return!(n.disabled||ll(n)||HC(n)||XC(n,t)||jC(n)||qC(n))},Yy=function(t,n){return!(KC(n)||zy(n)<0||!ZC(t,n))},JC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},eb=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=zy(a,s),u=s?e(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort(zC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Gy=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$C([t],n.includeContainer,{filter:Yy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:JC}):r=BC(t,n.includeContainer,Yy.bind(null,n)),eb(r)};function ts(e){return e.split("-")[1]}function Dd(e){return e==="y"?"height":"width"}function wr(e){return e.split("-")[0]}function ns(e){return["top","bottom"].includes(wr(e))?"x":"y"}function Wy(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=ns(t),l=Dd(a),u=r[l]/2-o[l]/2,c=a==="x";let d;switch(wr(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(ts(t)){case"start":d[a]-=u*(n&&c?-1:1);break;case"end":d[a]+=u*(n&&c?-1:1)}return d}const tb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Wy(u,r,l),f=r,h={},m=0;for(let v=0;v<a.length;v++){const{name:E,fn:p}=a[v],{x:g,y:S,data:_,reset:w}=await p({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});c=g??c,d=S??d,h={...h,[E]:{...h[E],..._}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:c,y:d}=Wy(u,f,l)),v=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}};function Ky(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function kd(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Qy(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=t,m=Ky(h),v=a[f?d==="floating"?"reference":"floating":d],E=kd(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),p=d==="floating"?{...s.floating,x:r,y:o}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))&&await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1},_=kd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p,offsetParent:g,strategy:l}):p);return{top:(E.top-_.top+m.top)/S.y,bottom:(_.bottom-E.bottom+m.bottom)/S.y,left:(E.left-_.left+m.left)/S.x,right:(_.right-E.right+m.right)/S.x}}const nb=Math.min,rb=Math.max;function Pd(e,t,n){return rb(e,nb(t,n))}const Xy=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:o,y:i,placement:s,rects:a,platform:l}=t;if(n==null)return{};const u=Ky(r),c={x:o,y:i},d=ns(s),f=Dd(d),h=await l.getDimensions(n),m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",E=a.reference[f]+a.reference[d]-c[d]-a.floating[f],p=c[d]-a.reference[d],g=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let S=g?d==="y"?g.clientHeight||0:g.clientWidth||0:0;S===0&&(S=a.floating[f]);const _=E/2-p/2,w=u[m],R=S-h[f]-u[v],C=S/2-h[f]/2+_,A=Pd(w,C,R),B=ts(s)!=null&&C!=A&&a.reference[f]/2-(C<w?u[m]:u[v])-h[f]/2<0;return{[d]:c[d]-(B?C<w?w-C:R-C:0),data:{[d]:A,centerOffset:C-A}}}});["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const ob={left:"right",right:"left",bottom:"top",top:"bottom"};function ul(e){return e.replace(/left|right|bottom|top/g,t=>ob[t])}function ib(e,t,n){n===void 0&&(n=!1);const r=ts(e),o=ns(e),i=Dd(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ul(s)),{main:s,cross:ul(s)}}const sb={start:"end",end:"start"};function Md(e){return e.replace(/start|end/g,t=>sb[t])}const ab=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:s,platform:a,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=e,E=wr(r),p=wr(s)===s,g=await(a.isRTL==null?void 0:a.isRTL(l.floating)),S=d||(p||!m?[ul(s)]:function(V){const $=ul(V);return[Md(V),$,Md($)]}(s));d||h==="none"||S.push(...function(V,$,F,O){const P=ts(V);let D=function(I,T,k){const U=["left","right"],z=["right","left"],j=["top","bottom"],K=["bottom","top"];switch(I){case"top":case"bottom":return k?T?z:U:T?U:z;case"left":case"right":return T?j:K;default:return[]}}(wr(V),F==="start",O);return P&&(D=D.map(I=>I+"-"+P),$&&(D=D.concat(D.map(Md)))),D}(s,m,h,g));const _=[s,...S],w=await Qy(t,v),R=[];let C=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&R.push(w[E]),c){const{main:V,cross:$}=ib(r,i,g);R.push(w[V],w[$])}if(C=[...C,{placement:r,overflows:R}],!R.every(V=>V<=0)){var A,B;const V=(((A=o.flip)==null?void 0:A.index)||0)+1,$=_[V];if($)return{data:{index:V,overflows:C},reset:{placement:$}};let F=(B=C.filter(O=>O.overflows[0]<=0).sort((O,P)=>O.overflows[1]-P.overflows[1])[0])==null?void 0:B.placement;if(!F)switch(f){case"bestFit":{var b;const O=(b=C.map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,I)=>D+I,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:b[0];O&&(F=O);break}case"initialPlacement":F=s}if(r!==F)return{reset:{placement:F}}}return{}}}},lb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(i,s){const{placement:a,platform:l,elements:u}=i,c=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=wr(a),f=ts(a),h=ns(a)==="x",m=["left","top"].includes(d)?-1:1,v=c&&h?-1:1,E=typeof s=="function"?s(i):s;let{mainAxis:p,crossAxis:g,alignmentAxis:S}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...E};return f&&typeof S=="number"&&(g=f==="end"?-1*S:S),h?{x:g*v,y:p*m}:{x:p*m,y:g*v}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function ub(e){return e==="x"?"y":"x"}const cb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:E=>{let{x:p,y:g}=E;return{x:p,y:g}}},...l}=e,u={x:n,y:r},c=await Qy(t,l),d=ns(wr(o)),f=ub(d);let h=u[d],m=u[f];if(i){const E=d==="y"?"bottom":"right";h=Pd(h+c[d==="y"?"top":"left"],h,h-c[E])}if(s){const E=f==="y"?"bottom":"right";m=Pd(m+c[f==="y"?"top":"left"],m,m-c[E])}const v=a.fn({...t,[d]:h,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}};function ct(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xt(e){return ct(e).getComputedStyle(e)}const qy=Math.min,rs=Math.max,cl=Math.round;function Zy(e){const t=Xt(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,s=cl(n)!==o||cl(r)!==i;return s&&(n=o,r=i),{width:n,height:r,fallback:s}}function Qn(e){return e0(e)?(e.nodeName||"").toLowerCase():""}let dl;function Jy(){if(dl)return dl;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(dl=e.brands.map(t=>t.brand+"/"+t.version).join(" "),dl):navigator.userAgent}function qt(e){return e instanceof ct(e).HTMLElement}function Mt(e){return e instanceof ct(e).Element}function e0(e){return e instanceof ct(e).Node}function t0(e){return typeof ShadowRoot>"u"?!1:e instanceof ct(e).ShadowRoot||e instanceof ShadowRoot}function fl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function db(e){return["table","td","th"].includes(Qn(e))}function Ud(e){const t=/firefox/i.test(Jy()),n=Xt(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(o=>n.willChange.includes(o))||["paint","layout","strict","content"].some(o=>{const i=n.contain;return i!=null&&i.includes(o)})}function Fd(){return/^((?!chrome|android).)*safari/i.test(Jy())}function Vd(e){return["html","body","#document"].includes(Qn(e))}function n0(e){return Mt(e)?e:e.contextElement}const r0={x:1,y:1};function Do(e){const t=n0(e);if(!qt(t))return r0;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=Zy(t);let s=(i?cl(n.width):n.width)/r,a=(i?cl(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}function Rr(e,t,n,r){var o,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=n0(e);let l=r0;t&&(r?Mt(r)&&(l=Do(r)):l=Do(e));const u=a?ct(a):window,c=Fd()&&n;let d=(s.left+(c&&((o=u.visualViewport)==null?void 0:o.offsetLeft)||0))/l.x,f=(s.top+(c&&((i=u.visualViewport)==null?void 0:i.offsetTop)||0))/l.y,h=s.width/l.x,m=s.height/l.y;if(a){const v=ct(a),E=r&&Mt(r)?ct(r):r;let p=v.frameElement;for(;p&&r&&E!==v;){const g=Do(p),S=p.getBoundingClientRect(),_=getComputedStyle(p);S.x+=(p.clientLeft+parseFloat(_.paddingLeft))*g.x,S.y+=(p.clientTop+parseFloat(_.paddingTop))*g.y,d*=g.x,f*=g.y,h*=g.x,m*=g.y,d+=S.x,f+=S.y,p=ct(p).frameElement}}return{width:h,height:m,top:f,right:d+h,bottom:f+m,left:d,x:d,y:f}}function Xn(e){return((e0(e)?e.ownerDocument:e.document)||window.document).documentElement}function pl(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function o0(e){return Rr(Xn(e)).left+pl(e).scrollLeft}function os(e){if(Qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||t0(e)&&e.host||Xn(e);return t0(t)?t.host:t}function i0(e){const t=os(e);return Vd(t)?t.ownerDocument.body:qt(t)&&fl(t)?t:i0(t)}function qn(e,t){var n;t===void 0&&(t=[]);const r=i0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=ct(r);return o?t.concat(i,i.visualViewport||[],fl(r)?r:[]):t.concat(r,qn(r))}function s0(e,t,n){let r;if(t==="viewport")r=function(s,a){const l=ct(s),u=Xn(s),c=l.visualViewport;let d=u.clientWidth,f=u.clientHeight,h=0,m=0;if(c){d=c.width,f=c.height;const v=Fd();(!v||v&&a==="fixed")&&(h=c.offsetLeft,m=c.offsetTop)}return{width:d,height:f,x:h,y:m}}(e,n);else if(t==="document")r=function(s){const a=Xn(s),l=pl(s),u=s.ownerDocument.body,c=rs(a.scrollWidth,a.clientWidth,u.scrollWidth,u.clientWidth),d=rs(a.scrollHeight,a.clientHeight,u.scrollHeight,u.clientHeight);let f=-l.scrollLeft+o0(s);const h=-l.scrollTop;return Xt(u).direction==="rtl"&&(f+=rs(a.clientWidth,u.clientWidth)-c),{width:c,height:d,x:f,y:h}}(Xn(e));else if(Mt(t))r=function(s,a){const l=Rr(s,!0,a==="fixed"),u=l.top+s.clientTop,c=l.left+s.clientLeft,d=qt(s)?Do(s):{x:1,y:1};return{width:s.clientWidth*d.x,height:s.clientHeight*d.y,x:c*d.x,y:u*d.y}}(t,n);else{const s={...t};if(Fd()){var o,i;const a=ct(e);s.x-=((o=a.visualViewport)==null?void 0:o.offsetLeft)||0,s.y-=((i=a.visualViewport)==null?void 0:i.offsetTop)||0}r=s}return kd(r)}function a0(e,t){return qt(e)&&Xt(e).position!=="fixed"?t?t(e):e.offsetParent:null}function l0(e,t){const n=ct(e);let r=a0(e,t);for(;r&&db(r)&&Xt(r).position==="static";)r=a0(r,t);return r&&(Qn(r)==="html"||Qn(r)==="body"&&Xt(r).position==="static"&&!Ud(r))?n:r||function(o){let i=os(o);for(;qt(i)&&!Vd(i);){if(Ud(i))return i;i=os(i)}return null}(e)||n}function fb(e,t,n){const r=qt(t),o=Xn(t),i=Rr(e,!0,n==="fixed",t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((Qn(t)!=="body"||fl(o))&&(s=pl(t)),qt(t)){const l=Rr(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else o&&(a.x=o0(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}const pb={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=n==="clippingAncestors"?function(u,c){const d=c.get(u);if(d)return d;let f=qn(u).filter(E=>Mt(E)&&Qn(E)!=="body"),h=null;const m=Xt(u).position==="fixed";let v=m?os(u):u;for(;Mt(v)&&!Vd(v);){const E=Xt(v),p=Ud(v);E.position==="fixed"?h=null:(m?p||h:p||E.position!=="static"||!h||!["absolute","fixed"].includes(h.position))?h=E:f=f.filter(g=>g!==v),v=os(v)}return c.set(u,f),f}(t,this._c):[].concat(n),s=[...i,r],a=s[0],l=s.reduce((u,c)=>{const d=s0(t,c,o);return u.top=rs(d.top,u.top),u.right=qy(d.right,u.right),u.bottom=qy(d.bottom,u.bottom),u.left=rs(d.left,u.left),u},s0(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=qt(n),i=Xn(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&r!=="fixed")&&((Qn(n)!=="body"||fl(i))&&(s=pl(n)),qt(n))){const u=Rr(n);a=Do(n),l.x=u.x+n.clientLeft,l.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:Mt,getDimensions:function(e){return qt(e)?Zy(e):e.getBoundingClientRect()},getOffsetParent:l0,getDocumentElement:Xn,getScale:Do,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||l0,i=this.getDimensions;return{reference:fb(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Xt(e).direction==="rtl"};function hb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,u=l||i?[...Mt(e)?qn(e):e.contextElement?qn(e.contextElement):[],...qn(t)]:[];u.forEach(h=>{l&&h.addEventListener("scroll",n,{passive:!0}),i&&h.addEventListener("resize",n)});let c,d=null;if(s){let h=!0;d=new ResizeObserver(()=>{h||n(),h=!1}),Mt(e)&&!a&&d.observe(e),Mt(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let f=a?Rr(e):null;return a&&function h(){const m=Rr(e);!f||m.x===f.x&&m.y===f.y&&m.width===f.width&&m.height===f.height||n(),f=m,c=requestAnimationFrame(h)}(),n(),()=>{var h;u.forEach(m=>{l&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),(h=d)==null||h.disconnect(),d=null,a&&cancelAnimationFrame(c)}}const gb=(e,t,n)=>{const r=new Map,o={platform:pb,...n},i={...o.platform,_c:r};return tb(e,t,{...o,platform:i})},mb=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?Xy({element:t.current,padding:n}).fn(o):{}:t?Xy({element:t,padding:n}).fn(o):{}}}};var hl=typeof document<"u"?N.useLayoutEffect:N.useEffect;function gl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!gl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!gl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function u0(e){const t=N.useRef(e);return hl(()=>{t.current=e}),t}function vb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:s}=e,[a,l]=N.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,c]=N.useState(r);gl(u,r)||c(r);const d=N.useRef(null),f=N.useRef(null),h=N.useRef(a),m=u0(i),v=u0(o),[E,p]=N.useState(null),[g,S]=N.useState(null),_=N.useCallback(b=>{d.current!==b&&(d.current=b,p(b))},[]),w=N.useCallback(b=>{f.current!==b&&(f.current=b,S(b))},[]),R=N.useCallback(()=>{if(!d.current||!f.current)return;const b={placement:t,strategy:n,middleware:u};v.current&&(b.platform=v.current),gb(d.current,f.current,b).then(V=>{const $={...V,isPositioned:!0};C.current&&!gl(h.current,$)&&(h.current=$,Ur.flushSync(()=>{l($)}))})},[u,t,n,v]);hl(()=>{s===!1&&h.current.isPositioned&&(h.current.isPositioned=!1,l(b=>({...b,isPositioned:!1})))},[s]);const C=N.useRef(!1);hl(()=>(C.current=!0,()=>{C.current=!1}),[]),hl(()=>{if(E&&g){if(m.current)return m.current(E,g,R);R()}},[E,g,R,m]);const A=N.useMemo(()=>({reference:d,floating:f,setReference:_,setFloating:w}),[_,w]),B=N.useMemo(()=>({reference:E,floating:g}),[E,g]);return N.useMemo(()=>({...a,update:R,refs:A,elements:B,reference:_,floating:w}),[a,R,A,B,_,w])}var Nr=typeof document<"u"?N.useLayoutEffect:N.useEffect;let Bd=!1,yb=0;const c0=()=>"floating-ui-"+yb++;function Eb(){const[e,t]=N.useState(()=>Bd?c0():void 0);return Nr(()=>{e==null&&t(c0())},[]),N.useEffect(()=>{Bd||(Bd=!0)},[]),e}const $d=xf["useId".toString()]||Eb;function Sb(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const _b=N.createContext(null),wb=N.createContext(null),d0=()=>{var e;return((e=N.useContext(_b))==null?void 0:e.id)||null},zd=()=>N.useContext(wb);function mn(e){return(e==null?void 0:e.ownerDocument)||document}function f0(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Rb(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Hd(e){return mn(e).defaultView||window}function Zt(e){return e?e instanceof Hd(e).Element:!1}function p0(e){return e?e instanceof Hd(e).HTMLElement:!1}function Nb(e){if(typeof ShadowRoot>"u")return!1;const t=Hd(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ob(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(f0())||t.test(Rb()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xb(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function h0(){return/apple/i.test(navigator.vendor)}function Tb(){return f0().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function g0(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function m0(e){const t=N.useRef(e);return Nr(()=>{t.current=e}),t}const v0="data-floating-ui-safe-polygon";function jd(e,t,n){return n&&!g0(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}const Cb=function(e,t){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:s=0,move:a=!0}=t===void 0?{}:t;const{open:l,onOpenChange:u,dataRef:c,events:d,elements:{domReference:f,floating:h},refs:m}=e,v=zd(),E=d0(),p=m0(o),g=m0(r),S=N.useRef(),_=N.useRef(),w=N.useRef(),R=N.useRef(),C=N.useRef(!0),A=N.useRef(!1),B=N.useRef(()=>{}),b=N.useCallback(()=>{var O;const P=(O=c.current.openEvent)==null?void 0:O.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[c]);N.useEffect(()=>{if(!n)return;function O(){clearTimeout(_.current),clearTimeout(R.current),C.current=!0}return d.on("dismiss",O),()=>{d.off("dismiss",O)}},[n,d]),N.useEffect(()=>{if(!n||!p.current||!l)return;function O(){b()&&u(!1)}const P=mn(h).documentElement;return P.addEventListener("mouseleave",O),()=>{P.removeEventListener("mouseleave",O)}},[h,l,u,n,p,c,b]);const V=N.useCallback(function(O){O===void 0&&(O=!0);const P=jd(g.current,"close",S.current);P&&!w.current?(clearTimeout(_.current),_.current=setTimeout(()=>u(!1),P)):O&&(clearTimeout(_.current),u(!1))},[g,u]),$=N.useCallback(()=>{B.current(),w.current=void 0},[]),F=N.useCallback(()=>{if(A.current){const O=mn(m.floating.current).body;O.style.pointerEvents="",O.removeAttribute(v0),A.current=!1}},[m]);return N.useEffect(()=>{if(!n)return;function O(){return c.current.openEvent?["click","mousedown"].includes(c.current.openEvent.type):!1}function P(T){if(clearTimeout(_.current),C.current=!1,i&&!g0(S.current)||s>0&&jd(g.current,"open")===0)return;c.current.openEvent=T;const k=jd(g.current,"open",S.current);k?_.current=setTimeout(()=>{u(!0)},k):u(!0)}function D(T){if(O())return;B.current();const k=mn(h);if(clearTimeout(R.current),p.current){l||clearTimeout(_.current),w.current=p.current({...e,tree:v,x:T.clientX,y:T.clientY,onClose(){F(),$(),V()}});const U=w.current;k.addEventListener("mousemove",U),B.current=()=>{k.removeEventListener("mousemove",U)};return}V()}function I(T){O()||p.current==null||p.current({...e,tree:v,x:T.clientX,y:T.clientY,onClose(){F(),$(),V()}})(T)}if(Zt(f)){const T=f;return l&&T.addEventListener("mouseleave",I),h==null||h.addEventListener("mouseleave",I),a&&T.addEventListener("mousemove",P,{once:!0}),T.addEventListener("mouseenter",P),T.addEventListener("mouseleave",D),()=>{l&&T.removeEventListener("mouseleave",I),h==null||h.removeEventListener("mouseleave",I),a&&T.removeEventListener("mousemove",P),T.removeEventListener("mouseenter",P),T.removeEventListener("mouseleave",D)}}},[f,h,n,e,i,s,a,V,$,F,u,l,v,g,p,c]),Nr(()=>{var O;if(n&&l&&(O=p.current)!=null&&O.__options.blockPointerEvents&&b()){const I=mn(h).body;if(I.setAttribute(v0,""),I.style.pointerEvents="none",A.current=!0,Zt(f)&&h){var P,D;const T=f,k=v==null||(P=v.nodesRef.current.find(U=>U.id===E))==null||(D=P.context)==null?void 0:D.elements.floating;return k&&(k.style.pointerEvents=""),T.style.pointerEvents="auto",h.style.pointerEvents="auto",()=>{T.style.pointerEvents="",h.style.pointerEvents=""}}}},[n,l,E,h,f,v,p,c,b]),Nr(()=>{l||(S.current=void 0,$(),F())},[l,$,F]),N.useEffect(()=>()=>{$(),clearTimeout(_.current),clearTimeout(R.current),F()},[n,$,F]),N.useMemo(()=>{if(!n)return{};function O(P){S.current=P.pointerType}return{reference:{onPointerDown:O,onPointerEnter:O,onMouseMove(){l||s===0||(clearTimeout(R.current),R.current=setTimeout(()=>{C.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(_.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),V(!1)}}}},[d,n,s,l,u,V])};function Yd(){return Yd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yd.apply(this,arguments)}function y0(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Gd(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Nb(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Wd(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function bb(e){return"composedPath"in e?e.composedPath()[0]:e.target}const E0=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function S0(e,t){const n=Gy(e,E0());t==="prev"&&n.reverse();const r=n.indexOf(y0(mn(e)));return n.slice(r+1)[0]}function Ib(){return S0(document.body,"next")}function Ab(){return S0(document.body,"prev")}function Kd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Gd(n,r)}function Lb(e){Gy(e,E0()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Db(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const kb=xf["useInsertionEffect".toString()]||(e=>e());function Qd(e){const t=N.useRef(()=>{});return kb(()=>{t.current=e}),N.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const _0={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Xd,qd;function w0(e){e.key==="Tab"&&(Xd=e.target,clearTimeout(qd))}function Pb(e){const t=Xd===e.relatedTarget;return Xd=e.relatedTarget,clearTimeout(qd),t}const R0=N.forwardRef(function(t,n){const r=Qd(t.onFocus),[o,i]=N.useState();return Nr(()=>(h0()&&i("button"),document.addEventListener("keydown",w0),()=>{document.removeEventListener("keydown",w0)}),[]),N.createElement("span",Yd({},t,{ref:n,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,"data-floating-ui-focus-guard":"",style:_0,onFocus:s=>{h0()&&Tb()&&!Pb(s)?(s.persist(),qd=window.setTimeout(()=>{r(s)},50)):r(s)}}))}),N0=N.createContext(null),Mb=function(e){let{id:t,enabled:n=!0}=e===void 0?{}:e;const[r,o]=N.useState(null),i=$d(),s=Fb();return Nr(()=>{if(!n)return;const a=t?document.getElementById(t):null;if(a)a.setAttribute("data-floating-ui-portal",""),o(a);else{const l=document.createElement("div");t!==""&&(l.id=t||i),l.setAttribute("data-floating-ui-portal",""),o(l);const u=(s==null?void 0:s.portalNode)||document.body;return u.appendChild(l),()=>{u.removeChild(l)}}},[t,s,i,n]),r},Ub=e=>{let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=Mb({id:n,enabled:!r}),[s,a]=N.useState(null),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null),d=N.useRef(null),f=!!s&&!s.modal&&!!(r||i)&&o;return N.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(m){i&&Kd(m)&&(m.type==="focusin"?Db:Lb)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),N.createElement(N0.Provider,{value:N.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&N.createElement(R0,{"data-type":"outside",ref:l,onFocus:h=>{if(Kd(h,i)){var m;(m=c.current)==null||m.focus()}else{const v=Ab()||(s==null?void 0:s.refs.domReference.current);v==null||v.focus()}}}),f&&i&&N.createElement("span",{"aria-owns":i.id,style:_0}),r?Ur.createPortal(t,r):i?Ur.createPortal(t,i):null,f&&i&&N.createElement(R0,{"data-type":"outside",ref:u,onFocus:h=>{if(Kd(h,i)){var m;(m=d.current)==null||m.focus()}else{const v=Ib()||(s==null?void 0:s.refs.domReference.current);v==null||v.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1))}}}))},Fb=()=>N.useContext(N0);function ml(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}const Vb={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Bb={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$b=function(e){var t,n;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(t=e.escapeKey)!=null?t:!0,outsidePressBubbles:typeof e=="boolean"?e:(n=e.outsidePress)!=null?n:!0}},zb=function(e,t){let{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:s,domReference:a,floating:l},dataRef:u}=e,{enabled:c=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:h="pointerdown",referencePress:m=!1,referencePressEvent:v="pointerdown",ancestorScroll:E=!1,bubbles:p=!0}=t===void 0?{}:t;const g=zd(),S=d0()!=null,_=Qd(typeof f=="function"?f:()=>!1),w=typeof f=="function"?_:f,R=N.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:A}=$b(p);return N.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=C,u.current.__outsidePressBubbles=A;function B(O){if(O.key==="Escape"){const P=g?Wd(g.nodesRef.current,i):[];if(P.length>0){let D=!0;if(P.forEach(I=>{var T;if((T=I.context)!=null&&T.open&&!I.context.dataRef.current.__escapeKeyBubbles){D=!1;return}}),!D)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function b(O){const P=R.current;if(R.current=!1,P||typeof w=="function"&&!w(O))return;const D=bb(O);if(p0(D)&&l){const k=l.ownerDocument.defaultView||window,U=D.scrollWidth>D.clientWidth,z=D.scrollHeight>D.clientHeight;let j=z&&O.offsetX>D.clientWidth;if(z&&k.getComputedStyle(D).direction==="rtl"&&(j=O.offsetX<=D.offsetWidth-D.clientWidth),j||U&&O.offsetY>D.clientHeight)return}const I=g&&Wd(g.nodesRef.current,i).some(k=>{var U;return ml(O,(U=k.context)==null?void 0:U.elements.floating)});if(ml(O,l)||ml(O,a)||I)return;const T=g?Wd(g.nodesRef.current,i):[];if(T.length>0){let k=!0;if(T.forEach(U=>{var z;if((z=U.context)!=null&&z.open&&!U.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:S?{preventScroll:!0}:Ob(O)||xb(O)}}),r(!1)}function V(){r(!1)}const $=mn(l);d&&$.addEventListener("keydown",B),w&&$.addEventListener(h,b);let F=[];return E&&(Zt(a)&&(F=qn(a)),Zt(l)&&(F=F.concat(qn(l))),!Zt(s)&&s&&s.contextElement&&(F=F.concat(qn(s.contextElement)))),F=F.filter(O=>{var P;return O!==((P=$.defaultView)==null?void 0:P.visualViewport)}),F.forEach(O=>{O.addEventListener("scroll",V,{passive:!0})}),()=>{d&&$.removeEventListener("keydown",B),w&&$.removeEventListener(h,b),F.forEach(O=>{O.removeEventListener("scroll",V)})}},[u,l,a,s,d,w,h,o,g,i,n,r,E,c,C,A,S]),N.useEffect(()=>{R.current=!1},[w,h]),N.useMemo(()=>c?{reference:{[Vb[v]]:()=>{m&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[Bb[h]]:()=>{R.current=!0}}}:{},[c,o,m,h,v,r])},Hb=function(e,t){let{open:n,onOpenChange:r,dataRef:o,events:i,refs:s,elements:{floating:a,domReference:l}}=e,{enabled:u=!0,keyboardOnly:c=!0}=t===void 0?{}:t;const d=N.useRef(""),f=N.useRef(!1),h=N.useRef();return N.useEffect(()=>{if(!u)return;const v=mn(a).defaultView||window;function E(){!n&&p0(l)&&l===y0(mn(l))&&(f.current=!0)}return v.addEventListener("blur",E),()=>{v.removeEventListener("blur",E)}},[a,l,n,u]),N.useEffect(()=>{if(!u)return;function m(v){(v.type==="referencePress"||v.type==="escapeKey")&&(f.current=!0)}return i.on("dismiss",m),()=>{i.off("dismiss",m)}},[i,u]),N.useEffect(()=>()=>{clearTimeout(h.current)},[]),N.useMemo(()=>u?{reference:{onPointerDown(m){let{pointerType:v}=m;d.current=v,f.current=!!(v&&c)},onMouseLeave(){f.current=!1},onFocus(m){var v;f.current||m.type==="focus"&&((v=o.current.openEvent)==null?void 0:v.type)==="mousedown"&&o.current.openEvent&&ml(o.current.openEvent,l)||(o.current.openEvent=m.nativeEvent,r(!0))},onBlur(m){f.current=!1;const v=m.relatedTarget,E=Zt(v)&&v.hasAttribute("data-floating-ui-focus-guard")&&v.getAttribute("data-type")==="outside";h.current=setTimeout(()=>{Gd(s.floating.current,v)||Gd(l,v)||E||r(!1)})}}}:{},[u,c,l,s,o,r])};function O0(e){return N.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const jb=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=$d(),s=$d();return N.useMemo(()=>{const a={id:i,role:o};return r?o==="tooltip"?{reference:{"aria-describedby":n?i:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:s}},floating:{...a,...o==="menu"&&{"aria-labelledby":s}}}:{}},[r,o,n,i,s])};function Yb(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=vb(e),i=zd(),s=N.useRef(null),a=N.useRef({}),l=N.useState(()=>Sb())[0],[u,c]=N.useState(null),d=N.useCallback(p=>{const g=Zt(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),contextElement:p}:p;o.refs.setReference(g)},[o.refs]),f=N.useCallback(p=>{(Zt(p)||p===null)&&(s.current=p,c(p)),(Zt(o.refs.reference.current)||o.refs.reference.current===null||p!==null&&!Zt(p))&&o.refs.setReference(p)},[o.refs]),h=N.useMemo(()=>({...o.refs,setReference:f,setPositionReference:d,domReference:s}),[o.refs,f,d]),m=N.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),v=Qd(n),E=N.useMemo(()=>({...o,refs:h,elements:m,dataRef:a,nodeId:r,events:l,open:t,onOpenChange:v}),[o,r,l,t,v,h,m]);return Nr(()=>{const p=i==null?void 0:i.nodesRef.current.find(g=>g.id===r);p&&(p.context=E)}),N.useMemo(()=>({...o,context:E,refs:h,reference:f,positionReference:d}),[o,h,E,f,d])}function Zd(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(s=>{let[a,l]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof l=="function"){var u;(u=r.get(a))==null||u.push(l),o[a]=function(){for(var c,d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];(c=r.get(a))==null||c.forEach(m=>m(...f))}}}else o[a]=l}),o),{})}}const Gb=function(e){e===void 0&&(e=[]);const t=e,n=N.useCallback(i=>Zd(i,e,"reference"),t),r=N.useCallback(i=>Zd(i,e,"floating"),t),o=N.useCallback(i=>Zd(i,e,"item"),e.map(i=>i==null?void 0:i.item));return N.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function Wb({initialOpen:e=!1,placement:t="top",open:n,onOpenChange:r,role:o="tooltip"}={}){const i=pt.useRef(null),[s,a]=pt.useState(e),l=n??s,u=r??a,c=Yb({placement:t,open:l,onOpenChange:u,whileElementsMounted:hb,strategy:"fixed",middleware:[lb(8),ab({fallbackPlacements:["top","bottom","left","right"]}),cb({padding:8}),mb({element:i})]}),d=c.context,f=Cb(d,{move:!1,enabled:n==null}),h=Hb(d,{enabled:n==null}),m=zb(d),v=jb(d,{role:o}),E=Gb([f,h,m,v]);return pt.useMemo(()=>({open:l,setOpen:u,arrowRef:i,...E,...c}),[l,u,E,c])}const x0=pt.createContext(null),Jd=()=>{const e=pt.useContext(x0);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},Kb=({children:e,...t})=>{const n=Wb(t);return y(x0.Provider,{value:n,children:e})},Qb={top:"-bottom-1 before:border-t-0 before:border-l-0",bottom:"-top-1 before:border-b-0 before:border-r-0",left:"-right-1 before:border-r-0 before:border-t-0",right:"-left-1 before:border-l-0 before:border-b-0"},Xb=()=>{var s,a;const e=Jd(),[t,n]=N.useState(e.middlewareData.arrow);N.useEffect(()=>{e.middlewareData.arrow&&n(e.middlewareData.arrow)},[e.middlewareData.arrow]);const r={left:(t==null?void 0:t.x)!==null?`${t==null?void 0:t.x}px`:"",top:(t==null?void 0:t.y)!==null?`${t==null?void 0:t.y}px`:""},o=((a=(s=e.placement)==null?void 0:s.split("-"))==null?void 0:a[0])||"top",i=`${Qb[o]}`;return y("div",{ref:e.arrowRef,style:r,className:`tooltip-arrow absolute h-2 w-2 rotate-45 bg-inherit
|
|
65
|
+
before:absolute before:h-2 before:w-2 before:border before:border-foreground/30 before:content-['']
|
|
66
|
+
${i}`})},qb=pt.forwardRef(function(t,n){var l;const r=q(u=>u.rootElementId),o=N.useRef(null),i=Jd(),s=document.getElementById(r);if(s&&!o.current&&(o.current=(l=s.shadowRoot)==null?void 0:l.getRootNode()),!o.current)throw new Error(`shadowRoot id:${r} not found. Floating portal cannot be rendered`);const a=O0([i.refs.setFloating,n]);return y(Ub,{root:o.current,children:i.open&&M("div",{className:"relative max-w-md rounded-md bg-foreground p-2 text-sm leading-4 text-background shadow-sm",ref:a,style:{position:i.strategy,top:i.y??0,left:i.x??0,visibility:i.x==null?"hidden":"visible",...t.style},...i.getFloatingProps(t),children:[t.children,y(Xb,{})]})})}),Zb=pt.forwardRef(function({children:t,asChild:n=!1,...r},o){const i=Jd(),s=O0([i.refs.setReference,o,t==null?void 0:t.ref]);return n&&pt.isValidElement(t)?pt.cloneElement(t,i.getReferenceProps({ref:s,...r,...t.props,"data-state":i.open?"open":"closed"})):y("button",{ref:s,"data-state":i.open?"open":"closed",...i.getReferenceProps(r),children:t})}),Or=({asChild:e=!0,children:t,placement:n="top",trigger:r=y(Fe,{tag:"circle-info"}),...o})=>M(Kb,{...o,placement:n,children:[y(Zb,{asChild:e,children:r}),y(qb,{children:t})]}),Jb=({dragging:e,id:t,isConnectable:n,selected:r})=>y(je,{id:t,isConnectable:n,missingRequiredEntry:!1,nodeTitle:"Answer Call",selected:r,showDelete:!e,children:y(Qt,{id:t,isConnectable:n,color:"positive"})}),eI=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>y(je,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:L(x.CONDITIONS),selected:o,showDelete:!n,children:M(Ji,{children:[t.options.map((i,s)=>{const a=Boolean(i.value);return y(gn,{color:"positive",enabled:a,id:i.id,isConnectable:r,optionText:L(x.COND_NUMBER,{index:s+1})},i.id)}),y(gn,{color:"negative",id:t.fallback,isConnectable:r,optionText:L(x.ELSE)})]})}),tI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{var i;return y(je,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:L(x.REQUEST),selected:o,showDelete:!t,children:M(Ji,{children:[(i=e==null?void 0:e.options)==null?void 0:i.map((s,a)=>y(gn,{color:"positive",enabled:Boolean(s.value),id:s.id,isConnectable:r,optionText:L(x.OPT_NUMBER,{index:a+1})},s.id)),y(gn,{color:"negative",id:e.fallback,isConnectable:r,optionText:L(x.ELSE)}),y(gn,{color:"negative",id:e.error,isConnectable:r,optionText:L(x.FAILURE)})]})})},nI={success:x.SUCCESS,noAnswer:x.NO_ANSWER,busy:x.BUSY,decline:x.DECLINE,error:x.ERROR},rI={address:x.FORWARD_TO_ADDRESS,phone:x.FORWARD_TO_PHONE,resource:x.FORWARD_TO_RESOURCE},ef=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>M(je,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:L(rI[t.destinationType]),selected:o,showDelete:!n,children:[t.destinations.length>0?y("section",{className:"p-4 pt-2",children:y("ul",{className:"space-y-2",children:t.destinations.map((i,s)=>y("li",{className:"text-sm",children:i},`node-${i}-${s}`))})}):null,y(Ji,{children:t.options.map(i=>y(gn,{id:i.id,optionText:L(nI[i.result]),color:ry(i.result),isConnectable:r},i.id))})]}),oI=({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>y(je,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:"Gather Input",selected:o,showDelete:!n,children:M(Ji,{children:[t.options.map((i,s)=>{const a=Boolean(i.command||i.digit);return y(gn,{color:"positive",enabled:a,id:i.id,isConnectable:r,optionText:L(x.OPT_NUMBER,{index:s+1})},i.id)}),t.results.map(i=>y(gn,{color:"negative",id:i.id,isConnectable:r,optionText:i.result==="no_input"?L(x.NO_INPUT):L(x.UNKNOWN)},i.id))]})}),iI=({id:e,isConnectable:t,selected:n})=>y(je,{allowDelete:!1,id:e,isConnectable:t,nodeTitle:L(x.HANDLE_CALL),selected:n,showDelete:!1,showValidation:!1,target:!1,children:y(Qt,{id:e,color:"positive",isConnectable:t})}),tf={busy:x.BUSY,decline:x.DECLINE,hangup:x.HANG_UP},sI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>y(je,{id:n,isConnectable:r,missingRequiredEntry:!1,nodeTitle:L(x.HANG_UP_CALL),selected:o,showDelete:!t,children:e.reason&&y("section",{className:"p-4 pt-2",children:y("p",{children:L(tf[e.reason])})})}),aI=e=>{try{return new URL(e).pathname.split("/").at(-1)}catch{return""}},lI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{let i=e.selected&&e[e.selected];return i&&e.selected==="url"&&(i=aI(i)||"Play Audio"),M(je,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:L(x.PLAY_AUDIO_TTS),selected:o,showDelete:!t,children:[i&&y("div",{className:"max-w-[300px] p-4 pt-0",children:e.selected==="url"?y("a",{className:"break-words text-primary underline line-clamp-3",href:e.url,target:"_blank",rel:"noopener noreferrer",children:i}):y("p",{className:"break-words line-clamp-3",children:i})}),y(Qt,{id:n,isConnectable:r})]})},uI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{const{label:i,missingRequiredParams:s}=e;return M(je,{id:n,isConnectable:r,missingRequiredEntry:s,nodeTitle:L(x.RECORD_CALL_START),selected:o,showDelete:!t,children:[i&&y("section",{className:"whitespace-nowrap px-4 pb-4 text-sm",children:i}),y(Qt,{id:n,isConnectable:r,color:"positive"})]})},cI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{var a;const i=(a=Wn(l=>l.entries))==null?void 0:a.find(l=>l.controlId===e.controlId),s=i==null?void 0:i.label;return M(je,{id:n,isConnectable:r,missingRequiredEntry:!s,nodeTitle:L(x.RECORD_CALL_STOP),selected:o,showDelete:!t,children:[s&&y("section",{className:"whitespace-nowrap px-4 pb-4 text-sm",children:s}),y(Qt,{id:n,color:"positive",isConnectable:r})]})},dI=({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>y(je,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:L(x.VOICEMAIL_RECORDING),selected:o,showDelete:!t,children:y(Qt,{id:n,isConnectable:r,color:"positive"})}),fI={success:x.SUCCESS,failed:x.FAILED},pI={answer:Jb,cond:eI,condRequest:tI,forwardAddress:ef,forwardPhone:ef,forwardResource:ef,handleCall:iI,hangup:sI,play:lI,promptPlay:oI,record:dI,recordCallStart:uI,recordCallStop:cI,request:({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>{var i;return M(je,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:L(x.REQUEST),selected:o,showDelete:!t,children:[y("p",{className:"pl-4 pb-1 text-sm text-foreground/70",children:L(x.DEPRECATED)}),y(Ji,{children:(i=e==null?void 0:e.options)==null?void 0:i.map(s=>y(gn,{id:s.id,optionText:L(fI[s.result]),color:ry(s.result),isConnectable:r},s.id))})]})},sendSms:({data:e,dragging:t,id:n,isConnectable:r,selected:o})=>M(je,{id:n,isConnectable:r,missingRequiredEntry:e.missingRequiredParams,nodeTitle:L(x.SEND_SMS),selected:o,showDelete:!t,children:[(e.body||e.toNumber)&&M("div",{className:"max-w-[300px] p-4 pt-0",children:[e.fromNumber&&M("p",{className:`whitespace-nowrap ${e.body?"pb-2":""}`,children:[L(x.FROM),": ",e.fromNumber]}),e.toNumber&&M("p",{className:`whitespace-nowrap ${e.body?"pb-2":""}`,children:[L(x.TO),": ",e.toNumber]}),e.body&&y("p",{className:"break-words pt-1 line-clamp-3",children:e.body})]}),y(Qt,{id:n,isConnectable:r})]}),set:({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>M(je,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:L(x.SET_VARIABLES),selected:o,showDelete:!n,children:[t.variables.length>0&&y("div",{className:"flow-root",children:y("div",{className:"inline-block p-4 pt-0 align-middle",children:M("table",{className:"w-80 table-fixed divide-y divide-foreground/10",children:[y("thead",{children:M("tr",{children:[y("th",{scope:"col",className:"py-3.5 text-left text-sm font-semibold",children:L(x.KEY)}),y("th",{scope:"col",className:"px-2 py-3.5 text-left text-sm font-semibold",children:L(x.VALUE)})]})}),y("tbody",{className:"divide-y divide-foreground/10 bg-background text-sm",children:t.variables.map(i=>i.key?M("tr",{children:[y("td",{className:"overflow-hidden text-ellipsis whitespace-nowrap py-2 text-sm",children:i.key}),y("td",{className:"overflow-hidden text-ellipsis whitespace-nowrap break-all px-2 py-2 text-sm",children:i.value})]},i.id):null)})]})})}),y(Qt,{id:e,isConnectable:r,color:"positive"})]}),unset:({id:e,data:t,dragging:n,isConnectable:r,selected:o})=>{const i=q(s=>s.partialUpdateNodeData);return N.useEffect(()=>{const s=Sr.subscribe(a=>{const u=Array.from(a.variables.values()).reduce((c,d)=>{const f=t.variables.find(h=>h.setId===d.id);return f&&c.push({...f,key:d.key}),c},[]);i(e,{variables:u,missingRequiredParams:u.length===0})});return()=>s()},[i,e,t.variables]),y(je,{id:e,isConnectable:r,missingRequiredEntry:t.missingRequiredParams,nodeTitle:L(x.UNSET_VARIABLES),selected:o,showDelete:!n,children:y(Qt,{id:e,isConnectable:r,color:"positive"})})}},hI={floating:NC},gI={duration:1e3,includeHiddenNodes:!0,padding:.3},mI=e=>({edges:e.edges,nodes:e.nodes,addNode:e.addNode,onConnect:e.onConnect,onConnectEnd:e.onConnectEnd,onConnectStart:e.onConnectStart,onEdgesChange:e.onEdgesChange,onEdgesDelete:e.onEdgesDelete,onEdgeUpdate:e.onEdgeUpdate,onEdgeUpdateEnd:e.onEdgeUpdateEnd,onEdgeUpdateStart:e.onEdgeUpdateStart,onInit:e.onInit,onNodeDragStart:e.onNodeDragStart,onNodeDragStop:e.onNodeDragStop,onNodesChange:e.onNodesChange,onNodesDelete:e.onNodesDelete,onSelectionChange:e.onSelectionChange}),vI=({children:e})=>{const t=N.useRef(null),{edges:n,nodes:r,addNode:o,onConnect:i,onConnectEnd:s,onConnectStart:a,onEdgesChange:l,onEdgesDelete:u,onEdgeUpdate:c,onEdgeUpdateEnd:d,onEdgeUpdateStart:f,onInit:h,onNodeDragStart:m,onNodeDragStop:v,onNodesChange:E,onNodesDelete:p,onSelectionChange:g}=q(mI,Je),S=N.useCallback(w=>{w.preventDefault(),w.target instanceof HTMLElement&&w.target.draggable&&(w.dataTransfer.dropEffect="move")},[]),_=N.useCallback(w=>{if(w.preventDefault(),!t.current)return qe().warn("reactFlowWrapper not available yet");const R=w.dataTransfer.getData(ey);if(!R)return qe().warn("nodeType not valid");const C=t.current.getBoundingClientRect();o({nodeType:R,x:w.clientX-C.left,y:w.clientY-C.top})},[o]);return y("div",{className:"bg-sw-white !h-auto w-full",ref:t,children:y(Xv,{connectionLineComponent:_C,connectionMode:$n.Strict,defaultEdgeOptions:ny,edges:n,edgeTypes:hI,fitView:!0,fitViewOptions:gI,nodes:r,nodeTypes:pI,onConnect:i,onConnectEnd:s,onConnectStart:a,onDragOver:S,onDrop:_,onEdgesChange:l,onEdgesDelete:u,onEdgeUpdate:c,onEdgeUpdateEnd:d,onEdgeUpdateStart:f,onInit:h,onNodeDragStart:m,onNodeDragStop:v,onNodesChange:E,onNodesDelete:p,onSelectionChange:g,children:e})})},yI=1e3,EI=e=>q.setState({initializing:e}),SI=()=>{const e=q(i=>i.initializing),t=q(i=>i.flowInteractive),n=Oe(),r=Vx(),o=N.useCallback(i=>{n.setState({nodesDraggable:i,nodesConnectable:i,elementsSelectable:i})},[n]);N.useEffect(()=>{let i;e&&(r?(i&&clearTimeout(i),i=setTimeout(()=>{o(!0),EI(!1)},yI)):o(!1))},[e,r,o]),N.useEffect(()=>{e||o(t)},[e,t,o])};function T0(e){let t;try{t=e()}catch{return}return{getItem:r=>{var o;const i=a=>a===null?null:JSON.parse(a),s=(o=t.getItem(r))!=null?o:null;return s instanceof Promise?s.then(i):i(s)},setItem:(r,o)=>t.setItem(r,JSON.stringify(o)),removeItem:r=>t.removeItem(r)}}const is=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return is(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return is(r)(n)}}}},_I=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:E=>E,version:0,merge:(E,p)=>({...p,...E}),...t},s=!1;const a=new Set,l=new Set;let u;try{u=i.getStorage()}catch{}if(!u)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...E)},r,o);const c=is(i.serialize),d=()=>{const E=i.partialize({...r()});let p;const g=c({state:E,version:i.version}).then(S=>u.setItem(i.name,S)).catch(S=>{p=S});if(p)throw p;return g},f=o.setState;o.setState=(E,p)=>{f(E,p),d()};const h=e((...E)=>{n(...E),d()},r,o);let m;const v=()=>{var E;if(!u)return;s=!1,a.forEach(g=>g(r()));const p=((E=i.onRehydrateStorage)==null?void 0:E.call(i,r()))||void 0;return is(u.getItem.bind(u))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var S;return m=i.merge(g,(S=r())!=null?S:h),n(m,!0),d()}).then(()=>{p==null||p(m,void 0),s=!0,l.forEach(g=>g(m))}).catch(g=>{p==null||p(void 0,g)})};return o.persist={setOptions:E=>{i={...i,...E},E.getStorage&&(u=E.getStorage())},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:E=>(a.add(E),()=>{a.delete(E)}),onFinishHydration:E=>(l.add(E),()=>{l.delete(E)})},v(),m||h},wI=(e,t)=>(n,r,o)=>{let i={storage:T0(()=>localStorage),partialize:v=>v,version:0,merge:(v,E)=>({...E,...v}),...t},s=!1;const a=new Set,l=new Set;let u=i.storage;if(!u)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...v)},r,o);const c=()=>{const v=i.partialize({...r()});return u.setItem(i.name,{state:v,version:i.version})},d=o.setState;o.setState=(v,E)=>{d(v,E),c()};const f=e((...v)=>{n(...v),c()},r,o);let h;const m=()=>{var v;if(!u)return;s=!1,a.forEach(p=>p(r()));const E=((v=i.onRehydrateStorage)==null?void 0:v.call(i,r()))||void 0;return is(u.getItem.bind(u))(i.name).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var g;return h=i.merge(p,(g=r())!=null?g:f),n(h,!0),c()}).then(()=>{E==null||E(h,void 0),s=!0,l.forEach(p=>p(h))}).catch(p=>{E==null||E(void 0,p)})};return o.persist={setOptions:v=>{i={...i,...v},v.storage&&(u=v.storage)},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},m(),h||f},RI=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_BASIC_AUTH:"78429ef1-283b-4fa9-8ebc-16b59f95bb1f:PT2d31b8e287dde883891cb987786603e6675141a30b7db9ad",VITE_DEFAULT_STYLE_HREF:"https://cdn.signalwire.com/npm/@signalwire/cfb@latest/dist/style.css",BASE_URL:"/cfb/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:n.MODE)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),_I(e,t)):wI(e,t)},C0=window,b0={showAllNodes:!1,showDevOptions:!1,showDeployButton:!1},Zn=Ca()(RI(e=>({...b0,toggleFlag:t=>{e(n=>({...n,[t]:!n[t]}))}}),{name:"flags",storage:T0(()=>localStorage),version:0}));Zn.subscribe(e=>{console.log("feature flags changed",e)});const NI=e=>{const t=(r,o)=>{Zn.setState(i=>({...i,[r]:o}))},n=r=>{const o=Zn.getState(),i={...r};return Object.entries(o).forEach(([s,a])=>{s in i&&typeof a=="boolean"&&(i[s]=a)}),i};if(C0){const r=new Proxy(n(e),{get:(o,i)=>Reflect.get(o,i),set:(o,i,s)=>{if(typeof s=="boolean"&&i in o)t(i,s);else throw new Error("unknown flag");return Reflect.set(o,i,s)}});C0.swFlags=r}},OI=()=>NI(b0),Rt=e=>{const[t,n]=N.useReducer((r,o)=>({...r,...o}),e);return[t,n]},nf=qe(),xI={deploy:x.STATUS_DEPLOY,deployed:x.STATUS_DEPLOYED,deploying:x.STATUS_DEPLOYING,error:x.STATUS_DEPLOY_ERROR},TI=()=>{const e=q(h=>h.httpError),t=q(h=>h.saveFlowStatus),n=q(h=>h.httpService),r=q(h=>h.documentVersion),o={error:void 0,status:"deploy",prevDocVersion:r},[i,s]=Rt(o),a=xI[i.status],l=async()=>{try{nf.info("Deploying..."),s({status:"deploying",error:void 0});const h=await(n==null?void 0:n.deployFlow({documentVersion:r}));if(h)nf.info("Deployed!"),s({status:"deployed"});else throw new Error(`Failed to deploy!, response: ${h}`)}catch(h){nf.error(h),h instanceof Error?s({status:"error",error:h.message}):s({status:"error",error:"Failed to deploy!"})}};N.useEffect(()=>{t==="saved"&&r!==i.prevDocVersion&&s({status:"deploy",prevDocVersion:r})},[i.prevDocVersion,r,t,s]);const u=Boolean(e)||t!=="saved"||i.status==="deployed"||i.status==="deploying",c=u?"text-disabled hover:bg-background hover:text-disabled":"",d=i.status==="deployed"?"text-positive":"",f=i.status==="error"?"text-negative":"";return M(Io,{className:`hidden sm:flex ${c} ${d} ${f}`,disabled:u,onClick:l,children:[L(a),y(Or,{placement:"right",trigger:y("div",{className:"flex items-center justify-center pl-1",role:"tooltip",tabIndex:0,children:i.status==="error"?M(Ee,{children:[y("span",{className:"sr-only",children:L(x.MORE_INFO_DEPLOY_ERROR)}),y(Fe,{tag:"circle-exclamation"})]}):M(Ee,{children:[y("span",{className:"sr-only",children:L(x.MORE_INFO_DEPLOY)}),y(Fe,{tag:"up-from-bracket"})]})}),children:i.status==="error"?L(x.MORE_INFO_DEPLOY_ERROR,{message:i.error}):L(x.MORE_INFO_DEPLOY)})]})},CI="react-flow__controls-button",bI="min-w-[3.625rem] cursor-auto select-auto text-center hover:bg-background active:bg-background",II="hidden sm:flex",I0=N.forwardRef(function({asTag:t="div",children:n,className:r="",hiddenSmallScreen:o=!1,...i},s){const a=t,u=`${CI} ${a==="button"?"":bI} ${o?II:""} ${r}`;return y(a,{className:u,ref:s,...i,children:n})}),AI=()=>{const[e,t]=N.useState(!1);return y(Or,{open:e,onOpenChange:t,placement:"bottom",role:"dialog",trigger:M(I0,{asTag:"button",onClick:()=>{t(r=>!r)},children:["Help",M("div",{className:"flex items-center justify-center pl-1",children:[y("span",{className:"sr-only",children:L(x.MORE_INFO_STATUS_ERROR)}),y(Fe,{tag:"circle-info"})]})]}),children:M("section",{className:"p-2",children:[y("h2",{className:"mb-4 text-2xl font-semibold",children:"Testing Your Call Flow"}),M("div",{className:"text-sm",children:[y("p",{children:"To test the current working version (draft) of your Call Flow, follow these steps:"}),M("ol",{className:"my-4 list-inside list-decimal",children:[M("li",{className:"mb-2 list-item",children:["Go to the settings tab of the purchased phone number you want to use for testing: ",y("a",{className:"underline hover:text-background/80",href:"/phone_numbers",target:"_blank",rel:"noopener noreferrer",children:"Purchased Phone Numbers"})]}),M("li",{className:"mb-2",children:["Choose the appropriate Call Flow for handling your calls: ",y("a",{className:"underline hover:text-background/80",href:"/call_flows",target:"_blank",rel:"noopener noreferrer",children:"Call Flows"})]}),y("li",{className:"mb-2",children:"Select the working version (draft) of the chosen Call Flow."}),y("li",{children:"When you make a call to the number, it should now execute the working version of your Call Flow upon answering."})]}),y("p",{className:"mt-4 mb-2",children:"In an upcoming update, you will be able to test your selected Call Flow directly from the Call Flow Builder, eliminating the need to manually associate the Call Flow with your number."})]})]})})},LI={"awaiting-save":x.STATUS_SAVING,"document-sync":x.STATUS_LOCKED,error:x.STATUS_ERROR,initial:x.STATUS_LOADING,saved:x.STATUS_SAVED,saving:x.STATUS_SAVING},A0=e=>(e.preventDefault(),e.returnValue=""),DI=()=>{const e=q(i=>i.saveFlowStatus),t=q(i=>i.httpError),r=LI[t==="document-sync"?t:e],o=e==="error"||t;return N.useEffect(()=>{if(!(e==="saved"||t))return addEventListener("beforeunload",A0,{capture:!0}),()=>{removeEventListener("beforeunload",A0,{capture:!0})}},[t,e]),M(I0,{"aria-live":o?"assertive":"polite",className:`${o?"text-negative":"text-foreground"}`,hiddenSmallScreen:!0,role:o?"alert":"status",children:[y("p",{children:L(r)}),o&&y(Or,{placement:"bottom",trigger:M("div",{className:"flex items-center justify-center pl-1",role:"tooltip",tabIndex:0,children:[y("span",{className:"sr-only",children:L(x.MORE_INFO_STATUS_ERROR)}),y(Fe,{tag:"circle-exclamation"})]}),children:L(t==="document-sync"?x.INFO_STATUS_ERROR_OUT_OF_SYNC:x.INFO_STATUS_ERROR)})]})},kI=()=>{SI();const e=q(s=>s.isDraggingNode),t=q(s=>s.rootAppWidth),n=q(s=>s.httpError),r=Zn(s=>s.showDeployButton),i=!Boolean(t&&t<ty)&&n!=="document-sync";return M(Gx,{className:e?"group/control-buttons":"",position:"top-left",showInteractive:i,children:[y(DI,{}),r&&y(TI,{}),y(AI,{})]})},L0=/^[\w\d ']+$/,D0=/^\d+$/,k0=/^\d|\*|#$/,PI=/^[\d|\*|#$]{0,12}$/,MI=/^.{1,20}$/,P0=/^[a-z0-9_]{1,20}$/,vl={MIN:1,MAX:99},xr=e=>(/(?:\/\^)(.+)(?:\$\/)/.exec(e.toString())??[])[1],rf=e=>t=>Boolean(e.exec(t)),of=e=>rf(k0)(e),sf=e=>rf(L0)(e),M0=e=>rf(P0)(e),U0=e=>typeof e=="string"&&e===""||Array.isArray(e)&&e.length===0?!1:typeof e=="object"&&e!==null?Object.keys(e).length===0?!1:Object.values(e).every(U0):!0,UI=e=>{var i;const t=N.useRef(),n=Mx(),r=e&&"options"in e.data?(i=e.data.options)==null?void 0:i.length:0;return t.current=r,{updateDynamicHandles:s=>{"options"in s&&s.options.length!==t.current&&(e&&n(e.id),t.current=s.options.length)}}},FI=()=>({value:{id:we(),value:""},valid:!0}),F0=e=>e.every(t=>t.valid),V0=({displayOptions:e,setDisplayData:t,handleOnUpdate:n})=>{const r=c=>{t({options:{value:c,valid:F0(c)}}),n({options:c.map(d=>d.value)})},o=c=>{c.preventDefault();const d=[...e,FI()];r(d)},i=c=>{const d=e.filter((f,h)=>h!==c);r(d)},s=(c,d)=>c.map(h=>h.value.id===d.value.id?{...h,...d}:h),a=c=>c.map(d=>({...d.value,value:d.value.value.trim()})),l=(c,d)=>{var g;const f=e;f[c]||qe().error(`Option not found at index ${c}`);const h=f[c],m={...h==null?void 0:h.value,...d},v=Boolean((g=m.value)==null?void 0:g.trim()),p=s(e,{value:m,valid:v});t({options:{value:p,valid:F0(p)}}),n({options:a(p)})},u=(c,d)=>{const f=c.target,{name:h,value:m}=f;switch(h){case"value":d!==void 0&&l(d,{[h]:m});break;default:qe().error(`Unhandled input name: ${h}`)}};return y("div",{className:"divide-y divide-foreground/10",children:e.map((c,d,f)=>M("div",{className:"mb-3",children:[M("div",{className:"flex items-center",children:[y("h2",{className:"nowrap flex-1 py-4 text-sm font-medium uppercase leading-4 text-foreground/50",children:L(x.CONDITION_NUMBER,{index:d+1})}),Boolean(e.length>1)&&y(Or,{trigger:M("button",{className:"px-2",onClick:()=>i(d),type:"button",children:[y("span",{className:"sr-only",children:L(x.REMOVE_CONDITION,{index:d+1})}),y(Fe,{tag:"xmark"})]}),children:L(x.INFO_NODE_OPTION_REMOVE)})]}),M("label",{className:"flex flex-col",children:[y("input",{className:`w-full ${c.valid?"":"invalid"}`,defaultValue:c.value.value,name:"value",onChange:h=>u(h,d),placeholder:"%{count} > 3, /hello/.test('%{foo}')",type:"text"}),y("p",{className:"requirements",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),d===f.length-1&&M("button",{onClick:o,type:"button",className:"mb-3 text-primary",children:["+ ",L(x.ADD_CONDITION)]})]},c.value.id))})},B0={url:x.PLAY_AUDIO_FILE,text:x.TEXT_TO_SPEECH},$0=({displayData:e,label:t,handleOnUpdate:n,setDisplayData:r,showDefaultOption:o})=>{var l,u;const i=e.selected.value,s=c=>{const d=c.currentTarget.value;r({selected:{value:d,valid:Boolean(d)||!o}}),n({selected:d})},a=c=>{const d=c.target,{name:f,value:h}=d,m=h.trim();let v=!0;switch(f){case"url":v=d.checkValidity(),r({[f]:{value:h,valid:v}}),n({text:"",url:v?m:""});break;case"text":v=d.checkValidity()&&m.length>0,r({[f]:{value:h,valid:v}}),n({text:v?m:"",url:""});break;default:throw new Error(`Unhandled input name: ${f}`)}};return M("div",{children:[M("label",{children:[y("span",{className:"sr-only",children:t}),M(Kn,{className:"w-full",name:"selected",onChange:s,value:i,children:[o&&y("option",{value:"",children:L(x.SELECT)}),Object.keys(B0).map(c=>y("option",{value:c,children:L(B0[c])},c))]})]}),i&&y(VI,{name:i,onChange:a,required:!0,selected:i,valid:(l=e[i])==null?void 0:l.valid,value:(u=e[i])==null?void 0:u.value})]})},VI=({name:e,onChange:t,required:n,selected:r,valid:o,value:i})=>{const a={url:y(_r,{errorText:L(x.ERROR_URL_IS_REQUIRED),inputMode:"url",label:L(x.PLAY_AUDIO_FILE),name:e,onChange:t,placeholder:L(x.ENTER_URL),required:n,valid:o,value:i}),text:y(_r,{errorText:L(x.ERROR_VALUE_IS_REQUIRED),inputMode:"text",label:L(x.TEXT_TO_SPEECH),name:e,onChange:t,placeholder:L(x.WRITE_SOMETHING),required:n,valid:o,value:i})}[r];return y(Ee,{children:a})},BI=[{field:"stereo",title:x.STEREO,subtitle:x.STEREO_SUBTITLE},{field:"beep",title:x.BEEP,subtitle:x.BEEP_SUBTITLE}],z0=({displayData:e,handleOnUpdate:t,setDisplayData:n})=>{const r=s=>{const a=s.target.name,l=!e[a].value,u={[a]:{value:l}};n(u),t({[a]:l})},o=s=>{const a=s.target,{name:l,value:u}=a,c=a.checkValidity(),d={[l]:{value:u,valid:c}};n(d),t({[l]:c?u.trim():""})},i=s=>{const a=s.target.name,l=s.target.value,u={[a]:{value:l,valid:!0}};n(u),t({[a]:l})};return M(Ee,{children:[y("div",{className:"mb-5",children:BI.map(s=>{const a=e[s.field].value;return y("div",{children:y(Ad,{checked:a,clickHandler:r,name:s.field,subtitle:L(s.subtitle),title:L(s.title)})},s.field)})}),M("label",{children:[L(x.TERMINATORS),y("input",{className:`w-full ${e.terminators.valid?"":"invalid"}`,defaultValue:e.terminators.value||"",name:"terminators",onChange:o,pattern:xr(PI),placeholder:"#*0",type:"text"}),y("p",{className:"requirements",role:"alert",children:L(x.ERROR_TERMINATORS)})]}),M("label",{children:[L(x.FORMAT),M(Kn,{className:"w-full",value:e.format.value,name:"format",onChange:i,children:[y("option",{value:"mp3",children:"MP3"}),y("option",{value:"wav",children:"WAV"})]})]})]})},dt=({children:e,formRef:t,info:n,handleOnChange:r=()=>null,title:o})=>y("form",{className:"flex h-full flex-col overflow-hidden",noValidate:!0,onChange:r,ref:t,children:M("div",{className:"flex flex-col overflow-hidden",children:[M("legend",{className:"mb-2 flex w-full shrink-0 items-center justify-between px-4",children:[y("span",{className:"text-lg font-semibold leading-6",children:o}),n&&y(Or,{trigger:M("div",{role:"tooltip",tabIndex:0,children:[y("span",{className:"sr-only",children:L(x.MORE_INFO_TITLE,{title:o})}),y(Fe,{tag:"circle-info"})]}),children:n})]}),y("div",{className:"mx-1 flex-1 overflow-y-auto px-3",children:e})]})}),$I=["GET","POST","PUT","DELETE"],zI=e=>{console.log("bodyToTextArea",e);try{return typeof e=="string"?e:JSON.stringify(e)}catch{return e}},HI=()=>({value:{id:we(),value:""},valid:!0}),jI=({nodeData:e,handleOnUpdate:t})=>{const n={url:{value:e.url,valid:!0},method:{value:e.method,valid:!0},headers:{value:e.headers,valid:!0},body:{value:e.body,valid:!0},saveVariables:{value:Boolean(e.saveVariables),valid:!0},options:{value:e.options.length?e.options.map(l=>({value:l,valid:Boolean(l.value)})):[HI()],valid:!0}},[r,o]=Rt(n),i=l=>{const u=l.target,{name:c,value:d}=u,f=typeof d=="string"?d.trim():d;let h=!0;switch(c){case"url":case"method":h=u.checkValidity()&&!!f,o({[c]:{value:d,valid:h}}),t({[c]:h?f:""});break;case"headers":if(!d){o({[c]:{value:{},valid:!0}}),t({[c]:{}});return}try{const m=JSON.parse(d);o({[c]:{valid:!0}}),t({[c]:m})}catch{o({[c]:{valid:!1}}),t({[c]:{}})}break;case"body":try{const m=JSON.parse(d);o({[c]:{value:d,valid:!0}}),t({[c]:m})}catch{o({[c]:{value:d,valid:!0}}),t({[c]:d})}break;default:throw new Error(`Unhandled input name: ${c}`)}},s=l=>{const u=l.target.name,c=l.target.value,d={[u]:c};o(d),t(d)},a=l=>{const u=l.target.name,c=!r[u].value;o({[u]:{value:c}}),t({[u]:c})};return M(dt,{info:L(x.INFO_NODE_REQUEST),title:L(x.REQUEST),children:[M("label",{children:[y("div",{children:L(x.URL)}),y("input",{className:`w-full ${r.url.valid?"":"invalid"}`,defaultValue:r.url.value,name:"url",onChange:i,placeholder:"https://user:password@example.com/api/status",required:!0,type:"text"}),y("p",{className:"requirements w-full",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),M("label",{className:"mb-3 block",children:[L(x.METHOD),y(Kn,{className:"w-full",value:r.method.value,name:"method",onChange:s,children:$I.map(l=>y("option",{value:l,children:l},l))})]}),y("div",{className:"mb-4",children:y(Ad,{checked:r.saveVariables.value,clickHandler:a,name:"saveVariables",subtitle:L(x.SAVE_VARIABLES_SUBTITLE),title:L(x.SAVE_VARIABLES)})}),M("label",{children:[y("div",{children:L(x.REQUEST_HEADERS)}),y(_r,{errorText:L(x.ERROR_INVALID_JSON),inputMode:"text",valid:Boolean(r.headers.valid),label:L(x.REQUEST_HEADERS),name:"headers",onChange:i,placeholder:'{"Content-Type": "application/json", "X-Custom-Header": "foo"}',required:!0,value:JSON.stringify(r.headers.value)})]}),M("label",{children:[y("div",{children:L(x.REQUEST_BODY)}),y(_r,{inputMode:"text",valid:!0,label:L(x.REQUEST_BODY),name:"body",onChange:i,placeholder:"String or JSON to serialize",value:zI(r.body.value)})]}),y(V0,{displayOptions:r.options.value,setDisplayData:o,handleOnUpdate:t})]})},ss=({displayData:e,formRef:t,setCompleted:n})=>{N.useEffect(()=>{var a,l;const r=t.current,o=new FormData(r),i=Object.fromEntries(o.entries());let s=!0;for(const u of Object.keys(i)){if(((a=e[u])==null?void 0:a.valid)!==void 0&&(s=s&&Boolean((l=e[u])==null?void 0:l.valid),s)){const c=r.elements.namedItem(u);c&&"checkValidity"in c&&(s=s&&c.checkValidity())}if(!s)break}n(s)},[e,t,n])},YI=()=>({value:{id:we(),value:""},valid:!0}),GI=({nodeData:e,handleOnUpdate:t})=>{const n=N.useRef(),r={options:{value:e.options.length?e.options.map(a=>({value:a,valid:Boolean(a.value)})):[YI()],valid:!0}},[o,i]=Rt(r);return ss({displayData:o,formRef:n,setCompleted:a=>{t({},a)}}),y(dt,{formRef:n,info:L(x.INFO_NODE_COND),title:L(x.CONDITIONS),children:y(V0,{displayOptions:o.options.value,handleOnUpdate:t,setDisplayData:i})})},WI={address:{info:x.INFO_NODE_FORWARD_TO_ADDRESS,title:x.FORWARD_TO_ADDRESS,call:x.CALL_ADDRESSES,single:x.SINGLE_ADDRESS,multiple:x.MULTIPLE_ADDRESSES},phone:{info:x.INFO_NODE_FORWARD_TO_PHONE,title:x.FORWARD_TO_PHONE,call:x.CALL_NUMBERS,single:x.SINGLE_NUMBER,multiple:x.MULTIPLE_NUMBERS},resource:{info:x.INFO_NODE_FORWARD_TO_RESOURCE,title:x.FORWARD_TO_RESOURCE,call:x.CALL_RESOURCES,single:x.SINGLE_RESOURCE,multiple:x.MULTIPLE_RESOURCES}},af=({destinationType:e,nodeData:t,handleOnUpdate:n})=>{const r=N.useRef(),o=WI[e],i={single:o.single,multiple:o.multiple},s={callOrder:{value:"serial"},destinationList:{value:Jx(t.destinations),valid:!0},destinationSingle:{value:t.destinations.length===1&&t.destinations[0]?t.destinations[0]:"",valid:!0},sessionTimeout:{value:t.sessionTimeout,valid:!0},type:{value:t.type??"single"}},[a,l]=Rt(s);ss({displayData:a,formRef:r,setCompleted:h=>{n({},h)}});const c=h=>{const m=h.currentTarget.value,v=a.destinationSingle.value;let E="single",p=v.trim()?[v.trim()]:[];m==="multiple"&&(E=a.callOrder.value,p=Nd(a.destinationList.value)),l({type:{value:E}}),n({destinations:p,type:E})},d=h=>{const m=h.currentTarget.value;l({type:{value:m}}),n({type:m})},f=h=>{const m=h.target,v=m.name,E=m.value;let p=!0;switch(v){case"destinationSingle":p=m.checkValidity()&&E.trim().length>0,l({[v]:{value:E,valid:p}}),n({destinations:p?[E.trim()]:[]});break;case"destinationList":p=m.checkValidity()&&Boolean(Nd(E).length),l({[v]:{value:E,valid:p}}),n({destinations:p?Nd(E):[]});break;case"sessionTimeout":p=m.checkValidity(),l({[v]:{value:E?Number.parseInt(E,10):void 0,valid:p}}),n({sessionTimeout:p&&E?Number.parseInt(E,10):void 0});break;default:throw new Error(`Unhandled input name: ${v}`)}};return M(dt,{info:L(o.info),title:L(o.title),formRef:r,children:[y("div",{className:"mb-1",children:M("label",{children:[y("span",{className:"sr-only",children:L(x.CHOOSE_OPTION_SINGLE_MULTIPLE)}),y(Kn,{className:"w-full",name:"quantity",onChange:c,value:a.type.value==="single"?"single":"multiple",children:Object.keys(i).map(h=>y("option",{value:h,children:L(i[h])},h))})]})}),y("div",{children:a.type.value==="single"?y(KI,{displayData:a,destinationType:e,handleChange:f}):y(QI,{displayData:a,destinationType:e,handleCallOrderSelectChange:d,handleChange:f,labels:o})}),e!=="phone"&&M("label",{children:[y("div",{children:L(x.DISCONNECT_CALL_AFTER_RINGING)}),M("div",{className:"flex flex-wrap items-center gap-x-2",children:[y("input",{className:`w-14 ${a.sessionTimeout.valid?"":"invalid"}`,defaultValue:a.sessionTimeout.value,min:0,name:"sessionTimeout",onChange:f,pattern:xr(D0),type:"number",inputMode:"numeric"}),L(x.SECONDS),y("p",{className:"requirements w-full",role:"alert",children:L(x.ERROR_NUMBER_IS_REQUIRED)})]})]})]})},KI=({displayData:e,destinationType:t,handleChange:n})=>M(Ee,{children:[M("label",{children:[y("span",{className:"sr-only",children:L(x.SINGLE_NUMBER)}),y("input",{className:`w-full ${e.destinationSingle.valid?"":"invalid"}`,defaultValue:e.destinationSingle.value,name:"destinationSingle",onChange:n,placeholder:"+1 (204) 000 0000",required:!0,type:t==="phone"?"tel":"text"}),y("p",{className:"requirements",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),t!=="phone"&&y("div",{className:"mb-4 pt-4 text-xs uppercase",children:L(x.SETTINGS)})]}),QI=({displayData:e,destinationType:t,handleCallOrderSelectChange:n,handleChange:r,labels:o})=>{const i={serial:x.SEQUENTIALLY,parallel:x.SIMULTANEOUSLY};return M(Ee,{children:[M("label",{children:[y("span",{className:"sr-only",children:L(x.MULTIPLE_NUMBERS)}),y("textarea",{className:`min-h-[77px] w-full ${e.destinationList.valid?"":"invalid"}`,name:"destinationList",onChange:r,placeholder:"+1 (204) 123 0000, +1 (204) 456 0000, +1 (204) 789 0000",required:!0,value:e.destinationList.value}),y("p",{className:"requirements",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),y("div",{className:"mb-4 pt-4 text-xs uppercase",children:L(x.SETTINGS)}),y("div",{className:`${t==="phone"?"":"mb-4"}`,children:M("label",{children:[L(o.call),y(Kn,{className:"w-full",name:"callOrder",onChange:n,value:e.type.value,children:Object.keys(i).map(s=>y("option",{value:s,children:L(i[s])},s))})]})})]})},H0=()=>({value:{id:we(),command:"",digit:""},valid:!0}),lf=e=>e.every(t=>t.valid),XI=({nodeData:e,handleOnUpdate:t})=>{const n=N.useRef(),r={initialTimeout:{value:e.initialTimeout??5,valid:!0},url:{value:e.url,valid:!0},text:{value:e.text,valid:!0},selected:{value:e.selected||"text",valid:!0},options:{value:e.options.length?e.options.map(m=>({value:m,valid:Boolean(m.command||m.digit)})):[H0()],valid:!0}},[o,i]=Rt(r);ss({displayData:o,formRef:n,setCompleted:m=>{t({},m)}});const a=m=>{m.preventDefault();const v=[...o.options.value,H0()];i({options:{value:v,valid:lf(v)}}),t({options:v.map(E=>E.value)})},l=m=>{const E=o.options.value.filter((p,g)=>g!==m);i({options:{value:E,valid:lf(E)}}),t({options:E.map(p=>p.value)})},u=(m,v)=>m.map(p=>p.value.id===v.value.id?{...p,...v}:p),c=m=>m.map(v=>{const E=v.value.command.trim(),p=v.value.digit.trim();return{...v.value,command:sf(E)?E:"",digit:of(p)?p:""}}),d=(m,v)=>{const E=o.options.value;if(!E[m])throw new Error(`Option not found at index ${m}`);const p=E[m],g={...p==null?void 0:p.value,...v},S=g.command.trim(),_=g.digit.trim(),w=Boolean(S)&&sf(S)||Boolean(_)&&of(_),R={value:g,valid:w},C=u(o.options.value,R);i({options:{value:C,valid:lf(C)}}),t({options:c(C)})},f=(m,v)=>{const E=m.target,{name:p,value:g}=E;let S=!0;switch(p){case"digit":case"command":v!==void 0&&d(v,{[p]:g});break;case"initialTimeout":{S=E.checkValidity(),i({[p]:{value:Number.parseInt(g,10),valid:S}}),t({initialTimeout:S&&g?parseInt(g,10):5});break}default:throw new Error(`Unhandled input name: ${p}`)}},h=o.options.value;return y(dt,{formRef:n,info:L(x.INFO_NODE_GATHER_INPUT),title:L(x.GATHER_INPUT),children:M("div",{className:"divide-y divide-foreground/10",children:[y("div",{className:"mb-2",children:y($0,{displayData:o,label:L(x.CHOOSE_OPTION_TTS_AUDIO),handleOnUpdate:t,setDisplayData:i})}),y("ul",{children:h.map((m,v,E)=>M("li",{className:"mb-3",children:[M("div",{className:"flex items-center",children:[y("h2",{className:"nowrap flex-1 py-6 text-sm font-medium uppercase leading-4 text-foreground/50",children:L(x.OPTION_NUMBER,{index:v+1})}),Boolean(h.length>1)&&y(Or,{trigger:M("button",{className:"px-2",onClick:()=>l(v),type:"button",children:[y("span",{className:"sr-only",children:L(x.REMOVE_OPTION,{index:v+1})}),y(Fe,{tag:"xmark"})]}),children:L(x.INFO_NODE_OPTION_REMOVE)})]}),M("label",{className:"flex flex-col",children:[L(x.CALLER_PRESSES),y("input",{className:`w-1/4 ${!m.valid||m.value.digit&&!of(m.value.digit)?"invalid":""}`,defaultValue:m.value.digit,name:"digit",onChange:p=>f(p,v),pattern:xr(k0),type:"text"}),y("p",{className:"requirements",role:"alert",children:L(x.ERROR_TELEPHONE_KEY_REQUIRED)})]}),M("label",{className:"flex flex-col",children:[L(x.OR_SAYS),y("input",{className:`w-full ${!m.valid||m.value.command&&!sf(m.value.command)?"invalid":""}`,defaultValue:m.value.command,name:"command",onChange:p=>f(p,v),pattern:`${xr(L0)}|''`,type:"text"}),y("p",{className:"requirements",role:"alert",children:L(x.ERROR_TEXT_IS_REQUIRED)})]}),v===E.length-1&&M("button",{onClick:a,type:"button",className:"mb-3 text-primary",children:["+ ",L(x.ADD_OPTION)]})]},m.value.id))}),M("div",{className:"pt-6",children:[y("h2",{className:"pb-6 text-sm uppercase leading-4 text-foreground/50",children:L(x.SETTINGS)}),M("label",{children:[y("div",{className:"w-full",children:L(x.WAIT_FOR_INPUT)}),M("div",{className:"flex flex-wrap items-center gap-x-2",children:[y("input",{className:`w-14 ${o.initialTimeout.valid?"":"invalid"}`,defaultValue:o.initialTimeout.value,min:vl.MIN,max:vl.MAX,name:"initialTimeout",onChange:f,pattern:xr(D0),type:"number",inputMode:"numeric"}),L(x.SECONDS),y("p",{className:"requirements w-full",role:"alert",children:L(x.ERROR_NUMBER_MIN_MAX_IS_REQUIRED,{min:vl.MIN,max:vl.MAX})})]})]})]})]})})},qI=({nodeData:e,handleOnChange:t})=>y(dt,{handleOnChange:t,info:L(x.INFO_NODE_HANG_UP),title:L(x.HANG_UP_CALL),children:M("label",{children:[M("p",{className:"mb-2 whitespace-nowrap",children:[L(x.REASON)," (",L(x.OPTIONAL),")"]}),M(Kn,{className:"w-full",defaultValue:e.reason,name:"reason",children:[y("option",{value:"",children:L(x.SELECT)}),Object.keys(tf).map(n=>y("option",{value:n,children:L(tf[n])},n))]})]})}),ZI=({nodeData:e,handleOnUpdate:t})=>{const n=N.useRef(),r={url:{value:e.url,valid:!0},text:{value:e.text,valid:!0},selected:{value:e.selected,valid:Boolean(e.selected)}},[o,i]=Rt(r);return ss({displayData:o,formRef:n,setCompleted:a=>{t({},a)}}),y(dt,{formRef:n,info:L(x.INFO_NODE_PLAY),title:L(x.PLAY_AUDIO_TTS),children:y($0,{displayData:o,label:L(x.CHOOSE_OPTION_TTS_AUDIO),handleOnUpdate:t,setDisplayData:i,showDefaultOption:!0})})},JI=({nodeData:e,handleOnUpdate:t})=>{const n={beep:{value:e.beep},controlId:{value:e.controlId},format:{value:e.format,valid:!0},label:{value:e.label,valid:!0},stereo:{value:e.stereo},terminators:{value:e.terminators,valid:!0}},r=N.useRef(),[o,i]=Rt(n),[s,a]=N.useState(!1),l=Wn(f=>f.upsertEntry),u=Wn(f=>f.isValueDuplicate);ss({displayData:o,formRef:r,setCompleted:f=>{t({},f)}});const d=f=>{let h=!0;const m=f.target,{name:v,value:E}=m,p=E.trim(),g=u(p,e.controlId);a(g),h=m.checkValidity()&&Boolean(p)&&!g,i({[v]:{value:E,valid:h}}),t({[v]:h?p:""}),l({controlId:e.controlId,label:h?p:""})};return M(dt,{info:L(x.INFO_NODE_RECORD_CALL_START),title:L(x.RECORD_CALL_START),formRef:r,children:[M("label",{children:[L(x.RECORDING_NAME),y("input",{className:`w-full ${o.label.valid?"":"invalid"}`,defaultValue:o.label.value,name:"label",onChange:d,pattern:xr(MI),required:!0,type:"text"}),y("p",{className:"requirements",role:"alert",children:L(s?x.ERROR_DUPLICATE_RECORDING_LABEL:x.ERROR_RECORDING_LABEL_REQUIRED)})]}),y(z0,{handleOnUpdate:t,displayData:o,setDisplayData:i})]})},eA=({nodeData:e,handleOnChange:t})=>{const r=Wn(o=>o.getEntries)().sort((o,i)=>o.label.toLowerCase().localeCompare(i.label.toLowerCase()));return y(dt,{handleOnChange:t,info:L(x.INFO_NODE_RECORD_CALL_STOP),title:L(x.RECORD_CALL_STOP),children:r.length?M("label",{children:[y("p",{className:"mb-2 whitespace-nowrap",children:L(x.RECORDING_NAME)}),M(Kn,{className:"w-full",defaultValue:e.controlId,name:"controlId",children:[y("option",{value:"",children:L(x.SELECT)}),r.map(o=>y("option",{value:o.controlId,children:o.label},o.controlId))]})]}):y("p",{className:"text-negative",children:L(x.ERROR_ADD_RECORDING_FIRST)})})},tA=({nodeData:e,handleOnUpdate:t})=>{const n={beep:{value:e.beep},format:{value:e.format,valid:!0},stereo:{value:e.stereo},terminators:{value:e.terminators,valid:!0}},[r,o]=Rt(n);return y(dt,{info:L(x.INFO_NODE_RECORD),title:L(x.VOICEMAIL_RECORDING),children:y(z0,{handleOnUpdate:t,displayData:r,setDisplayData:o})})},nA=["GET","POST","PUT","DELETE"],rA=e=>{console.log("bodyToTextArea",e);try{return typeof e=="string"?e:JSON.stringify(e)}catch{return e}},oA=({nodeData:e,handleOnUpdate:t})=>{const n={url:{value:e.url,valid:!0},method:{value:e.method,valid:!0},headers:{value:e.headers,valid:!0},body:{value:e.body,valid:!0},saveVariables:{value:Boolean(e.saveVariables),valid:!0}},[r,o]=Rt(n),i=l=>{const u=l.target,{name:c,value:d}=u,f=typeof d=="string"?d.trim():d;let h=!0;switch(c){case"url":case"method":h=u.checkValidity()&&!!f,o({[c]:{value:d,valid:h}}),t({[c]:h?f:""});break;case"headers":if(!d){o({[c]:{value:{},valid:!0}}),t({[c]:{}});return}try{const m=JSON.parse(d);o({[c]:{valid:!0}}),t({[c]:m})}catch{o({[c]:{valid:!1}}),t({[c]:{}})}break;case"body":try{const m=JSON.parse(d);o({[c]:{value:d,valid:!0}}),t({[c]:m})}catch{o({[c]:{value:d,valid:!0}}),t({[c]:d})}break;default:throw new Error(`Unhandled input name: ${c}`)}},s=l=>{const u=l.target.name,c=l.target.value,d={[u]:c};o(d),t(d)},a=l=>{const u=l.target.name,c=!r[u].value;o({[u]:{value:c}}),t({[u]:c})};return M(dt,{info:L(x.INFO_NODE_REQUEST),title:L(x.REQUEST),children:[y("p",{className:"pb-1 text-sm text-foreground/70",children:L(x.DEPRECATED)}),M("label",{children:[y("div",{children:L(x.URL)}),y("input",{className:`w-full ${r.url.valid?"":"invalid"}`,defaultValue:r.url.value,name:"url",onChange:i,placeholder:"https://user:password@example.com/api/status",required:!0,type:"text"}),y("p",{className:"requirements w-full",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),M("label",{className:"mb-3 block",children:[L(x.METHOD),y(Kn,{className:"w-full",value:r.method.value,name:"method",onChange:s,children:nA.map(l=>y("option",{value:l,children:l},l))})]}),y("div",{className:"mb-4",children:y(Ad,{checked:r.saveVariables.value,clickHandler:a,name:"saveVariables",subtitle:L(x.SAVE_VARIABLES_SUBTITLE),title:L(x.SAVE_VARIABLES)})}),M("label",{children:[y("div",{children:L(x.REQUEST_HEADERS)}),y(_r,{errorText:L(x.ERROR_INVALID_JSON),inputMode:"text",valid:Boolean(r.headers.valid),label:L(x.REQUEST_HEADERS),name:"headers",onChange:i,placeholder:'{"Content-Type": "application/json", "X-Custom-Header": "foo"}',required:!0,value:JSON.stringify(r.headers.value)})]}),M("label",{children:[y("div",{children:L(x.REQUEST_BODY)}),y(_r,{inputMode:"text",valid:!0,label:L(x.REQUEST_BODY),name:"body",onChange:i,placeholder:"String or JSON to serialize",value:rA(r.body.value)})]})]})},iA=({nodeData:e,handleOnUpdate:t})=>{const n={body:{value:e.body,valid:!0},fromNumber:{value:e.fromNumber,valid:!0},toNumber:{value:e.toNumber,valid:!0}},[r,o]=Rt(n),i=s=>{const a=s.target,{name:l,value:u}=a,c=typeof u=="string"?u.trim():u;let d=!0;switch(l){case"body":case"fromNumber":case"toNumber":d=a.checkValidity()&&!!c,o({[l]:{value:u,valid:d}}),t({[l]:d?c:""});break;default:throw new Error(`Unhandled input name: ${l}`)}};return M(dt,{info:L(x.INFO_NODE_SEND_SMS),title:L(x.SEND_SMS),children:[M("label",{className:"mb-1",children:[y("div",{children:L(x.FROM_PHONE_NUMBER)}),y("input",{className:`w-full ${r.fromNumber.valid?"":"invalid"}`,defaultValue:r.fromNumber.value,name:"fromNumber",onChange:i,placeholder:"+1 (204) 000 0000",required:!0,type:"tel"}),y("p",{className:"requirements w-full",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),M("label",{className:"mb-1",children:[y("div",{children:L(x.TO_PHONE_NUMBER)}),y("input",{className:`w-full ${r.toNumber.valid?"":"invalid"}`,defaultValue:r.toNumber.value,name:"toNumber",onChange:i,placeholder:"+1 (204) 000 0000",required:!0,type:"tel"}),y("p",{className:"requirements w-full",role:"alert",children:L(x.ERROR_VALUE_IS_REQUIRED)})]}),M("label",{children:[y("div",{children:L(x.TEXT)}),y(_r,{errorText:L(x.ERROR_VALUE_IS_REQUIRED),inputMode:"text",valid:Boolean(r.body.valid),label:L(x.SMS_TEXT),name:"body",onChange:i,placeholder:L(x.WRITE_SOMETHING),required:!0,value:r.body.value})]})]})},j0=()=>({id:we(),key:"",value:"",valid:!0}),Y0=e=>e.reduce((t,{id:n,key:r,value:o,valid:i})=>(i&&r.trim().length>0&&t.push({id:n,key:r,value:o}),t),[]),sA=({nodeData:e,handleOnUpdate:t})=>{var v;const n=Sr(E=>E.isKeyDuplicate),r={variables:{value:e.variables.length>0?e.variables.map(E=>({...E,valid:!0})):[j0()],valid:!0}},[o,i]=Rt(r),s=Sr(E=>E.upsertVariable),a=Sr(E=>E.removeVariable),l=E=>{E.preventDefault(),i({variables:{value:[...o.variables.value,j0()],valid:!0}})},u=E=>E.key.trim().length>0&&!n(E.key,E.id)&&M0(E.key),c=E=>E.every(p=>p.valid),d=E=>o.variables.value.map(p=>p.id===E.id?{...p,...E}:p),f=(E,p)=>{const g=o.variables.value[E];if(!g)throw new Error(`Variable not found at index ${E}`);const S={...g,...p};S.valid=u(S);const _=d(S),w=c(_);i({variables:{value:_,valid:w}}),t({variables:Y0(_)},w),S.valid?s({id:S.id,key:S.key,value:S.value}):a(S.id)},h=E=>{const p=o.variables.value[E];if(p){const g=o.variables.value.filter((_,w)=>w!==E),S=c(g);i({variables:{value:g,valid:S}}),t({variables:Y0(g)},S),a(p.id)}},m=(E,p)=>{const g=E.target,S=g.name;if(g.checkValidity())switch(S){case"key":case"value":f(p,{[S]:g.value});break;default:throw new Error(`Unhandled input name: ${S}`)}else f(p,{[S]:"",valid:!1})};return y(dt,{info:L(x.INFO_NODE_SET_VARIABLES),title:L(x.SET_VARIABLES),children:y("div",{className:"divide-y divide-foreground/10",children:(v=o.variables.value)==null?void 0:v.map((E,p,g)=>{const S=n(E.key,E.id);return M("div",{className:"mb-3",children:[M("div",{className:"flex flex-nowrap",children:[y("h3",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap py-6 text-sm font-medium uppercase leading-4 text-foreground/50",children:L(x.VARIABLE_KEY,{key:E.key})}),Boolean(g.length>1)&&y(Or,{trigger:M("button",{className:"px-2",onClick:()=>h(p),type:"button",children:[y("span",{className:"sr-only",children:L(x.REMOVE_VARIABLE,{key:E.key})}),y(Fe,{tag:"xmark"})]}),children:L(x.INFO_NODE_SET_VARIABLES_OPTION)})]}),M("label",{className:"flex flex-col",children:[L(x.KEY),y("input",{className:`w-full ${(E.valid||M0(E.key))&&!S?"":"invalid"}`,defaultValue:E.key,name:"key",onChange:_=>m(_,p),pattern:xr(P0),type:"text"}),y("p",{className:"requirements",children:L(S?x.ERROR_DUPLICATE_VARIABLE_KEY:x.ERROR_VARIABLE_KEY_REQUIRED)})]}),M("label",{className:"flex flex-col",children:[L(x.VALUE),y("input",{className:"w-full",defaultValue:E.value,name:"value",onChange:_=>m(_,p),type:"text"}),y("p",{className:"requirements",children:L(x.ERROR_TEXT_IS_REQUIRED)})]}),p===g.length-1&&M("button",{onClick:l,type:"button",className:"mb-3 text-primary",children:["+ ",L(x.ADD_VARIABLE)]})]},E.id)})})})},aA=(e,t)=>{N.useEffect(()=>{var o;const n=(o=e.current)==null?void 0:o.getRootNode(),r=i=>{var a;const s=i.target;s instanceof Node&&!((a=e.current)!=null&&a.contains(s))&&t(i)};return n&&n.addEventListener("pointerdown",r),()=>{n&&n.removeEventListener("pointerdown",r)}},[e,t])},lA=({key:e,setId:t})=>({id:we(),key:e,setId:t}),uA=e=>e.length>0,cA=({nodeData:e,handleOnUpdate:t})=>{const r={currentFocus:void 0,listOpen:!1,setVariablesList:Array.from(Sr(m=>m.variables).values()).map(m=>({...m,selected:Boolean(e.variables.find(v=>v.setId===m.id))})).sort((m,v)=>m.key.toLowerCase().localeCompare(v.key.toLowerCase())),unsetVariables:e.variables},[o,i]=Rt(r),s=m=>o.setVariablesList.map(v=>v.id===m?{...v,selected:!v.selected}:v),a=m=>{const v=o.setVariablesList[m];if(!v)throw new Error("Variable not found");if(v.selected){const E=o.unsetVariables.findIndex(p=>p.setId===v.id);l(E)}else{const E=[...o.unsetVariables,lA({key:v.key,setId:v.id})];i({unsetVariables:E,setVariablesList:s(v.id)}),t({variables:E},!0)}},l=m=>{const v=o.unsetVariables[m];if(!v)throw new Error("Cannot Remove Variable, not found");const E=o.unsetVariables.filter(p=>p.id!==v.id);i({unsetVariables:E,setVariablesList:s(v.setId)}),t({variables:E},uA(E))},u=N.useRef(null);aA(u,()=>i({listOpen:!1}));const c=m=>{(m.key==="Escape"||m.key==="Esc")&&i({listOpen:!1})},d=(m,v)=>{m.preventDefault(),(m.key===" "||m.code==="Space"||m.key==="Enter")&&a(v),c(m)},f=()=>{i({listOpen:!o.listOpen})},h=o.unsetVariables.length;return M(dt,{info:L(x.INFO_NODE_UNSET_VARIABLES),title:L(x.UNSET_VARIABLES),children:[M("div",{className:"my-1 flex flex-col",children:[y("label",{id:"listbox-label",className:"sr-only",children:L(x.SELECT_VARIABLES_TO_UNSET)}),M("div",{className:"relative",ref:u,children:[y("button",{"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"listbox-label",className:`relative w-full cursor-pointer rounded-md border border-foreground/10 bg-transparent py-1.5 px-3 text-left shadow-sm
|
|
827
67
|
after:absolute after:right-3 after:top-3 after:h-[7px] after:w-[7px] after:rotate-45 after:border-r after:border-b after:border-foreground after:content-['']
|
|
828
|
-
focus:outline-none focus:ring-1 focus:ring-foreground`,onClick:d,onKeyDown:c,type:"button",children:h>0?U(C.NUMBER_OF_VARIABLES_SELECTED,{count:h}):U(C.SELECT_VARIABLES)}),o.listOpen&&V("ul",{"aria-activedescendant":o.currentFocus,"aria-labelledby":"listbox-label","aria-multiselectable":"true",className:"mt-1 max-h-60 w-full overflow-auto rounded-lg border border-foreground/10 bg-backgroundAlt py-1 shadow-xl",role:"listbox",children:[!o.setVariablesList.length&&w("li",{"aria-disabled":"true",className:"relative",role:"option",children:w("label",{className:"flex select-none items-center py-2 pl-3 pr-9",children:U(C.NO_VARIABLES_SET)})}),o.setVariablesList.map((v,y)=>w("li",{"aria-selected":v.selected,className:"relative",id:v.id,role:"option",children:V("label",{className:"flex select-none items-center py-2 pl-3 pr-9",children:[w("input",{checked:v.selected,className:"mr-2 h-4 w-4 rounded accent-primary",onChange:()=>s(y),onKeyDown:E=>f(E,y),type:"checkbox"}),v.key]})},v.id))]})]})]}),h>0&&V("section",{className:"pt-3",children:[w("h3",{className:"mb-2 leading-5 text-foreground",children:U(C.UNSET_VARIABLES)}),w("ul",{className:"flex flex-wrap gap-2",children:o.unsetVariables.map((v,y)=>w(WC,{handleClick:()=>l(y),children:v.key},v.id))})]})]})},WL=({nodeData:e,handleOnUpdate:t})=>{const n={beep:{value:e.beep},format:{value:e.format,valid:!0},stereo:{value:e.beep},terminators:{value:e.terminators,valid:!0}},[r,o]=Tn(n);return w(Bt,{info:U(C.INFO_NODE_RECORD),title:U(C.RECORD),children:w(b1,{handleOnUpdate:t,displayData:r,setDisplayData:o})})},YL=20,GL=({nodeData:e,handleOnUpdate:t})=>{const n={beep:{value:e.beep},controlId:{value:e.controlId},format:{value:e.format,valid:!0},label:{value:e.label,valid:!0},stereo:{value:e.stereo},terminators:{value:e.terminators,valid:!0}},r=b.useRef(),[o,i]=Tn(n),[a,s]=b.useState(!1),l=Wo(d=>d.upsertEntry),u=Wo(d=>d.isValueDuplicate);cu({displayData:o,formRef:r,setCompleted:d=>{t({},d)}});const f=d=>{let h=!0;const v=d.target,{name:y,value:E}=v,p=E.trim(),m=u(p,e.controlId);s(m),h=v.checkValidity()&&Boolean(p)&&!m,i({[y]:{value:E,valid:h}}),t({[y]:h?p:""}),l({controlId:e.controlId,label:h?p:""})};return V(Bt,{info:U(C.INFO_NODE_RECORD_CALL_START),title:U(C.RECORD_CALL_START),formRef:r,children:[V("label",{children:[U(C.RECORDING_NAME),w("input",{className:`w-full ${o.label.valid?"":"invalid"}`,defaultValue:o.label.value,maxLength:YL,name:"label",onChange:f,pattern:Br(gI),required:!0,type:"text"}),w("p",{className:"requirements",role:"alert",children:U(a?C.ERROR_DUPLICATE_RECORDING_LABEL:C.ERROR_RECORDING_LABEL_REQUIRED)})]}),w(b1,{handleOnUpdate:t,displayData:o,setDisplayData:i})]})},KL=({nodeData:e,handleOnChange:t})=>{const r=Wo(o=>o.getEntries)();return w(Bt,{handleOnChange:t,info:U(C.INFO_NODE_RECORD_CALL_STOP),title:U(C.RECORD_CALL_STOP),children:V("label",{children:[w("p",{className:"mb-2 whitespace-nowrap",children:U(C.RECORDING_NAME)}),V($r,{className:"w-full",defaultValue:e.controlId,name:"controlId",required:!0,children:[w("option",{value:"",children:U(C.SELECT)}),r.map(o=>w("option",{value:o.controlId,children:o.label},o.controlId))]})]})})},XL=({nodeData:e,handleOnUpdate:t})=>{const n={body:{value:e.body,valid:!0},fromNumber:{value:e.fromNumber,valid:!0},toNumber:{value:e.toNumber,valid:!0}},[r,o]=Tn(n),i=a=>{const s=a.target,{name:l,value:u}=s,c=typeof u=="string"?u.trim():u;let f=!0;switch(l){case"body":case"fromNumber":case"toNumber":f=s.checkValidity()&&!!c,o({[l]:{value:u,valid:f}}),t({[l]:f?c:""});break;default:throw new Error(`Unhandled input name: ${l}`)}};return V(Bt,{info:U(C.INFO_NODE_SEND_SMS),title:U(C.SEND_SMS),children:[V("label",{className:"mb-1",children:[w("div",{children:U(C.FROM_PHONE_NUMBER)}),w("input",{className:`w-full ${r.fromNumber.valid?"":"invalid"}`,defaultValue:r.fromNumber.value,name:"fromNumber",onChange:i,placeholder:"+1 (204) 000 0000",required:!0,type:"tel"}),w("p",{className:"requirements w-full",role:"alert",children:U(C.ERROR_VALUE_IS_REQUIRED)})]}),V("label",{className:"mb-1",children:[w("div",{children:U(C.TO_PHONE_NUMBER)}),w("input",{className:`w-full ${r.toNumber.valid?"":"invalid"}`,defaultValue:r.toNumber.value,name:"toNumber",onChange:i,placeholder:"+1 (204) 000 0000",required:!0,type:"tel"}),w("p",{className:"requirements w-full",role:"alert",children:U(C.ERROR_VALUE_IS_REQUIRED)})]}),V("label",{children:[w("div",{children:U(C.TEXT)}),w(Ma,{errorText:U(C.ERROR_VALUE_IS_REQUIRED),inputMode:"text",valid:Boolean(r.body.valid),label:U(C.SMS_TEXT),name:"body",onChange:i,placeholder:U(C.WRITE_SOMETHING),required:!0,value:r.body.value})]})]})},QL=["GET","POST","PUT","DELETE"],qL=e=>{console.log("bodyToTextArea",e);try{return typeof e=="string"?e:JSON.stringify(e)}catch{return e}},ZL=({nodeData:e,handleOnUpdate:t})=>{const n={url:{value:e.url,valid:!0},method:{value:e.method,valid:!0},headers:{value:e.headers,valid:!0},body:{value:e.body,valid:!0},saveVariables:{value:Boolean(e.saveVariables),valid:!0}},[r,o]=Tn(n),i=l=>{const u=l.target,{name:c,value:f}=u,d=typeof f=="string"?f.trim():f;let h=!0;switch(c){case"url":case"method":h=u.checkValidity()&&!!d,o({[c]:{value:f,valid:h}}),t({[c]:h?d:""});break;case"headers":if(!f){o({[c]:{value:{},valid:!0}}),t({[c]:{}});return}try{const v=JSON.parse(f);o({[c]:{valid:!0}}),t({[c]:v})}catch{o({[c]:{valid:!1}}),t({[c]:{}})}break;case"body":try{const v=JSON.parse(f);o({[c]:{value:f,valid:!0}}),t({[c]:v})}catch{o({[c]:{value:f,valid:!0}}),t({[c]:f})}break;default:throw new Error(`Unhandled input name: ${c}`)}},a=l=>{const u=l.target.name,c=l.target.value,f={[u]:c};o(f),t(f)},s=l=>{const u=l.target.name,c=!r[u].value;o({[u]:{value:c}}),t({[u]:c})};return V(Bt,{info:U(C.INFO_NODE_REQUEST),title:U(C.REQUEST),children:[V("label",{children:[w("div",{children:U(C.URL)}),w("input",{className:`w-full ${r.url.valid?"":"invalid"}`,defaultValue:r.url.value,name:"url",onChange:i,placeholder:"https://user:password@example.com/api/status",required:!0,type:"text"}),w("p",{className:"requirements w-full",role:"alert",children:U(C.ERROR_VALUE_IS_REQUIRED)})]}),V("label",{className:"mb-3 block",children:[U(C.METHOD),w($r,{className:"w-full",value:r.method.value,name:"method",onChange:a,children:QL.map(l=>w("option",{value:l,children:l},l))})]}),w("div",{className:"mb-4",children:w(g1,{checked:r.saveVariables.value,clickHandler:s,name:"saveVariables",subtitle:U(C.SAVE_VARIABLES_SUBTITLE),title:U(C.SAVE_VARIABLES)})}),V("label",{children:[w("div",{children:U(C.REQUEST_HEADERS)}),w(Ma,{errorText:U(C.ERROR_INVALID_JSON),inputMode:"text",valid:Boolean(r.headers.valid),label:U(C.REQUEST_HEADERS),name:"headers",onChange:i,placeholder:'{"Content-Type": "application/json", "X-Custom-Header": "foo"}',required:!0,value:JSON.stringify(r.headers.value)})]}),V("label",{children:[w("div",{children:U(C.REQUEST_BODY)}),w(Ma,{inputMode:"text",valid:!0,label:U(C.REQUEST_BODY),name:"body",onChange:i,placeholder:"String or JSON to serialize",value:qL(r.body.value)})]})]})},JL=()=>{const e=Re(u=>u.selectedNode),t=Re(u=>u.partialUpdateNodeData),n=e==null?void 0:e.data,r=e==null?void 0:e.id;if(!(e&&n&&r))return null;const o=u=>{const c=new FormData(u.currentTarget),f=Object.fromEntries(c.entries());t(r,{...f,missingRequiredParams:!_1(f)})},i=(u,c)=>{typeof c=="boolean"&&(u.missingRequiredParams=!c),t(r,u)},a={forwardAddress:()=>w($p,{destinationType:"address",nodeData:n,handleOnUpdate:i}),forwardPhone:()=>w($p,{destinationType:"phone",nodeData:n,handleOnUpdate:i}),forwardResource:()=>w($p,{destinationType:"resource",nodeData:n,handleOnUpdate:i}),hangup:()=>w(UL,{nodeData:n,handleOnChange:o}),play:()=>w(VL,{nodeData:n,handleOnUpdate:i}),promptPlay:()=>w(FL,{nodeData:n,handleOnUpdate:i}),set:()=>w($L,{nodeData:n,handleOnUpdate:i}),unset:()=>w(jL,{nodeData:n,handleOnUpdate:i}),record:()=>w(WL,{nodeData:n,handleOnUpdate:i}),recordCallStart:()=>w(GL,{nodeData:n,handleOnUpdate:i}),recordCallStop:()=>w(KL,{nodeData:n,handleOnChange:o}),sendSms:()=>w(XL,{nodeData:n,handleOnUpdate:i}),request:()=>w(ZL,{nodeData:n,handleOnUpdate:i})};if(!(u=>Boolean(u in a))(e.type))return null;const l=a[e.type];return w(ad,{className:"nokey flex max-h-[95%] w-[300px] flex-col overflow-hidden rounded-md border border-foreground/10 bg-background py-4",position:"top-right",children:w(l,{})})};function mS(e){let t;try{t=e()}catch{return}return{getItem:r=>{var o;const i=s=>s===null?null:JSON.parse(s),a=(o=t.getItem(r))!=null?o:null;return a instanceof Promise?a.then(i):i(a)},setItem:(r,o)=>t.setItem(r,JSON.stringify(o)),removeItem:r=>t.removeItem(r)}}const za=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return za(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return za(r)(n)}}}},eP=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:E=>E,version:0,merge:(E,p)=>({...p,...E}),...t},a=!1;const s=new Set,l=new Set;let u;try{u=i.getStorage()}catch{}if(!u)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...E)},r,o);const c=za(i.serialize),f=()=>{const E=i.partialize({...r()});let p;const m=c({state:E,version:i.version}).then(g=>u.setItem(i.name,g)).catch(g=>{p=g});if(p)throw p;return m},d=o.setState;o.setState=(E,p)=>{d(E,p),f()};const h=e((...E)=>{n(...E),f()},r,o);let v;const y=()=>{var E;if(!u)return;a=!1,s.forEach(m=>m(r()));const p=((E=i.onRehydrateStorage)==null?void 0:E.call(i,r()))||void 0;return za(u.getItem.bind(u))(i.name).then(m=>{if(m)return i.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return i.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var g;return v=i.merge(m,(g=r())!=null?g:h),n(v,!0),f()}).then(()=>{p==null||p(v,void 0),a=!0,l.forEach(m=>m(v))}).catch(m=>{p==null||p(void 0,m)})};return o.persist={setOptions:E=>{i={...i,...E},E.getStorage&&(u=E.getStorage())},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:E=>(s.add(E),()=>{s.delete(E)}),onFinishHydration:E=>(l.add(E),()=>{l.delete(E)})},y(),v||h},tP=(e,t)=>(n,r,o)=>{let i={storage:mS(()=>localStorage),partialize:y=>y,version:0,merge:(y,E)=>({...E,...y}),...t},a=!1;const s=new Set,l=new Set;let u=i.storage;if(!u)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...y)},r,o);const c=()=>{const y=i.partialize({...r()});return u.setItem(i.name,{state:y,version:i.version})},f=o.setState;o.setState=(y,E)=>{f(y,E),c()};const d=e((...y)=>{n(...y),c()},r,o);let h;const v=()=>{var y;if(!u)return;a=!1,s.forEach(p=>p(r()));const E=((y=i.onRehydrateStorage)==null?void 0:y.call(i,r()))||void 0;return za(u.getItem.bind(u))(i.name).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var m;return h=i.merge(p,(m=r())!=null?m:d),n(h,!0),c()}).then(()=>{E==null||E(h,void 0),a=!0,l.forEach(p=>p(h))}).catch(p=>{E==null||E(void 0,p)})};return o.persist={setOptions:y=>{i={...i,...y},y.storage&&(u=y.storage)},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},v(),h||d},nP=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_BASE_URL:"",VITE_BASIC_AUTH:"signalwire:1aG93uXk",VITE_DEFAULT_STYLE_HREF:"https://cdn.jsdelivr.net/npm/@signalwire/cfb@dev/dist/style.css",BASE_URL:"/cfb/",MODE:"staging",DEV:!1,PROD:!0,SSR:!1})==null?void 0:n.MODE)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),eP(e,t)):tP(e,t)},gS=window,vS={showAllNodes:!1,showDevOptions:!1},Wr=dl()(nP(e=>({...vS,toggleFlag:t=>{e(n=>({...n,[t]:!n[t]}))}}),{name:"flags",storage:mS(()=>localStorage),version:0}));Wr.subscribe(e=>{console.log("feature flags changed",e)});const rP=e=>{const t=(r,o)=>{Wr.setState(i=>({...i,[r]:o}))},n=r=>{const o=Wr.getState(),i={...r};return Object.entries(o).forEach(([a,s])=>{a in i&&typeof s=="boolean"&&(i[a]=s)}),i};if(gS){const r=new Proxy(n(e),{get:(o,i)=>Reflect.get(o,i),set:(o,i,a)=>{if(typeof a=="boolean"&&i in o)t(i,a);else throw new Error("unknown flag");return Reflect.set(o,i,a)}});gS.swFlags=r}},oP=()=>rP(vS),iP=()=>V("div",{className:"rounded-sm border border-gray-200 p-2",children:[w("h3",{className:"w-full",children:"Feature Flags"}),V("div",{className:"flex flex-col gap-y-2 py-2",children:[w(yS,{flagName:"showAllNodes"}),w(yS,{flagName:"showDevOptions"})]})]}),yS=({flagName:e})=>{const t=Wr(o=>o.toggleFlag),r=Wr(o=>o[e])?"translate-x-5 bg-positive":"translate-x-0 bg-negative";return V("label",{className:"flex cursor-pointer items-center",children:[V("div",{className:"relative",children:[w("input",{type:"checkbox",className:"sr-only",onChange:()=>t(e)}),w("div",{className:"h-5 w-10 rounded-full bg-foreground/70",children:w("div",{className:`absolute left-1 top-1 h-3 w-3 rounded-full transition ${r}`})})]}),w("p",{className:"ml-3 text-sm font-medium",children:e})]})},ES={answer:{label:C.ANSWER_CALL,active:!0},forwardAddress:{label:C.FORWARD_TO_ADDRESS,active:!1},forwardPhone:{label:C.FORWARD_TO_PHONE,active:!0},forwardResource:{label:C.FORWARD_TO_RESOURCE,active:!1},promptPlay:{label:C.GATHER_INPUT,active:!0},hangup:{label:C.HANG_UP_CALL,active:!0},handleCall:{label:C.HANDLE_CALL,active:!1},play:{label:C.PLAY_AUDIO_TTS,active:!0},set:{label:C.SET_VARIABLES,active:!0},unset:{label:C.UNSET_VARIABLES,active:!0},record:{label:C.RECORD,active:!0},recordCallStart:{label:C.RECORD_CALL_START,active:!0},recordCallStop:{label:C.RECORD_CALL_STOP,active:!0},sendSms:{label:C.SEND_SMS,active:!0},request:{label:C.REQUEST,active:!0}},SS=Object.entries(ES).map(([e,t])=>({type:e,label:t.label})),aP=SS.filter(e=>{var t;return(t=ES[e.type])==null?void 0:t.active}),{apiVersion:sP,builderVersion:lP,cfbAppVersion:uP,relayMLVersion:cP}=kd(),fP={[C.API_VERSION]:sP,[C.APP_VERSION]:uP,[C.BUILDER_VERSION]:lP,[C.RELAYML_VERSION]:cP},dP=()=>{const e=()=>{var r;((r=n.current)==null?void 0:r.open)===!1&&n.current.showModal()},t=()=>{var r;(r=n.current)!=null&&r.open&&n.current.close()},n=Ke.useRef(null);return V("section",{className:"ml-4 mt-4",children:[w("menu",{children:w("button",{className:"text-xs text-foreground hover:underline",onClick:e,children:U(C.ABOUT)})}),w("dialog",{ref:n,className:"aspect-[5/4] w-72 max-w-xs overflow-hidden rounded-lg border border-foreground/10 bg-background text-foreground shadow-xl backdrop:backdrop-blur-sm backdrop:backdrop-brightness-95",children:V("div",{className:"h-full px-2 pb-10",children:[V("div",{className:"flex items-center justify-between",children:[w("h2",{className:"text-2xl leading-10",children:U(C.ABOUT)}),V("button",{className:"my-0.5 -mr-1.5 rounded-md py-0.5 px-1.5 ",onClick:t,children:[w("span",{className:"sr-only",children:U(C.CLOSE)}),w(nn,{tag:"xmark",size:"lg"})]})]}),V("div",{className:"h-full overflow-y-auto",children:[w("ul",{className:"mt-1 flex flex-col items-center justify-center text-sm",children:Object.entries(fP).map(([r,o])=>w("li",{className:"text-foreground/70",children:V("p",{children:[U(r),": ",o]})},r))}),w("div",{className:"mt-6 flex items-center justify-center ",children:w("button",{className:"rounded border border-foreground/10 bg-positive py-1.5 px-2.5 text-sm font-medium tracking-wider text-background ",onClick:t,children:U(C.CLOSE)})})]})]})})]})},pP=()=>{const e=Re(t=>t.backButtonHref);return e?V("a",{href:e,children:[w("span",{className:"sr-only",children:U(C.NAVIGATE_BACK)}),w(nn,{tag:"arrow-left",className:"text-negative",size:"lg"})]}):null},hP=()=>{const e=Wr(c=>c.showAllNodes),t=Wr(c=>c.showDevOptions),r=(e?SS:aP).map(c=>({...c,title:U(c.label)})).sort((c,f)=>c.title<f.title?-1:1),o=Re(c=>c.addNode),i=Re(c=>c.flowTitle),a=Re(c=>c.exportStoreData),s=b.useRef(null),l=c=>{c.preventDefault(),s.current&&s.current.showModal()},u=(c,f)=>{c.preventDefault(),o(f)};return V(Xe,{children:[V("section",{className:"flex h-full w-1/6 shrink-0 flex-col bg-background py-4 text-foreground",children:[V("nav",{className:"mx-4 flex items-center justify-between",children:[w(pP,{}),t&&w("button",{className:"rounded bg-positive p-1 px-2 text-xs text-white",onClick:l,children:"Dev Options"})]}),w("h1",{className:"m-4 block text-lg font-semibold leading-tight line-clamp-2",children:i}),w("menu",{className:"flex-1 overflow-y-auto px-4",children:r.map(c=>w("li",{children:w("button",{className:"mb-2 block w-full rounded-lg border border-foreground/10 p-3 text-center text-sm hover:shadow-md",onClick:f=>u(f,c.type),children:c.title})},c.type))}),w(dP,{})]}),t&&w("dialog",{className:"z-50 my-10 rounded-lg border border-foreground/10 bg-background text-foreground",ref:s,children:w("form",{children:V("fieldset",{children:[V("legend",{className:"flex w-full items-start justify-between pb-2",children:[w("h1",{className:"text-2xl leading-10",children:"Dev Options"}),V("button",{className:"p-1 pt-0 font-semibold",formMethod:"dialog",children:[w("span",{className:"sr-only",children:"Close"}),w(nn,{tag:"xmark",size:"lg"})]})]}),V("div",{className:"mb-1 rounded-sm border border-gray-200 p-2",children:[w("h3",{className:"w-full",children:"Flow Data"}),w("div",{className:"flex flex-row gap-x-2 py-2",children:w("div",{className:"flex items-center",children:w("button",{type:"button",className:"rounded border bg-background px-2 py-1 text-sm hover:scale-105 hover:bg-background/80 active:scale-95",onClick:a,children:"View JSON File"})})})]}),w(iP,{})]})})})]})},_3="";function mP(){Oo().warn("Hello World!");const e=Re(t=>t.colorMode)??"";return V("div",{className:`${e} flex h-full w-full bg-backgroundAlt text-foreground`,children:[w(hP,{}),V(hI,{children:[w(h2,{}),w(JL,{})]})]})}const gP=`@font-face{font-family:SWInter;font-style:normal;font-weight:400;font-display:swap;src:url(//cdn.signalwire.com/fonts/inter/Inter-Regular.woff2) format("woff2"),url(//cdn.signalwire.com/fonts/inter/Inter-Regular.woff) format("woff")}
|
|
829
|
-
`,
|
|
68
|
+
focus:outline-none focus:ring-1 focus:ring-foreground`,onClick:f,onKeyDown:c,type:"button",children:h>0?L(x.NUMBER_OF_VARIABLES_SELECTED,{count:h}):L(x.SELECT_VARIABLES)}),o.listOpen&&M("ul",{"aria-activedescendant":o.currentFocus,"aria-labelledby":"listbox-label","aria-multiselectable":"true",className:"mt-1 max-h-60 w-full overflow-auto rounded-lg border border-foreground/10 bg-backgroundAlt py-1 shadow-xl",role:"listbox",children:[!o.setVariablesList.length&&y("li",{"aria-disabled":"true",className:"relative",role:"option",children:y("label",{className:"flex select-none items-center py-2 pl-3 pr-9",children:L(x.NO_VARIABLES_SET)})}),o.setVariablesList.map((m,v)=>y("li",{"aria-selected":m.selected,className:"relative",id:m.id,role:"option",children:M("label",{className:"flex select-none items-center py-2 pl-3 pr-9",children:[y("input",{checked:m.selected,className:"mr-2 h-4 w-4 rounded accent-primary",onChange:()=>a(v),onKeyDown:E=>d(E,v),type:"checkbox"}),m.key]})},m.id))]})]})]}),h>0&&M("section",{className:"pt-3",children:[y("h3",{className:"mb-2 leading-5 text-foreground",children:L(x.UNSET_VARIABLES)}),y("ul",{className:"flex flex-wrap gap-2",children:o.unsetVariables.map((m,v)=>y(PC,{handleClick:()=>l(v),children:m.key},m.id))})]})]})},dA=(e,t)=>{if("options"in t)switch(e.type){case"promptPlay":case"cond":return!0}return!1},fA=()=>{const e=q(c=>c.selectedNode),t=q(c=>c.partialUpdateNodeData),n=e==null?void 0:e.data,r=e==null?void 0:e.id,{updateDynamicHandles:o}=UI(e);if(!(e&&n&&r))return null;const i=c=>{const d=new FormData(c.currentTarget),f=Object.fromEntries(d.entries());t(r,{...f,missingRequiredParams:!U0(f)})},s=(c,d)=>{typeof d=="boolean"&&(c.missingRequiredParams=!d),dA(e,c)&&o(c),t(r,c)},a={cond:()=>y(GI,{nodeData:n,handleOnUpdate:s}),condRequest:()=>y(jI,{nodeData:n,handleOnUpdate:s}),forwardAddress:()=>y(af,{destinationType:"address",nodeData:n,handleOnUpdate:s}),forwardPhone:()=>y(af,{destinationType:"phone",nodeData:n,handleOnUpdate:s}),forwardResource:()=>y(af,{destinationType:"resource",nodeData:n,handleOnUpdate:s}),hangup:()=>y(qI,{nodeData:n,handleOnChange:i}),play:()=>y(ZI,{nodeData:n,handleOnUpdate:s}),promptPlay:()=>y(XI,{nodeData:n,handleOnUpdate:s}),set:()=>y(sA,{nodeData:n,handleOnUpdate:s}),unset:()=>y(cA,{nodeData:n,handleOnUpdate:s}),record:()=>y(tA,{nodeData:n,handleOnUpdate:s}),recordCallStart:()=>y(JI,{nodeData:n,handleOnUpdate:s}),recordCallStop:()=>y(eA,{nodeData:n,handleOnChange:i}),sendSms:()=>y(iA,{nodeData:n,handleOnUpdate:s}),request:()=>y(oA,{nodeData:n,handleOnUpdate:s})};if(!(c=>Boolean(c in a))(e.type))return null;const u=a[e.type];return y(nd,{className:"nokey flex max-h-[95%] w-[300px] flex-col overflow-hidden rounded-md border border-foreground/10 bg-background py-4",position:"top-right",children:y(u,{})})},pA=({asDialog:e=!1,open:t=!1}={})=>{const[n,r]=pt.useState(t);N.useEffect(()=>{r(t)},[t]);const o=N.useCallback(()=>r(!1),[]),i=N.useCallback(()=>r(!0),[]);return{asDialog:e,isOpen:n,closeContainer:o,openContainer:i}},G0=N.createContext(null),uf=()=>{const e=N.useContext(G0);if(e==null)throw new Error("Toast components must be wrapped in <ToastContainer />");return e},hA=({children:e,...t})=>{const n=pA(t);return y(G0.Provider,{value:n,children:e})},gA=({title:e,children:t})=>{const{asDialog:n}=uf();return M("div",{className:"max-w-xl rounded-lg bg-foreground p-4 text-background shadow-2xl transition-[transform,box-shadow] duration-500 will-change-transform hover:shadow-none",role:n?"dialog":"alert",children:[M("h2",{className:"text-lg font-semibold leading-6 tracking-wide",children:[y("span",{className:"mr-2",children:y(Fe,{tag:"circle-exclamation"})}),e]}),y("div",{className:"mt-2 text-sm leading-5",children:t})]})},mA=({children:e})=>{const{asDialog:t,closeContainer:n,isOpen:r}=uf(),o=N.useRef(null);return N.useEffect(()=>{if(!o.current)return;let i,s;const a=l=>{var u,c;if(l.key==="Escape"&&n(),l.key==="Tab"){const d=(c=(u=document.activeElement)==null?void 0:u.shadowRoot)==null?void 0:c.activeElement;l.shiftKey?d===i&&(s==null||s.focus(),l.preventDefault()):d===s&&(i==null||i.focus(),l.preventDefault())}};if(t){const l=o.current.querySelectorAll("button");i=l[0],s=l[l.length-1],s==null||s.focus(),document.addEventListener("keydown",a)}return()=>{document.removeEventListener("keydown",a)}},[t,n]),r?y("section",{className:`flex w-full justify-center px-6 ${t?"fixed top-0 z-50 h-full items-start py-36 backdrop-blur-sm backdrop-grayscale":"absolute top-10 z-10 translate-y-1/2 items-center"}`,ref:t?o:void 0,children:e}):null},vA=({asDialog:e=!1,open:t,children:n})=>y(hA,{asDialog:e,open:t,children:y(mA,{children:n})}),yA=()=>{const t=q(n=>n.httpError)==="document-sync";return t?y(vA,{asDialog:!0,open:t,children:y(gA,{title:L(x.DOCUMENT_OUT_OF_SYNC),children:y(EA,{})})}):null},EA=()=>{const{closeContainer:e}=uf(),t=()=>{window.location.reload()};return M(Ee,{children:[y("p",{children:L(x.TOAST_DOCUMENT_OUT_OF_SYNC)}),M("div",{className:"mt-11 flex items-center justify-center gap-x-6",children:[y("button",{className:"rounded-md border border-background bg-foreground px-3.5 py-2.5 font-bold tracking-widest text-background",onClick:e,children:L(x.IGNORE)}),y("button",{className:"rounded-md border border-background bg-positive/70 px-3.5 py-2.5 font-bold tracking-widest text-background",onClick:t,children:L(x.RESYNC)})]})]})},{apiVersion:SA,builderVersion:_A,cfbAppVersion:wA,relayMLVersion:RA}=bd(),NA={[x.API_VERSION]:SA,[x.APP_VERSION]:wA,[x.BUILDER_VERSION]:_A,[x.RELAYML_VERSION]:RA},OA=()=>{const e=()=>{var r;((r=n.current)==null?void 0:r.open)===!1&&n.current.showModal()},t=()=>{var r;(r=n.current)!=null&&r.open&&n.current.close()},n=pt.useRef(null);return M("section",{className:"ml-4 mt-4",children:[y("menu",{children:y("button",{className:"text-xs text-foreground hover:underline",onClick:e,children:L(x.ABOUT)})}),y("dialog",{ref:n,className:"aspect-[5/4] w-72 max-w-xs overflow-hidden rounded-lg border border-foreground/10 bg-background text-foreground shadow-xl backdrop:backdrop-blur-sm backdrop:backdrop-brightness-95",children:M("div",{className:"h-full px-2 pb-10",children:[M("div",{className:"flex items-center justify-between",children:[y("h2",{className:"text-2xl leading-10",children:L(x.ABOUT)}),M("button",{className:"my-0.5 -mr-1.5 rounded-md py-0.5 px-1.5 ",onClick:t,children:[y("span",{className:"sr-only",children:L(x.CLOSE)}),y(Fe,{tag:"xmark",size:"lg"})]})]}),M("div",{className:"h-full overflow-y-auto",children:[y("ul",{className:"mt-1 flex flex-col items-center justify-center text-sm",children:Object.entries(NA).map(([r,o])=>y("li",{className:"text-foreground/70",children:M("p",{children:[L(r),": ",o]})},r))}),y("div",{className:"mt-6 flex items-center justify-center ",children:y("button",{className:"rounded-md border border-foreground/10 bg-positive px-3.5 py-2.5 font-bold tracking-widest text-background",onClick:t,children:L(x.CLOSE)})})]})]})})]})},xA=()=>{const e=q(t=>t.backButtonHref);return e?M("a",{href:e,children:[y("span",{className:"sr-only",children:L(x.NAVIGATE_BACK)}),y(Fe,{tag:"arrow-left",className:"text-negative",size:"lg"})]}):null},TA=()=>M("div",{className:"rounded-sm border border-gray-200 p-2",children:[y("h3",{className:"w-full",children:"Feature Flags"}),M("div",{className:"flex flex-col gap-y-2 py-2",children:[y(cf,{flagName:"showAllNodes"}),y(cf,{flagName:"showDevOptions"}),y(cf,{flagName:"showDeployButton"})]})]}),cf=({flagName:e})=>{const t=Zn(o=>o.toggleFlag),r=Zn(o=>o[e])?"translate-x-5 bg-positive":"translate-x-0 bg-negative";return M("label",{className:"flex cursor-pointer items-center",children:[M("div",{className:"relative",children:[y("input",{type:"checkbox",className:"sr-only",onChange:()=>t(e)}),y("div",{className:"h-5 w-10 rounded-full bg-foreground/70",children:y("div",{className:`absolute left-1 top-1 h-3 w-3 rounded-full transition ${r}`})})]}),y("p",{className:"ml-3 text-sm font-medium",children:e})]})},W0={action:{label:x.ACTION,nodes:{answer:{active:!0,label:x.ANSWER_CALL},hangup:{active:!0,label:x.HANG_UP_CALL},sendSms:{active:!0,label:x.SEND_SMS},play:{active:!0,label:x.PLAY_AUDIO_TTS}}},decision:{label:x.DECISION,nodes:{cond:{active:!0,label:x.CONDITIONS},set:{active:!0,label:x.SET_VARIABLES},unset:{active:!0,label:x.UNSET_VARIABLES}}},forwardTo:{label:x.FORWARD,nodes:{forwardAddress:{active:!1,label:x.FORWARD_TO_ADDRESS},forwardPhone:{active:!0,label:x.FORWARD_TO_PHONE},forwardResource:{active:!1,label:x.FORWARD_TO_RESOURCE}}},input:{label:x.INPUT,nodes:{promptPlay:{active:!0,label:x.GATHER_INPUT},request:{active:!0,deprecated:!0,label:x.REQUEST},condRequest:{active:!0,label:x.REQUEST}}},recording:{label:x.RECORD,nodes:{record:{active:!0,label:x.VOICEMAIL_RECORDING},recordCallStart:{active:!0,label:x.RECORD_CALL_START},recordCallStop:{active:!0,label:x.RECORD_CALL_STOP}}}},CA=(e,t)=>({label:L(W0[e].label),nodes:Object.entries(W0[e].nodes).map(([n,r])=>(r.active||t)&&{deprecated:Boolean(r.deprecated),title:L(r.label),type:n}).filter(Boolean).sort((n,r)=>n.title.localeCompare(r.title))}),bA=["action","forwardTo","recording","input","decision"],IA=()=>{const e=Zn(u=>u.showAllNodes),t=Zn(u=>u.showDevOptions),n=q(u=>u.addNode),r=q(u=>u.flowTitle),o=q(u=>u.exportStoreData),i=N.useRef(null),s=u=>{u.preventDefault(),i.current&&i.current.showModal()},a=N.useCallback(u=>{u.preventDefault();const{nodeType:c}=u.currentTarget.dataset;c&&n({nodeType:c})},[n]),l=N.useCallback(u=>{const{nodeType:c}=u.currentTarget.dataset;c&&(u.dataTransfer.setData(ey,c),u.dataTransfer.effectAllowed="move")},[]);return M(Ee,{children:[M("section",{className:"hidden h-full w-1/6 min-w-[160px] shrink-0 flex-col bg-background py-4 text-foreground sm:flex",children:[M("nav",{className:"mx-4 flex shrink-0 items-center justify-between",children:[y(xA,{}),t&&y("button",{className:"rounded bg-positive p-1 px-2 text-xs text-white",onClick:s,children:"Dev Options"})]}),y("h1",{className:"m-4 block shrink-0 text-lg font-semibold leading-tight line-clamp-2",children:r}),y("ul",{className:"overflow-y-auto",id:"sidebar-node-list",children:bA.map(u=>y("li",{children:y(AA,{group:u,handleOnClick:a,handleDragStart:l,showAllNodes:e})},u))}),y(OA,{})]}),t&&y("dialog",{className:"z-50 my-10 rounded-lg border border-foreground/10 bg-background text-foreground",ref:i,children:y("form",{children:M("fieldset",{children:[M("legend",{className:"flex w-full justify-between pb-2",children:[y("h1",{className:"text-2xl leading-10",children:"Dev Options"}),M("button",{className:"p-1 pt-0 font-semibold",formMethod:"dialog",children:[y("span",{className:"sr-only",children:"Close"}),y(Fe,{tag:"xmark",size:"lg"})]})]}),M("div",{className:"mb-1 rounded-sm border border-gray-200 p-2",children:[y("h3",{className:"w-full",children:"Flow Data"}),y("div",{className:"flex flex-row gap-x-2 py-2",children:y("div",{className:"flex items-center",children:y("button",{type:"button",className:"rounded border bg-background px-2 py-1 text-sm hover:scale-105 hover:bg-background/80 active:scale-95",onClick:o,children:"View JSON File"})})})]}),y(TA,{})]})})})]})},AA=({group:e,handleOnClick:t,handleDragStart:n,showAllNodes:r})=>{const o=CA(e,r),i=`ngm-heading-${nT(o.label)}`;return M(Ee,{children:[y("h2",{className:"px-4 pb-2 text-sm uppercase text-foreground/50",id:i,children:o.label}),y("ul",{"aria-labelledby":i,className:"flex-1 px-4 pb-2",children:o.nodes.map(s=>y("li",{children:M("button",{className:"mb-2 block w-full rounded-lg border border-foreground/10 p-3 text-center text-sm line-clamp-1 hover:shadow-md",onClick:t,onDragStart:n,"data-node-type":s.type,draggable:!0,children:[s.title,s.deprecated&&M("p",{className:"inline-block text-xs text-foreground/70",children:[" ",L(x.DEPRECATED)]})]})},s.type))})]})},LA=()=>{const e=N.useRef(null),[t,n]=N.useState(),[r,o]=N.useState(null);return N.useLayoutEffect(()=>(e.current=new ResizeObserver(([i])=>n(i)),r&&e.current.observe(r),()=>{var i;return(i=e.current)==null?void 0:i.disconnect()}),[r]),{setTarget:o,observerEntry:t}},DA=e=>{q.setState({flowInteractive:e})},kA=({rootAppHeight:e,rootAppWidth:t})=>{q.setState({rootAppHeight:e,rootAppWidth:t})},PA=()=>{const{observerEntry:e,setTarget:t}=LA(),n=q(o=>o.initializing),r=q(o=>o.rootAppWidth);return N.useEffect(()=>{!n&&r&&DA(r>=ty)},[n,r]),N.useEffect(()=>{e&&(qe().log("resized",{rootAppHeight:e.contentRect.height,rootAppWidth:e.contentRect.width}),kA({rootAppHeight:e.contentRect.height,rootAppWidth:e.contentRect.width}))},[e]),{rootTarget:t}},Ok="";function MA(){qe().warn("Hello World!");const{rootTarget:e}=PA(),t=q(o=>o.colorMode)??"",n=q(o=>o.httpError),r=n!==void 0&&n!=="document-sync";return y(Ee,{children:y("div",{className:`${t} flex h-full w-full bg-backgroundAlt text-foreground`,ref:e,children:r?y(SC,{errorType:n}):M(Ee,{children:[y(IA,{}),y(yA,{}),M(vI,{children:[y(kI,{}),y(fA,{})]})]})})})}const UA=`@font-face{font-family:SWInter;font-style:normal;font-weight:400;font-display:swap;src:url(//cdn.signalwire.com/fonts/inter/Inter-Regular.woff2) format("woff2"),url(//cdn.signalwire.com/fonts/inter/Inter-Regular.woff) format("woff")}
|
|
69
|
+
`,FA=e=>{if(!e||!e.getFlowURL||!e.updateFlowURL)throw new TypeError("Invalid or missing required params")};function VA(e){FA(e);const{backButtonHref:t,rootElementId:n="sw-cfb-root",styleHref:r="https://cdn.signalwire.com/npm/@signalwire/cfb@latest/dist/style.css",getFlowURL:o,updateFlowURL:i,deployFlowURL:s=i}=e;q.setState({backButtonHref:t,deployFlowURL:s,getFlowURL:o,rootElementId:n,updateFlowURL:i}),iC(),OI();const a=document.getElementById(n);if(!a)throw new Error(`Id: '${n}' not found in the DOM`);a.attachShadow({mode:"open"}),a.shadowRoot&&Nl.createRoot(a.shadowRoot).render(M(N.StrictMode,{children:[y("link",{type:"text/css",rel:"stylesheet",href:r}),y(MA,{})]}));const l=document.createElement("style");document.head.appendChild(l),l.appendChild(document.createTextNode(UA))}Pr.main=VA,Object.defineProperty(Pr,Symbol.toStringTag,{value:"Module"})});
|